Class Residue

java.lang.Object
edu.duke.cs.osprey.structure.Residue
All Implemented Interfaces:
Serializable

public class Residue extends Object implements Serializable
A Residue is a piece of a molecular system that can mutate, take on RCs, etc. and is the basic unit for energy calculations: energy is broken down to intra-residue energies, pairwise interactions between residues, and maybe a few triples etc.
See Also:
  • Field Details

    • fullName

      public String fullName
    • indexInMolecule

      public int indexInMolecule
      Index of this residue in the molecule it's in
    • molec

      public Molecule molec
      The molecule the residue's in
    • template

      public ResidueTemplate template
      Gives the name of the residue like "GLU" or "H2O" or whatever and any information about bonds, force-field, rotatable dihedrals, and rotamers Only assignment using assignTemplate(ResidueTemplateLibrary), which will reorder atoms to match template.
    • atoms

      public ArrayList<Atom> atoms
      Information about the individual atoms. When assigning the template we will copy this from the template.
    • coords

      public double[] coords
      coordinates of all the atoms: x1, y1, z1, x2, ...
    • intraResBondsMarked

      public boolean intraResBondsMarked
    • interResBondsMarked

      public boolean interResBondsMarked
    • confProblems

      public ArrayList<ConfProblem> confProblems
    • pucker

      public ProlinePucker pucker
    • secondaryStruct

      public Residue.SecondaryStructure secondaryStruct
  • Constructor Details

  • Method Details

    • copyAtoms

      public static ArrayList<Atom> copyAtoms(ArrayList<Atom> atoms)
    • copyToMol

      public Residue copyToMol(Molecule mol, boolean copyIntraBonds)
      An optimized copy method (profiling shows the usual constructors are a bit slow)
    • getPDBResNumber

      public String getPDBResNumber()
    • getChainId

      public char getChainId()
    • getType

      public String getType()
    • assignTemplate

      public boolean assignTemplate(ResidueTemplateLibrary templateLib, Residue.TemplateMatchingMethod method)
    • assignTemplate

      public boolean assignTemplate(ResidueTemplateLibrary templateLib)
    • assignTemplate

      public boolean assignTemplate(List<ResidueTemplate> templCandidates, ForcefieldParams ffParams)
    • assignTemplateSimple

      public void assignTemplateSimple(ResidueTemplateLibrary templateLib)
    • assignTemplateSimple

      public boolean assignTemplateSimple(ResidueTemplateLibrary templateLib, String type)
      A much simpler template assigner that works only with atom names. Doesn't require coords to match templates, and hence is completely immune to bugs caused by mis-matched atoms, say, due to issues with stereochemistries. Important for accurately assigning templates to structures in the top8000 dataset.
    • markIntraResBondsByTemplate

      public void markIntraResBondsByTemplate()
      Assign all the bonds between atoms in this residue, based on the template
    • reconnectInterResBonds

      public void reconnectInterResBonds()
    • getIntraResBondMatrix

      public boolean[][] getIntraResBondMatrix()
    • copyIntraBondsFrom

      public void copyIntraBondsFrom(Residue other)
    • checkTemplateAtomNames

      public void checkTemplateAtomNames()
    • checkBonds

      public void checkBonds()
    • getAtomByName

      public Atom getAtomByName(String name)
    • getAtomByNameOrThrow

      public Atom getAtomByNameOrThrow(String name)
    • getAtomIndexByName

      public int getAtomIndexByName(String n)
    • getCoordsByAtomName

      public double[] getCoordsByAtomName(String n)
    • setCoordsByAtomName

      public void setCoordsByAtomName(String name, double[] atomCoords)
    • distanceTo

      public double distanceTo(Residue res2)
    • isBondedTo

      public boolean isBondedTo(Residue res2)
    • atomDistanceMatrix

      public double[][] atomDistanceMatrix()
    • estBondDistanceMatrix

      public double[][] estBondDistanceMatrix(ForcefieldParams ffParams)
    • removeInterResBonds

      public void removeInterResBonds()
    • getNumDihedrals

      public int getNumDihedrals()
    • getDihedralAngle

      public double getDihedralAngle(int i)
    • getDihedralAngles

      public double[] getDihedralAngles()
    • equivalentInMolec

      public Residue equivalentInMolec(Molecule mol)
    • equivalentInMolec

      public static ArrayList<Residue> equivalentInMolec(ArrayList<Residue> resList, Molecule mol)
    • deleteHydrogens

      public void deleteHydrogens()
    • addAtom

      public void addAtom(Atom atom, double[] newAtomCoords)