[Chimera-users] SplitCommand python
Tom Goddard
goddard at sonic.net
Fri Feb 14 09:30:14 PST 2020
Hi Joe,
You need to use
import SplitMolecule
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.
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.
Tom
> On Feb 14, 2020, at 8:14 AM, Healey, Joseph <J.Healey.1 at warwick.ac.uk> wrote:
>
>
> Hi Chimera Team,
>
> 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.
>
> 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:
>
> >>> from chimera import SplitMolecule
> Traceback (most recent call last):
> File "<pyshell#25>", line 2, in <module>
> ImportError: cannot import name SplitMolecule
>
> 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?
>
> I’m currently on chimera production version 1.14 (build 42094) 2019-11-13 06:05:13 UTC if that helps.
>
> 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.
>
> Many thanks,
>
> Joe
>
>
> Dr. Joseph Healey Ph.D. M.Sc. B.Sc. (Hons) MRSB
> Research Fellow
> Warwick Medical School
> University of Warwick
> Coventry
> CV47AL
> Mob: +44 (0) 7536 042620 | Twitter: @JRJHealey | Website
> Email: J.Healey.1 at warwick.ac.uk | ORCID: orcid.org/0000-0002-9569-6738
>
> _______________________________________________
> Chimera-users mailing list: Chimera-users at cgl.ucsf.edu
> Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20200214/f01e2609/attachment-0001.html>
More information about the Chimera-users
mailing list