Package ffx.potential.bonded
Class RotamerLibrary
java.lang.Object
ffx.potential.bonded.RotamerLibrary
The Rotamer Library Class manages a library of side-chain Rotamers for amino acids, and a library
of backbone Rotamers for nucleic acids.
- Since:
- 1.0
- Author:
- Ava M. Lynn, Shibo Gao, Jacob M. Litman
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static enum
static enum
static class
-
Constructor Summary
ConstructorDescriptionRotamerLibrary
(boolean origCoords) Constructor for RotamerLibrary.RotamerLibrary
(RotamerLibrary.NucleicAcidLibrary naLibrary, boolean origCoords) Constructor for RotamerLibrary.RotamerLibrary
(RotamerLibrary.ProteinLibrary protLibrary, boolean origCoords) Constructor for RotamerLibrary.RotamerLibrary
(RotamerLibrary.ProteinLibrary protLibrary, RotamerLibrary.NucleicAcidLibrary naLibrary, boolean origCoords) Constructor for RotamerLibrary. -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
addRotPatch
(String rotFileName) addRotPatch.static void
applyRotamer
(Residue residue, Rotamer rotamer) Applies a Rotamer to a Residue by calling applyAARotamer or applyNARotamer.static void
applyRotamer
(Residue residue, Rotamer rotamer, boolean independent) Version of applyRotamer which allows for chain context-independent drawing of nucleic acid Rotamers.static double[]
applySugarPucker
(Residue residue, RotamerLibrary.NucleicSugarPucker pucker, boolean isDeoxy, boolean place) If place is true, builds C2', C3', and O3' based on delta(i) and returns an empty double[]; if place is false, returns a double[] filled with the coordinates at which O3' would be placed by the specified pucker.static RotamerLibrary
getDefaultLibrary.Get the protein rotamer library.Rotamer[]
Return an array of Rotamers for the given amino acid.Rotamer[]
getRotamers
(AminoAcidUtils.AminoAcid3 name, TitrationUtils titrationUtils) Return an array of Rotamers for the given amino acid.Rotamer[]
Return an array of Rotamers for the given nucleic acid.boolean
getUsingOrigCoordsRotamer.guessRotamer
(Residue residue) Guess at what rotamer a residue is currently in.static void
initializeDefaultAtomicCoordinates
(Polymer[] polymers) Initializes default coordinates (presently PDB coordinates) for key atoms in all nucleic acid Residues.static int
measureAARotamer
(Residue residue, double[] chi, boolean print) Measures the torsions of an amino acid Residue's current configuration.static double
measureDelta
(Residue residue) Measures the delta torsion (sugar pucker) of a nucleic acid Residue.static double[]
measureRotamer
(Residue residue, boolean print) Measures the torsional angles of a residue's side chain.static int
measureRotamer
(Residue residue, double[] chi, boolean print) Measures the torsion angles of a Residue.static void
measureRotamers
(List<Residue> residueList, boolean print) Measures the torsions in a list of Residues.static void
readRotFile
(File rotamerFile, MolecularAssembly assembly) void
setUseOrigCoordsRotamer
(boolean set) Setter for the fielduseOrigCoordsRotamer
.
-
Constructor Details
-
RotamerLibrary
public RotamerLibrary(boolean origCoords) Constructor for RotamerLibrary.- Parameters:
origCoords
- Whether to use original-coordinates rotamers.
-
RotamerLibrary
Constructor for RotamerLibrary.- Parameters:
protLibrary
- ARotamerLibrary.ProteinLibrary
to use as the idealized amino acid rotamer library.origCoords
- Whether to use original-coordinates rotamers.
-
RotamerLibrary
Constructor for RotamerLibrary.- Parameters:
naLibrary
- ARotamerLibrary.NucleicAcidLibrary
to use as the idealized nucleic acid rotamer library.origCoords
- Whether to use original-coordinates rotamers.
-
RotamerLibrary
public RotamerLibrary(RotamerLibrary.ProteinLibrary protLibrary, RotamerLibrary.NucleicAcidLibrary naLibrary, boolean origCoords) Constructor for RotamerLibrary.- Parameters:
protLibrary
- ARotamerLibrary.ProteinLibrary
to use as the idealized amino acid rotamer library.naLibrary
- ARotamerLibrary.NucleicAcidLibrary
to use as the idealized nucleic acid rotamer library.origCoords
- Whether to use original-coordinates rotamers.
-
-
Method Details
-
addRotPatch
addRotPatch.- Parameters:
rotFileName
- aString
object.- Returns:
- a boolean.
-
applyRotamer
Applies a Rotamer to a Residue by calling applyAARotamer or applyNARotamer.- Parameters:
residue
- the Residue whose side-chain will be moved.rotamer
- the Rotamer defining the move.
-
applyRotamer
Version of applyRotamer which allows for chain context-independent drawing of nucleic acid Rotamers. Solely used in saveRotamers at this point, although it may be useful for debugging.- Parameters:
residue
- the Residue to be moved.rotamer
- Rotamer to be applied.independent
- Whether to draw Rotamer independent of chain context.
-
applySugarPucker
public static double[] applySugarPucker(Residue residue, RotamerLibrary.NucleicSugarPucker pucker, boolean isDeoxy, boolean place) If place is true, builds C2', C3', and O3' based on delta(i) and returns an empty double[]; if place is false, returns a double[] filled with the coordinates at which O3' would be placed by the specified pucker.Presently uses default locations for C1', O4', and C4' to build these atoms.
- Parameters:
residue
- Nucleic acid Residue to which the pucker is to bea appliedpucker
- An int specifying pucker (1=North, 2=South).isDeoxy
- Booleanplace
- Flag for usage case.- Returns:
- A double[] with O3' coordinates (place=false), or null (place=true).
-
getDefaultLibrary
getDefaultLibrary.- Returns:
- a
RotamerLibrary
object.
-
initializeDefaultAtomicCoordinates
Initializes default coordinates (presently PDB coordinates) for key atoms in all nucleic acid Residues. This is necessary to preserve rotamer independence while still adjusting rotamers to correctly meet prior residues; C4', O4', and C1' are used to build the rest of the nucleic acid base, but are moved with each Rotamer to take part of the strain of correctly meeting O3' of residue i-1.It also initializes the location of O3' in both North and South puckers; while in theory this could be recalculated each time based off of C4', O4', and C1', it is easier to just store these two locations and call them when needed.
This MUST be called before any applyRotamer calls are made, else invalid coordinates will be stored.
- Parameters:
polymers
- the Polymer array to examine.
-
measureAARotamer
Measures the torsions of an amino acid Residue's current configuration.- Parameters:
residue
- To be measured.chi
- Array to be filled with torsion values.print
- Verbosity flag.- Returns:
- The number of rotamers this Residue has.
-
measureDelta
Measures the delta torsion (sugar pucker) of a nucleic acid Residue.- Parameters:
residue
- To be measured- Returns:
- Delta torsion (sugar pucker angle).
-
measureRotamer
Measures the torsional angles of a residue's side chain.- Parameters:
residue
- aResidue
object.print
- a boolean.- Returns:
- an array of
invalid reference
double
-
measureRotamer
Measures the torsion angles of a Residue.- Parameters:
residue
- To be measuredchi
- Array to be filled with torsion valuesprint
- Verbosity flag- Returns:
- The number of rotamers this Residue has.
-
measureRotamers
Measures the torsions in a list of Residues.- Parameters:
residueList
- Residues to be measured.print
- Verbosity flag.
-
readRotFile
- Throws:
IOException
-
getLibrary
Get the protein rotamer library.- Returns:
- the ProteinLibrary in use.
-
getRotamers
Return an array of Rotamers for the given amino acid.- Parameters:
name
- The name of the amino acid.- Returns:
- An array of Rotamers.
-
getRotamers
Return an array of Rotamers for the given amino acid.- Parameters:
name
- The name of the amino acid.- Returns:
- An array of Rotamers.
-
getRotamers
Return an array of Rotamers for the given nucleic acid.- Parameters:
name
- The name of the nucleic acid.- Returns:
- An array of Rotamers.
-
getUsingOrigCoordsRotamer
public boolean getUsingOrigCoordsRotamer()getUsingOrigCoordsRotamer.- Returns:
- a boolean.
-
guessRotamer
Guess at what rotamer a residue is currently in.- Parameters:
residue
- Residue to check.- Returns:
- Index of the rotamer it is in.
-
setUseOrigCoordsRotamer
public void setUseOrigCoordsRotamer(boolean set) Setter for the fielduseOrigCoordsRotamer
.- Parameters:
set
- a boolean.
-