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

[BUG] genion fails with crystallographic water in a protein-ligand system #141

Closed
cespos opened this issue Jul 17, 2023 · 6 comments · Fixed by #154
Closed

[BUG] genion fails with crystallographic water in a protein-ligand system #141

cespos opened this issue Jul 17, 2023 · 6 comments · Fixed by #154
Labels
bug Something isn't working

Comments

@cespos
Copy link

cespos commented Jul 17, 2023

Describe the bug
In my system, I have a protein with two crystallographic waters bound to a ligand.
BSS.Solvent.solvate() fails with the following error:
image

Looking into the genions.err, I found the error message:
image

And this is because in the input system, I have in order:

  • protein
  • crystallographic waters
  • ligand

Therefore, when solvent waters are added, genions sees water molecules that are not continuous but with a ligand in between.
How to best deal with this?

To Reproduce

import BioSimSpace as BSS

protein_coord = BSS.IO.readMolecules('protein.pdb')[0]
ligand_coord = BSS.IO.readMolecules('ligand.sdf')[0]

protein = BSS.Parameters.parameterise(protein_coord , 'ff14SB', water_model='tip3p').getMolecule()
ligand = BSS.Parameters.parameterise(ligand_coord, 'gaff2').getMolecule()
system = protein + ligand

box = [100 * BSS.Units.Length.angstrom] * 3
angles = [100 * BSS.Units.Angle.degree] * 3
solvated = BSS.Solvent.solvate('tip3p', system, box=box, angles=angles, work_dir='tmp')

Expected behavior
BSS.Solvent.solvate() should not fail

(please complete the following information):

  • Ubuntu
  • Version of Python: 3.10.12
  • Version of BioSimSpace: 2023.3.0
  • I confirm that I have checked this bug still exists in the latest released version of BioSimSpace: [yes/no] no (not in the dev version)
@cespos cespos added the bug Something isn't working label Jul 17, 2023
@cespos
Copy link
Author

cespos commented Jul 18, 2023

I just noticed that this issue is related to issue #67

@lohedges
Copy link
Contributor

Thanks. I am away at the moment and will take a look next week. We do have code to deal with existing waters, i.e. to make sure that they are contiguous, but it is clearly failing in certain cases.

@cespos
Copy link
Author

cespos commented Jul 18, 2023

Thanks Lester!

This solved it for me:

image

But maybe there is a better way to this internally/automatically

@lohedges
Copy link
Contributor

Are you able to share the example system that triggers the error? I'm guessing that the issue is caused by one of the following:

  • Non-standard water naming.
  • Waters embedding in the protein, i.e. the are not separate molecules, so are not detected by our water finding code.

Cheers.

@cespos
Copy link
Author

cespos commented Jul 26, 2023

I cannot share the system but I can send you a screenshot of the PDB showing ions, water molecules, and the protein terminal residue.

image

@lohedges
Copy link
Contributor

Thank you, this is very helpful. As shown, the first crystal water is combined with other atoms, i.e. MG, CA, and CA. We'll need to add some logic to search for water molecules within a structure, rather than just as self-contained molecules. I'll see if I can find another example, or make one myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants