chemosim-lab / ProLIF

Interaction Fingerprints for protein-ligand complexes and more
https://prolif.readthedocs.io
Apache License 2.0
337 stars 66 forks source link

plf.display_residues(protein_mol) #196

Closed milenamlakic closed 3 months ago

milenamlakic commented 3 months ago

I have a problem with plf.display_residues(protein_mol). There are a lot of O2-, don't know how to fix, if you have idea I would be grateful.. Issues

cbouy commented 3 months ago

Hi,

a few questions which might explain why this is happening:

cbouy commented 3 months ago

Ok I see where the problem is, your protein PDB file contains bond information for only a subset of residues (the non-standard ones like HIE), so the atoms without explicit bonds end up being assigned charges to satisfy valence rules.

You could either try removing the CONECT record at the end of your protein file, or simply forcing bond guessing calculation with:

u = mda.Universe("protein.pdb", guess_bonds=True)
protein_mol = plf.Molecule.from_mda(u)

Or if you have the option, export the protein PDB file with all bonds explicit rather than just the ones for non-standard residues.

Please reopen this issue if you run into other related problems.