|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojava.bio.structure.io.PDBFileReader
public class PDBFileReader
A PDB file parser.
Q: How can I get a Structure object from a PDB file?
A:
String filename = "path/to/pdbfile.ent" ; PDBFileReader pdbreader = new PDBFileReader(); try{ Structure struc = pdbreader.getStructure(filename); System.out.println(struc); } catch (Exception e) { e.printStackTrace(); }
Constructor Summary | |
---|---|
PDBFileReader()
|
Method Summary | |
---|---|
void |
addExtension(String s)
define supported file extensions compressed extensions .Z,.gz do not need to be specified they are dealt with automatically. |
String |
getPath()
Returns the path value. |
Structure |
getStructure(File filename)
opens filename, parses it and returns a Structure object |
Structure |
getStructure(String filename)
opens filename, parses it and returns aStructure object . |
Structure |
getStructureById(String pdbId)
load a structure from local file system and return a PDBStructure object |
void |
setPath(String p)
directory where to find PDB files |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PDBFileReader()
Method Detail |
---|
public void setPath(String p)
setPath
in interface StructureIOFile
p
- a String specifying the path valuepublic String getPath()
setPath(java.lang.String)
public void addExtension(String s)
addExtension
in interface StructureIOFile
s
- a String ...public Structure getStructureById(String pdbId) throws IOException
getStructureById
in interface StructureIO
pdbId
- a String specifying the id value (PDB code)
IOException
- ...public Structure getStructure(String filename) throws IOException
getStructure
in interface StructureIOFile
filename
- a String
IOException
- ...public Structure getStructure(File filename) throws IOException
filename
- a File object
IOException
- ...
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |