Class RotamerLibrary

java.lang.Object
ffx.potential.bonded.RotamerLibrary

public class RotamerLibrary extends Object
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
  • Constructor Details

  • Method Details

    • addRotPatch

      public static boolean addRotPatch(String rotFileName)
      addRotPatch.
      Parameters:
      rotFileName - a String object.
      Returns:
      a boolean.
    • applyRotamer

      public static void applyRotamer(Residue residue, Rotamer rotamer)
      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

      public static void applyRotamer(Residue residue, Rotamer rotamer, boolean independent)
      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 applied
      pucker - An int specifying pucker (1=North, 2=South).
      isDeoxy - Boolean
      place - Flag for usage case.
      Returns:
      A double[] with O3' coordinates (place=false), or null (place=true).
    • getDefaultLibrary

      public static RotamerLibrary getDefaultLibrary()
      getDefaultLibrary.
      Returns:
      a RotamerLibrary object.
    • initializeDefaultAtomicCoordinates

      public static void initializeDefaultAtomicCoordinates(Polymer[] polymers)
      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

      public static int measureAARotamer(Residue residue, double[] chi, boolean print)
      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

      public static double measureDelta(Residue residue)
      Measures the delta torsion (sugar pucker) of a nucleic acid Residue.
      Parameters:
      residue - To be measured
      Returns:
      Delta torsion (sugar pucker angle).
    • measureRotamer

      public static double[] measureRotamer(Residue residue, boolean print)
      Measures the torsional angles of a residue's side chain.
      Parameters:
      residue - a Residue object.
      print - a boolean.
      Returns:
      an array of
      invalid reference
      double
      objects.
    • measureRotamer

      public static int measureRotamer(Residue residue, double[] chi, boolean print)
      Measures the torsion angles of a Residue.
      Parameters:
      residue - To be measured
      chi - Array to be filled with torsion values
      print - Verbosity flag
      Returns:
      The number of rotamers this Residue has.
    • measureRotamers

      public static void measureRotamers(List<Residue> residueList, boolean print)
      Measures the torsions in a list of Residues.
      Parameters:
      residueList - Residues to be measured.
      print - Verbosity flag.
    • readRotFile

      public static void readRotFile(File rotamerFile, MolecularAssembly assembly) throws IOException
      Throws:
      IOException
    • getLibrary

      public RotamerLibrary.ProteinLibrary getLibrary()
      Get the protein rotamer library.
      Returns:
      the ProteinLibrary in use.
    • getRotamers

      public Rotamer[] getRotamers(AminoAcidUtils.AminoAcid3 name)
      Return an array of Rotamers for the given amino acid.
      Parameters:
      name - The name of the amino acid.
      Returns:
      An array of Rotamers.
    • getRotamers

      public Rotamer[] getRotamers(AminoAcidUtils.AminoAcid3 name, TitrationUtils titrationUtils)
      Return an array of Rotamers for the given amino acid.
      Parameters:
      name - The name of the amino acid.
      Returns:
      An array of Rotamers.
    • getRotamers

      public Rotamer[] getRotamers(NucleicAcidUtils.NucleicAcid3 name)
      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

      public RotamerLibrary.RotamerGuess guessRotamer(Residue residue)
      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 field useOrigCoordsRotamer.
      Parameters:
      set - a boolean.