|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojava.bio.structure.io.PDBFileParser
public class PDBFileParser
This class implements the actual PDB file parsing. Do not access it directly, but via the PDBFileReader class.
setParseCAOnly(boolean)
- parse only the Atom records for C-alpha atomssetParseSecStruc(boolean)
- a flag if the secondary structure information from the PDB file (author's assignment) should be parsed.
If true the assignment can be accessed through AminoAcid
.getSecStruc(); setAlignSeqRes(boolean)
- should the AminoAcid sequences from the SEQRES
and ATOM records of a PDB file be aligned? (default:yes)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.
Q: How can I get a Structure object from a PDB file?
A:
publicStructure
loadStructure(String pathToPDBFile){ // The PDBFileParser is wrapped by the PDBFileReaderPDBFileReader
pdbreader = newPDBFileReader
();Structure
structure = null; try{ structure = pdbreader.getStructure(pathToPDBFile); System.out.println(structure); } catch (IOException e) { e.printStackTrace(); } return structure; }
Field Summary | |
---|---|
static int |
ATOM_CA_THRESHOLD
the maximum number of atoms that will be parsed before the parser switches to a CA-only representation of the PDB file. |
static String |
HELIX
Helix secondary structure assignment. |
static int |
MAX_ATOMS
the maximum number of atoms we will add to a structure this protects from memory overflows in the few really big protein structures. |
boolean |
parseCAOnly
Set the flag to only read in Ca atoms - this is useful for parsing large structures like 1htq. |
static String |
PDB_AUTHOR_ASSIGNMENT
Secondary strucuture assigned by the PDB author/ |
static String |
STRAND
Strand secondary structure assignment. |
static String |
TURN
Turn secondary structure assignment. |
Constructor Summary | |
---|---|
PDBFileParser()
|
Method Summary | |
---|---|
protected String |
getTimeStamp()
Returns a time stamp. |
boolean |
isAlignSeqRes()
Flag if the SEQRES amino acids should be aligned with the ATOM amino acids. |
boolean |
isParseCAOnly()
the flag if only the C-alpha atoms of the structure should be parsed. |
boolean |
isParseSecStruc()
is secondary structure assignment being parsed from the file? default is null |
void |
linkChains2Compound(Structure s)
After the parsing of a PDB file the Chain and Compound
objects need to be linked to each other. |
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 |
setAlignSeqRes(boolean alignSeqRes)
define if the SEQRES in the structure should be aligned with the ATOM records if yes, the AminoAcids in structure.getSeqRes will have the coordinates set. |
void |
setParseCAOnly(boolean parseCAOnly)
the flag if only the C-alpha atoms of the structure should be parsed. |
void |
setParseSecStruc(boolean parseSecStruc)
a flag to tell the parser to parse the Author's secondary structure assignment from the file default is set to false, i.e. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PDB_AUTHOR_ASSIGNMENT
public static final String HELIX
public static final String STRAND
public static final String TURN
public static final int ATOM_CA_THRESHOLD
public static final int MAX_ATOMS
public boolean parseCAOnly
Constructor Detail |
---|
public PDBFileParser()
Method Detail |
---|
public boolean isParseCAOnly()
public void setParseCAOnly(boolean parseCAOnly)
parseCAOnly
- boolean flag to enable or disable C-alpha only parsingpublic boolean isAlignSeqRes()
public void setAlignSeqRes(boolean alignSeqRes)
alignSeqRes
- public boolean isParseSecStruc()
public void setParseSecStruc(boolean parseSecStruc)
parseSecStruc
- if HELIX STRAND and TURN fields are being parsedprotected String getTimeStamp()
public Structure parsePDBFile(InputStream inStream) throws IOException
inStream
- an InputStream object
IOException
public Structure parsePDBFile(BufferedReader buf) throws IOException
buf
- a BufferedReader object
IOException
- ...public void linkChains2Compound(Structure s)
Chain
and Compound
objects need to be linked to each other.
s
- the structure
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |