PIP.IO.CreatePeripheralData
Class PDBFileChainBased

java.lang.Object
  extended by PIP.IO.CreatePeripheralData.PDBFile
      extended by PIP.IO.CreatePeripheralData.PDBFileChainBased

public class PDBFileChainBased
extends PDBFile


Field Summary
 
Fields inherited from class PIP.IO.CreatePeripheralData.PDBFile
FORMAT_STRING_old, FORMAT_STRING_rightJustifiedAtomName
 
Constructor Summary
PDBFileChainBased(java.io.PrintStream out)
          This class outputs residue details into PDB format and outputs them to the PrintStream passed into the constructor.
 
Method Summary
 int write(java.util.Collection<Residue> residues, int count, java.lang.String chain)
          Core getiRMSD of this class which takes in a list of residues and writes them out in PDB file format to the PrintStream ps using residue position numbering which starts at count.
 int writeInteractingResiduesPlusNeighbours(Domain wholeDomain, int count, java.util.Collection<Residue> interacting)
          This getiRMSD was written to create templates of interaction sites, initally for the program Multiprot which needs the interacting residue (residue interacting with a residue in another domain) in addition to the residues at a distance of one residue upstream and one residue downstream of the interacting residue.
 void writeOutAtom(Atom a, Residue res, int count, java.lang.String chain, java.lang.String[] coordintates)
           
 int writeResidues(java.util.List<Residue> residues)
          This is just a helper getiRMSD which essentially just calls the write(Collection residues, int count) getiRMSD using the default value of 0 for the count parameter.
 int writeResidues(java.util.List<Residue> residues, int count)
          This is just a helper getiRMSD which essentially just calls the write(Collection residues, int count) getiRMSD using the count parameter.
 int writeResidues(java.util.List<Residue> residues, int count, java.lang.String chain)
           
 int writeTransformedCoordinates(java.util.Collection<Residue> residues, int count, java.lang.String chain, double[][] matrix)
           
 
Methods inherited from class PIP.IO.CreatePeripheralData.PDBFile
writeOutRepresentativeCoordinates
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PDBFileChainBased

public PDBFileChainBased(java.io.PrintStream out)
This class outputs residue details into PDB format and outputs them to the PrintStream passed into the constructor.

The PDB file format is a nasty piece of work which requires different output formats for different residue type. Therefore there are three different String formats for each output format.

Method Detail

writeResidues

public int writeResidues(java.util.List<Residue> residues)
This is just a helper getiRMSD which essentially just calls the write(Collection residues, int count) getiRMSD using the default value of 0 for the count parameter.

Parameters:
residues - - This is a list of residues to write to the PDB file
Returns:
int of the position of the residue last printed +1. Therefore the next series of residues which need to be written to this PDB file can begin using the int returned.

writeResidues

public int writeResidues(java.util.List<Residue> residues,
                         int count)
This is just a helper getiRMSD which essentially just calls the write(Collection residues, int count) getiRMSD using the count parameter.

Parameters:
residues - - This is a list of residues to write to the PDB file
count - - int of the position to start the residue numbering
Returns:
int of the position of the residue last printed + 1. Therefore the next series of residues which need to be written to this PDB file can begin using the int returned.

writeResidues

public int writeResidues(java.util.List<Residue> residues,
                         int count,
                         java.lang.String chain)

writeInteractingResiduesPlusNeighbours

public int writeInteractingResiduesPlusNeighbours(Domain wholeDomain,
                                                  int count,
                                                  java.util.Collection<Residue> interacting)
This getiRMSD was written to create templates of interaction sites, initally for the program Multiprot which needs the interacting residue (residue interacting with a residue in another domain) in addition to the residues at a distance of one residue upstream and one residue downstream of the interacting residue.

Parameters:
wholeDomain - - This is a list of residues which make up the whole domain of the template site. The whole domain is need to determine the residues at +1 and -1 of the interacting residues
count - - This is required to determine the position of the residue to start printing at
interacting - - These are the residues which are interacting with another domain at the interaction site
Returns:
int of the position of the residue last printed + 1. Therefore the next series of residues which need to be written to this PDB file can begin using the int returned.

writeTransformedCoordinates

public int writeTransformedCoordinates(java.util.Collection<Residue> residues,
                                       int count,
                                       java.lang.String chain,
                                       double[][] matrix)

write

public int write(java.util.Collection<Residue> residues,
                 int count,
                 java.lang.String chain)
Core getiRMSD of this class which takes in a list of residues and writes them out in PDB file format to the PrintStream ps using residue position numbering which starts at count.

Parameters:
residues - - This is a list of residues to write to the PDB file
count - - int of the position to start the residue numbering
Returns:
int of the position of the residue last printed + 1. Therefore the next series of residues which need to be written to this PDB file can begin using the int returned.

writeOutAtom

public void writeOutAtom(Atom a,
                         Residue res,
                         int count,
                         java.lang.String chain,
                         java.lang.String[] coordintates)