From: Bryan Roessler (roessler_at_uab.edu)
Date: Thu Dec 03 2015 - 19:34:39 CST

Since I am unsure of whether or not my question is clear, I am including a
MWE:

proc my_contacts {} {
    set A [atomselect top "resid 968 543"]
    set my_contacts [measure contacts 1.8 $A]
    echo $my_contacts
}

returns:
{{11498 11505 11505 7810 11500 7813 11504 11503 11492} {11497 11504 11503
7811 11501 7814 7816 11504 11491}}

Perhaps I am not understanding how measure contacts works, but I would
expect that the two lists would be identical since *selection2* is omitted.

*contacts cutoff selection1 [selection2]*: Find all atoms in *selection1*
> that are within *cutoff* of any atom in *selection2* and not bonded to
> it. If *selection2* is omitted, *it is taken to be the same as
> selection1.* *selection2* and *selection1* can either be from the same of
> from different molecules. Returns two lists of atom indices, the first
> containing the first index of each pair (taken from *selection1*) and the
> second containing the second index (taken from *selection2*). Note that
> the index is the global index of the atom with respect to its parent
> molecule, as opposed to the index within the given atom selection that
> contains it.
>

When I add selection2 manually I get the exact same output:

proc my_contacts {} {
    set A [atomselect top "resid 968 543"]
    set B [atomselect top "resid 968 543"]
    set my_contacts [measure contacts 1.8 $A $B]
    echo $my_contacts
}

returns:
{{11498 11505 11505 7810 11500 7813 11504 11503 11492} {11497 11504 11503
7811 11501 7814 7816 11504 11491}}

What am I running into here?

Thanks,

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 Wed, Dec 2, 2015 at 4:51 PM, Bryan Roessler <roessler_at_uab.edu> wrote:

> Hello,
>
> I have a single atomselection with two residues that I am trying to run a
> measure contacts on, however measure contacts is not working as expected.
>
> set A [atomselect top "resid 543 968"]
> measure contacts 3.0 $A
> (note this is a simplified version of what I am trying to do, thus running
> an atomsel on resid 543 and an atomsel on 968 and using both in the
> contacts command would not work)
>
> Output:
> {7805 7805 7805 7806 7806 7805 7805 7806 7806 7805 7806 7807 7808 7807
> 7808 7808 7818 7818 7808 7807 7807 7807 7808 7808 7808 11504 11502 11502
> 11504 11504 11505 11504 11505 11502 11502 11502 11504 11504 11504 11505
> 11505 11505 11504 11502 11502 11504 11504 11505 11505 11504 7817 7817 7817
> 7817 11494 11494 11494 11494 11494 11494 11494 11494 11494 7810 7810 7810
> 7813 7810 7812 7813 7814 7814 7812 7813 7814 11503 11503 11503 7815 7815
> 7815 7815 7816 7816 7815 7816 11493 11493 11493 11495 11495 11495 11497
> 11497 11498 11493 11493 11493 11493 11495 11495 11495 11495 11495 11496
> 11496 11498 11498 11493 11496 11496 11497 11498 11498 11493 11496 11498
> 11499 11486 11486 11486 11487 11487 11487 11487 11488 11489 11486 11489
> 11490 11491 11488 11489 11491 11486 11488 11500 11501 11501 11492} {7808
> 7818 7819 7807 7808 7810 7813 7810 7813 7809 7809 7819 7818 7811 7809 7811
> 7809 7811 7815 7810 7812 7813 7812 7813 7817 11505 7817 11494 7817 11494
> 11494 11503 11503 11493 11496 11497 11493 11496 11499 11496 11497 11499
> 7815 11500 11501 11500 11501 11500 11501 11492 11494 7812 7813 7816 11488
> 11489 11490 11492 11495 11496 11497 11499 11501 7812 7813 7814 7814 7811
> 7811 7809 7809 7811 11489 11489 11489 11500 11501 11499 7809 7811 7813 7814
> 7812 7814 11489 11489 11497 11498 11499 11496 11497 11498 11498 11499 11499
> 11487 11488 11489 11491 11486 11487 11488 11490 11491 11490 11491 11490
> 11491 11501 11500 11501 11500 11500 11501 11492 11492 11492 11492 11489
> 11490 11491 11488 11489 11490 11491 11491 11490 11506 11506 11506 11506
> 11492 11492 11492 11507 11507 11501 11492 11490 11506}
>
> Since no selection2 is specified, then the atomsel "resid 543 968" should
> be used for both the first and second selections. For instance, there
> should be duplicated atom pairs in both lists since we are measuring both
> the contacts between 543-968 AND 968-543 (as well as 543-543 and 968-968).
> However, measure contacts is only outputting 3 contacts between 543-968 and
> 6 contacts between 968-543, indicating that some of the contacts have been
> filtered out. Am I missing something? Is this intentional? is there a
> workaround?
>
> Thank you,
>
> 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
>
>