org.proteinshader.structure
Class BetaStrand

java.lang.Object
  extended by org.proteinshader.structure.Region
      extended by org.proteinshader.structure.BetaStrand
All Implemented Interfaces:
IDTest, Visitable

public class BetaStrand
extends Region

This concrete subclass of Region holds information specific to a protein BetaStrand.

PDB SHEET records are usually generated automatically with the Kabsch and Sander algoritnm (Kabsch and Sander, 1983, Biopolymers 22: 2577-2637), but they may be specified by the depositor of the structure entry.


Constructor Summary
BetaStrand(String betaStrandID, String betaStrandNumber, String sheetID, String startResidueID, String endResidueID, Chain chain, int sense, int strandsInSheet)
          Constructs a BetaStrand.
 
Method Summary
 void accept(Visitor visitor)
          Accepts a Visitor and does a callback.
 String getBetaStrandID()
          Returns the BetaStrand ID.
 String getBetaStrandNumber()
          Returns the BetaStrand number.
 int getSense()
          Returns the sense (orientation) of the BetaStrand.
 String getSheetID()
          Returns the ID of the sheet that the BetaStrand belongs to.
 int getStrandsInSheet()
          Returns the total number of BetaStrands in the same sheet as this BetaStrand.
 String toString()
          Returns the BetaStrand ID.
 
Methods inherited from class org.proteinshader.structure.Region
createSegments, getAminoAcidAfterRegion, getAminoAcidBeforeRegion, getChainID, getEndResidueID, getModelID, getSegment, getStartResidueID, getStructureID, iteratorAminoAcids, iteratorSegments, markAminoAcids, numberOfAminoAcids, numberOfSegments, processID, setSegmentAlpha, setSegmentAlphaToDefault, setSegmentRGB, setSegmentRGBToDefault, setSegmentsToAminoAcidColors, setSegmentsToRegionColor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BetaStrand

public BetaStrand(String betaStrandID,
                  String betaStrandNumber,
                  String sheetID,
                  String startResidueID,
                  String endResidueID,
                  Chain chain,
                  int sense,
                  int strandsInSheet)
           throws InvalidRegionException,
                  InvalidIDException
Constructs a BetaStrand.

Region (the superclass of BetaStrand) will cache the Residues from startResidueID to endResidueID (or throw an exception) so that an iterator to the Region's sequence can be easily obtained. If the Region is constructed successfully, each AminoAcid in the region will be marked with the betaStrandID.

The sense (orientation) of an individual BetaStrand is 0 if it is the first strand in a sheet, 1 if the strand is parallel to the previous strand in the sheet, and -1 if the strand is anti-parallel to the previous strand in the sheet.

Any leading or trailing whitespace will be trimmed from the betaStrandNumber, sheetID, startResidueID, and the endResidueID. The ancestor IDs (Chain, Model, and Structure) will be stored after they are obtained from the Chain given as an argument.

Parameters:
betaStrandID - a unique ID (betaStrandNumber plus sheetID).
betaStrandNumber - Strand identifier from a PDB SHEET record.
sheetID - sheet identifier from a PDB SHEET record
startResidueID - ID of the first AminoAcid in the sequence.
endResidueID - ID of the last AminoAcid in the sequence.
chain - Chain the Helix belongs to.
sense - strand sense (0, 1, or -1).
strandsInSheet - total number of BetaStrands in the sheet.
Throws:
InvalidRegionException - if the sequence of AminoAcids (with at least two Residues) cannot be found on the Chain.
InvalidIDException - if the betaStrandID, sheetID, startResidueID, or endResidueID is null or does not have at least one non-whitespace character.
Method Detail

accept

public void accept(Visitor visitor)
            throws VisitorException
Accepts a Visitor and does a callback.

Specified by:
accept in interface Visitable
Specified by:
accept in class Region
Parameters:
visitor - the Visitor to do a callback with.
Throws:
VisitorException - if an error occurs while an object is being visited.

getBetaStrandID

public String getBetaStrandID()
Returns the BetaStrand ID. The String returned cannot be null or empty, because the constructor checks that this read-only attribute has at least one character.

Returns:
The BetaStrand ID as a String.

getBetaStrandNumber

public String getBetaStrandNumber()
Returns the BetaStrand number. The String returned cannot be null or empty, because the constructor checks that this read-only attribute has at least one character.

Returns:
The BetaStrand number as a String.

getSheetID

public String getSheetID()
Returns the ID of the sheet that the BetaStrand belongs to.

Returns:
The sheet ID as a String.

getSense

public int getSense()
Returns the sense (orientation) of the BetaStrand.

Returns:
The BetaStrand sense as an int.

getStrandsInSheet

public int getStrandsInSheet()
Returns the total number of BetaStrands in the same sheet as this BetaStrand.

Returns:
The number of strands in the sheet.

toString

public String toString()
Returns the BetaStrand ID. The String returned cannot be null or empty, because the constructor checks that this read-only attribute has at least one character.

Overrides:
toString in class Object
Returns:
The BetaStrand ID as a String.


Copyright © 2007-2008