public class PDBFileParser extends Object
setFileParsingParameters(FileParsingParameters) methods.
To provide excessive memory usage for large PDB files, there is the ATOM_CA_THRESHOLD. If more Atoms than this threshold are being parsed in a PDB file, the parser will automatically switch to a C-alpha only representation.
The result of the parsing of the PDB file is a new Structure object.
For more documentation on how to work with the Structure API please see http://biojava.org/wiki/BioJava:CookBook#Protein_Structure
Q: How can I get a Structure object from a PDB file?
A:
publicStructureloadStructure(String pathToPDBFile){ // The PDBFileParser is wrapped by the PDBFileReaderPDBFileReaderpdbreader = newPDBFileReader();Structurestructure = null; try{ structure = pdbreader.getStructure(pathToPDBFile); System.out.println(structure); } catch (IOException e) { e.printStackTrace(); } return structure; }
| Constructor and Description |
|---|
PDBFileParser() |
| Modifier and Type | Method and Description |
|---|---|
FileParsingParameters |
getFileParsingParameters() |
Structure |
parsePDBFile(BufferedReader buf)
Parse a PDB file and return a datastructure implementing
PDBStructure interface.
|
Structure |
parsePDBFile(InputStream inStream)
Parse a PDB file and return a datastructure implementing
PDBStructure interface.
|
void |
setFileParsingParameters(FileParsingParameters params) |
public PDBFileParser()
public Structure parsePDBFile(InputStream inStream) throws IOException
inStream - an InputStream objectIOExceptionpublic Structure parsePDBFile(BufferedReader buf) throws IOException
buf - a BufferedReader objectIOException - ...public void setFileParsingParameters(FileParsingParameters params)
public FileParsingParameters getFileParsingParameters()
Copyright © 2000–2019 BioJava. All rights reserved.