Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault with some files #21

Closed
xrobin opened this issue Apr 23, 2018 · 5 comments
Closed

Segmentation fault with some files #21

xrobin opened this issue Apr 23, 2018 · 5 comments

Comments

@xrobin
Copy link
Contributor

xrobin commented Apr 23, 2018

I have 3 files in PDB format that cause a segmentation fault when I run plipcmd.

All the files I use are generated by OpenStructure, and only these 3 appear to cause a crash. I don't actually know if they are due to a single or multiple bugs. The PDB files from RCSB work fine.

$ gunzip 4lck.biounit.2.pdb.gz
$ plipcmd -f 4lck.biounit.2.pdb
Segmentation fault (core dumped)

I can see it crash with plip 1.4.0 and 1.4.1, both running Python 2.7.11 and OpenBabel 2.4.1.

I tried to run it on your web server and the job didn't get through either:

Sorry, your job has been failed for some reason. Please try again or contact us, if the problem still persists

So it doesn't seem to be specific to our system.

@ssalentin
Copy link

Segmentation faults with PLIP are usually always related to OpenBabel, also seems to be the way in this case. Tested again with OpenBabel 2.4.90, PLIP 1.4.1 in Python 2.7.12

  • 1ijs.biounit.6.filtered.pdb.gz works fine now.
  • 1yj9.biounit.1.pdb.gz still segfault
  • 1yj9.biounit.1.filtered.pdb.gz works fine.
  • 4lck.biounit.2.pdb still segfault

Structures with only DNA and no ligands should not result in a crash, PLIP wil report that no ligands are contained or there are no interactions.

@xrobin
Copy link
Contributor Author

xrobin commented Apr 30, 2018

I can however run the file with openbabel just fine:

zohixe92@worker02:~$ plipcmd -f /scicore/data/databases/SMTL/entries/4l/ck/biounit.2.pdb.gz
Segmentation fault
zohixe92@worker02:~$ babel -ipdb /scicore/data/databases/SMTL/entries/4l/ck/biounit.2.pdb.gz -opdb aaa.pdb
1 molecule converted
18 info messages 14 audit log messages 

It seems to generate a valid PDB file in aaa.pdb.
If I increase the error level I can see some messages about "Kekulize Error for molecule" and "Problems reading a CONECT record.", however I get the same messages for other structures.

I suspect the error comes from some specific action in the python openbabel or pybel module?
I'm asking because I'd like to report the bug upstream so it would be nice to be able to isolate what causes the error exactly.

@xrobin
Copy link
Contributor Author

xrobin commented May 24, 2018

Being hit by this again with an other PDB file. I could identify the segfault happens at the following line supplemental.py, in canonicalize, line 348:

testcan = lig.write(format='can')

ssalentin pushed a commit that referenced this issue May 30, 2018
…el canonical SMILES conversion can be avoided by skipping the step for mapping between canonical and PDB atom order with the flag --nopdbcanmap
@ssalentin
Copy link

I added a new command line flag in the newest commit to address the problem.
When started with --nopdbcanmap, PLIP skips the step of calculating the mapping between the canonical atom order and PDB atom order. Skipping this step has no effects on the other calculations.

@ssalentin
Copy link

Tested with all 4 offending structures and works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants