[chimerax-users] Find Residues From Specified Residue Numbers Help
Tom Goddard
goddard at sonic.net
Fri Aug 5 16:47:53 PDT 2022
Hi Jonathan,
I added some Python code to that example
https://rbvi.github.io/chimerax-recipes/residues/residues.html <https://rbvi.github.io/chimerax-recipes/residues/residues.html>
to get the currently open atomic structures
from chimerax.atomic import all_structures
structures = all_structures(session)
Another way to get the structures is
from chimerax.atomic import Structure
structures = session.models.list(type = Structure)
More info about the Python functions in ChimeraX is in the programmer's manual
https://www.rbvi.ucsf.edu/chimerax/docs/devel/index.html <https://www.rbvi.ucsf.edu/chimerax/docs/devel/index.html>
for instance the all_structures() function is under the atomic module. But that has hundreds of functions so it can certainly be hard to find
https://www.rbvi.ucsf.edu/chimerax/docs/devel/bundles/atomic/src/atomic.html <https://www.rbvi.ucsf.edu/chimerax/docs/devel/bundles/atomic/src/atomic.html>
Tom
> On Aug 5, 2022, at 4:15 PM, Myers, Jonathan via ChimeraX-users <chimerax-users at cgl.ucsf.edu> wrote:
>
> Dear ChimeraX Users,
>
> I'm learning how to use the Python API and I found the set of ChimeraX recipes and am trying to use the code featured on the "Find Residues From Specified Residue Numbers" page. I've run into the following issue: NameError: name 'structure' is not defined.
>
> I'm not sure what I should be using as an input for the "structure.residues" argument so I have not changed that input. What "structure" should I be specifying? Any help would be greatly appreciated.
>
> Shosholoza,
> Jonathan Myers
>
>
> _______________________________________________
> ChimeraX-users mailing list
> ChimeraX-users at cgl.ucsf.edu <mailto:ChimeraX-users at cgl.ucsf.edu>
> Manage subscription:
> https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users <https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.rbvi.ucsf.edu/pipermail/chimerax-users/attachments/20220805/2f30ae17/attachment.html>
More information about the ChimeraX-users
mailing list