org.biojava.bio.structure
Class StructureImpl

java.lang.Object
  extended byorg.biojava.bio.structure.StructureImpl
All Implemented Interfaces:
Structure

public class StructureImpl
extends Object
implements Structure

Implementation of a PDBStructure. This class provides the data contained in a PDB file.


Constructor Summary
StructureImpl()
           
 
Method Summary
 void addChain(Chain chain)
          add a new chain
 void addChain(Chain chain, int modelnr)
          add a new chain, if several models are available
 void addModel(ArrayList model)
          add a new model
 Chain getChain(int number)
          retrieve a chain by it's position within the Structure
 Chain getChain(int modelnr, int number)
          retrieve a chain by it's position within the Structure and model number
 ArrayList getChains(int modelnr)
          retrieve all chains of a model
 ArrayList getConnections()
           
 HashMap getHeader()
          get Header data
 ArrayList getModel(int modelnr)
          retrieve all Chains belonging to a model
 String getName()
          get biological name of Structure
 String getPDBCode()
          get PDB code of structure
 boolean isNmr()
          is this structure an nmr strucutre ?
 int nrModels()
          return number of models
 void setConnections(ArrayList conns)
          CONECT data sets/gets an ArrayList of HashMaps which corresponds to the CONECT lines in the PDB file:
 void setHeader(HashMap h)
          set the Header data
 void setName(String nam)
          set biological name of Structure
 void setNmr(boolean nmr)
           
 void setPDBCode(String pdb_id_)
          set PDB code of structure
 int size()
          return number of chains in this container
 int size(int modelnr)
          return number of chains of of model
 String toPDB()
          create a String that contains the contents of a PDB file
 String toString()
          string representation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StructureImpl

public StructureImpl()
Method Detail

setPDBCode

public void setPDBCode(String pdb_id_)
set PDB code of structure

Specified by:
setPDBCode in interface Structure

getPDBCode

public String getPDBCode()
get PDB code of structure

Specified by:
getPDBCode in interface Structure

setName

public void setName(String nam)
set biological name of Structure

Specified by:
setName in interface Structure

getName

public String getName()
get biological name of Structure

Specified by:
getName in interface Structure

setHeader

public void setHeader(HashMap h)
set the Header data

Specified by:
setHeader in interface Structure

getHeader

public HashMap getHeader()
get Header data

Specified by:
getHeader in interface Structure

setConnections

public void setConnections(ArrayList conns)
Description copied from interface: Structure
CONECT data sets/gets an ArrayList of HashMaps which corresponds to the CONECT lines in the PDB file:
       COLUMNS         DATA TYPE        FIELD           DEFINITION
       ---------------------------------------------------------------------------------
       1 -  6         Record name      "CONECT"
       7 - 11         Integer          serial          Atom serial number
       12 - 16         Integer          serial          Serial number of bonded atom
       17 - 21         Integer          serial          Serial number of bonded atom
       22 - 26         Integer          serial          Serial number of bonded atom
       27 - 31         Integer          serial          Serial number of bonded atom
       32 - 36         Integer          serial          Serial number of hydrogen bonded
       atom
       37 - 41         Integer          serial          Serial number of hydrogen bonded
       atom
       42 - 46         Integer          serial          Serial number of salt bridged
       atom
       47 - 51         Integer          serial          Serial number of hydrogen bonded
       atom
       52 - 56         Integer          serial          Serial number of hydrogen bonded
       atom
       57 - 61         Integer          serial          Serial number of salt bridged
       atom
       
the HashMap for a single CONECT line contains the following fields:

Specified by:
setConnections in interface Structure
See Also:
interface

getConnections

public ArrayList getConnections()
Specified by:
getConnections in interface Structure
See Also:
interface

addChain

public void addChain(Chain chain)
add a new chain

Specified by:
addChain in interface Structure

addChain

public void addChain(Chain chain,
                     int modelnr)
add a new chain, if several models are available

Specified by:
addChain in interface Structure

getChain

public Chain getChain(int number)
retrieve a chain by it's position within the Structure

Specified by:
getChain in interface Structure

getChain

public Chain getChain(int modelnr,
                      int number)
retrieve a chain by it's position within the Structure and model number

Specified by:
getChain in interface Structure

addModel

public void addModel(ArrayList model)
add a new model

Specified by:
addModel in interface Structure

toString

public String toString()
string representation

Specified by:
toString in interface Structure

size

public int size()
return number of chains in this container

Specified by:
size in interface Structure

size

public int size(int modelnr)
return number of chains of of model

Specified by:
size in interface Structure

nrModels

public int nrModels()
return number of models

Specified by:
nrModels in interface Structure

isNmr

public boolean isNmr()
is this structure an nmr strucutre ?

Specified by:
isNmr in interface Structure

setNmr

public void setNmr(boolean nmr)
Specified by:
setNmr in interface Structure

getChains

public ArrayList getChains(int modelnr)
retrieve all chains of a model

Specified by:
getChains in interface Structure
See Also:
getModel

getModel

public ArrayList getModel(int modelnr)
retrieve all Chains belonging to a model

Specified by:
getModel in interface Structure
See Also:
getChains

toPDB

public String toPDB()
create a String that contains the contents of a PDB file

Specified by:
toPDB in interface Structure