org.strbio.mol
Class Protein

java.lang.Object
  extended by org.strbio.mol.Molecule
      extended by org.strbio.mol.Polymer
          extended by org.strbio.mol.Protein
Direct Known Subclasses:
Profile, RAFProtein

public class Protein
extends Polymer

Class to represent a single protein. For an example of how to extend this class, see Profile or ProfilePSI

 Version 1.7, 7/1/05 - added readSwissProt
 Version 1.64, 12/15/04 - added molecularWeight
 Version 1.63, 1/8/02 - change in getInfo; moved some code to parent class
 Version 1.62, 2/12/02 - made findPDB look for matching chain ID.
 Version 1.61, 11/22/00 - moved translateEA to Residue
 Version 1.6, 3/31/00 - split PRECALC_ANGLES into PRECALC_PHIPSI and
   PRECALC_ALPHATAU
 Version 1.5, 1/14/00 - added makeVirtualCB
 Version 1.48, 1/7/00 - added fixDistanceGaps
 Version 1.47, 1/3/00 - added makeMonDistanceCB
 Version 1.46, 12/6/99 - added isCATHMatch function
 Version 1.45, 10/28/99 - recognises PDB HEADER lines
 Version 1.44, 9/28/99 - made getInfo(env) get exposedArea, pctExposed
 Version 1.43, 7/22/99 - changed getPDBInfo to getInfo
 Version 1.42, 6/4/99 - added predictSS
 Version 1.41, 3/30/99 - made printfs consistent, limited names to 4096 chars
 Version 1.4, 2/10/99 - added YAPF format
 Version 1.38, 1/4/99 - added readCASP
 Version 1.37, 11/23/98 - fixed readDSSP for no-HEADER cases
 Version 1.36, 8/20/98 - gets secondary structure predcition if present
   in VAR2 file.  Added translateEA from org.strbio.jmc.TPSet.
 Version 1.35, 8/17/98 - changed all JMC.fatal() calls to exceptions,
   since they aren't always fatal.
 Version 1.34, 8/7/98 - changed PrintfStream to Printf
 Version 1.33, 7/22/98 - fixed bug in reading SEQRES records in generic PDB
 Version 1.32, 7/17/98 - added readVar
 Version 1.31, 6/10/98 - added writeCASP
 Version 1.3, 5/21/98 - added transparent reading of gzipped files
   ending in .gz.
 Version 1.2, 4/20/98 - extends Polymer, removed JMC-specific methods
 Version 1.1, 4/8/98 - added static alignment methods, getPDBInfo, readList
 Version 1.01, 4/3/98 - added methods to setup JMCPotential's with
   default offset and scale.
 Version 1.0, 3/31/98 - original version
 

Version:
1.63, 1/8/03
Author:
JMC
See Also:
Atom, Residue, ProteinSet, Profile, ProfilePSI

Field Summary
 
Fields inherited from class org.strbio.mol.Polymer
chainID, includeFile, includingFile, monDistance, monomers, properties
 
Fields inherited from class org.strbio.mol.Molecule
atoms, data, MAX_NAME_LENGTH, name
 
Constructor Summary
Protein()
          Create a new protein with no information known about it.
Protein(Protein q)
          Copy another Protein, making copies of all data fields.
Protein(java.lang.String sequence)
          Make a new protein from a string representing a sequence.
 
Method Summary
 Residue AA(int i)
          returns the N'th residue in the sequence.
 double actualAccuracy()
          The actual accuracy of the secondary structure prediction that's been done on this protein.
 Polymer copy()
          Return a copy of yourself.
 void copyPredSSFrom(Protein q)
          Copy predicted secondary structure info from another protein.
 double expectedAccuracy()
          Expected accuracy of the secondary structure prediction that's been done on this protein.
 void filterPred()
          filters predStructure predictions in a protein's residues according to DSSP rules: no helix shorter than 4, no strand shorter than 2.
 void filterPred(boolean frishman)
          filters predStructure predictions in a protein's residues according to DSSP rules: no helix shorter than 4, no strand shorter than 2.
 void filterReal()
          filters DSSP structure in a protein's residues according to DSSP rules: no helix shorter than 4, no strand shorter than 2.
 void filterReal(boolean frishman)
          filters DSSP structure in a protein's residues according to DSSP rules: no helix shorter than 4, no strand shorter than 2.
 Protein findAccess(Printf outfile)
          find a protein in a PDB file which should be this one, based on the name.
 Protein findDSSP(Printf outfile)
          finds a protein in a PDB file which should be this one, based on the name.
