Class StructureInterface

    • Constructor Detail

      • 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
    • Method Detail

      • getId

        public int getId()
      • setId

        public void setId​(int id)
      • getCrystalIds

        public Pair<StringgetCrystalIds()
        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)
      • getMoleculeIds

        public Pair<StringgetMoleculeIds()
        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:
      • getTransforms

        public Pair<CrystalTransformgetTransforms()
        Return the 2 crystal transform operations performed on each of the molecules of this interface.
        Returns:
      • 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
      • 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:
      • 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]
      • 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

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

        public Pair<EntityInfogetParentCompounds()
        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