cole-group / FEgrow

An Open-Source Molecular Builder and Free Energy Preparation Workflow
https://cole-group.github.io/FEgrow/
MIT License
115 stars 19 forks source link

Cofactor in receptor #58

Open ven828 opened 10 months ago

ven828 commented 10 months ago

Hi, I have a target protein that contains a cofactor (small molecule) in the binding site and the workflow fails at the energy optimisation step (residue template missing error).

Any suggestions?

bieniekmateusz commented 10 months ago

Hey, openff now supports it so we should be able to add that. Would you be able to upload a system we can use for testing? Thanks

bieniekmateusz commented 10 months ago

Hi again. We currently use the SystemGenerator from the openmmforcefields package: https://github.com/cole-group/FEgrow/blob/418190b1a73a3a927d5ae27a467206136d07b3c5/fegrow/receptor.py#L144C33-L149 To which we pass only one molecule. Co-factors should be passed here as well with molecules.

These are expected to be OFF Molecules, which can be built from Smiles or anything really. https://github.com/openmm/openmmforcefields/blob/637d551a4408cc6145529cd9dc30e267f4178367/openmmforcefields/generators/system_generators.py#L98-L102

So this should be a rather simple upgrade. We'd be happy to have you as the first tester! Thanks @jthorton

ven828 commented 10 months ago

Hi, thanks for the reply. Due to confidentiality concerns, I can't share the structures I'm working on at the moment. But I can provide an example PDB such as 1T26 if it can be used to make the adjustments?

bieniekmateusz commented 10 months ago

Thanks @ven828 , I extracted the function to and run this small prototype. I'll try to find some time (most likely next week) to add it as a feature. This will be part of the optimise_in_receptor function.

However, it was point out to me that it may not play with the gnina "scoring function" (@djcole56), so this will have to be accounted for as well. If gnina does not work with cofactors, an error message might be a solution.

Edit: The only changing positions during the minimisation are that of the ligand.

cofactor.zip

velocirraptor23 commented 3 months ago

Is the function using cofactors avalaible in the new release (2.0)?