essex-lab / grand

A Python module for carrying out GCMC insertions and deletions of water molecules in OpenMM.
https://grand.readthedocs.io
MIT License
58 stars 17 forks source link

Protein-ligand GCMC simulations #4

Closed dlukauskis closed 2 years ago

dlukauskis commented 2 years ago

Hi,

I'm trying to use grand to equilibrate a protein-ligand system, but ran into some issues with getting grand to understand the ligand parameters. I've followed the scytalone example, but I didn't have the prepi files, so I used MOL2 instead. I get the XML file but when I try to define the system, I get the following error:

ValueError: No template found for residue 299 (UNK).  The set of atoms matches UNK-0, but the bonds are different.

I'm attaching all the files and the NB with the code.

olliemelling commented 2 years ago

Hi,

This problem seems to be arising from how you are setting up your system. It looks like when you re-write the CONECT lines when adding the ligand back into the structure after solvation that something is going wrong and hence the resulting xml file is incorrect and OpenMM throws an error.

Is there a reason as to why you are removing the ligand from the protein structure before solvating? This isn't a typical approach given waters may be placed where the ligand should be, resulting in steric clashes when the ligand is added back into the structure. This has happened in your protein_solvated.pdb file where there is a water overlapping with the ligand.

I followed the steps below and it seemed to work fine:

Can you try this and see if it works for you? If there are still problems then please let me know.

Many thanks, Ollie

dlukauskis commented 2 years ago

Yeah, that fixed this problem. I do have a couple of ligands that raise the same error, but I think this is an issue with openmoltools and not grand.