giorginolab / vmd_diffusion_coefficient

Computing Diffusion Coefficients in Macromolecular Simulations: The Diffusion Coefficient Tool for VMD
https://doi.org/10.21105/joss.01698
BSD 3-Clause "New" or "Revised" License
31 stars 14 forks source link

Selection: Atoms selection format #16

Closed csuab closed 9 months ago

csuab commented 9 months ago

Greetings,

I have a system containing water, perchlorate ions and Sodium ions. I am having trouble figuring the atom selection format for the water and perchlorate molecules. Separate selections for the O and H in the water molecules is possible, however for the water molecule as a whole, it isn't. The trajectory (position file) is obtained from cp2k and is in XYZ format.

System indexing: 1) 0-299: water 2) 300-310: ClO4 3) 310-311: Na

Selection of the Na and Cl atoms: name Na (or) name Cl generates results. However using: index < 300, I am unable to select the water molecules. The error: " Each selected atom should belong to a separate molecule " is seen.

What is the best way to make the necessary selection. Thank you!

tonigi commented 9 months ago

Write an atom selection that only matches one atom per water molecule (likely oxygen). Perhaps something like "name O and index < 300" or so.