Class AtomContactSet
java.lang.Object
org.biojava.nbio.structure.contact.AtomContactSet
- All Implemented Interfaces:
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(AtomContact contact) void
addAll
(Collection<AtomContact> list) getContact
(Atom atom1, Atom atom2) Returns the corresponding AtomContact or null if no contact exists between the 2 given atomsgetContactsWithinDistance
(double distance) Returns the list of contacts from this set that are within the given distance.boolean
hasContact
(Atom atom1, Atom atom2) boolean
hasContact
(AtomIdentifier atomId1, AtomIdentifier atomId2) boolean
hasContactsWithinDistance
(double distance) Returns true if at least 1 contact from this set is within the given distance.iterator()
int
size()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
AtomContactSet
public AtomContactSet(double cutoff)
-
-
Method Details
-
add
-
addAll
-
hasContact
-
hasContact
-
getContact
Returns the corresponding AtomContact or null if no contact exists between the 2 given atoms- Parameters:
atom1
-atom2
-- Returns:
-
size
public int size() -
iterator
- Specified by:
iterator
in interfaceIterable<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
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
-