-
Notifications
You must be signed in to change notification settings - Fork 397
Closed
Description
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
Labels
No labels