I have a molecule with four (4) residues, and I want to select the number of molecules interacting within a certain distance of another molecule
Here is a snippet of the code for selecting the number of molecules near cor2. Either selection seems to work the same way ... incorrectly
define nearby sele .byresidue. ( resn MACR .and. ( prop Z .le. +10.0 ) .and. ( segid cor2 .around. 53.0 ) ) end
define nearby sele .byresidue. ( ( segid MACR .and resid 1:4 ) .and. ( prop Z .le. +10.0 ) .and. ( segid cor2 .around. 53.0 ) ) end
calc ntest = ?nsel / 53
There are definitely 53 atoms in the molecule with 4 residues. Since I am using .byresidue. it should give me the number of residues divided by 53 as a whole number. (If the moleculesurrounding COR2 has one (1) residue, it works just fine.)
The problem is that, for the 4 residue molecule, ntest is NOT a whole number. HELP! All different attempts at selection do not work (e.g. without using .byresidue.).
If you view the final results with vmd, then some of the molecules near COR2 have the correct number of residues (i.e. 4) but there are others with only one (1) residue. That's why I am getting a
selection value (ntest) that is not a whole number.
Can you please help me with a selection command that will always provide a selection with four (4) residues?
Thanks so much for your help with this.
Kind regards and Happy New Year (2021)!