Class PDBFileParser


  • public class PDBFileParser
    extends Object
    This class implements the actual PDB file parsing. Do not access it directly, but via the PDBFileReader class.

    Parsing

    During the PDBfile parsing several Flags can be set. See the 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

    Example

    Q: How can I get a Structure object from a PDB file?

    A:

     public Structure loadStructure(String pathToPDBFile){
            // The PDBFileParser is wrapped by the PDBFileReader
            PDBFileReader pdbreader = new PDBFileReader();
    
            Structure structure = null;
            try{
                    structure = pdbreader.getStructure(pathToPDBFile);
                    System.out.println(structure);
            } catch (IOException e) {
                    e.printStackTrace();
            }
            return structure;
     }
     
    Since:
    1.4
    Author:
    Andreas Prlic, Jules Jacobsen, Jose Duarte