Skip to content

AtomContactSet uses Pair<Atom> which is directed (atom1 -> atom2) #1153

Open

Description

@aalhossary

Atom contacts are saved in AtomContactSet as a Pair without enforcing atom ordering.
This way, a Contact c1 (atom1, atom2) is not considered equal to another Contact c2(atom2, atom1).

The fix is to ensure atom ordering as described in this comment.
However, this fix will impose behaviour change, which needs to be studied thoroughly first.

Originally posted by @aalhossary in #1147 (comment)

Activity

  1. josemduarte commented on Sep 4, 2026

    @josemduarte
    Contributor

    Thanks for reporting. At least the new docs that went in with #1147 make it clear what the behaviour is now. One thing that is important to consider: in intra-chain contacts the order is defined in a certain way (and that's an issue as reported above), but not in the inter-chain case.

    One special case of inter-chain that is worth remembering is inter-chain contacts of chains that are symmetry mates: in there the contacts are not necessarily symmetric (they are only symmetric in isologous interfaces, i.e. with C2 symmetry) but they are identified with same serial numbers and same chain ids.

  2. aalhossary commented on Sep 6, 2026

    @aalhossary
    MemberAuthor

    OK What about adding new method overloads that take a parameter (directed)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions