[chimerax-users] Building ChimeraX Bundle

Anthony James Schaefer tony.schaefer at uga.edu
Tue Feb 1 11:10:04 PST 2022


Katie,


  1.  I don't know
  2.  Yes, I've done this in my SEQCROW bundle. It'll probably depend on how you can organize the code. You can see my code here (sorry it doesn't have many annotations): https://github.com/QChASM/SEQCROW/blob/5a5d00f2d6368a68dca8abcb7e816b7ac1202d0b/src/selectors.py#L21.

Basically, calling register_selector from chimerax.core.commands will add a new selector. I pass a lambda function with different default values for a keyword argument to register_selector. The behavior of the function in the lambda changes based on the value of this keyword argument. I do this to register the selectors for substituents, atoms with a particular VSEPR shape, and a few other identifiers.
  3.  Open-source bundles have a green keyhole symbol at the top of their bundle page. Clicking that should take you to the code repository on GitHub or wherever.

The install folder depends on your operating system. On Windows, it's in %userprofile%\AppData\Local\UCSF\ChimeraX\(version)\site-packages

Best,

Tony

  1.
  2.

________________________________
From: ChimeraX-users <chimerax-users-bounces at cgl.ucsf.edu> on behalf of Zeng, Katie via ChimeraX-users <chimerax-users at cgl.ucsf.edu>
Sent: Tuesday, February 1, 2022 1:21 PM
To: ChimeraX Users Help <chimerax-users at cgl.ucsf.edu>
Subject: [chimerax-users] Building ChimeraX Bundle

[EXTERNAL SENDER - PROCEED CAUTIOUSLY]

Dear ChimeraX Users,

I'm currently working on a bundle for building lipid membranes and I have a few questions:


  1.  A part of my bundle is a lipid selector that works with AMBER-compatible pdb files. I followed the tutorial and have successfully built a selector that selects all lipids of the type I specify (say, I put in the command line 'sel POPC' then all the POPCs in the membrane get highlighted). Because of the way AMBER lipid forcefields work, individual lipids are separated into three residues, one head and two tails. I'm trying to add a function to my bundle such that individual lipids can be selected - e.g. when I select a headgroup and go [up]+[up], then the entire lipid can be selected. How can I group three residues together in a bundle?
  2.  Is it possible to register multiple selectors through a single function? There are many lipids that I want to include in the selector, but for now I have to copy the same function over and over if I want to do that. It will be great if I could have a list containing all the names of the lipids and have a function that registers all of them.
  3.  Are there any built bundles that are open source? I tried to access the source code of bundles after installing them but I couldn't find the directory of which they are stored. It will be really helpful if I could refer to them.

Thank you so much for your help!

Best Regards,
Katie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimerax-users/attachments/20220201/8cefe223/attachment.html>


More information about the ChimeraX-users mailing list