|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.proteinshader.structure.visitor.demos.ModifierVisitorDemo
public class ModifierVisitorDemo
Temporary class for testing the ModifierVisitor class. USAGE: java -cp . path/ModifierVisitorDemo inputFilename outputFilename where path = edu/harvard/fas/jrweber/molecular/structure/visitor/demos/ After reading 'inputFilename' and creating a Structure, the Structure will be written as an object dump to a file named 'outputFilename.out'. The Helices of the Structure are modified by changing their shape to CYLINDER, their visiblity to OPAQUE, and setting all of their Atoms and Bonds to INVISIBLE. Modifications will then be made and written to 'outputFilename-Modified.out".
Field Summary | |
---|---|
static String |
PATH
|
static String |
usageMessage
|
Constructor Summary | |
---|---|
ModifierVisitorDemo()
Constructs a PDBStructureReaderDemo. |
Method Summary | |
---|---|
String |
getFilenameOrDie(String[] cmdLineArgs,
int index)
Returns the requested command line argument if it is present. |
static void |
main(String[] args)
Uses a PDBStructureReader to read a PDB file and create a Structure, and then uses a WriterVisitor to write the contents of the Structure to an output file. |
void |
modify(Structure structure)
The Helices of the Structure are modified by changing their shape to CYLINDER and setting all of their Atoms and Bonds to INVISIBLE. |
void |
printBadLines(List<String> badLines)
Prints the bad lines from the PDB file to standard out. |
void |
writeStructure(Structure structure,
String filename)
Writes a Structure to a file by using a SFWriterVisitor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PATH
public static final String usageMessage
Constructor Detail |
---|
public ModifierVisitorDemo()
Method Detail |
---|
public void writeStructure(Structure structure, String filename) throws VisitorException
structure
- the Structure to write.filename
- the name of the file to write to.
VisitorException
- if an IO error occurs.public void modify(Structure structure) throws VisitorException
structure
- the Structure to Modify.
VisitorException
- if an error occurs while modifying the
Structure.public void printBadLines(List<String> badLines)
badLines
- the bad lines to print.public String getFilenameOrDie(String[] cmdLineArgs, int index)
cmdLineArgs
- the command line arguments.index
- the index position to get the filename from.public static void main(String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |