ProteinStructure
Date: 2019-10-22

org.jmol.modelsetbio

## Class ProteinStructure

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

- All Implemented Interfaces:
    Structure
  Direct Known Subclasses:
    Annotation, Helix, Sheet, Turn

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

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `AlphaPolymer` | `apolymer`
    `protected javajs.util.P3` | `axisA`
    `protected javajs.util.P3` | `axisB`
    `protected javajs.util.V3` | `axisUnitVector`
    `private static int` | `globalStrucNo`
    `protected int` | `monomerIndexFirst`
    `(package private) int` | `monomerIndexLast`
    `int` | `nRes`
    `private java.util.Map<Monomer,java.lang.Integer>` | `resMap`
    `private javajs.util.P3[]` | `segments`
    `(package private) int` | `serialID`
    `(package private) int` | `strandCount`
    `(package private) int` | `strucNo`
    `(package private) java.lang.String` | `structureID`
    `(package private) STR` | `subtype`
    `(package private) STR` | `type`
    `protected javajs.util.V3` | `vectorProjection`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ProteinStructure()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `(package private) void` | `addMonomer(int index)` Note that this method does not check to see that there are no overlapping protein structures.
    `void` | `calcAxis()`
    `private void` | `calcSegments()`
    `Monomer` | `findMonomer(javajs.util.BS bsAtoms, boolean isFirst)`
    `javajs.util.P3` | `getAxisEndPoint()`
    `javajs.util.P3` | `getAxisStartPoint()`
    `int` | `getIndex(Monomer monomer)`
    `javajs.util.P3[]` | `getSegments()`
    `(package private) javajs.util.P3` | `getStructureMidPoint(int index)`
    `boolean` | `isWithin(int monomerIndex)`
    `(package private) void` | `removeMonomer(int index)` should be OK here to remove the first -- we just get a monomerCount of 0; but we don't remove monomers that aren't part of this structure.
    `(package private) void` | `resetAxes()`
    `void` | `setAtomBits(javajs.util.BS bs)`
    `void` | `setAtomBitsAndClear(javajs.util.BS bs, javajs.util.BS bsOut)`
    `protected void` | `setupPS(AlphaPolymer apolymer, STR type, int monomerIndex, int monomerCount)`

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

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

- - ### Field Detail

    - #### type

          STR type

    - #### subtype

          STR subtype

    - #### structureID

          java.lang.String structureID

    - #### strucNo

          int strucNo

    - #### serialID

          int serialID

    - #### strandCount

          int strandCount

    - #### nRes

          public int nRes

    - #### apolymer

          public AlphaPolymer apolymer

    - #### monomerIndexFirst

          protected int monomerIndexFirst

    - #### monomerIndexLast

          int monomerIndexLast

    - #### axisA

          protected javajs.util.P3 axisA

    - #### axisB

          protected javajs.util.P3 axisB

    - #### axisUnitVector

          protected javajs.util.V3 axisUnitVector

    - #### vectorProjection

          protected javajs.util.V3 vectorProjection

    - #### globalStrucNo

          private static int globalStrucNo

    - #### segments

          private javajs.util.P3[] segments

    - #### resMap

          private java.util.Map<Monomer,java.lang.Integer> resMap

  - ### Constructor Detail

    - #### ProteinStructure

          public ProteinStructure()

  - ### Method Detail

    - #### setupPS

          protected void setupPS(AlphaPolymer apolymer,
                                 STR type,
                                 int monomerIndex,
                                 int monomerCount)

      Parameters:
        `apolymer` -
        `type` -
        `monomerIndex` -
        `monomerCount` -

    - #### addMonomer

          void addMonomer(int index)

      Note that this method does not check to see that there are no overlapping protein structures.
      Parameters:
        `index` -

    - #### removeMonomer

          void removeMonomer(int index)

      should be OK here to remove the first -- we just get a monomerCount of 0; but we don't remove monomers that aren't part of this structure.
      Parameters:
        `index` -

    - #### calcAxis

          public void calcAxis()

    - #### isWithin

          public boolean isWithin(int monomerIndex)

    - #### getIndex

          public int getIndex(Monomer monomer)

    - #### getSegments

          public javajs.util.P3[] getSegments()

      Returns:
        points for rocket segment rendering

    - #### getStructureMidPoint

          javajs.util.P3 getStructureMidPoint(int index)

    - #### calcSegments

          private void calcSegments()

    - #### getAxisStartPoint

          public javajs.util.P3 getAxisStartPoint()

    - #### getAxisEndPoint

          public javajs.util.P3 getAxisEndPoint()

    - #### resetAxes

          void resetAxes()

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

    - #### findMonomer

          public Monomer findMonomer(javajs.util.BS bsAtoms,
                                     boolean isFirst)