Class StructureInterface

java.lang.Object
org.biojava.nbio.structure.contact.StructureInterface
All Implemented Interfaces:
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

      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

      public void setContacts(AtomContactSet contacts)
    • getMolecules

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

      public void setMolecules(Pair<Atom[]> molecules)
    • 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

      Return the 2 crystal transform operations performed on each of the molecules of this interface.
      Returns:
    • setTransforms

      public void setTransforms(Pair<CrystalTransform> transforms)
    • 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

      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

      public void setFirstGroupAsa(GroupAsa groupAsa)
    • setFirstGroupAsas

      public void setFirstGroupAsas(Map<ResidueNumber,GroupAsa> firstGroupAsas)
    • setSecondGroupAsas

      public void setSecondGroupAsas(Map<ResidueNumber,GroupAsa> secondGroupAsas)
    • getSecondGroupAsas

      Gets a map of ResidueNumbers to GroupAsas for all groups of second chain.
      Returns:
    • setSecondGroupAsa

      public void setSecondGroupAsa(GroupAsa groupAsa)
    • getSecondGroupAsa

      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

    • setCluster

      public void setCluster(StructureInterfaceCluster cluster)
    • getContactOverlapScore

      public double getContactOverlapScore(StructureInterface other, boolean invert)
      Calculates the Jaccard contact set score (intersection over union) between this StructureInterface and the given one. The calculation assumes that both interfaces come from the same structure. The output will not necessarily make sense if the two interfaces come from different structures. The two sides of the given StructureInterface need to match this StructureInterface in the sense that they must come from the same Entity, i.e. their residue numbers need to align with 100% identity, except for unobserved density residues. The SEQRES indices obtained through EntityInfo.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 - the interface to be compared to this one
      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 entity 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 entities 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:
      the PDB-formatted string
    • 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:
      the mmCIF-formatted string
    • compareTo

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

      public String toString()
      Overrides:
      toString in class Object