matteoferla / Fragmenstein

Merging, linking and placing compounds by stitching bound compounds together like a reanimated corpse
MIT License
180 stars 13 forks source link

PyRosetta > openMM #33

Open matteoferla opened 1 year ago

matteoferla commented 1 year ago

In Fragmenstein, Igor uses PyRosetta, while industry folk want OpenMM. This means I will add Fritz that can optionally replace Igor.

For that the following is needed:

Constraints to the ligand: In PyRosetta I add a coordinate constrain. In OpenMM it seems like I need to add a virtual residue with those coordinates and constrain to those. I assume also a constraint to a reference to deal with drift.

Covalent residues: Adding openmm.HarmonicBondForce().addBond does not make the bond obey dihedrals etc. or even angles in PyRosetta if the topology is not done right... How does one declare a covalent topology in openff?

Things that will require testing:

thomas-coudrat commented 2 months ago

Hi Matteo,

Thanks for developing Fragmenstein!

I'm trying to workout the status of this issue, as I'd like to avoid using PyRosetta/Rosetta. The README suggests using OpenVictor, based on OpenMM instead of PyRosetta. Does this mean Fritz was abandoned and OpenVictor should be used instead?

I do note the developments in other code bases linked here of OpenMM implementation: this suggests to me that there is still more work to come to integrate these developments back into the main Fragmenstein code base?

Thanks again,

Thomas

matteoferla commented 1 month ago

Sorry, I had not see this.

Yes and no: the openMM mod works (OpenVictor via Fritz), but it is too slow for use. It requires GPU and takes over a minute on multiple cores per compound, whereas the main criticism is that 30–60 CPU-seconds per compound is way too much when in the thousands scale. I use Fragmenstein generally with 100s of filtered runs, but that is what not what it gets used for and due to the pairwise or higher combination of parent hits, it does have a combinatorial explosion problem in the wild. So the mode without Pyrosetta and just RDKit MMFF94 gets used.

A second problem is that as you can immagine the hybrid scorefunction in Rosetta performs better than a better pure physics one when dealing with a static snapshot. Namely, the hack of delta of a score (REU) that is a proxy Gibbs free energy (hence the nasty ∆∆G) works in Rosetta, but in not in OpenMM, where the minimised energy is at zero Kelvin so entropy is zero, making it a delta in absolute enthalpy.