Class AtomContactSet

java.lang.Object
org.biojava.nbio.structure.contact.AtomContactSet
All Implemented Interfaces:
Serializable, Iterable<AtomContact>

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

    • AtomContactSet

      public AtomContactSet(double cutoff)
  • Method Details

    • add

      public void add(AtomContact contact)
    • addAll

      public void addAll(Collection<AtomContact> list)
    • hasContact

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

      public boolean hasContact(AtomIdentifier atomId1, AtomIdentifier atomId2)
    • 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 Iterator<AtomContact> iterator()
      Specified by:
      iterator in interface 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:
      IllegalArgumentException - if given distance is larger than distance cutoff used for calculation of contacts
    • getContactsWithinDistance

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