Class StructureUtil


  • public final class StructureUtil
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.List<Atom[]> findAtomLinkages​(Group group1, Group group2, boolean ignoreNCLinkage, double bondLengthTolerance)
      Find linkages between two groups within tolerance of bond length, from potential atoms.
      static java.util.List<Atom[]> findAtomLinkages​(Group group1, Group group2, java.util.List<java.lang.String> potentialNamesOfAtomOnGroup1, java.util.List<java.lang.String> potentialNamesOfAtomOnGroup2, boolean ignoreNCLinkage, double bondLengthTolerance)
      Find linkages between two groups within tolerance of bond length, from potential atoms.
      static Atom[] findLinkage​(Group group1, Group group2, java.lang.String nameOfAtomOnGroup1, java.lang.String nameOfAtomOnGroup2, double bondLengthTolerance)
      Find a linkage between two groups within tolerance of bond length.
      static Atom[] findNearestAtomLinkage​(Group group1, Group group2, java.util.List<java.lang.String> potentialNamesOfAtomOnGroup1, java.util.List<java.lang.String> potentialNamesOfAtomOnGroup2, boolean ignoreNCLinkage, double bondLengthTolerance)
      Find a linkage between two groups within tolerance of bond length, from potential atoms.
      static java.util.List<Group> getAminoAcids​(Chain chain)
      Get all amino acids in a chain.
      static double getAtomDistance​(Atom atom1, Atom atom2)  
      static java.util.List<java.lang.String> getAtomNames​(Group group)  
      static StructureAtom getStructureAtom​(Atom atom, boolean isParentAminoAcid)  
      static StructureAtomLinkage getStructureAtomLinkage​(Atom atom1, boolean isParentAminoAcid1, Atom atom2, boolean isParentAminoAcid2)  
      static StructureGroup getStructureGroup​(Group group, boolean isAminoAcid)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getStructureGroup

        public static StructureGroup getStructureGroup​(Group group,
                                                       boolean isAminoAcid)
        Parameters:
        group - a Group in structure.
        isAminoAcid - true if it is an amino acid.
        Returns:
        the StructureGroup of the group.
      • getStructureAtom

        public static StructureAtom getStructureAtom​(Atom atom,
                                                     boolean isParentAminoAcid)
        Parameters:
        atom - a Atom in structure.
        isParentAminoAcid - true if the containing group is an amino acid.
        Returns:
        the StructureAtom of the atom.
      • getStructureAtomLinkage

        public static StructureAtomLinkage getStructureAtomLinkage​(Atom atom1,
                                                                   boolean isParentAminoAcid1,
                                                                   Atom atom2,
                                                                   boolean isParentAminoAcid2)
        Parameters:
        atom1 - the first Atom in structure.
        isParentAminoAcid1 - true if the first containing group is an amino acid..
        atom2 - the second Atom in structure.
        isParentAminoAcid2 - true if the second containing group is an amino acid..
        Returns:
        the StructureAtomLinkage of the two atoms.
      • getAtomDistance

        public static double getAtomDistance​(Atom atom1,
                                             Atom atom2)
        Parameters:
        atom1 - the first Atom in structure.
        atom2 - the second Atom in structure.
        Returns:
        the distance between the two atoms in Angstrom.
      • findNearestAtomLinkage

        public static Atom[] findNearestAtomLinkage​(Group group1,
                                                    Group group2,
                                                    java.util.List<java.lang.String> potentialNamesOfAtomOnGroup1,
                                                    java.util.List<java.lang.String> potentialNamesOfAtomOnGroup2,
                                                    boolean ignoreNCLinkage,
                                                    double bondLengthTolerance)
        Find a linkage between two groups within tolerance of bond length, from potential atoms.
        Parameters:
        group1 - the first Group.
        group2 - the second Group.
        potentialNamesOfAtomOnGroup1 - potential names of the atom on the first group. If null, search all atoms on the first group.
        potentialNamesOfAtomOnGroup2 - potential names of the atom on the second group. If null, search all atoms on the second group.
        ignoreNCLinkage - true to ignore all N-C linkages
        bondLengthTolerance - bond length error tolerance.
        Returns:
        an array of two Atoms that form bond between each other if found; null, otherwise.
      • findAtomLinkages

        public static java.util.List<Atom[]> findAtomLinkages​(Group group1,
                                                              Group group2,
                                                              boolean ignoreNCLinkage,
                                                              double bondLengthTolerance)
        Find linkages between two groups within tolerance of bond length, from potential atoms.
        Parameters:
        group1 - the first Group.
        group2 - the second Group.
        ignoreNCLinkage - true to ignore all N-C linkages
        bondLengthTolerance - bond length error tolerance.
        Returns:
        a list, each element of which is an array of two Atoms that form bond between each other.
      • findAtomLinkages

        public static java.util.List<Atom[]> findAtomLinkages​(Group group1,
                                                              Group group2,
                                                              java.util.List<java.lang.String> potentialNamesOfAtomOnGroup1,
                                                              java.util.List<java.lang.String> potentialNamesOfAtomOnGroup2,
                                                              boolean ignoreNCLinkage,
                                                              double bondLengthTolerance)
        Find linkages between two groups within tolerance of bond length, from potential atoms.
        Parameters:
        group1 - the first Group.
        group2 - the second Group.
        potentialNamesOfAtomOnGroup1 - potential names of the atom on the first group. If null, search all atoms on the first group.
        potentialNamesOfAtomOnGroup2 - potential names of the atom on the second group. If null, search all atoms on the second group.
        ignoreNCLinkage - true to ignore all N-C linkages
        bondLengthTolerance - bond length error tolerance.
        Returns:
        a list, each element of which is an array of two Atoms that form bond between each other.
      • findLinkage

        public static Atom[] findLinkage​(Group group1,
                                         Group group2,
                                         java.lang.String nameOfAtomOnGroup1,
                                         java.lang.String nameOfAtomOnGroup2,
                                         double bondLengthTolerance)
        Find a linkage between two groups within tolerance of bond length.
        Parameters:
        group1 - the first Group.
        group2 - the second Group.
        nameOfAtomOnGroup1 - atom name of the first group.
        nameOfAtomOnGroup2 - atom name of the second group.
        bondLengthTolerance - bond length error tolerance.
        Returns:
        an array of two Atoms that form bond between each other if found; null, otherwise.
      • getAtomNames

        public static java.util.List<java.lang.String> getAtomNames​(Group group)
        Parameters:
        group - a Group.
        Returns:
        all atom names of the group.
      • getAminoAcids

        public static java.util.List<Group> getAminoAcids​(Chain chain)
        Get all amino acids in a chain.
        Parameters:
        chain -
        Returns: