org.biojava3.structure
Class StructureIO

java.lang.Object
  extended by org.biojava3.structure.StructureIO

public class StructureIO
extends java.lang.Object

A class that provides static access methods for easy lookup of protein structure related components

Since:
3.0.5
Author:
Andreas Prlic

Constructor Summary
StructureIO()
           
 
Method Summary
static Structure getBiologicalAssembly(java.lang.String pdbId)
          Returns the first biologicalAssembly that is available for a protein structure.
static Structure getBiologicalAssembly(java.lang.String pdbId, int biolAssemblyNr)
          By default the getStructure method loads asym units.
static int getNrBiologicalAssemblies(java.lang.String pdbId)
           
static Structure getStructure(java.lang.String name)
          Loads a structure based on a name.
static boolean hasBiologicalAssembly(java.lang.String pdbId)
          Does the provider PDB ID have a biological assembly?
static void setAtomCache(AtomCache c)
           
static void setPdbPath(java.lang.String pathToPDBFiles)
          Utility method to set the location where PDB files can be found
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StructureIO

public StructureIO()
Method Detail

getStructure

public static Structure getStructure(java.lang.String name)
                              throws java.io.IOException,
                                     StructureException
Loads a structure based on a name. Supported naming conventions are: *
                Formal specification for how to specify the name:

                name     := pdbID
                               | pdbID '.' chainID
                               | pdbID '.' range
                               | scopID 
                               | biol
                               | pdp
                range         := '('? range (',' range)? ')'?
                               | chainID
                               | chainID '_' resNum '-' resNum
                pdbID         := [0-9][a-zA-Z0-9]{3}
                chainID       := [a-zA-Z0-9]
                scopID        := 'd' pdbID [a-z_][0-9_]
                biol              := 'BIOL:' pdbID [:]? [0-9]+
                pdp                       := 'PDP:' pdbID[A-Za-z0-9_]+ 
                resNum        := [-+]?[0-9]+[A-Za-z]?


                Example structures:
                1TIM            #whole structure - asym unit
                4HHB.C          #single chain
                4GCR.A_1-83 #one domain, by residue number
                3AA0.A,B    #two chains treated as one structure
                d2bq6a1     #scop domain
                BIOL:1fah   #biological assembly nr 1 for 1fah
                BIOL:1fah:0 #asym unit for 1fah
                BIOL:1fah:1 #biological assembly nr 1 for 1fah
                BIOL:1fah:2 #biological assembly nr 2 for 1fah

                
With the additional set of rules:

Parameters:
name -
Returns:
a Structure object, or null if name appears improperly formated (eg too short, etc)
Throws:
java.io.IOException - The PDB file cannot be cached due to IO errors
StructureException - The name appeared valid but did not correspond to a structure. Also thrown by some submethods upon errors, eg for poorly formatted subranges.

setAtomCache

public static void setAtomCache(AtomCache c)

getBiologicalAssembly

public static Structure getBiologicalAssembly(java.lang.String pdbId)
                                       throws java.io.IOException,
                                              StructureException
Returns the first biologicalAssembly that is available for a protein structure. For more documentation on quaternary structures see: http://www.pdb.org/pdb/101/static101.do?p=education_discussion/Looking-at-Structures/bioassembly_tutorial.html

Parameters:
pdbId -
Returns:
a Structure object or null if that assembly is not available
Throws:
StructureException
java.io.IOException

getBiologicalAssembly

public static Structure getBiologicalAssembly(java.lang.String pdbId,
                                              int biolAssemblyNr)
                                       throws java.io.IOException,
                                              StructureException
By default the getStructure method loads asym units. This access method allows to recreate the quaternary structure for a protein if it is available.

Parameters:
pdbId -
biolAssemblyNr - - the ith biological assembly that is available for a PDB ID (we start counting at 1, 0 represents the asym unit).
Returns:
a Structure object or null if that assembly is not available
Throws:
StructureException
java.io.IOException

hasBiologicalAssembly

public static boolean hasBiologicalAssembly(java.lang.String pdbId)
Does the provider PDB ID have a biological assembly?

Parameters:
pdbId -
Returns:
flag if one or more biological assemblies are available

getNrBiologicalAssemblies

public static int getNrBiologicalAssemblies(java.lang.String pdbId)

setPdbPath

public static void setPdbPath(java.lang.String pathToPDBFiles)
Utility method to set the location where PDB files can be found

Parameters:
pathToPDBFiles -