AminoPolymer
Date: 2019-10-22

org.jmol.modelsetbio

## Class AminoPolymer

- java.lang.Object
- - org.jmol.modelsetbio.BioPolymer
  - - org.jmol.modelsetbio.AlphaPolymer
    - - org.jmol.modelsetbio.AminoPolymer

- All Implemented Interfaces:
    Structure

      public class AminoPolymer
      extends AlphaPolymer

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private static float` | `maxHbondAlphaDistance`
    `private static float` | `maxHbondAlphaDistance2`
    `private static float` | `minimumHbondDistance2`
    `private java.util.Map<STR,float[]>` | `structureList`

    - ### Fields inherited from class org.jmol.modelsetbio.AlphaPolymer

      `pt0`

    - ### Fields inherited from class org.jmol.modelsetbio.BioPolymer

      `bioPolymerIndexInModel, bsSelectedMonomers, controlPoints, cyclicFlag, hasStructure, hasWingPoints, haveParameters, invalidControl, leadAtomIndices, leadMidpoints, leadPoints, model, monomerCount, monomers, reversed, sheetSmoothing, twistedSheets, type, TYPE_AMINO, TYPE_CARBOHYDRATE, TYPE_NOBONDING, TYPE_NUCLEIC, wingVectors`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AminoPolymer(Monomer[] monomers, int pt0)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `private void` | `addResidueHydrogenBond(Atom nitrogen, Atom oxygen, int indexAminoGroup, int indexCarbonylGroup, float energy, javajs.util.Lst<Bond> vHBonds)`
    `private int` | `calcHbondEnergy(javajs.util.P3 nitrogenPoint, javajs.util.P3 hydrogenPoint, AminoMonomer target, boolean checkDistances)` based on RasMol 2.7.2.1.1 model checkDistances: When we are seriously looking for H bonds, we want to also check that distCN > distCH and that the OH distance is less than 3 Angstroms.
    `protected boolean` | `calcPhiPsiAngles()`
    `private void` | `calcPhiPsiAngles2(AminoMonomer residue1, AminoMonomer residue2)`
    `void` | `calcRasmolHydrogenBonds(BioPolymer polymer, javajs.util.BS bsA, javajs.util.BS bsB, javajs.util.Lst<Bond> vHBonds, int nMaxPerResidue, int[][][] min, boolean checkDistances, boolean dsspIgnoreHydrogens)`
    `protected float` | `calculateRamachandranHelixAngle(int m, char qtype)`
    `void` | `calculateStructures(boolean alphaOnly)` Uses Levitt & Greer algorithm to calculate protein secondary structures using only alpha-carbon atoms.
    `private static boolean` | `checkPhiPsi(float[] list, float psi, float phi)`
    `private void` | `checkRasmolHydrogenBond(AminoMonomer source, BioPolymer polymer, int indexDonor, javajs.util.P3 hydrogenPoint, javajs.util.BS bsB, javajs.util.Lst<Bond> vHBonds, int[][] min, boolean checkDistances)`
    `private boolean` | `isHelix(float psi, float phi)`
    `private boolean` | `isSheet(float psi, float phi)`
    `private boolean` | `isTurn(float psi, float phi)`
    `protected void` | `resetHydrogenPoints()`
    `void` | `setStructureList(java.util.Map<STR,float[]> structureList)`

    - ### Methods inherited from class org.jmol.modelsetbio.AlphaPolymer

      `addStructure, addStructureProtected, clearStructures, getControlPoint, getProteinStructure, setStructureBS`

    - ### Methods inherited from class org.jmol.modelsetbio.BioPolymer

      `calcEtaThetaAngles, calcParameters, calcSelectedMonomersCount, findNearestAtomIndex, getControlPoints, getIndex, getLeadAtomIndices, getLeadMidPoint, getLeadMidpoints, getLeadPoint, getLeadPoints, getPolymerPointsAndVectors, getPolymerSequenceAtoms, getRange, getRangeGroups, getSelectedMonomerCount, getSequence, getType, getWingPoint, getWingVectors, isCyclic, isMonomerSelected, isNucleic, recalculateLeadMidpointsAndWingVectors, set, setAtomBits, setAtomBitsAndClear, setConformation`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### maxHbondAlphaDistance

          private static final float maxHbondAlphaDistance

      See Also:
        Constant Field Values

    - #### maxHbondAlphaDistance2

          private static final float maxHbondAlphaDistance2

      See Also:
        Constant Field Values

    - #### minimumHbondDistance2

          private static final float minimumHbondDistance2

      See Also:
        Constant Field Values

    - #### structureList

          private java.util.Map<STR,float[]> structureList

  - ### Constructor Detail

    - #### AminoPolymer

          AminoPolymer(Monomer[] monomers,
                       int pt0)

  - ### Method Detail

    - #### resetHydrogenPoints

          protected void resetHydrogenPoints()

      Overrides:
        `resetHydrogenPoints` in class `BioPolymer`

    - #### calcPhiPsiAngles

          protected boolean calcPhiPsiAngles()

      Overrides:
        `calcPhiPsiAngles` in class `BioPolymer`

    - #### calcPhiPsiAngles2

          private void calcPhiPsiAngles2(AminoMonomer residue1,
                                         AminoMonomer residue2)

    - #### calculateRamachandranHelixAngle

          protected float calculateRamachandranHelixAngle(int m,
                                                          char qtype)

      Overrides:
        `calculateRamachandranHelixAngle` in class `BioPolymer`
      Returns:
        calculated value

    - #### calcRasmolHydrogenBonds

          public void calcRasmolHydrogenBonds(BioPolymer polymer,
                                              javajs.util.BS bsA,
                                              javajs.util.BS bsB,
                                              javajs.util.Lst<Bond> vHBonds,
                                              int nMaxPerResidue,
                                              int[][][] min,
                                              boolean checkDistances,
                                              boolean dsspIgnoreHydrogens)

      Overrides:
        `calcRasmolHydrogenBonds` in class `BioPolymer`

    - #### checkRasmolHydrogenBond

          private void checkRasmolHydrogenBond(AminoMonomer source,
                                               BioPolymer polymer,
                                               int indexDonor,
                                               javajs.util.P3 hydrogenPoint,
                                               javajs.util.BS bsB,
                                               javajs.util.Lst<Bond> vHBonds,
                                               int[][] min,
                                               boolean checkDistances)

    - #### calcHbondEnergy

          private int calcHbondEnergy(javajs.util.P3 nitrogenPoint,
                                      javajs.util.P3 hydrogenPoint,
                                      AminoMonomer target,
                                      boolean checkDistances)

      based on RasMol 2.7.2.1.1 model checkDistances: When we are seriously looking for H bonds, we want to also check that distCN > distCH and that the OH distance is less than 3 Angstroms. Otherwise that's just too strange a hydrogen bond. (We get hydrogen bonds from i to i+2, for example) This check is skipped for an actual DSSP calc., where we want the original definition and are not actually creating hydrogen bonds H .......... O | | | | N C
      Parameters:
        `nitrogenPoint` -
        `hydrogenPoint` -
        `target` -
        `checkDistances` -
      Returns:
        energy in cal/mol or 0 (none)

    - #### addResidueHydrogenBond

          private void addResidueHydrogenBond(Atom nitrogen,
                                              Atom oxygen,
                                              int indexAminoGroup,
                                              int indexCarbonylGroup,
                                              float energy,
                                              javajs.util.Lst<Bond> vHBonds)

    - #### calculateStructures

          public void calculateStructures(boolean alphaOnly)

      Description copied from class: `AlphaPolymer`
      Uses Levitt & Greer algorithm to calculate protein secondary structures using only alpha-carbon atoms.

      Levitt and Greer
      Automatic Identification of Secondary Structure in Globular Proteins
      J.Mol.Biol.(1977) 114, 181-293

      http://csb.stanford.edu/levitt/Levitt_JMB77_Secondary_structure.pdf

      Overrides:
        `calculateStructures` in class `AlphaPolymer`
      Parameters:
        `alphaOnly` - caught by AminoPolymer and discarded if desired

    - #### isTurn

          private boolean isTurn(float psi,
                                 float phi)

      Parameters:
        `psi` - N-C-CA-N torsion for NEXT group
        `phi` - C-CA-N-C torsion for THIS group
      Returns:
        whether this corresponds to a helix

    - #### isSheet

          private boolean isSheet(float psi,
                                  float phi)

    - #### isHelix

          private boolean isHelix(float psi,
                                  float phi)

    - #### checkPhiPsi

          private static boolean checkPhiPsi(float[] list,
                                             float psi,
                                             float phi)

    - #### setStructureList

          public void setStructureList(java.util.Map<STR,float[]> structureList)

      Parameters:
        `structureList` - protein only -- helix, sheet, turn definitions