org.proteinshader.structure.visitor
Class LoopGeneratorVisitor

java.lang.Object
  extended by org.proteinshader.structure.visitor.Visitor
      extended by org.proteinshader.structure.visitor.LoopGeneratorVisitor

public class LoopGeneratorVisitor
extends Visitor

Generates Loop objects from any AminoAcids of a Chain that do not already belong to a Helix or BetaStrand.

All Helix and BetaStrand objects should have already been added to the Structure before this LoopGeneratorVisitor is used. Whenever a Region is successfully created, each AminoAcid that belongs to the Region is marked with the regionID and Region type (LOOP, HELIX, or BETA_STRAND). When this Visitor is used, any AminoAcids that are not already assigned to a Region object will be used to create Loop objects.


Constructor Summary
LoopGeneratorVisitor()
          Constructs a LoopGeneratorVisitor.
 
Method Summary
 void visit(AminoAcid aminoAcid)
          Checks whether a start AminoAcid and an end AminoAcid for a Loop have been found, and creates a new Loop as needed.
 void visit(Chain chain)
          Generates Loop objects from AminoAcids that do not already belong to any Region.
 void visit(Model model)
          Generates all Loop objects needed by the Model.
 
Methods inherited from class org.proteinshader.structure.visitor.Visitor
clear, includeAAHetAndWater, setDebug, setMode, setMode, setMode, setMode, setMode, setMode, setVisitSegments, visit, visit, visit, visit, visit, visit, visit, visit, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoopGeneratorVisitor

public LoopGeneratorVisitor()
Constructs a LoopGeneratorVisitor.

All other Regions (Helices and BetaStrands) must have already been added before this Visitor is used to generate Loops.

Method Detail

visit

public void visit(Model model)
           throws VisitorException
Generates all Loop objects needed by the Model.

Overrides:
visit in class Visitor
Parameters:
model - the Model to generate Loops for.
Throws:
VisitorException - if an error occurs while generating Bonds.

visit

public void visit(Chain chain)
           throws VisitorException
Generates Loop objects from AminoAcids that do not already belong to any Region.

Overrides:
visit in class Visitor
Parameters:
chain - the Chain to generate Loops for.
Throws:
VisitorException - if an error occurs while generating Loops.

visit

public void visit(AminoAcid aminoAcid)
           throws VisitorException
Checks whether a start AminoAcid and an end AminoAcid for a Loop have been found, and creates a new Loop as needed. Any AminoAcids that already belong to a Helix or BetaStrand should be marked such that aminoAcid.getRegionType() will be non-null.

Overrides:
visit in class Visitor
Parameters:
aminoAcid - the AminoAcid to test.
Throws:
VisitorException - if an error occurs while generating Loops.


Copyright © 2007-2008