tristanic / isolde

Interactive molecular dynamics based model building into low-resolution crystallographic and cryo-EM maps
Other
34 stars 4 forks source link

Incorporating Small Molecules #4

Closed CoryKornowicz closed 3 years ago

CoryKornowicz commented 3 years ago

Over the past few years, people have slowly been figuring out how to combine small molecules with protein complexes in an efficient and understandable manner. The pipeline is always something following: Amber:

OpenFF:

How hard would the implementation be to include an option to load or parse an already included small ligand into the local simulation environment? I think this could be game changing for local binding site refinement.

CoryKornowicz commented 3 years ago

Edit: I just discovered the other ligand issue that was previously closed, and I am re-opening my issue as a clarification of the steps to perform a local simulation between a small molecule and a protein.

I am familiar with combining systems on parmed, but I am not sure how to take a small molecule and either change it to a custom parameterized residue or add it to ISOLDE as a secondary molecule.

CoryKornowicz commented 3 years ago

I did a little digging and figured out how to make it work! I understand now about generating parameters for unknown residues (including small molecules if we pretend they are residues and match the name of the generated parameters file).

Below I will include a little code snippet I use to make such parameters.

Imports

from simtk.openmm.app import PDBFile from openff.toolkit.topology import Molecule from openmmforcefields.generators import GAFFTemplateGenerator from rdkit import Chem

Small Molecule Preparation

rdmol = Chem.MolFromMol2File("{mol2 file here}")

Chem.AddHs(rdmol) Chem.AssignAtomChiralTagsFromStructure(rdmol) Chem.AssignStereochemistryFrom3D(rdmol)

molecule = Molecule.from_rdkit(rdmol)

Parameterizing Ligand

gaff = GAFFTemplateGenerator(molecules=molecule)

ret = gaff.generate_residue_template(molecule) print(ret)

This ret is a string of the xml file contents.

tristanic commented 3 years ago

Thank you for this, and sorry for being really slow to respond! Incorporating ligand parameterisation via OpenForceField has been on my to-do list for a while now - but a seemingly never-ending series of more immediate, smaller tasks keeps stealing my attention. Just in case you haven't noticed it, ISOLDE's Sim settings tab has a button marked "Load residue MD definition(s)" - load in your XML file through that and your ligand should "just work" in simulations for the remainder of the session. Some caveats: