Class StructureInterface
java.lang.Object
org.biojava.nbio.structure.contact.StructureInterface
- All Implemented Interfaces:
Serializable
,Comparable<StructureInterface>
public class StructureInterface
extends Object
implements Serializable, Comparable<StructureInterface>
An interface between 2 molecules (2 sets of atoms).
- Author:
- duarte_j
- See Also:
-
Constructor Summary
ConstructorDescriptionConstructs an empty StructureInterfaceStructureInterface
(Atom[] firstMolecule, Atom[] secondMolecule, String firstMoleculeId, String secondMoleculeId, AtomContactSet contacts, CrystalTransform firstTransf, CrystalTransform secondTransf) Constructs a StructureInterface -
Method Summary
Modifier and TypeMethodDescriptionint
protected Atom[]
getAtomsForAsa
(int cofactorSizeToUse) double
getContactOverlapScore
(StructureInterface other, boolean invert) Calculates the contact overlap score between this StructureInterface and the given one.getCoreResidues
(double bsaToAsaCutoff, double minAsaForSurface) Returns the residues belonging to the interface core, defined as those residues at the interface (BSA>0) and for which the BSA/ASA ratio is above the given bsaToAsaCutoffReturns a pair of identifiers for each of the 2 member molecules that identify them uniquely in the crystal: <molecule id (asym unit id)>+<operator id>+<crystal translation>protected Atom[]
getFirstAtomsForAsa
(int cofactorSizeToUse) getFirstGroupAsa
(ResidueNumber resNum) Gets the GroupAsa for the corresponding residue number of first chainGets a map of ResidueNumbers to GroupAsas for all groups of first chain.int
getId()
getInterfacingResidues
(double minAsaForSurface) Returns the residues belonging to the interface, i.e.Return the pair of identifiers identifying each of the 2 molecules of this interface in the asymmetry unit (usually the chain identifier if this interface is between 2 chains)Finds the parent chains by looking up the references of first atom of each side of this interfaceFinds the parent compounds by looking up the references of first atom of each side of this interfacegetRimResidues
(double bsaToAsaCutoff, double minAsaForSurface) Returns the residues belonging to the interface rim, defined as those residues at the interface (BSA>0) and for which the BSA/ASA ratio is below the given bsaToAsaCutoffprotected Atom[]
getSecondAtomsForAsa
(int cofactorSizeToUse) getSecondGroupAsa
(ResidueNumber resNum) Gets the GroupAsa for the corresponding residue number of second chainGets a map of ResidueNumbers to GroupAsas for all groups of second chain.getSurfaceResidues
(double minAsaForSurface) Returns the residues belonging to the surfacedouble
Returns the total area buried upon formation of this interface, defined as: 1/2[ (ASA1u-ASA1c) + (ASA2u-ASA2u) ] , with:Return the 2 crystal transform operations performed on each of the molecules of this interface.boolean
Returns true if the 2 molecules of this interface are the same entity (i.e.boolean
Returns true if the transformation applied to the second molecule of this interface has an infinite character (pure translation or screw rotation) and both molecules of the interface have the same asymmetric unit identifier (chain id): in such cases the interface would lead to infinite fiber-like (linear or helical) assembliesboolean
Tell whether the interface is isologous, i.e.boolean
Tells whether the interface corresponds to one mediated by crystallographic symmetry, i.e.protected void
setAsas
(double[] asas1, double[] asas2, int nSpherePoints, int nThreads, int cofactorSizeToUse) void
setCluster
(StructureInterfaceCluster cluster) void
setContacts
(AtomContactSet contacts) void
setFirstGroupAsa
(GroupAsa groupAsa) void
setId
(int id) void
setMoleculeIds
(Pair<String> moleculeIds) void
setMolecules
(Pair<Atom[]> molecules) void
setSecondGroupAsa
(GroupAsa groupAsa) void
setTotalArea
(double totalArea) void
setTransforms
(Pair<CrystalTransform> transforms) toMMCIF()
Return a String representing the 2 molecules of this interface in mmCIF format.toPDB()
Return a String representing the 2 molecules of this interface in PDB format.toString()
-
Constructor Details
-
StructureInterface
public StructureInterface(Atom[] firstMolecule, Atom[] secondMolecule, String firstMoleculeId, String secondMoleculeId, AtomContactSet contacts, CrystalTransform firstTransf, CrystalTransform secondTransf) Constructs a StructureInterface- Parameters:
firstMolecule
- the atoms of the first moleculesecondMolecule
- the atoms of the second moleculefirstMoleculeId
- an identifier that identifies the first molecule within the Asymmetric UnitsecondMoleculeId
- an identifier that identifies the second molecule within the Asymmetric Unitcontacts
- the contacts between the 2 moleculesfirstTransf
- the transformation (crystal operator) applied to first moleculesecondTransf
- the transformation (crystal operator) applied to second molecule
-
StructureInterface
public StructureInterface()Constructs an empty StructureInterface
-
-
Method Details
-
getId
public int getId() -
setId
public void setId(int id) -
getCrystalIds
Returns a pair of identifiers for each of the 2 member molecules that identify them uniquely in the crystal: <molecule id (asym unit id)>+<operator id>+<crystal translation>- Returns:
-
getTotalArea
public double getTotalArea()Returns the total area buried upon formation of this interface, defined as: 1/2[ (ASA1u-ASA1c) + (ASA2u-ASA2u) ] , with:ASAxu = ASA of first/second unbound chain
ASAxc = ASA of first/second complexed chain
In the area calculation HETATOM groups not part of the main protein/nucleotide chain are not included.- Returns:
-
setTotalArea
public void setTotalArea(double totalArea) -
getContacts
-
setContacts
-
getMolecules
-
setMolecules
-
getMoleculeIds
Return the pair of identifiers identifying each of the 2 molecules of this interface in the asymmetry unit (usually the chain identifier if this interface is between 2 chains)- Returns:
-
setMoleculeIds
-
getTransforms
Return the 2 crystal transform operations performed on each of the molecules of this interface.- Returns:
-
setTransforms
-
setAsas
protected void setAsas(double[] asas1, double[] asas2, int nSpherePoints, int nThreads, int cofactorSizeToUse) -
getFirstAtomsForAsa
-
getSecondAtomsForAsa
-
getAtomsForAsa
-
isSymRelated
public boolean isSymRelated()Tells whether the interface corresponds to one mediated by crystallographic symmetry, i.e. it is between symmetry-related molecules (with same chain identifier)- Returns:
-
isInfinite
public boolean isInfinite()Returns true if the transformation applied to the second molecule of this interface has an infinite character (pure translation or screw rotation) and both molecules of the interface have the same asymmetric unit identifier (chain id): in such cases the interface would lead to infinite fiber-like (linear or helical) assemblies- Returns:
-
isHomomeric
public boolean isHomomeric()Returns true if the 2 molecules of this interface are the same entity (i.e. homomeric interface), false otherwise (i.e. heteromeric interface)- Returns:
- true if homomeric or if either of the entities is unknonw (null Compounds), false otherwise
-
getFirstGroupAsas
Gets a map of ResidueNumbers to GroupAsas for all groups of first chain.- Returns:
-
getFirstGroupAsa
Gets the GroupAsa for the corresponding residue number of first chain- Parameters:
resNum
-- Returns:
-
setFirstGroupAsa
-
getSecondGroupAsas
Gets a map of ResidueNumbers to GroupAsas for all groups of second chain.- Returns:
-
setSecondGroupAsa
-
getSecondGroupAsa
Gets the GroupAsa for the corresponding residue number of second chain- Parameters:
resNum
-- Returns:
-
getCoreResidues
Returns the residues belonging to the interface core, defined as those residues at the interface (BSA>0) and for which the BSA/ASA ratio is above the given bsaToAsaCutoff- Parameters:
bsaToAsaCutoff
-minAsaForSurface
- the minimum ASA to consider a residue on the surface- Returns:
-
getRimResidues
Returns the residues belonging to the interface rim, defined as those residues at the interface (BSA>0) and for which the BSA/ASA ratio is below the given bsaToAsaCutoff- Parameters:
bsaToAsaCutoff
-minAsaForSurface
- the minimum ASA to consider a residue on the surface- Returns:
-
getInterfacingResidues
Returns the residues belonging to the interface, i.e. the residues at the surface with BSA>0- Parameters:
minAsaForSurface
- the minimum ASA to consider a residue on the surface- Returns:
-
getSurfaceResidues
Returns the residues belonging to the surface- Parameters:
minAsaForSurface
- the minimum ASA to consider a residue on the surface- Returns:
-
getCluster
-
setCluster
-
getContactOverlapScore
Calculates the contact overlap score between this StructureInterface and the given one. The two sides of the given StructureInterface need to match this StructureInterface in the sense that they must come from the same Compound (Entity), i.e. their residue numbers need to align with 100% identity, except for unobserved density residues. The SEQRES indices obtained throughCompound.getAlignedResIndex(Group, Chain)
are used to match residues, thus if no SEQRES is present or ifFileParsingParameters.setAlignSeqRes(boolean)
is not used, this calculation is not guaranteed to work properly.- Parameters:
other
-invert
- if false the comparison will be done first-to-first and second-to-second, if true the match will be first-to-second and second-to-first- Returns:
- the contact overlap score, range [0.0,1.0]
-
getGroupContacts
-
isIsologous
public boolean isIsologous()Tell whether the interface is isologous, i.e. it is formed by the same patches of same Compound on both sides.- Returns:
- true if isologous, false if heterologous
-
getParentChains
Finds the parent chains by looking up the references of first atom of each side of this interface- Returns:
-
getParentCompounds
Finds the parent compounds by looking up the references of first atom of each side of this interface- Returns:
-
toPDB
Return a String representing the 2 molecules of this interface in PDB format. If the molecule ids (i.e. chain ids) are the same for both molecules, then the second one will be replaced by the next letter in alphabet (or A for Z)- Returns:
-
toMMCIF
Return a String representing the 2 molecules of this interface in mmCIF format. If the molecule ids (i.e. chain ids) are the same for both molecules, then the second one will be written as chainId_operatorId (with operatorId taken fromgetTransforms()
- Returns:
-
compareTo
- Specified by:
compareTo
in interfaceComparable<StructureInterface>
-
toString
-