How to select multiple residues by auth_sequence_id
See original GitHub issueHi, until now I selected one residue with an expression I created and converted that to a structure selection (which then got focused), like in #120.
Now I have a different use case. I want to select multiple residues by their auth sequence id and focus them. It is clear for me how to select exactly one residue by its auth sequence id, the code I use is
const expr = MS.struct.generator.atomGroups({
"residue-test": MS.core.rel.eq([
MS.struct.atomProperty.macromolecular.auth_seq_id(),
557, // or any other auth seq id
]),
})
const sel = Script.getStructureSelection(expr, root);
const loci = StructureSelection.toLociWithSourceUnits(sel);
What I need: An expression that can select multiple residues at once by their auth seq id (so [556, 558, …] for example). So is there an easy way to do this or to combine multiple single select expressions to one big expression?
Thanks in advance
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Selecting residues in PyMOL - YouTube
Your browser can't play this video. Learn more. Switch camera.
Read more >[Chimera-users] how to select multiple residues ... - UCSF RBVI
[Chimera-users] how to select multiple residues in multiple chains ... Is there a way to select all of the same >> number residues...
Read more >Property Selectors - PyMOLWiki
Select All Alternate Locations. To select all residues with alternate locations (alt, alt loc), simply do: select ...
Read more >Advanced Selection Techniques - Maestro - Schrödinger
Selecting more in the Workspace. You can switch between picking atoms and picking residues without changing your pick level. Just double-click the atom...
Read more >RE: Selecting multiple ranges - VMD-L Mailing List
I have been in the TkC to select multiple ranges to do a "fit". I want to > select multiple ranges separated by...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thank you, that worked as expected, for anyone looking at this issue, here is the code that created the expression for selecting residues by their auth sequence id (and chain)
As a bit of clarification, what I’m trying to implement is the following. I’d like to take as input:
and apply the measure the distance between the two. This will take the form:
What I’m trying to do is implement the functions
getResidueAtomLoci
andgetLigandAtomLoci
. Any help or suggestions would be much appreciated. In any case, thank you for your reply @kscgl! This gives me a good starting point to work from.