org.jmol.modelsetbio
Class AlphaPolymer

java.lang.Object
  extended by org.jmol.modelset.Polymer
      extended by org.jmol.modelsetbio.BioPolymer
          extended by org.jmol.modelsetbio.AlphaPolymer
Direct Known Subclasses:
AminoPolymer

public class AlphaPolymer
extends BioPolymer


Field Summary
private static byte CODE_BETA_SHEET
           
private static byte CODE_LEFT_HELIX
           
private static byte CODE_LEFT_TURN
           
private static byte CODE_NADA
           
private static byte CODE_RIGHT_HELIX
           
private static byte CODE_RIGHT_TURN
           
private static byte TAG_HELIX
           
private static byte TAG_NADA
           
private static byte TAG_SHEET
           
private static byte TAG_TURN
           
 
Fields inherited from class org.jmol.modelsetbio.BioPolymer
bsSelectedMonomers, hasWingPoints, haveParameters, invalidControl, monomers, sheetSmoothing
 
Fields inherited from class org.jmol.modelset.Polymer
bioPolymerIndexInModel, controlPoints, leadAtomIndices, leadMidpoints, leadPoints, model, monomerCount, type, TYPE_AMINO, TYPE_CARBOHYDRATE, TYPE_NOBONDING, TYPE_NUCLEIC, wingVectors
 
Constructor Summary
AlphaPolymer(Monomer[] monomers)
           
 
Method Summary
 void addSecondaryStructure(byte type, String structureID, int serialID, int strandCount, char startChainID, int startSeqcode, char endChainID, int endSeqcode)
           
protected  void addSecondaryStructure(byte type, String structureID, int serialID, int strandCount, int indexStart, int indexEnd)
           
private  void addStructuresFromTags(byte[] tags)
           
private  float[] calculateAnglesInDegrees()
           
private  byte[] calculateCodes(float[] angles)
           
private  byte[] calculateRunsFourOrMore(byte[] codes)
           
 void calculateStructures(boolean alphaOnly)
          Uses Levitt & Greer algorithm to calculate protein secondary structures using only alpha-carbon atoms.
 List calculateStruts(ModelSet modelSet, Atom[] atoms, BitSet bs1, BitSet bs2, List vCA, float thresh, int delta, boolean allowMultiple)
          Algorithm of George Phillips phillips@biochem.wisc.edu originally a contribution to pyMol as struts.py; adapted here by Bob Hanson for Jmol 1/2010 Return a vector of support posts for rapid prototyping models along the lines of George Phillips for Pymol except on actual molecular segments (biopolymers), not PDB chains (which may or may not be continuous).
private  void checkBetaSheetAlphaHelixOverlap(byte[] codes, float[] angles)
           
private  void extendRuns(byte[] tags)
           
protected  Point3f getControlPoint(int i, Vector3f v)
           
 void getPdbData(Viewer viewer, char ctype, char qtype, int mStep, int derivType, boolean isDraw, BitSet bsAtoms, OutputStringBuffer pdbATOM, StringBuffer pdbCONECT, BitSet bsSelected, boolean addHeader, boolean bothEnds, BitSet bsWritten)
           
private  void searchForTurns(byte[] codes, float[] angles, byte[] tags)
           
private  void setStrut(int i, int j, int n, List vCA, BitSet bs1, BitSet bs2, List vStruts, BitSet bsStruts, BitSet bsNotAvailable, BitSet bsNearbyResidues, int delta)
           
private  int strutPoint(int i, int j, int n)
           
 
Methods inherited from class org.jmol.modelsetbio.BioPolymer
allocateBioPolymer, calcEtaThetaAngles, calcParameters, calcPhiPsiAngles, calcSelectedMonomersCount, calculateRamachandranHelixAngle, calculateStructures, clearStructures, findNearestAtomIndex, getConformation, getControlPoints, getControlPoints, getGroups, getIndex, getInitiatorPoint, getLeadAtomIndices, getLeadMidPoint, getLeadMidpoints, getLeadPoint, getLeadPoint, getLeadPoints, getPdbData, getPolymerInfo, getPolymerPointsAndVectors, getPolymerSequenceAtoms, getProteinStructure, getRange, getRangeGroups, getSelectedMonomerCount, getSequence, getTerminatorPoint, getWingPoint, getWingVectors, isDna, isMonomerSelected, isRna, recalculateLeadMidpointsAndWingVectors, removeProteinStructure, resetHydrogenPoints, setConformation
 
Methods inherited from class org.jmol.modelset.Polymer
calcRasmolHydrogenBonds, getType, setStructureList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CODE_NADA

private static final byte CODE_NADA
See Also:
Constant Field Values

CODE_RIGHT_HELIX

