schrodinger / pymol-open-source

Open-source foundation of the user-sponsored PyMOL molecular visualization system.
https://pymol.org/
Other
1.2k stars 281 forks source link

Selection tools: near_to, within, expand do not work properly with trajectories, even for molecules in a frozen state #338

Closed hubertrybka closed 9 months ago

hubertrybka commented 9 months ago

The tools: near_to, within, expand do not work well with frozen trajectory states. Instead of selecting the nearest neighbors of the studied molecule in a frozen system, they list all the entities that were in proximity to our molecule during the whole trajectory.

Example: I'm interested in a particular state of my trajectory. I want to highlight all the atoms that are in 5 A distance from the studied molecule. I freeze my system in the desired state and use sele system within 5 of molecule. Instead of selecting only the atoms that are < 5 A in this one state, the functions select all of the atoms that our molecule met at < 5 A distance moving along the trajectory.

speleo3 commented 9 months ago

select takes a state argument, try this:

select system within 5 of molecule, state=-1
hubertrybka commented 9 months ago

Thanks, skill issue.