org.biojava.bio.structure
Interface Structure

All Known Implementing Classes:
StructureImpl

public interface Structure


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 pos)
          retrieve a chain by it's position within the Structure
 Chain getChain(int pos, int modelnr)
          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()
          test if this structure is an nmr structure
 int nrModels()
          return number of models in this implementation also XRAY structures have "1 model", since model is the container for the chains.
 void setConnections(ArrayList connections)
          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 name)
          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 file
 int size(int modelnr)
          return number of chains of model
 String toPDB()
          create a String that contains the contents of a PDB file
 String toString()
          String representation of object
 

Method Detail

toString

public String toString()
String representation of object


setPDBCode

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


getPDBCode

public String getPDBCode()
get PDB code of structure


setName

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


getName

public String getName()
get biological name of Structure


setHeader

public void setHeader(HashMap h)
set the Header data


getHeader

public HashMap getHeader()
get Header data


setConnections

public void setConnections(ArrayList connections)
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:


getConnections

public ArrayList getConnections()

size

public int size()
return number of Chains in file


size

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


nrModels

public int nrModels()
return number of models in this implementation also XRAY structures have "1 model", since model is the container for the chains. to test if a Structure is an NMR structure use @see isNMR , since this is based on the info in the PDB file header.


isNmr

public boolean isNmr()
test if this structure is an nmr structure


setNmr

public void setNmr(boolean nmr)

addModel

public void addModel(ArrayList model)
add a new model


getModel

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

See Also:
getChains

getChains

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

See Also:
getModel

addChain

public void addChain(Chain chain)
add a new chain


addChain

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


getChain

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


getChain

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


toPDB

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