|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectio.g96.in.InBlock
io.g96.in.InCorG96
Read blocks from a final coordinate (POSITION) or a trajectory (POSITIONRED) file until all requirements are fulfilled. In general (with exceptions, see below), this means, that the following blocks are read: TIMESTEP, POSITION(RED), BOX. The TIMESTEP block in G96 is sort broken for trajectories longer than 100 ns. The box block is not available for vacuum simulations, so attempt to handle that gracefully.
| Field Summary | |
private boolean |
attemptTimeStepRead
|
private boolean |
foundBadTimestep
|
private static boolean |
foundZeroBox
|
boolean |
readFrameSuccessful
|
| Fields inherited from class io.g96.in.InBlock |
endPattern, fileName, startPattern, stream, tok |
| Constructor Summary | |
InCorG96()
|
|
InCorG96(java.lang.String fileName)
|
|
| Method Summary | |
static void |
assertNonDuplicateBlock(java.lang.String blockName,
java.util.Set frameKeys)
If we want to read a block type that we have already read for this frame, it's likely an error. |
java.util.HashMap |
getFrame(boolean isVacuum)
Read all the blocks we need to have a valid frame. |
double[] |
parseBoxBlock(java.util.ArrayList block)
Parse the (BOX) block and put the stuff into box. |
double[] |
parseGenBoxBlock(java.util.ArrayList block)
Parse the (GENBOX) block and put the stuff into box. |
static double[][] |
parsePositionBlock(java.util.ArrayList block)
|
static double[][] |
parsePositionredBlock(java.util.ArrayList block)
|
java.util.HashMap |
parseTimeStepBlock(java.util.ArrayList block)
Parse a Gromos96 TIMESTEP block. |
G96Frame |
readFrame()
Read and parse a Gromos96 frame from file. |
G96Frame |
readFrame(boolean isVacuum)
|
static boolean |
skipBlock(java.lang.String blockName)
We don't care about any blocks except the TIMESTEP, POSITION(RED) and the BOX block. |
| Methods inherited from class io.g96.in.InBlock |
assertBlockName, assertBlockSize, close, getBlocks, getNextBlock, open, parseDoubleArray, parseDoubleArray, parseDoubleArray, parseDoubleMatrix, readTitle, skipLine, slurp |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private boolean foundBadTimestep
private boolean attemptTimeStepRead
private static boolean foundZeroBox
public boolean readFrameSuccessful
| Constructor Detail |
public InCorG96()
throws java.io.IOException
java.io.IOException
public InCorG96(java.lang.String fileName)
throws java.io.IOException
java.io.IOException| Method Detail |
public static boolean skipBlock(java.lang.String blockName)
blockName -
public static void assertNonDuplicateBlock(java.lang.String blockName,
java.util.Set frameKeys)
throws java.io.IOException
blockName - frameKeys -
java.io.IOException
public double[] parseBoxBlock(java.util.ArrayList block)
throws java.io.IOException
block -
java.io.IOException
public double[] parseGenBoxBlock(java.util.ArrayList block)
throws java.io.IOException
block -
java.io.IOException
public static double[][] parsePositionredBlock(java.util.ArrayList block)
throws java.io.IOException
block -
java.io.IOException
public static double[][] parsePositionBlock(java.util.ArrayList block)
throws java.io.IOException
block -
java.io.IOException
public java.util.HashMap parseTimeStepBlock(java.util.ArrayList block)
throws java.io.IOException
block -
java.io.IOException
public java.util.HashMap getFrame(boolean isVacuum)
throws java.io.IOException
isVacuum - determines whether we should attempt to read a box block (we don't in vacuum)
java.io.IOException
public G96Frame readFrame()
throws java.io.IOException
java.io.IOException
public G96Frame readFrame(boolean isVacuum)
throws java.io.IOException
java.io.IOException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||