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 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 molecule
      secondMolecule - the atoms of the second molecule
      firstMoleculeId - an identifier that identifies the first molecule within the Asymmetric Unit
      secondMoleculeId - an identifier that identifies the second molecule within the Asymmetric Unit
      contacts - the contacts between the 2 molecules
      firstTransf - the transformation (crystal operator) applied to first molecule
      secondTransf - 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

      public Pair<String> 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

      public AtomContactSet getContacts()
    • setContacts

      public void setContacts(AtomContactSet contacts)
    • getMolecules

      public Pair<Atom[]> getMolecules()
    • setMolecules

      public void setMolecules(Pair<Atom[]> molecules)
    • getMoleculeIds

      public Pair<String> 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

      public void setMoleculeIds(Pair<String> moleculeIds)
    • getTransforms

      public Pair<CrystalTransform> getTransforms()
      Return the 2 crystal transform operations performed on each of the molecules of this interface.
      Returns:
    • setTransforms

      public void setTransforms(Pair<CrystalTransform> transforms)
    • setAsas

      protected void setAsas(double[] asas1, double[] asas2, int nSpherePoints, int nThreads, int cofactorSizeToUse)
    • getFirstAtomsForAsa

      protected Atom[] getFirstAtomsForAsa(int cofactorSizeToUse)
    • getSecondAtomsForAsa

      protected Atom[] getSecondAtomsForAsa(int cofactorSizeToUse)
    • getAtomsForAsa

      protected Atom[] getAtomsForAsa(int cofactorSizeToUse)
    • 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

      public Map<ResidueNumber,GroupAsa> getFirstGroupAsas()
      Gets a map of ResidueNumbers to GroupAsas for all groups of first chain.
      Returns:
    • getFirstGroupAsa

      public GroupAsa getFirstGroupAsa(ResidueNumber resNum)
      Gets the GroupAsa for the corresponding residue number of first chain
      Parameters:
      resNum -
      Returns:
    • setFirstGroupAsa

      public void setFirstGroupAsa(GroupAsa groupAsa)
    • getSecondGroupAsas

      public Map<ResidueNumber,GroupAsa> getSecondGroupAsas()
      Gets a map of ResidueNumbers to GroupAsas for all groups of second chain.
      Returns:
    • setSecondGroupAsa

      public void setSecondGroupAsa(GroupAsa groupAsa)
    • getSecondGroupAsa

      public GroupAsa getSecondGroupAsa(ResidueNumber resNum)
      Gets the GroupAsa for the corresponding residue number of second chain
      Parameters:
      resNum -
      Returns:
    • getCoreResidues

      public Pair<List<Group>> 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 bsaToAsaCutoff
      Parameters:
      bsaToAsaCutoff -
      minAsaForSurface - the minimum ASA to consider a residue on the surface
      Returns:
    • getRimResidues

      public Pair<List<Group>> getRimResidues(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 bsaToAsaCutoff
      Parameters:
      bsaToAsaCutoff -
      minAsaForSurface - the minimum ASA to consider a residue on the surface
      Returns:
    • getInterfacingResidues

      public Pair<List<Group>> getInterfacingResidues(double minAsaForSurface)
      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

      public Pair<List<Group>> getSurfaceResidues(double minAsaForSurface)
      Returns the residues belonging to the surface
      Parameters:
      minAsaForSurface - the minimum ASA to consider a residue on the surface
      Returns:
    • getCluster

      public StructureInterfaceCluster getCluster()
    • setCluster

      public void setCluster(StructureInterfaceCluster cluster)
    • getContactOverlapScore

      public double getContactOverlapScore(StructureInterface other, boolean invert)
      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 through Compound.getAlignedResIndex(Group, Chain) are used to match residues, thus if no SEQRES is present or if FileParsingParameters.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

      public GroupContactSet 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

      public Pair<Chain> getParentChains()
      Finds the parent chains by looking up the references of first atom of each side of this interface
      Returns:
    • getParentCompounds

      public Pair<Compound> getParentCompounds()
      Finds the parent compounds by looking up the references of first atom of each side of this interface
      Returns:
    • toPDB

      public String 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

      public String 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 from getTransforms()
      Returns:
    • compareTo

      public int compareTo(StructureInterface o)
      Specified by:
      compareTo in interface Comparable<StructureInterface>
    • toString

      public String toString()
      Overrides:
      toString in class Object