Class StructureUtil
java.lang.Object
org.biojava.nbio.protmod.structure.StructureUtil
-
Method Summary
Modifier and TypeMethodDescriptionfindAtomLinkages(Group group1, Group group2, boolean ignoreNCLinkage, double bondLengthTolerance) Find linkages between two groups within tolerance of bond length, from potential atoms.findAtomLinkages(Group group1, Group group2, List<String> potentialNamesOfAtomOnGroup1, List<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, String nameOfAtomOnGroup1, String nameOfAtomOnGroup2, double bondLengthTolerance) Find a linkage between two groups within tolerance of bond length.static Atom[]findNearestAtomLinkage(Group group1, Group group2, List<String> potentialNamesOfAtomOnGroup1, List<String> potentialNamesOfAtomOnGroup2, boolean ignoreNCLinkage, double bondLengthTolerance) Find a linkage between two groups within tolerance of bond length, from potential atoms.getAminoAcids(Chain chain) Get all amino acids in a chain.static doublegetAtomDistance(Atom atom1, Atom atom2) getAtomNames(Group group) static StructureAtomgetStructureAtom(Atom atom, boolean isParentAminoAcid) static StructureAtomLinkagegetStructureAtomLinkage(Atom atom1, boolean isParentAminoAcid1, Atom atom2, boolean isParentAminoAcid2) static StructureGroupgetStructureGroup(Group group, boolean isAminoAcid)
-
Method Details
-
getStructureGroup
- Parameters:
group- aGroupin structure.isAminoAcid- true if it is an amino acid.- Returns:
- the
StructureGroupof the group.
-
getStructureAtom
- Parameters:
atom- aAtomin structure.isParentAminoAcid- true if the containing group is an amino acid.- Returns:
- the
StructureAtomof the atom.
-
getStructureAtomLinkage
public static StructureAtomLinkage getStructureAtomLinkage(Atom atom1, boolean isParentAminoAcid1, Atom atom2, boolean isParentAminoAcid2) - Parameters:
atom1- the firstAtomin structure.isParentAminoAcid1- true if the first containing group is an amino acid..atom2- the secondAtomin structure.isParentAminoAcid2- true if the second containing group is an amino acid..- Returns:
- the
StructureAtomLinkageof the two atoms.
-
getAtomDistance
-
findNearestAtomLinkage
public static Atom[] findNearestAtomLinkage(Group group1, Group group2, List<String> potentialNamesOfAtomOnGroup1, List<String> potentialNamesOfAtomOnGroup2, boolean ignoreNCLinkage, double bondLengthTolerance) Find a linkage between two groups within tolerance of bond length, from potential atoms.- Parameters:
group1- the firstGroup.group2- the secondGroup.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 linkagesbondLengthTolerance- bond length error tolerance.- Returns:
- an array of two Atoms that form bond between each other if found; null, otherwise.
-
findAtomLinkages
public static List<Atom[]> findAtomLinkages(Group group1, Group group2, boolean ignoreNCLinkage, double bondLengthTolerance) Find linkages between two groups within tolerance of bond length, from potential atoms. -
findAtomLinkages
public static List<Atom[]> findAtomLinkages(Group group1, Group group2, List<String> potentialNamesOfAtomOnGroup1, List<String> potentialNamesOfAtomOnGroup2, boolean ignoreNCLinkage, double bondLengthTolerance) Find linkages between two groups within tolerance of bond length, from potential atoms.- Parameters:
group1- the firstGroup.group2- the secondGroup.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 linkagesbondLengthTolerance- 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, String nameOfAtomOnGroup1, String nameOfAtomOnGroup2, double bondLengthTolerance) Find a linkage between two groups within tolerance of bond length.- Parameters:
group1- the firstGroup.group2- the secondGroup.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
- Parameters:
group- aGroup.- Returns:
- all atom names of the group.
-
getAminoAcids
Get all amino acids in a chain.- Parameters:
chain-- Returns:
-