private static final byte CODE_RIGHT_HELIX
See Also:
Constant Field Values

CODE_BETA_SHEET

private static final byte CODE_BETA_SHEET
See Also:
Constant Field Values

CODE_LEFT_HELIX

private static final byte CODE_LEFT_HELIX
See Also:
Constant Field Values

CODE_LEFT_TURN

private static final byte CODE_LEFT_TURN
See Also:
Constant Field Values

CODE_RIGHT_TURN

private static final byte CODE_RIGHT_TURN
See Also:
Constant Field Values

TAG_NADA

private static final byte TAG_NADA
See Also:
Constant Field Values

TAG_TURN

private static final byte TAG_TURN
See Also:
Constant Field Values

TAG_SHEET

private static final byte TAG_SHEET
See Also:
Constant Field Values

TAG_HELIX

private static final byte TAG_HELIX
See Also:
Constant Field Values
Constructor Detail

AlphaPolymer

AlphaPolymer(Monomer[] monomers)
Method Detail

getControlPoint

protected Point3f getControlPoint(int i,
                                  Vector3f v)
Overrides:
getControlPoint in class BioPolymer
Returns:
the leadPoint unless a protein sheet residue (see AlphaPolymer)

getPdbData

public void getPdbData(Viewer viewer,
                       char ctype,
                       char qtype,
                       int mStep,
                       int derivType,
                       boolean isDraw,
                       BitSet bsAtoms,
                       OutputStringBuffer pdbATOM,
                       StringBuffer pdbCONECT,
                       BitSet bsSelected,
                       boolean addHeader,
                       boolean bothEnds,
                       BitSet bsWritten)
Overrides:
getPdbData in class Polymer

addSecondaryStructure

public void addSecondaryStructure(byte type,
                                  String structureID,
                                  int serialID,
                                  int strandCount,
                                  char startChainID,
                                  int startSeqcode,
                                  char endChainID,
                                  int endSeqcode)
Overrides:
addSecondaryStructure in class Polymer

addSecondaryStructure

protected void addSecondaryStructure(byte type,
                                     String structureID,
                                     int serialID,
                                     int strandCount,
                                     int indexStart,
                                     int indexEnd)

calculateStruts

public List calculateStruts(ModelSet modelSet,
                            Atom[] atoms,
                            BitSet bs1,
                            BitSet bs2,
                            List vCA,
                            float thresh,
                            int delta,
                            boolean allowMultiple)
Algorithm of George Phillips phillips@biochem.wisc.edu originally a contribution to pyMol as struts.py; adapted here by Bob Hanson for Jmol 1/2010 Return a vector of support posts for rapid prototyping models along the lines of George Phillips for Pymol except on actual molecular segments (biopolymers), not PDB chains (which may or may not be continuous). Like George, we go from thresh-4 to thresh in units of 1 Angstrom, but we do not require this threshold to be an integer. In addition, we prevent double-creation of struts by tracking where struts are, and we do not look for any addtional end struts if there is a strut already to an atom at a particular biopolymer end. The three parameters are: set strutDefaultRadius 0.3 set strutSpacingMinimum 6 set strutLengthMaximum 7.0 Struts will be introduced by: calculate struts {atom set A} {atom set B} where the two atom sets are optional and default to the currently selected set. They can be manipulated using the STRUTS command much like any "bond" struts 0.3 color struts opaque pink connect {atomno=3} {atomno=4} strut structs only command

Overrides:
calculateStruts in class Polymer
Parameters:
modelSet -
atoms -
bs1 -
bs2 -
vCA -
thresh -
delta -
allowMultiple -
Returns:
vector of pairs of atoms

strutPoint

private int strutPoint(int i,
                       int j,
                       int n)

setStrut

private void setStrut(int i,
                      int j,
                      int n,
                      List vCA,
                      BitSet bs1,
                      BitSet bs2,
                      List vStruts,
                      BitSet bsStruts,
                      BitSet bsNotAvailable,
                      BitSet bsNearbyResidues,
                      int delta)

calculateStructures

public void calculateStructures(boolean alphaOnly)
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 Polymer
Parameters:
alphaOnly -

calculateAnglesInDegrees

private float[] calculateAnglesInDegrees()

calculateCodes

private byte[] calculateCodes(float[] angles)

checkBetaSheetAlphaHelixOverlap

private void checkBetaSheetAlphaHelixOverlap(byte[] codes,
                                             float[] angles)

calculateRunsFourOrMore

private byte[] calculateRunsFourOrMore(byte[] codes)

extendRuns

private void extendRuns(byte[] tags)

searchForTurns

private void searchForTurns(byte[] codes,
                            float[] angles,
                            byte[] tags)

addStructuresFromTags

private void addStructuresFromTags(byte[] tags)