io.pdb
Class OutPDB

java.lang.Object
  extended byio.TrajectoryWriter
      extended byio.pdb.OutPDB

public class OutPDB
extends TrajectoryWriter

Author:
mika, vincent

Field Summary
(package private) static PrintfFormat modelSerialFormat
           
 
Fields inherited from class io.TrajectoryWriter
outFile
 
Constructor Summary
OutPDB(java.lang.String title)
           
OutPDB(java.lang.String fileName, java.lang.String title)
           
 
Method Summary
 void writeFrame(double time, int step, double[][] positions, double[] box, java.lang.String[] atomNames, java.lang.String[] residueNames, int[] residueNumbers)
          attempt to write a reasonably correct pdb MODEL block.
 void writeFrame(int step, double[][] positions, java.lang.String[] atomNames, java.lang.String[] residueNames, int[] residueNumbers)
          attempt to write a reasonably correct pdb MODEL block.
 void writeTitle(java.lang.String title)
          write more or less proper pdb header information (author, title...)
 
Methods inherited from class io.TrajectoryWriter
getWriter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

modelSerialFormat

static final PrintfFormat modelSerialFormat
Constructor Detail

OutPDB

public OutPDB(java.lang.String title)
       throws java.io.IOException
Parameters:
title -
Throws:
java.io.IOException

OutPDB

public OutPDB(java.lang.String fileName,
              java.lang.String title)
       throws java.io.IOException
Parameters:
fileName -
title -
Throws:
java.io.IOException
Method Detail

writeTitle

public void writeTitle(java.lang.String title)
                throws java.io.IOException
write more or less proper pdb header information (author, title...)

Specified by:
writeTitle in class TrajectoryWriter
Parameters:
title - the title block
Throws:
java.io.IOException

writeFrame

public void writeFrame(double time,
                       int step,
                       double[][] positions,
                       double[] box,
                       java.lang.String[] atomNames,
                       java.lang.String[] residueNames,
                       int[] residueNumbers)
                throws java.io.IOException
attempt to write a reasonably correct pdb MODEL block. one should in principle be able to generate a trajectory by concatenating a bunch of MODEL blocks.

Specified by:
writeFrame in class TrajectoryWriter
Parameters:
time - the time of the frame
step - corresponds to a given time step (g96, vmd) or model serial (pdb)
positions - the 3N coordinates
box - the 3 box dimensions (ignored by pdb)
atomNames - the N atom names
residueNames - the N residue names of the atoms
residueNumbers - the N residue numbers of the atoms
Throws:
java.io.IOException
See Also:
TrajectoryWriter.writeFrame(double, int, double[][], double[], java.lang.String[], java.lang.String[], int[])

writeFrame

public void writeFrame(int step,
                       double[][] positions,
                       java.lang.String[] atomNames,
                       java.lang.String[] residueNames,
                       int[] residueNumbers)
                throws java.io.IOException
attempt to write a reasonably correct pdb MODEL block. one should in principle be able to generate a trajectory by concatenating a bunch of MODEL blocks.

Throws:
java.io.IOException
See Also:
TrajectoryWriter.writeFrame(double, int, double[][], double[], java.lang.String[], java.lang.String[], int[])