plip icon indicating copy to clipboard operation
plip copied to clipboard

HET from custom .pdb file created in PyMOL not parsed correctly by plip

Open fabioatuib opened this issue 3 years ago • 6 comments

Hi! I used to PyMOL to add a molecule to a pdb file. PyMOL reads the new .pdb file just fine, but plip reads the added ligand incorrectly. Do you know what went wrong and how could I fix it?

Is there a way to analyze the protein-ligand interactions with PLIP without having the generate a custom .pdb file with the docked ligand + receptor? For example, by using the Python module of PLIP?

Thank you!

I generated the custom .pdb in the following way:

from pymol import cmd
# receptor in a .pdb file
cmd.load(filename='../3KF4_B90.pdb', object='protein')
# docked ligand in a .sdf file
cmd.load(filename='../3KF4_B90.sdf', object='ligand')
# save protein and ligand in the same .pdb for plip analysis
cmd.save(filename='../3KF4_B90_complex.pdb')

This is what I see in PyMOL when I open 3KF4_B90_complex.pdb: Screenshot from 2021-05-18 12-10-36

This is what I see in PLIP: 3KF4_B90_COMPLEX_PROTEIN_UNK_Z_0

fabioatuib avatar May 18 '21 10:05 fabioatuib

Hi fabioatuib, thank you for the request. This seems to be an issue with the connect records. You could have some luck explicitly adding connections. If this does not help, we would need to see the original and the resulting files to further investigate the issue.

All the Best Christoph

cleberecht avatar May 19 '21 08:05 cleberecht

Hi Christoph, Unfortunately, PLIP is still parsing the ligand incorrectly. You can find in the .zip file the .pdb and .sdf files used and custom .pdb file created with PyMOL. Thank you for the support! test.zip

fabioatuib avatar May 19 '21 09:05 fabioatuib

Hey fabioatuib, PLIPs focus is solely to predict interactions. Parsing and visualization tasks are outsources to other tools. The problem you are experiencing is a problem of the visualization. The connect records are not required for PLIP, only for customized visualization purposes. It seems, that in your case there is an offset in the atom records that the visualizer uses and the atom records written by PyMol (compare your initial file and the "plip fixed" pdb file). A simple solution for this is to drop the connect records altogether and let the visualizer take care of the rendering of the interactions.

cleberecht avatar May 20 '21 13:05 cleberecht

Hi Christoph, It does not seem to be just a problem of visualization. If I fully remove the connect records then PLIP detects different interactions, so it seems that the tools PLIP used to parse the ligand are using information in the connect records. From comparing the "PLIP fixed" pdb file and the pymol I could see that the connect records are the same in both, but the atom numbering changed. Since I am planning to use the python module is there a way to stop PLIP from changing the numbering of the atoms? Thank you in advance!

fabioatuib avatar May 20 '21 15:05 fabioatuib

Hi fabioatuib,

the atom numbering issue is a "feature" of processing the molecule with OpenBabel. Have you tried to run PLIP wirh config.NOFIX = True? I think a crucial line here is also:

https://github.com/pharmai/plip/blob/99df154d831cea92900ff7daf0e3e38f689ec89a/plip/structure/preparation.py#L114

and here

https://github.com/pharmai/plip/blob/99df154d831cea92900ff7daf0e3e38f689ec89a/plip/structure/preparation.py#L142

And just to clarify, PLIP does NOT do any definition of bonds via CONECT records itself. It relies on OpenBabel to do that. So I assume the bonds are recognized differently by OpenBabel than they are defined in your PDB file and this is why the results differ.

Hope that helped. If you are deep into that topic, we are happy to see a pull request that streamlines atom renumbering in PLIP.

Cheers

Florian

fkaiserbio avatar May 25 '21 06:05 fkaiserbio

I just had a similar problem. So in order to help anyone in future I will commend what worked for me. I built the PDB ligand-target pair file using Pymol. First I loaded ligand.pdb and then target.pdb (both as independent objects).

The order seems to matter, if I did it in the reverse order I observed the wrong result. When exporting the molecules in "File", I selected state -1, and in PDB options I selected "Write CONECT records for all bonds".

I hope to help.

aldhr avatar Jan 09 '23 20:01 aldhr