public class StructureIO extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
StructureIO.StructureFiletype |
| Constructor and Description |
|---|
StructureIO() |
| Modifier and Type | Method and Description |
|---|---|
static Structure |
getBiologicalAssembly(String pdbId)
Returns the first biologicalAssembly that is available for a protein structure.
|
static Structure |
getBiologicalAssembly(String pdbId,
int biolAssemblyNr)
By default the getStructure method loads asym units.
|
static Structure |
getBiologicalAssembly(String pdbId,
int biolAssemblyNr,
AtomCache cache) |
static Structure |
getBiologicalAssembly(String pdbId,
int biolAssemblyNr,
AtomCache cache,
BioUnitDataProvider provider) |
static int |
getNrBiologicalAssemblies(String pdbId) |
static Structure |
getStructure(String name)
Loads a structure based on a name.
|
static StructureIO.StructureFiletype |
guessFiletype(String filename)
Attempts to guess the type of a structure file based on the extension
|
static boolean |
hasBiologicalAssembly(String pdbId)
Does the provider PDB ID have a biological assembly?
|
static void |
setAtomCache(AtomCache c) |
static void |
setPdbPath(String pathToPDBFiles)
Utility method to set the location where PDB files can be found
|
public static Structure getStructure(String name) throws IOException, StructureException
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:
#setStrictSCOP(boolean)name - IOException - The PDB file cannot be cached due to IO errorsStructureException - The name appeared valid but did not correspond to a structure.
Also thrown by some submethods upon errors, eg for poorly formatted subranges.public static void setAtomCache(AtomCache c)
public static Structure getBiologicalAssembly(String pdbId) throws IOException, StructureException
http://www.pdb.org/pdb/101/static101.do?p=education_discussion/Looking-at-Structures/bioassembly_tutorial.htmlpdbId - StructureExceptionIOExceptionpublic static Structure getBiologicalAssembly(String pdbId, int biolAssemblyNr) throws IOException, StructureException
pdbId - biolAssemblyNr - - the ith biological assembly that is available for a PDB ID (we start counting at 1, 0 represents the asym unit).StructureException - if there is no bioassembly available for given biolAssemblyNr or some other problems encountered while loading itIOExceptionpublic static Structure getBiologicalAssembly(String pdbId, int biolAssemblyNr, AtomCache cache) throws IOException, StructureException
IOExceptionStructureExceptionpublic static Structure getBiologicalAssembly(String pdbId, int biolAssemblyNr, AtomCache cache, BioUnitDataProvider provider) throws IOException, StructureException
IOExceptionStructureExceptionpublic static boolean hasBiologicalAssembly(String pdbId)
pdbId - public static int getNrBiologicalAssemblies(String pdbId)
public static void setPdbPath(String pathToPDBFiles)
pathToPDBFiles - public static StructureIO.StructureFiletype guessFiletype(String filename)
filename - Copyright © 2000–2016 BioJava. All rights reserved.