protected  Protein findDSSPResult(ProteinSet q, Printf outfile)
          returns the appropriate protein from a set of DSSP results, aligned to this one.
 Protein findPDB(Printf outfile)
          find a protein in a PDB file which should be this one, based on the name.
 Residue firstRes()
          Return first residue if there is one.
 ProteinSet fixDistanceGaps()
          Filter out distance gaps (inter-CA > 4 A or < 3.6 A), returning a new set of proteins consisting of this protein broken into fragments everywhere there is a problem.
 ProteinSet getDSSPResults(Printf outfile)
          runs DSSP on a protein, returning a ProteinSet containing results from DSSP.
 void getInfo(Printf outfile, boolean getSequence, boolean getAngles, boolean getAtoms, boolean getStructure, boolean getEnv, boolean getPDB, boolean getCATH)
          Get info for a protein out of local databases.
 boolean hasGaps()
          Are any residues missing?
 boolean isCATHMatch(Protein y)
          Does this protein match another at the H level or below, according to CATH codes?
 void makeMonDistance()
          calculate inter-residue distance matrix (CA-CA distances) for use in threading functions.
 void makeMonDistanceCB()
          calculate inter-residue distance matrix (CB-CB distances, or CA for Gly residues) for use in threading functions.
 void makeVirtualCB()
          Add a virtual CB atom for residues that don't have one.
 double molecularWeight()
          Calculate molecular weight; add back the last water
 Monomer newMonomer()
          This should return a new monomer of whatever type this polymer is made of (i.e.
 Monomer newMonomer(char t)
          This should return a new monomer of whatever type this polymer is made of (i.e.
 Monomer newMonomer(java.lang.String s)
          This should return a new monomer of whatever type this polymer is made of (i.e.
 void preCalculateAlphaTau()
          pre-calculates cAlpha and cTau for all residues.
 void preCalculateAngles()
          pre-calculates cPhi, cPsi, cAlpha, and cTau for all residues.
 void preCalculatePhiPsi()
          pre-calculates cPhi and cPsi for all residues.
 void predictSS(Printf outfile)
          Predict the secondary structure of this protein, using the default method (Pred2ary, with large jury).
 void predictSS(Printf outfile, SSPredictor method)
          Predict the secondary structure of this protein, using a specified prediction method.
 void processYAPF(java.lang.String buffer)
          Process a line from a YAPF file... this should ignore the line if it doesn't know what it is.
 void readAccess(java.io.BufferedReader infile, Printf outfile)
          read a protein out of an Access file.
 void readCASP(java.io.BufferedReader infile, Printf outfile)
          read a protein out of a CASP file.
 void readConv(java.io.BufferedReader infile, Printf outfile)
          read a protein out of a Conv file.
 void readDSSP(java.io.BufferedReader infile, Printf outfile)
          read a protein out of a DSSP file.
 void readEA(java.io.BufferedReader infile, Printf outfile)
          read a protein out of an EA file.
 void readPDB(java.io.BufferedReader infile, Printf outfile)
          read a protein out of a PDB file.
 void readPDBAtom(java.io.BufferedReader infile, Printf outfile)
          read a protein out of a PDB file with no SEQRES records.
 void readProf(java.io.BufferedReader infile, Printf outfile)
          read a protein out of a Prof file.
 void readSwissProt(java.io.BufferedReader infile, Printf outfile)
          read a protein out of a SwissProt file.
 void readVar(java.io.BufferedReader infile, Printf outfile)
          read a protein out of a Var file.
 void readVar2(java.io.BufferedReader infile, Printf outfile)
          read a protein out of a Var2 file.
protected  boolean recognizeAndRead(java.lang.String buffer, java.io.BufferedReader infile, Printf outfile)
          This looks for a protein and reads it in.
 int residues()
          How many residues do we have?
 void reverse()
          Reverse yourself.
 void runDSSP(Printf outfile)
          Runs DSSP on this protein (which must have atomic coordinates).
 void showGaps(Printf outfile)
          Print out possible gaps in the sequence.
 void smoothHE()
          Do one round of 'diffusive smoothing' on the predH and predE values in a protein's residues.
protected  Polymer splitCopy()
          This should return a copy of all data which should be copied during AutoSplit (not including monomers, monDistance, name).
 void stripAllButCA()
          go to each residue, and remove all atoms except alpha carbons (CA).
 ThreadResults thread(Printf outfile)
          Thread, using the default method.
 ThreadResults thread(Printf outfile, ThreadMethod method)
          Thread the protein, using a specified threading method.
 void translateEA()
          Translates predH and predE into predStructure (directly).
 void writeCASP(Printf outfile)
          Write in CASP format.
 void writeConv(Printf outfile)
          Write in Conv format.
 void writeEA(Printf outfile)
          Write in EA format.
 void writePDB(Printf outfile)
          Write in PDB format, including SEQRES, JMCSTR, and ATOM records.
 void writePDB(Printf outfile, boolean vanillaPDB)
          Write in PDB format, which includes SEQRES and ATOM records.
 void writeVar2(Printf outfile)
          Write in Var2 format.
protected  void writeYAPFInfo(Printf outfile)
          Write applicable sections of YAPF info.
 
Methods inherited from class org.strbio.mol.Polymer
alignToArray, alignToInverseArray, autoSplit, centerOfMass, centerOfMass, clear, clearProperties, clearProperty, copyAtoms, correctAlignFold, correctAlignSeq, deleteMonDistance, firstMon, getGlobalAlignment, getMonomers, getNonGapMonomers, getProperty, getValidNonGapMonomers, globalAlign, globalAlign, globalCompare, globalCompare, keepMonomers, kludgeChainID, lastMon, length, makeMonDistanceAllAtomMin, minareaSuperimpose, monomer, nMonomers, nMonomers, nonGapMonomers, pad, printSequence, quickAlign, quickAlign, quickCompare, quickCompare, read, read, read, readFasta, readList, readSequence, readYAPF, renumberMonomers, renumberValidNonGapMonomers, reverseCopy, rotate, sequence, sequenceNonGap, sequenceValidNonGap, setProperty, stripAllAtoms, stripAllBut, stripAllButFirstAtom, stripAtomsByName, stripCommonGaps, stripGaps, stripInvalidAndGaps, stripNoAtoms, stripType, transform, translate, trimEnds, validNonGapMonomers, writeFasta, writePDBAtom, writePDBSeqres, writePTS, writeYAPF, writeYAPFAtom, YAPFGetNextMonomer
 
Methods inherited from class org.strbio.mol.Molecule
atomSearch, copyAtoms
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Protein

public Protein()
Create a new protein with no information known about it.


Protein

public Protein(Protein q)
Copy another Protein, making copies of all data fields.


Protein

public Protein(java.lang.String sequence)
Make a new protein from a string representing a sequence.

Method Detail

residues

public int residues()
How many residues do we have?


firstRes

public Residue firstRes()
Return first residue if there is one.


newMonomer

public Monomer newMonomer()
This should return a new monomer of whatever type this polymer is made of (i.e. Residue, Base). By default, this is just Monomer.

Overrides:
newMonomer in class Polymer

newMonomer

public Monomer newMonomer(char t)
This should return a new monomer of whatever type this polymer is made of (i.e. Residue, Base), and initialize the type from a character.

Overrides:
newMonomer in class Polymer

newMonomer

public Monomer newMonomer(java.lang.String s)
This should return a new monomer of whatever type this polymer is made of (i.e. Residue, Base), and initialize the type from a string.

Overrides:
newMonomer in class Polymer

splitCopy

protected Polymer splitCopy()
Description copied from class: Polymer
This should return a copy of all data which should be copied during AutoSplit (not including monomers, monDistance, name).

Overrides:
splitCopy in class Polymer

AA

public final Residue AA(int i)
returns the N'th residue in the sequence. This starts from zero and counts gaps, so it has no relation to the residue (if it exists) with residue number N. This function is slow the first time it gets called after loading the protein in or making insertions/deletions, but otherwise fast.


makeMonDistance

public void makeMonDistance()
calculate inter-residue distance matrix (CA-CA distances) for use in threading functions.

Overrides:
makeMonDistance in class Polymer

makeMonDistanceCB

public void makeMonDistanceCB()
calculate inter-residue distance matrix (CB-CB distances, or CA for Gly residues) for use in threading functions.


readPDB

public final void readPDB(java.io.BufferedReader infile,
                          Printf outfile)
                   throws java.io.IOException
read a protein out of a PDB file. It will complain if the ATOM records don't match the sequence in SEQRES records. If that happens, curse the crystallographer, grep out just the ATOM records, and try again.

Parameters:
infile - an open PDB file
outfile - if non-null, will print info on what's going on
Throws:
java.io.IOException
See Also:
Polymer.read(java.io.BufferedReader, org.strbio.io.Printf, boolean)

readPDBAtom

public final void readPDBAtom(java.io.BufferedReader infile,
                              Printf outfile)
                       throws java.io.IOException
read a protein out of a PDB file with no SEQRES records. It figures out the sequence based on the ATOM records, I suggest renumbering the sequence afterwards.

Parameters:
infile - an open PDB file
outfile - if non-null, will print info on what's going on
Throws:
java.io.IOException
See Also:
Polymer.read(java.io.BufferedReader, org.strbio.io.Printf, boolean)

readVar2

public final void readVar2(java.io.BufferedReader infile,
                           Printf outfile)
                    throws java.io.IOException
read a protein out of a Var2 file.

Parameters:
infile - an open Var2 file
outfile - if non-null, will print info on what's going on
Throws:
java.io.IOException
See Also:
Polymer.read(java.io.BufferedReader, org.strbio.io.Printf, boolean), Residue.readVar2(java.io.BufferedReader)

readVar

public final void readVar(java.io.BufferedReader infile,
                          Printf outfile)
                   throws java.io.IOException
read a protein out of a Var file.

Parameters:
infile - an open Var file
outfile - if non-null, will print info on what's going on
Throws:
java.io.IOException
See Also:
Polymer.read(java.io.BufferedReader, org.strbio.io.Printf, boolean), Residue.readVar(java.io.BufferedReader)

readEA

public final void readEA(java.io.BufferedReader infile,
                         Printf outfile)
                  throws java.io.IOException
read a protein out of an EA file.

Parameters:
infile - an open EA file
outfile - if non-null, will print info on what's going on
Throws:
java.io.IOException
See Also:
Polymer.read(java.io.BufferedReader, org.strbio.io.Printf, boolean), Residue.readEA(java.io.BufferedReader)

readProf

public final void readProf(java.io.BufferedReader infile,
                           Printf outfile)
                    throws java.io.IOException
read a protein out of a Prof file.

Parameters:
infile - an open Prof file
outfile - if non-null, will print info on what's going on
Throws:
java.io.IOException
See Also:
Polymer.read(java.io.BufferedReader, org.strbio.io.Printf, boolean), Residue.readProf(java.io.BufferedReader), ProfRes.readProf(java.io.BufferedReader)

readConv

public final void readConv(java.io.BufferedReader infile,
                           Printf outfile)
                    throws java.io.IOException
read a protein out of a Conv file.

Parameters:
infile - an open Conv file
outfile - if non-null, will print info on what's going on
Throws:
java.io.IOException
See Also:
Polymer.read(java.io.BufferedReader, org.strbio.io.Printf, boolean), Residue.readConv(java.io.BufferedReader)

readCASP

public final void readCASP(java.io.BufferedReader infile,
                           Printf outfile)
                    throws java.io.IOException
read a protein out of a CASP file.

Parameters:
infile - an open CASP file
outfile - if non-null, will print info on what's going on
Throws:
java.io.IOException
See Also:
Polymer.read(java.io.BufferedReader, org.strbio.io.Printf, boolean)

readSwissProt

public final void readSwissProt(java.io.BufferedReader infile,
                                Printf outfile)
                         throws java.io.IOException
read a protein out of a SwissProt file.

Parameters:
infile - an open SwissProt file
outfile - if non-null, will print info on what's going on
Throws:
java.io.IOException
See Also:
Polymer.read(java.io.BufferedReader, org.strbio.io.Printf, boolean)

readDSSP

public final void readDSSP(java.io.BufferedReader infile,
                           Printf outfile)
                    throws java.io.IOException
read a protein out of a DSSP file.

Parameters:
infile - an open DSSP file
outfile - if non-null, will print info on what's going on
Throws:
java.io.IOException
See Also:
Polymer.read(java.io.BufferedReader, org.strbio.io.Printf, boolean), Residue.readDSSP(java.io.BufferedReader)

readAccess

public final void readAccess(java.io.BufferedReader infile,
                             Printf outfile)
                      throws java.io.IOException
read a protein out of an Access file. This format is not autodetected.

Parameters:
infile - an open Access file
outfile - if non-null, will print info on what's going on
Throws:
java.io.IOException
See Also:
Residue.readAccess(java.io.BufferedReader)

recognizeAndRead

protected boolean recognizeAndRead(java.lang.String buffer,
                                   java.io.BufferedReader infile,
                                   Printf outfile)
                            throws java.io.IOException
This looks for a protein and reads it in.

Overrides:
recognizeAndRead in class Polymer
Throws:
java.io.IOException
See Also:
Polymer.recognizeAndRead(java.lang.String, java.io.BufferedReader, org.strbio.io.Printf)

expectedAccuracy

public final double expectedAccuracy()
Expected accuracy of the secondary structure prediction that's been done on this protein. It assumes you've done one.


translateEA

public final void translateEA()
Translates predH and predE into predStructure (directly).


actualAccuracy

public final double actualAccuracy()
The actual accuracy of the secondary structure prediction that's been done on this protein. It assumes you've done one.


writePDB

public final void writePDB(Printf outfile,
                           boolean vanillaPDB)
                    throws java.io.IOException
Write in PDB format, which includes SEQRES and ATOM records.

Parameters:
outfile - where to write to
vanillaPDB - if true, won't write JMCSTR records
Throws:
java.io.IOException

writePDB

public final void writePDB(Printf outfile)
                    throws java.io.IOException
Write in PDB format, including SEQRES, JMCSTR, and ATOM records.

Overrides:
writePDB in class Polymer
Parameters:
outfile - where to write to
Throws:
java.io.IOException

writeEA

public final void writeEA(Printf outfile)
                   throws java.io.IOException
Write in EA format.

Parameters:
outfile - where to write to
Throws:
java.io.IOException

writeCASP

public final void writeCASP(Printf outfile)
                     throws java.io.IOException
Write in CASP format.

Parameters:
outfile - where to write to
Throws:
java.io.IOException

writeConv

public final void writeConv(Printf outfile)
                     throws java.io.IOException
Write in Conv format.

Parameters:
outfile - where to write to
Throws:
java.io.IOException

writeVar2

public final void writeVar2(Printf outfile)
                     throws java.io.IOException
Write in Var2 format.

Parameters:
outfile - where to write to
Throws:
java.io.IOException

processYAPF

public void processYAPF(java.lang.String buffer)
                 throws java.io.IOException
Process a line from a YAPF file... this should ignore the line if it doesn't know what it is.

Overrides:
processYAPF in class Polymer
Throws:
java.io.IOException

writeYAPFInfo

protected void writeYAPFInfo(Printf outfile)
                      throws java.io.IOException
Write applicable sections of YAPF info.

Overrides:
writeYAPFInfo in class Polymer
Throws:
java.io.IOException

filterPred

public final void filterPred(boolean frishman)
filters predStructure predictions in a protein's residues according to DSSP rules: no helix shorter than 4, no strand shorter than 2. Set frishman to eliminate helices of length 4 and strands of length 2, making secondary structure prediction much easier than it really is.


filterPred

public final void filterPred()
filters predStructure predictions in a protein's residues according to DSSP rules: no helix shorter than 4, no strand shorter than 2.


filterReal

public final void filterReal(boolean frishman)
filters DSSP structure in a protein's residues according to DSSP rules: no helix shorter than 4, no strand shorter than 2. Set frishman to use Dmitri Frishman's idea of what DSSP's minimum lengths should be.


filterReal

public final void filterReal()
filters DSSP structure in a protein's residues according to DSSP rules: no helix shorter than 4, no strand shorter than 2.


smoothHE

public final void smoothHE()
Do one round of 'diffusive smoothing' on the predH and predE values in a protein's residues. Values from each residue get averaged with values from adjacent residues.


stripAllButCA

public final void stripAllButCA()
go to each residue, and remove all atoms except alpha carbons (CA).

See Also:
Residue.stripAllButCA()

makeVirtualCB

public final void makeVirtualCB()
Add a virtual CB atom for residues that don't have one.


copy

public Polymer copy()
Return a copy of yourself.

Overrides:
copy in class Polymer

hasGaps

public final boolean hasGaps()
Are any residues missing? Inter-CA distances greater than 4.0 or less than 3.6 angstroms are considered gaps. For lo-res PDB files, this is usually true.


fixDistanceGaps

public final ProteinSet fixDistanceGaps()
Filter out distance gaps (inter-CA > 4 A or < 3.6 A), returning a new set of proteins consisting of this protein broken into fragments everywhere there is a problem. Also, residues without CA are deleted. If there are no gaps, returns null.


showGaps

public final void showGaps(Printf outfile)
                    throws java.io.IOException
Print out possible gaps in the sequence. Inter-CA distances greater than 4.0 or less than 3.6 angstroms are considered gaps. For lo-res PDB files, this is usually true.

Throws:
java.io.IOException

preCalculatePhiPsi

public final void preCalculatePhiPsi()
pre-calculates cPhi and cPsi for all residues.


preCalculateAlphaTau

public final void preCalculateAlphaTau()
pre-calculates cAlpha and cTau for all residues.


preCalculateAngles

public final void preCalculateAngles()
pre-calculates cPhi, cPsi, cAlpha, and cTau for all residues.


findPDB

public final Protein findPDB(Printf outfile)
                      throws java.io.IOException
find a protein in a PDB file which should be this one, based on the name. Returns that protein aligned to this one. All residues which do not match (except Cys) have their atom information removed. If this protein has no residue information, the function does not do the alignment or remove any atom information.

Throws:
java.io.IOException

getDSSPResults

public final ProteinSet getDSSPResults(Printf outfile)
                                throws java.io.IOException
runs DSSP on a protein, returning a ProteinSet containing results from DSSP.

Throws:
java.io.IOException
See Also:
ProteinSet.findDSSP(java.lang.String, org.strbio.io.Printf)

findDSSPResult

protected final Protein findDSSPResult(ProteinSet q,
                                       Printf outfile)
                                throws java.io.IOException
returns the appropriate protein from a set of DSSP results, aligned to this one. All residues which do not match (except Cys) have their structure information removed (set to '-'). If this protein has no residue information, the function does not do the alignment or remove any structure information.

Throws:
java.io.IOException

runDSSP

public final void runDSSP(Printf outfile)
                   throws java.io.IOException
Runs DSSP on this protein (which must have atomic coordinates). As a side affect, all gaps are removed.

Throws:
java.io.IOException

findDSSP

public final Protein findDSSP(Printf outfile)
                       throws java.io.IOException
finds a protein in a PDB file which should be this one, based on the name. Does DSSP on it. Returns that protein aligned to this one. All residues which do not match (except Cys) have their structure information removed (set to '-'). If this protein has no residue information, the function does not do the alignment or remove any structure information.

Throws:
java.io.IOException

findAccess

public final Protein findAccess(Printf outfile)
                         throws java.io.IOException
find a protein in a PDB file which should be this one, based on the name. Run Access on it to get the environmental classes for each residue, and load it in. Returns that protein aligned to this one. All residues which do not match (except Cys) have their environment information removed. If this protein has no residue information, the function does not do the alignment or remove any atom information.

Throws:
java.io.IOException

copyPredSSFrom

public final void copyPredSSFrom(Protein q)
Copy predicted secondary structure info from another protein.


predictSS

public void predictSS(Printf outfile,
                      SSPredictor method)
               throws java.io.IOException
Predict the secondary structure of this protein, using a specified prediction method.

Throws:
java.io.IOException

predictSS

public void predictSS(Printf outfile)
               throws java.io.IOException
Predict the secondary structure of this protein, using the default method (Pred2ary, with large jury).

Throws:
java.io.IOException

thread

public ThreadResults thread(Printf outfile,
                            ThreadMethod method)
                     throws java.io.IOException
Thread the protein, using a specified threading method.

Throws:
java.io.IOException

thread

public ThreadResults thread(Printf outfile)
                     throws java.io.IOException
Thread, using the default method.

Throws:
java.io.IOException

getInfo

public final void getInfo(Printf outfile,
                          boolean getSequence,
                          boolean getAngles,
                          boolean getAtoms,
                          boolean getStructure,
                          boolean getEnv,
                          boolean getPDB,
                          boolean getCATH)
                   throws java.io.IOException
Get info for a protein out of local databases. Writes some progress reports to outfile, if non-null. For residue based properties, this does a simple sequence alignment before copying things over; residues that don't match don't have their info copied (except for Cys, which is often incorrectly stored in protein sequences).

Parameters:
outfile - write progress reports here
getSequence - get sequence out of PDB
getAngles - get precalculated dihedral angels
getAtoms - get atomic coordinates
getStructure - get secondary structure using DSSP
getEnv - get environmental class using Access
getPDB - get records like title, header from PDB
getCATH - get records like title, header from CATH
Throws:
java.io.IOException

isCATHMatch

public final boolean isCATHMatch(Protein y)
Does this protein match another at the H level or below, according to CATH codes? CATH data must be present for both proteins, or false is returned.


reverse

public void reverse()
Reverse yourself. Name is prepended with an 'R' character. Also, ProteinInfo is removed.

Overrides:
reverse in class Polymer

molecularWeight

public double molecularWeight()
Calculate molecular weight; add back the last water

Overrides:
molecularWeight in class Polymer