DSSP
Date: 2019-10-22

org.jmol.dssx

## Class DSSP

- java.lang.Object
- - org.jmol.dssx.DSSP

-     public class DSSP
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private int` | `bioPolymerCount`
    `private BioPolymer[]` | `bioPolymers`
    `private javajs.util.Lst<Bridge>` | `bridgesA`
    `private javajs.util.Lst<Bridge>` | `bridgesP`
    `private javajs.util.BS` | `bsBad`
    `private javajs.util.BS[]` | `done`
    `private boolean` | `doReport`
    `private boolean` | `dsspIgnoreHydrogens`
    `private java.util.Map<java.lang.String,Bridge>` | `htBridges`
    `private java.util.Map<int[][],java.lang.Boolean>` | `htLadders`
    `private boolean` | `isDSSP2`
    `private char[][]` | `labels`
    `private boolean` | `setStructure`
    `private int[][]` | `sheetOffsets`
    `private javajs.util.Lst<Bond>` | `vHBonds`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DSSP()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `private void` | `addHbond(Monomer donor, Monomer acceptor, int iEnergy, int type, java.util.Map<java.lang.String,java.lang.Boolean> htTemp)`
    `java.lang.String` | `calculateDssp(java.lang.Object[] objBioPolymers, int bioPolymerCount, java.lang.Object objVHBonds, boolean doReport, boolean dsspIgnoreHydrogens, boolean setStructure, int version)`
    `private boolean` | `checkBridge(Bridge bridge, boolean isAntiparallel, int n1, int n2)` check to see if another bridge exists offset by n1 and n2 from the two ends of a bridge
    `private void` | `checkBulge(Bridge bridge, boolean isAntiparallel, int dir)`
    `private void` | `createLadders(javajs.util.Lst<Bridge> bridges, boolean isAntiparallel)` "ladder =: one or more consecutive bridges of identical type" (p.
    `private java.lang.String` | `dumpSummary(AminoPolymer ap, char[] labels)`
    `private java.lang.String` | `dumpTags(AminoPolymer ap, java.lang.String lines, javajs.util.BS bsBad, int mode)`
    `private java.lang.String` | `findHelixes(int iPolymer, int[][][] min)` (p.
    `private java.lang.String` | `findHelixes2(int mmtfType, int iPolymer, int pitch, int[][][] min, STR subtype, int type, javajs.util.BS bsTurn, boolean isFirst)`
    `private Bridge` | `getBridge(int[][][][] min, int p1, int a, int p2, int b, javajs.util.Lst<Bridge> bridges, Atom atom1, Atom atom2, AminoPolymer ap1, AminoPolymer ap2, java.util.Map<java.lang.String,java.lang.Boolean> htTemp, boolean isAntiparallel)`
    `private void` | `getBridges(int[][][][] min)` (p.
    `private int[][][][]` | `getDualHydrogenBondArray()` (p.
    `private void` | `getSheetStructures()` "sheet =: a set of one or more ladders connected by shared residues" (p.
    `private int[]` | `isHbonded(int indexDonor, int indexAcceptor, int pDonor, int pAcceptor, int[][][][] min)`
    `private void` | `setTag(char[] tags, javajs.util.BS bs, char ch)`

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

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

- - ### Field Detail

    - #### bioPolymers

          private BioPolymer[] bioPolymers

    - #### vHBonds

          private javajs.util.Lst<Bond> vHBonds

    - #### done

          private javajs.util.BS[] done

    - #### doReport

          private boolean doReport

    - #### dsspIgnoreHydrogens

          private boolean dsspIgnoreHydrogens

    - #### setStructure

          private boolean setStructure

    - #### labels

          private char[][] labels

    - #### bsBad

          private javajs.util.BS bsBad

    - #### bioPolymerCount

          private int bioPolymerCount

    - #### htBridges

          private java.util.Map<java.lang.String,Bridge> htBridges

    - #### htLadders

          private java.util.Map<int[][],java.lang.Boolean> htLadders

    - #### bridgesA

          private javajs.util.Lst<Bridge> bridgesA

    - #### bridgesP

          private javajs.util.Lst<Bridge> bridgesP

    - #### isDSSP2

          private boolean isDSSP2

    - #### sheetOffsets

          private int[][] sheetOffsets

  - ### Constructor Detail

    - #### DSSP

          public DSSP()

  - ### Method Detail

    - #### calculateDssp

          public java.lang.String calculateDssp(java.lang.Object[] objBioPolymers,
                                                int bioPolymerCount,
                                                java.lang.Object objVHBonds,
                                                boolean doReport,
                                                boolean dsspIgnoreHydrogens,
                                                boolean setStructure,
                                                int version)

      Parameters:
        `objBioPolymers` -
        `bioPolymerCount` -
        `objVHBonds` -
        `doReport` -
        `dsspIgnoreHydrogens` -
        `setStructure` -
        `version` - can be 2.0 to reverse order of helix calculation and emphasize pi-helices
      Returns:
        helix-5, helix-4, helix-3, and SUMMARY lines

    - #### getDualHydrogenBondArray

          private int[][][][] getDualHydrogenBondArray()

      (p. 2579): Hydrogen bonds in proteins have little wave-function overlap and are well described by an electromodel: E = q1q2(1/r(ON) + 1/r(CH) - 1/r(OH) - 1/r(CN)) * f with q1 = 0.42e and q2 = 0.20e, e being the unit electron charge and r(AB) the interatomic distance from A to B. In chemical units, r is in angstroms, the dimensional factor f = 332, and E is in kcal/mol. We ... assign an H bond between C=O of residue i and N-H of residue j if E is less than the cutoff, i.e., "Hbond(i,j) =: [E < -0.5 kcal/mol]."
      Returns:
        array of dual-minmum NH-->O=C H bonds

    - #### getBridges

          private void getBridges(int[][][][] min)

      (p. 2581): Two nonoverlapping stretches of three residues each, i-1,i,i+1 and j-1,j,j+1, form either a parallel or antiparallel bridge, depending on which of two basic patterns (Fig. 2) is matched. We assign a bridge between residues i and j if there are two H bonds characteristic of beta-structure; in particular: Parallel Bridge(i,j) =: [Hbond(i-1,j) and Hbond(j,i+1)] or [Hbond(j-1,i) and Hbond(i,j+1)] Antiparallel Bridge(i,j) =: [Hbond(i,j) and Hbond(j,i)] or [Hbond(i-1,j+1) and Hbond(j-1,i+1)]
      Parameters:
        `min` -

    - #### getBridge

          private Bridge getBridge(int[][][][] min,
                                   int p1,
                                   int a,
                                   int p2,
                                   int b,
                                   javajs.util.Lst<Bridge> bridges,
                                   Atom atom1,
                                   Atom atom2,
                                   AminoPolymer ap1,
                                   AminoPolymer ap2,
                                   java.util.Map<java.lang.String,java.lang.Boolean> htTemp,
                                   boolean isAntiparallel)

    - #### addHbond

          private void addHbond(Monomer donor,
                                Monomer acceptor,
                                int iEnergy,
                                int type,
                                java.util.Map<java.lang.String,java.lang.Boolean> htTemp)

    - #### getSheetStructures

          private void getSheetStructures()

      "sheet =: a set of one or more ladders connected by shared residues" (p. 2582)

    - #### createLadders

          private void createLadders(javajs.util.Lst<Bridge> bridges,
                                     boolean isAntiparallel)

      "ladder =: one or more consecutive bridges of identical type" (p. 2582) "For beta structures, we define explicitly: a bulge-linked ladder consists of two (perfect) ladder or bridges of the same type connected by at most one extra residue on one strand and at most four extra resideus on the other strand.... all residues in bulge-linked ladders are marked "E," including the extra residues." (p. 2585)
      Parameters:
        `bridges` -
        `isAntiparallel` -

    - #### checkBridge

          private boolean checkBridge(Bridge bridge,
                                      boolean isAntiparallel,
                                      int n1,
                                      int n2)

      check to see if another bridge exists offset by n1 and n2 from the two ends of a bridge
      Parameters:
        `bridge` -
        `isAntiparallel` -
        `n1` -
        `n2` -
      Returns:
        TRUE if bridge is part of a ladder

    - #### checkBulge

          private void checkBulge(Bridge bridge,
                                  boolean isAntiparallel,
                                  int dir)

    - #### dumpSummary

          private java.lang.String dumpSummary(AminoPolymer ap,
                                               char[] labels)

    - #### dumpTags

          private java.lang.String dumpTags(AminoPolymer ap,
                                            java.lang.String lines,
                                            javajs.util.BS bsBad,
                                            int mode)

    - #### isHbonded

          private int[] isHbonded(int indexDonor,
                                  int indexAcceptor,
                                  int pDonor,
                                  int pAcceptor,
                                  int[][][][] min)

    - #### findHelixes

          private java.lang.String findHelixes(int iPolymer,
                                               int[][][] min)

      (p. 2581): A basic turn pattern (Fig. 2) is a single H bond of type (i,i+n). We assign an n-turn at residue i if there is an H bond from CO(i) to NH(i+n).... When the pattern is found, the ends of the H bond are indicated using ">" at i and "<" at i+n...; the residues bracketed by the H bond are noted "3," "4," or "5" unless they are also end points of other H bonds. Coincidence of ">" and "<" at one residue is indicated by "X." ... Residues bracketed by the hydrogen bond are marked "T," unless they are part of an n-helix (defined below). (p. 2582): A minimal helix is defined by two consecutive n-turns.... Longer helices are defined as overlaps of minimal helices.... Residues bracketed by H bonds are labeled G, H, I.... Long helices can deviate from regularity in that not all possible H bonds are formed. This possibility is implicit in the above helix definition.
      Parameters:
        `min` -
        `iPolymer` -
      Returns:
        string label

    - #### findHelixes2

          private java.lang.String findHelixes2(int mmtfType,
                                                int iPolymer,
                                                int pitch,
                                                int[][][] min,
                                                STR subtype,
                                                int type,
                                                javajs.util.BS bsTurn,
                                                boolean isFirst)

    - #### setTag

          private void setTag(char[] tags,
                              javajs.util.BS bs,
                              char ch)