Skip to content

Cannot parse pdb file.  #702

@jendelel

Description

@jendelel

Hi,

it seems that I cannot parse any pdb file using PDBFileReader.
This simple code fails for me (2src_off.pdb is official 2src PDB file from RCSB):

    PDBFileReader pdbReader = new PDBFileReader();
    //pdbReader.getFileParsingParameters().setCreateAtomCharges(false);
    String path = "~/pranklib/2src_off.pdb";
    Structure structure = null;
    try {
      structure = pdbReader.getStructure(path);
      System.out.println(structure);
    } catch (IOException e) {
      e.printStackTrace();
    } 

with error:

20:22:57 [main] ERROR org.biojava.nbio.structure.io.mmcif.SimpleMMcifParser - This does not look like a valid mmCIF file! The first line should start with 'data_', but is: 'null'
Exception in thread "main" java.lang.NullPointerException
        at org.biojava.nbio.structure.io.ChargeAdder.addCharges(ChargeAdder.java:55)
        at org.biojava.nbio.structure.io.PDBFileParser.addCharges(PDBFileParser.java:2772)
        at org.biojava.nbio.structure.io.PDBFileParser.parsePDBFile(PDBFileParser.java:2760)
        at org.biojava.nbio.structure.io.PDBFileParser.parsePDBFile(PDBFileParser.java:2622)
        at org.biojava.nbio.structure.io.PDBFileReader.getStructure(PDBFileReader.java:307)
        at org.biojava.nbio.structure.io.LocalPDBDirectory.getStructure(LocalPDBDirectory.java:337)
        at org.biojava.nbio.structure.io.LocalPDBDirectory.getStructure(LocalPDBDirectory.java:321)
        at hello.HelloWorld.main(HelloWorld.java:22)

Weird thing is that it didn't fail before. How is that possible? Also we do I get so many ERROR from MMcifParser when I am parsing PDB and not mmCIF?

Thanks in advance for any help.

Lukas

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions