<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr">Hi Joe,</div><div dir="ltr"><br></div><div dir="ltr"> You need to use</div><div dir="ltr"><br></div><div dir="ltr"> import SplitMolecule</div><div dir="ltr"><br></div><div dir="ltr">It is not a submodule of the chimera module. I am not sure why we made all the Chimera tools be top level modules instead of under the chimera module.</div><div dir="ltr"><br></div><div dir="ltr"> Are you splitting to make each chain a separate model? If so then checking if a molecule needs splitting is the same as checking if it has one chain.</div><div dir="ltr"><br></div><div dir="ltr"> Tom</div><div dir="ltr"><br><blockquote type="cite">On Feb 14, 2020, at 8:14 AM, Healey, Joseph <J.Healey.1@warwick.ac.uk> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"CMU Serif Roman";
panose-1:2 0 6 3 0 0 0 0 0 0;}
@font-face
{font-family:"CMU Sans Serif Medium";
panose-1:2 0 6 3 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style>
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">Hi Chimera Team,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I’m trying to reduce some overheads in one of my scripts part of which is coming from my use of `runCommand`. At the moment, I’m only using it for `split`, but I’d like to first test whether a model is already
split to avoid unnecessary invocation.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I’m aware the python equivalent of the command is buried inside chimera.SplitMolecule and the command split_command, however it doesn’t seem to be importable, as when I try:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">>>> from chimera import SplitMolecule<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Traceback (most recent call last):<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> File "<pyshell#25>", line 2, in <module><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">ImportError: cannot import name SplitMolecule<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I’m getting the above ImportError. I can import other members of the chimera class (e.g. chimera.openModels or chimera.Molecule and chimera itself without issue). I’ve seen in the source code that SplitMolecule
gets imported elsewhere, and it has the __init__ file, so I assume I’m just doing something stupid with paths or similar. That said, SplitMolecule is clearly within the main chimera modules directory, so I would have expected it to only be one ‘layer’ below
`chimera` itself. Can you elighten me?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I’m currently on chimera production version 1.14 (build 42094) 2019-11-13 06:05:13 UTC if that helps.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">If you could point me in the right direction to understand how the code will check for multiple chains and decide to split by chain, that would also be a massive help.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Many thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Joe<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"CMU Serif Roman";color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:white"><u><span style="font-size:10.0pt;font-family:"CMU Serif Roman";color:black;mso-fareast-language:EN-GB">
<o:p></o:p></span></u></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"CMU Sans Serif Medium";color:#941100;mso-fareast-language:EN-GB">Dr. Joseph Healey Ph.D. M.Sc. B.Sc. (Hons) MRSB</span><span style="font-family:"CMU Sans Serif Medium";color:#941100;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"CMU Sans Serif Medium";color:black;mso-fareast-language:EN-GB">Research Fellow<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"CMU Sans Serif Medium";color:black;mso-fareast-language:EN-GB">Warwick Medical School</span><span style="font-family:"CMU Sans Serif Medium";color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"CMU Sans Serif Medium";color:black;mso-fareast-language:EN-GB">University of Warwick</span><span style="font-family:"CMU Sans Serif Medium";color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"CMU Sans Serif Medium";color:black;mso-fareast-language:EN-GB">Coventry</span><span style="font-family:"CMU Sans Serif Medium";color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"CMU Sans Serif Medium";color:black;mso-fareast-language:EN-GB">CV47AL<br>
Mob: +44 (0) 7536 042620 | Twitter: <a href="https://twitter.com/JRJHealey"><span style="color:#0563C1">@JRJHealey</span></a> | </span><span style="font-family:"CMU Sans Serif Medium";color:black;mso-fareast-language:EN-GB"><a href="http://www2.warwick.ac.uk/fac/sci/moac/people/students/2013/joseph_healey"><span style="font-size:10.0pt;color:#0563C1">Website</span></a><o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"CMU Sans Serif Medium";color:black;mso-fareast-language:EN-GB">Email:
<a href="mailto:J.Healey.1@warwick.ac.uk"><span style="color:#0563C1">J.Healey.1@warwick.ac.uk</span></a> | ORCID: orcid.org/0000-0002-9569-6738</span><span style="font-family:"CMU Sans Serif Medium";color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<span>_______________________________________________</span><br><span>Chimera-users mailing list: Chimera-users@cgl.ucsf.edu</span><br><span>Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users</span><br></div></blockquote></body></html>