BioPolymer
Date: 2019-10-22

org.jmol.modelsetbio

## Class BioPolymer

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

- All Implemented Interfaces:
    Structure
  Direct Known Subclasses:
    AlphaPolymer, CarbohydratePolymer, PhosphorusPolymer

      public abstract class BioPolymer
      extends java.lang.Object
      implements Structure

  A "BioPolymer" is a constructed set of contiguous (probably connected) "Monomers", which may be one of Alpha (Calpha atoms), Amino (Calpha + backbone), Phosphorus (P atoms), Nucleic (DNA/RNA), or Carbohydrate. BioPolymers are constructed after file loading and after various changes that might affect secondary structure. BioPolymers are not Chains. Chains are set at load time and just constitute collections of unique chain identifiers in the file.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int` | `bioPolymerIndexInModel`
    `(package private) javajs.util.BS` | `bsSelectedMonomers`
    `protected javajs.util.P3[]` | `controlPoints`
    `int` | `cyclicFlag`
    `protected boolean` | `hasStructure`
    `protected boolean` | `hasWingPoints`
    `boolean` | `haveParameters`
    `protected boolean` | `invalidControl`
    `private boolean` | `invalidLead`
    `protected int[]` | `leadAtomIndices`
    `protected javajs.util.P3[]` | `leadMidpoints`
    `protected javajs.util.P3[]` | `leadPoints`
    `Model` | `model`
    `int` | `monomerCount`
    `Monomer[]` | `monomers`
    `javajs.util.BS` | `reversed`
    `private int` | `selectedMonomerCount`
    `protected float` | `sheetSmoothing`
    `boolean` | `twistedSheets`
    `protected int` | `type`
    `protected static int` | `TYPE_AMINO`
    `protected static int` | `TYPE_CARBOHYDRATE`
    `protected static int` | `TYPE_NOBONDING`
    `protected static int` | `TYPE_NUCLEIC`
    `private javajs.util.V3` | `unitVectorX`
    `protected javajs.util.V3[]` | `wingVectors`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `BioPolymer()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected boolean` | `calcEtaThetaAngles()`
    `private void` | `calcLeadMidpointsAndWingVectors()`
    `boolean` | `calcParameters()`
    `protected boolean` | `calcPhiPsiAngles()`
    `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)`
    `void` | `calcSelectedMonomersCount(javajs.util.BS bsSelected)`
    `protected float` | `calculateRamachandranHelixAngle(int m, char qtype)`
    `void` | `clearStructures()`
    `void` | `findNearestAtomIndex(int xMouse, int yMouse, Atom[] closest, short[] mads, int myVisibilityFlag, javajs.util.BS bsNot)`
    `protected javajs.util.P3` | `getControlPoint(int i, javajs.util.V3 v)`
    `javajs.util.P3[]` | `getControlPoints(boolean isTraceAlpha, float sheetSmoothing, boolean invalidate)`
    `private javajs.util.P3[]` | `getControlPoints2(float sheetSmoothing)`
    `protected int` | `getIndex(int chainID, int seqcode, int istart, int iend)`
    `private javajs.util.P3` | `getInitiatorPoint()`
    `int[]` | `getLeadAtomIndices()`
    `(package private) void` | `getLeadMidPoint(int i, javajs.util.P3 midPoint)`
    `javajs.util.P3[]` | `getLeadMidpoints()`
    `(package private) javajs.util.P3` | `getLeadPoint(int monomerIndex)`
    `(package private) javajs.util.P3[]` | `getLeadPoints()`
    `int` | `getPolymerPointsAndVectors(int last, javajs.util.BS bs, javajs.util.Lst<javajs.util.P3[]> vList, boolean isTraceAlpha, float sheetSmoothing)`
    `void` | `getPolymerSequenceAtoms(int group1, int nGroups, javajs.util.BS bsInclude, javajs.util.BS bsResult)`
    `ProteinStructure` | `getProteinStructure(int monomerIndex)`
    `void` | `getRange(javajs.util.BS bs, boolean isMutated)`
    `void` | `getRangeGroups(int nResidues, javajs.util.BS bsAtoms, javajs.util.BS bsResult)`
    `(package private) int` | `getSelectedMonomerCount()`
    `java.lang.String` | `getSequence()`
    `private javajs.util.P3` | `getTerminatorPoint()`
    `int` | `getType()`
    `(package private) javajs.util.P3` | `getWingPoint(int polymerIndex)`
    `javajs.util.V3[]` | `getWingVectors()`
    `boolean` | `isCyclic()`
    `(package private) boolean` | `isMonomerSelected(int i)`
    `boolean` | `isNucleic()`
    `void` | `recalculateLeadMidpointsAndWingVectors()`
    `protected void` | `resetHydrogenPoints()`
    `protected void` | `set(Monomer[] monomers)`
    `void` | `setAtomBits(javajs.util.BS bs)`
    `void` | `setAtomBitsAndClear(javajs.util.BS bs, javajs.util.BS bsOut)`
    `void` | `setConformation(javajs.util.BS bsSelected)`

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

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

- - ### Field Detail

    - #### model

          public Model model

    - #### monomers

          public Monomer[] monomers

    - #### hasStructure

          protected boolean hasStructure

    - #### leadMidpoints

          protected javajs.util.P3[] leadMidpoints

    - #### leadPoints

          protected javajs.util.P3[] leadPoints

    - #### controlPoints

          protected javajs.util.P3[] controlPoints

    - #### wingVectors

          protected javajs.util.V3[] wingVectors

    - #### leadAtomIndices

          protected int[] leadAtomIndices

    - #### type

          protected int type

    - #### bioPolymerIndexInModel

          public int bioPolymerIndexInModel

    - #### monomerCount

          public int monomerCount

    - #### TYPE_NOBONDING

          protected static final int TYPE_NOBONDING

      See Also:
        Constant Field Values

    - #### TYPE_AMINO

          protected static final int TYPE_AMINO

      See Also:
        Constant Field Values

    - #### TYPE_NUCLEIC

          protected static final int TYPE_NUCLEIC

      See Also:
        Constant Field Values

    - #### TYPE_CARBOHYDRATE

          protected static final int TYPE_CARBOHYDRATE

      See Also:
        Constant Field Values

    - #### cyclicFlag

          public int cyclicFlag

    - #### invalidLead

          private boolean invalidLead

    - #### invalidControl

          protected boolean invalidControl

    - #### sheetSmoothing

          protected float sheetSmoothing

    - #### hasWingPoints

          protected boolean hasWingPoints

    - #### reversed

          public javajs.util.BS reversed

    - #### twistedSheets

          public boolean twistedSheets

    - #### unitVectorX

          private final javajs.util.V3 unitVectorX

    - #### selectedMonomerCount

          private int selectedMonomerCount

    - #### bsSelectedMonomers

          javajs.util.BS bsSelectedMonomers

    - #### haveParameters

          public boolean haveParameters

  - ### Constructor Detail

    - #### BioPolymer

          protected BioPolymer()

  - ### Method Detail

    - #### set

          protected void set(Monomer[] monomers)

    - #### setAtomBits

          public void setAtomBits(javajs.util.BS bs)

      Specified by:
        `setAtomBits` in interface `Structure`

    - #### setAtomBitsAndClear

          public void setAtomBitsAndClear(javajs.util.BS bs,
                                          javajs.util.BS bsOut)

      Specified by:
        `setAtomBitsAndClear` in interface `Structure`

    - #### getRange

          public void getRange(javajs.util.BS bs,
                               boolean isMutated)

    - #### clearStructures

          public void clearStructures()

    - #### getLeadAtomIndices

          public int[] getLeadAtomIndices()

    - #### getIndex

          protected int getIndex(int chainID,
                                 int seqcode,
                                 int istart,
                                 int iend)

    - #### getLeadPoint

          final javajs.util.P3 getLeadPoint(int monomerIndex)

    - #### getInitiatorPoint

          private final javajs.util.P3 getInitiatorPoint()

    - #### getTerminatorPoint

          private final javajs.util.P3 getTerminatorPoint()

    - #### getLeadMidPoint

          void getLeadMidPoint(int i,
                               javajs.util.P3 midPoint)

    - #### getWingPoint

          final javajs.util.P3 getWingPoint(int polymerIndex)

    - #### setConformation

          public void setConformation(javajs.util.BS bsSelected)

    - #### recalculateLeadMidpointsAndWingVectors

          public void recalculateLeadMidpointsAndWingVectors()

    - #### resetHydrogenPoints

          protected void resetHydrogenPoints()

    - #### getLeadMidpoints

          public javajs.util.P3[] getLeadMidpoints()

    - #### getLeadPoints

          javajs.util.P3[] getLeadPoints()

    - #### getControlPoints

          public javajs.util.P3[] getControlPoints(boolean isTraceAlpha,
                                                   float sheetSmoothing,
                                                   boolean invalidate)

    - #### getControlPoints2

          private javajs.util.P3[] getControlPoints2(float sheetSmoothing)

    - #### getControlPoint

          protected javajs.util.P3 getControlPoint(int i,
                                                   javajs.util.V3 v)

      Parameters:
        `i` -
        `v` -
      Returns:
        the leadPoint unless a protein sheet residue (see AlphaPolymer)

    - #### getWingVectors

          public final javajs.util.V3[] getWingVectors()

    - #### calcLeadMidpointsAndWingVectors

          private final void calcLeadMidpointsAndWingVectors()

    - #### findNearestAtomIndex

          public void findNearestAtomIndex(int xMouse,
                                           int yMouse,
                                           Atom[] closest,
                                           short[] mads,
                                           int myVisibilityFlag,
                                           javajs.util.BS bsNot)

    - #### getSelectedMonomerCount

          int getSelectedMonomerCount()

    - #### calcSelectedMonomersCount

          public void calcSelectedMonomersCount(javajs.util.BS bsSelected)

    - #### isMonomerSelected

          boolean isMonomerSelected(int i)

    - #### getPolymerPointsAndVectors

          public int getPolymerPointsAndVectors(int last,
                                                javajs.util.BS bs,
                                                javajs.util.Lst<javajs.util.P3[]> vList,
                                                boolean isTraceAlpha,
                                                float sheetSmoothing)

    - #### getSequence

          public java.lang.String getSequence()

    - #### getPolymerSequenceAtoms

          public void getPolymerSequenceAtoms(int group1,
                                              int nGroups,
                                              javajs.util.BS bsInclude,
                                              javajs.util.BS bsResult)

    - #### getProteinStructure

          public ProteinStructure getProteinStructure(int monomerIndex)

      Parameters:
        `monomerIndex` -
      Returns:
        "HELIX" "TURN" etc

    - #### calcParameters

          public boolean calcParameters()

    - #### calcEtaThetaAngles

          protected boolean calcEtaThetaAngles()

    - #### calcPhiPsiAngles

          protected boolean calcPhiPsiAngles()

    - #### calculateRamachandranHelixAngle

          protected float calculateRamachandranHelixAngle(int m,
                                                          char qtype)

      Parameters:
        `m` -
        `qtype` -
      Returns:
        calculated value

    - #### isNucleic

          public boolean isNucleic()

    - #### getRangeGroups

          public void getRangeGroups(int nResidues,
                                     javajs.util.BS bsAtoms,
                                     javajs.util.BS bsResult)

    - #### 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)

      Parameters:
        `polymer` -
        `bsA` -
        `bsB` -
        `vHBonds` -
        `nMaxPerResidue` -
        `min` -
        `checkDistances` -
        `dsspIgnoreHydrogens` -

    - #### getType

          public int getType()

    - #### isCyclic

          public boolean isCyclic()