Class AtomContactSet

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Iterable<AtomContact>

    public class AtomContactSet
    extends java.lang.Object
    implements java.io.Serializable, java.lang.Iterable<AtomContact>
    A set of atom-atom contacts to hold the results of intra and inter-chain contact calculations
    Author:
    duarte_j
    See Also:
    Serialized Form
    • Constructor Detail

      • AtomContactSet

        public AtomContactSet​(double cutoff)
    • Method Detail

      • addAll

        public void addAll​(java.util.Collection<AtomContact> list)
      • hasContact

        public boolean hasContact​(Atom atom1,
                                  Atom atom2)
      • getContact

        public AtomContact getContact​(Atom atom1,
                                      Atom atom2)
        Returns the corresponding AtomContact or null if no contact exists between the 2 given atoms
        Parameters:
        atom1 -
        atom2 -
        Returns:
      • size

        public int size()
      • iterator

        public java.util.Iterator<AtomContact> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<AtomContact>
      • hasContactsWithinDistance

        public boolean hasContactsWithinDistance​(double distance)
        Returns true if at least 1 contact from this set is within the given distance. Note that if the distance given is larger than the distance cutoff used to calculate the contacts then nothing will be found.
        Parameters:
        distance -
        Returns:
        Throws:
        java.lang.IllegalArgumentException - if given distance is larger than distance cutoff used for calculation of contacts
      • getContactsWithinDistance

        public java.util.List<AtomContact> getContactsWithinDistance​(double distance)
        Returns the list of contacts from this set that are within the given distance.
        Parameters:
        distance -
        Returns:
        Throws:
        java.lang.IllegalArgumentException - if given distance is larger than distance cutoff used for calculation of contacts