You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to import a PDB format file created with GaussView containing the structure of alanine (attached).
This raised an exception:
java.lang.StringIndexOutOfBoundsException: String index out of range: -4
at java.base/java.lang.String.substring(String.java:1841)
at org.openscience.cdk.io.PDBReader.readChemFile(PDBReader.java:397)
at org.openscience.cdk.io.PDBReader.read(PDBReader.java:198)
After looking into it, I think the problem is line 3 in the file that has the property key "COMPND". In the class PDBReader line 396 and following, the functionality tries to parse the rest of the line as a title for the imported compound. But it is not checked whether there is actually something more than just "COMPND" in the line. Maybe, you can add a check for the line length before it is parsed (as it is done above for "REMARK").
If I can be of any further help, please let me know!
Dear CDK developers,
I tried to import a PDB format file created with GaussView containing the structure of alanine (attached).
This raised an exception:
java.lang.StringIndexOutOfBoundsException: String index out of range: -4
at java.base/java.lang.String.substring(String.java:1841)
at org.openscience.cdk.io.PDBReader.readChemFile(PDBReader.java:397)
at org.openscience.cdk.io.PDBReader.read(PDBReader.java:198)
After looking into it, I think the problem is line 3 in the file that has the property key "COMPND". In the class PDBReader line 396 and following, the functionality tries to parse the rest of the line as a title for the imported compound. But it is not checked whether there is actually something more than just "COMPND" in the line. Maybe, you can add a check for the line length before it is parsed (as it is done above for "REMARK").
If I can be of any further help, please let me know!
Kind regards,
Jonas Schaub
Ala_PDB.txt
The text was updated successfully, but these errors were encountered: