-
Notifications
You must be signed in to change notification settings - Fork 67
Description
This is related to ParmEd/ParmEd#209.
I would like to expand the mask parser to be able to select molecules, chain IDs, etc.
Current proposals from @swails
A couple ideas:
Do what Chimera does (see https://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/frameatom_spec.html)
Use :: for chain IDs (in the same way that @% indicates atom type names)
An example of 1:
# Select residues 1-10 in chain A
:1-10.A
# Select residues 1-10 in chains A, B, and C
:1-10.A-C # I *think*; not sure if you can use - for string range, maybe .A,B,C
# etc...
An example of 2:
# Select chain A
::A
# Select residues 1-10 of chains A, B, and C
::A,B,C:1-10
# Select protein backbone atoms of residues 2-20 in chains A and B
::A,B:2-20@CA,C,O,N
Another idea for flexibility is to say that chains are strings, and use the same "chain" syntax to denote molecules when the chain is given a numerical value.
My Thoughts
I do like 2) for chain IDs - I think we could potentially get into trouble with the .
syntax. I don't know why but for some reason I feel I've come across atom names with .
in them, although nothing is coming to mind now.
For molecule selection, personally I like the idea of having a separate character that can represent molecules, the way there is currently @
for atoms and :
for residues. Based on what is currently used in the mask parser, I think that the most likely candidates for "molecule" are ;
and %
. Both have drawbacks: ;
looks enough like :
that things could easily get confused (and it's on the same key), while %
is already used in a subset of @
to denote "type", so it would have different meanings in different contexts.
Whatever is decided, it should be consistent between ParmEd, Cpptraj, and the rest of Amber.