From: Bryan Roessler (roessler_at_uab.edu)
Date: Thu Dec 03 2015 - 23:05:08 CST

Thanks Peter,

I suppose then that the best way to iterate the over the list of contacts
then is to simply combine both atom indices lists. I had been separating
the atom pair lists using:

for {set i 0} {$i <= $numframes} {incr i} {
  $A frame $i
  $A update
  foreach {listA listB} [measure contacts $cutoff $A] break
  foreach indA $listA indB $listB {
     set selA [atomselect top index $indA]
     set selB [atomselect top index $indB]
     set residA [$selA get resid]
     set residB [$selB get resid]
     $selA delete
     $selB delete
     lappend contactTable($residA,$residB) $i
  }
}

but obviously that's an issue when a single resid (residA or residB) is not
tied to either listA or listB and is randomly distributed between the two,
even when it is present in both *selection1* and *selection2*.

Thus I would need to combine each list in my array by adding:

lappend contactTable($residB,$residA) $i

so that the contact pair is included regardless of the 'direction' of the
measurement.

Cheers,
Bryan

*Bryan Roessler | Graduate Research Assistant*
UAB | The University of Alabama at Birmingham
*uab.edu/cmdb <http://uab.edu/cmdb>*
Knowledge that will change your world

On Thu, Dec 3, 2015 at 9:14 PM, Peter Freddolino <petefred_at_umich.edu> wrote:

> Hi Bryan,
> It isn’t really an MWE if we don’t have the structure that you’re looking
> at to try it out. But I’m pretty sure what you’re running into is that the
> elementary object being enumerated by measure contacts is the *atom pair*--001a11410092ea622005260b7511--