|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.proteinshader.structure.factory.SegmentFactory
public class SegmentFactory
Creates Segment objects for a Region (Loop, Helix, or BetaStrand).
A Segment object can be thought of as a segment of a tube-like
structure used to create a cartoon-like representation of a protein.
A Segment object is ultimately a collection of local frame objects
that will be needed for sweeping a waist polygon along a spline in
order to draw the tube-like structure. A figure illustrating this
approach can be found on page 316 of "Computer Graphics Using OpenGL",
F.S. Hill (2000), Upper Saddle River, NJ. Prentice Hall.
A Segment object corresponds to an individual AminoAcid. and will be
marked with the same ID as that AminoAcid. A Segment object will also
have the same xyz-center as the AminoAcid it represents.
To calculate the LocalFrame objects needed by a Segment, it will be
necessary to have information on not only the AminoAcid the Segment
represents, but also to have information on the previous and next
AminoAcids in the Chain (if they exist). For this reason, the
createSegments() method of this class will iterate() through the
AminoAcids of a Region so that three AminoAcids at a time (previous,
current, and next) can be plugged into a helper method that will
create the Segment.
There may be some case where a Segment object cannot be created
because some Atoms belonging to an AminoAcid are simply missing from
the PDB structure file. If this type of error occurs, then a
SegmentException object with the error information will be added to
a list. After the createSegments() method has been called (and
created all the Segments that it can), a public getErrors() method
can be used to get any SegmentExceptions that occurred (if no errors
occurred then the list will be empty).
Field Summary | |
---|---|
static double |
MAX_CA_DISTANCE
The maximum distance from one alpha-carbon to the next alpha-carbon in a chain of amino acids should not be greater than 4.5 angstroms. |
static double |
SEGMENT_LENGTH
If an AminoAcid does not have an adjacent AminoAcid before or after it, then the Segment representing the AminoAcid will have it length determined by this constant, which currently is set at 2.6 angstroms in length. |
Constructor Summary | |
---|---|
SegmentFactory()
No-arg constructor, which will be called automatically by concrete subclasses. |
Method Summary | |
---|---|
LinkedHashMap<String,Segment> |
createSegments(Region region)
Creates the Segment objects for a Region. |
List<SegmentException> |
getErrors()
Returns a list with any SegmentExceptions that were created because an error prevented a Segment from being created. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final double MAX_CA_DISTANCE
public static final double SEGMENT_LENGTH
Constructor Detail |
---|
public SegmentFactory()
Method Detail |
---|
public LinkedHashMap<String,Segment> createSegments(Region region)
region
- the Region object to create Segments for.
public List<SegmentException> getErrors()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |