meshi.molecularElements
Class Protein

java.lang.Object
  extended by meshi.molecularElements.Protein
Direct Known Subclasses:
ExtendedAtomsProtein, HydrogenTest.PolyAla, SymmetricComplex

public class Protein
extends java.lang.Object

A protein chain.


Nested Class Summary
static class Protein.BackboneFilter
          Sets the chain of this protein, after asserting that it is comprised of residues belonging to a single polypeptide chain.
 
Field Summary
protected  AngleList angles
           
protected  AtomList atoms
          A list of the protein's atoms.
protected  AtomPairList bonds
          A list of the protein's bonds.
protected  ChainList chains
           
protected  int firstResidueIndex
           
protected  java.lang.Integer modelNumber
          Often many models of the same protein are generated.
protected  java.lang.String name
          The protein name.
protected  ResidueList residues
          A list of the protein's residues.
protected  TorsionList torsions
           
private  boolean verbose
           
 
Constructor Summary
Protein(AtomList atomList)
          Builds a protein from a list of atoms.
Protein(AtomList atomList, ResidueCreator creator)
          Builds a protein from a PDB formatted file and a line filter.
Protein(Residue residue)
           
Protein(Sequence sequence, java.lang.String name, ResidueCreator creator)
          Builds a protein from AA sequence.
Protein(Sequence sequence, java.lang.String name, java.lang.String chainName, ResidueCreator creator)
           
Protein(java.lang.String name)
           
Protein(java.lang.String fileName, Filter filter, ResidueCreator creator)
          Builds a protein from a PDB formatted file and a line filter.
 
Method Summary
 void addChain(Chain chain)
           
 void allYouWantToKnow()
           
 AtomList atoms()
          A list of the protein's atoms.
 AtomPairList bonds()
           
 Chain chain()
           
 ChainList chains()
           
 void defrost()
          Allow all atoms to move.
 int firstResidueIndex()
          For users who need this signature.
 ResidueIdentifier[] firstResidues()
          An array of the Residue Identifiers of the first residues in each chain In most cases it is residue 1 but in many other cases some n > 1 typicaly because the N-terminus is not present in the PDB file
 void freeze()
           
 void freeze(Filter filter)
           
 Atom getAtom(java.lang.String residueName, ResidueIdentifier residueID, java.lang.String atomName)
          Returns the specified atom.
private  java.lang.Integer getModelNumber(MeshiLineReader file)
          Extracts the model number from the filename.
static java.lang.String getProteinName(MeshiLineReader file)
          Extract the protein name from the filename.
static java.lang.String getProteinName(java.lang.String pathString)
           
 java.lang.String getSequence()
           
 ResidueList missingResidues()
           
 int modelNumber()
           
 java.lang.String name()
          The protein name.
 AtomList nowhereAtoms()
           
 void printAtomsToFile(java.lang.String fileName)
           
 Residue residue(int residueNumber)
          Returns the residue.
 Residue residue(ResidueIdentifier id)
          Returns the residue.
 Residue residueAt(int residueNumber)
           
 ResidueList residues()
          A list of the protein's residues.
 Sequence sequence()
           
 void setName(java.lang.String name)
           
 void setSS(SequenceAlignment alignment)
           
 void setSS(java.lang.String SS)
          A method to set the secondary structure of a protein.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected java.lang.String name
The protein name.


modelNumber

protected java.lang.Integer modelNumber
Often many models of the same protein are generated.


residues

protected ResidueList residues
A list of the protein's residues.


chains

protected ChainList chains

atoms

protected AtomList atoms
A list of the protein's atoms.


bonds

protected AtomPairList bonds
A list of the protein's bonds.


angles

protected AngleList angles

torsions

protected TorsionList torsions

firstResidueIndex

protected int firstResidueIndex

verbose

private boolean verbose
Constructor Detail

Protein

public Protein(java.lang.String name)

Protein

public Protein(Sequence sequence,
               java.lang.String name,
               ResidueCreator creator)
Builds a protein from AA sequence.


Protein

public Protein(Sequence sequence,
               java.lang.String name,
               java.lang.String chainName,
               ResidueCreator creator)

Protein

public Protein(AtomList atomList,
               ResidueCreator creator)
Builds a protein from a PDB formatted file and a line filter.


Protein

public Protein(java.lang.String fileName,
               Filter filter,
               ResidueCreator creator)
Builds a protein from a PDB formatted file and a line filter.


Protein

public Protein(Residue residue)

Protein

public Protein(AtomList atomList)
Builds a protein from a list of atoms. This constructor is used by HeliumClusterMinimization our work horse for development. It is not very useful in any other context.

Method Detail

chains

public ChainList chains()

addChain

public void addChain(Chain chain)

missingResidues

public ResidueList missingResidues()

nowhereAtoms

public AtomList nowhereAtoms()

bonds

public AtomPairList bonds()

getProteinName

public static java.lang.String getProteinName(MeshiLineReader file)
Extract the protein name from the filename. expects name.pdb or name.modelNumber.pdb or pdbname.ent


getProteinName

public static java.lang.String getProteinName(java.lang.String pathString)

getModelNumber

private java.lang.Integer getModelNumber(MeshiLineReader file)
Extracts the model number from the filename. Expects file name with the format name.modelNumber.pdb


name

public java.lang.String name()
The protein name.


modelNumber

public int modelNumber()

atoms

public AtomList atoms()
A list of the protein's atoms.


residues

public ResidueList residues()
A list of the protein's residues.


firstResidues

public ResidueIdentifier[] firstResidues()
An array of the Residue Identifiers of the first residues in each chain In most cases it is residue 1 but in many other cases some n > 1 typicaly because the N-terminus is not present in the PDB file


residue

public Residue residue(ResidueIdentifier id)
Returns the residue.


residue

public Residue residue(int residueNumber)
Returns the residue.


defrost

public void defrost()
Allow all atoms to move.


freeze

public void freeze()

freeze

public void freeze(Filter filter)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getAtom

public Atom getAtom(java.lang.String residueName,
                    ResidueIdentifier residueID,
                    java.lang.String atomName)
Returns the specified atom.


firstResidueIndex

public int firstResidueIndex()
For users who need this signature.


allYouWantToKnow

public void allYouWantToKnow()

setSS

public void setSS(java.lang.String SS)
A method to set the secondary structure of a protein. The input SS string currently support only C,E,H letters + A for the ALL type (= every SS is posible). This method works only if the number of letter in the SS string equals to the number of non-dummy residues. The assignment of SS is than sequential in the residue numbers.


setSS

public void setSS(SequenceAlignment alignment)

getSequence

public java.lang.String getSequence()

printAtomsToFile

public void printAtomsToFile(java.lang.String fileName)
                      throws java.lang.Exception
Throws:
java.lang.Exception

setName

public void setName(java.lang.String name)

residueAt

public Residue residueAt(int residueNumber)

sequence

public Sequence sequence()

chain

public Chain chain()