Class StructureInterfaceList
java.lang.Object
org.biojava.nbio.structure.contact.StructureInterfaceList
- All Implemented Interfaces:
Serializable
,Iterable<StructureInterface>
public class StructureInterfaceList
extends Object
implements Serializable, Iterable<StructureInterface>
A list of interfaces between 2 molecules (2 sets of atoms)
- Author:
- Jose Duarte
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Default number of points to use when calculating ASAsstatic final double
Any 2 interfaces with contact overlap score larger than this value will be considered to be clusteredstatic final int
Default minimum size of cofactor molecule (non-chain HET atoms) that will be usedstatic final double
Default minimum area for a contact between two chains to be considered a valid interface. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(StructureInterface interf) void
addNcsEquivalent
(StructureInterface interfaceNew, StructureInterface interfaceRef) Add an interface to the list, possibly defining it as NCS-equivalent to an interface already in the list.void
calcAsas()
Calculates ASAs for all interfaces in list, both for the unbound chains and for the complex of the two chains together.void
calcAsas
(int nSpherePoints, int nThreads, int cofactorSizeToUse) Calculates ASAs for all interfaces in list, both for the unbound chains and for the complex of the two chains together.static StructureInterfaceList
calculateInterfaces
(Structure struc) Calculates the interfaces for a structure using default parametersget
(int id) Gets the interface corresponding to given id.Calculate the interface clusters for this StructureInterfaceList using a contact overlap score to measure the similarity of interfaces.getClusters
(double contactOverlapScoreClusterCutoff) Calculate the interface clusters for this StructureInterfaceList using Jaccard contact set scores to measure the similarity of interfaces.Get the interface clusters for this StructureInterfaceList grouped by NCS-equivalence.getList()
iterator()
void
Removes from this interface list all interfaces with areas below the default cutoff area.void
removeInterfacesBelowArea
(double area) Removes from this interface list all interfaces with areas below the given cutoff area.void
setChainOrigNamesMap
(Map<String, String> chainOrigNamesMap) Sets a map with mapping from NCS chain names to original chain names.int
size()
void
sort()
Sorts the interface list and reassigns ids based on new sortingtoString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
DEFAULT_MINIMUM_INTERFACE_AREA
Default minimum area for a contact between two chains to be considered a valid interface.- See Also:
-
DEFAULT_ASA_SPHERE_POINTS
Default number of points to use when calculating ASAs- See Also:
-
DEFAULT_MIN_COFACTOR_SIZE
Default minimum size of cofactor molecule (non-chain HET atoms) that will be used- See Also:
-
DEFAULT_CONTACT_OVERLAP_SCORE_CLUSTER_CUTOFF
Any 2 interfaces with contact overlap score larger than this value will be considered to be clustered- See Also:
-
-
Constructor Details
-
StructureInterfaceList
public StructureInterfaceList()
-
-
Method Details
-
add
-
size
-
getList
-
get
Gets the interface corresponding to given id. The ids go from 1 to n Ifsort()
was called then the order is descendent by area.- Parameters:
id
-- Returns:
-
calcAsas
Calculates ASAs for all interfaces in list, both for the unbound chains and for the complex of the two chains together. Also sorts the interfaces based on calculated BSA areas (descending).Uses default parameters
-
calcAsas
Calculates ASAs for all interfaces in list, both for the unbound chains and for the complex of the two chains together. Also sorts the interfaces based on calculated BSA areas (descending)- Parameters:
nSpherePoints
-nThreads
-cofactorSizeToUse
- the minimum size of cofactor molecule (non-chain HET atoms) that will be used
-
sort
Sorts the interface list and reassigns ids based on new sorting -
getClustersNcs
Get the interface clusters for this StructureInterfaceList grouped by NCS-equivalence. This means that for any two interfaces in the same cluster: 1. The chains forming the first interface are NCS-copies of the chains forming the second interface, in any order. 2. Relative orientation of the chains is preserved, i.e. the contacts are identical.- Returns:
- list of
StructureInterfaceCluster
objects. - Since:
- 5.0.0
-
addNcsEquivalent
Add an interface to the list, possibly defining it as NCS-equivalent to an interface already in the list. Used to build up the NCS clustering.- Parameters:
interfaceNew
- an interface to be added to the list.interfaceRef
- interfaceNew will be added to the cluster which contains interfaceRef. If interfaceRef is null, new cluster will be created for interfaceNew.- Since:
- 5.0.0
-
setChainOrigNamesMap
Sets a map with mapping from NCS chain names to original chain names. Necessary whenaddNcsEquivalent(StructureInterface, StructureInterface)
is used and NCS equivalent interfaces exist in this list and their names need mapping when setting ASAs.- Parameters:
chainOrigNamesMap
- a map of NCS chain name to original chain name
-
removeInterfacesBelowArea
Removes from this interface list all interfaces with areas below the default cutoff area. Note that this must be called aftercalcAsas(int, int, int)
, otherwise all areas would be 0 and thus all removed.- See Also:
-
removeInterfacesBelowArea
Removes from this interface list all interfaces with areas below the given cutoff area. Note that this must be called aftercalcAsas(int, int, int)
, otherwise all areas would be 0 and thus all removed.- Parameters:
area
- the minimum interface buried surface area to keep. Interfaces below this value will be removed.
-
getClusters
Calculate the interface clusters for this StructureInterfaceList using a contact overlap score to measure the similarity of interfaces. Subsequent calls will use the cached value without recomputing the clusters. The contact overlap score cutoff to consider a pair in the same cluster is the valueDEFAULT_CONTACT_OVERLAP_SCORE_CLUSTER_CUTOFF
- Returns:
-
getClusters
Calculate the interface clusters for this StructureInterfaceList using Jaccard contact set scores to measure the similarity of interfaces. Subsequent calls will use the cached value without recomputing the clusters. The clusters will be assigned ids by sorting descending byStructureInterfaceCluster.getTotalArea()
- Parameters:
contactOverlapScoreClusterCutoff
- the contact overlap score above which a pair will be clustered- Returns:
-
iterator
- Specified by:
iterator
in interfaceIterable<StructureInterface>
-
toString
-
calculateInterfaces
Calculates the interfaces for a structure using default parameters- Parameters:
struc
-- Returns:
-