From: Amendra Fernando Hewa Dewage (
Date: Fri Jun 21 2019 - 15:27:01 CDT


I want to select atoms within certain distance (say 5 Angstrom) to an atom, where these atoms should be in that radius within 80% of the trajectory.
ie. say you have two atoms, atom A and B, atom A is picked only if it is 80% of the time during the trajectory lies within 5 A of radius to atom B,

part of the script is like this, here I am selecting side chains atoms within $R radius.

 foreach id $list {
        set sel1 [atomselect top "index $id" frame $iframe]
        set atomenvirn [atomselect top "(within $R of index $id) and (index $list and sidechain)" frame $iframe]

I have large number of atoms.