openmm / pdbfixer

PDBFixer fixes problems in PDB files
Other
464 stars 114 forks source link

Mutating to non-standard amino acids not present in available force field libraries #286

Open amin-sagar opened 7 months ago

amin-sagar commented 7 months ago

Hello. This is related to #44

I am exploring if there is a possibility to add hundreds of non-canonical amino acids to templates and soft.xml to allow for mutating standard residues to any of these residues.

These residues don't exist in the standard force fields but can be parameterized using ambertools, openff, espaloma etc. Are there any instructions/hints about how to use user-derived force field parameters to generate soft.xml?

It seems to me that a way to use OpenFF, Espaloma would be really nice as it would allow for quick addition of these non-canonical residues. I don't need a perfect structure as I would subject these to minimization and MD simulations later.

I would be really grateful for any suggestions. Best, Amin.

peastman commented 7 months ago

Here's the script that was used to generate it. It just started from a standard Amber force field and modified certain parameters. It should be easy to do the same thing for any residue you have parameters for.

amin-sagar commented 7 months ago

Thanks @peastman Sorry, if this is obvious, could you please point me to some scripts to save xml files in a format similar to amber99sbildn.xml after generating parameters with openff? I tried using espaloma and I can write offxml files which have a different format like follows

Folate = Molecule.from_file("Folate.mol")
espaloma_model = esp.get_model("latest")
molecule_graph = esp.Graph(Folate)
espaloma_model(molecule_graph.heterograph)
openmm_system = esp.graphs.deploy.openmm_system_from_graph(molecule_graph)
ffxml = espaloma_generator.convert_system_to_ffxml()
espaloma_generator = EspalomaTemplateGenerator(molecules=Folate, forcefield='espaloma-0.3.1')
ffxml = espaloma_generator.convert_system_to_ffxml(Folate,openmm_system)
with open('Folate_esp.xml', 'w') as wf:
    wf.write(ffxml)
peastman commented 7 months ago

I haven't used espaloma, so I'm not sure how it works. Perhaps someone else can help with this?

amin-sagar commented 6 months ago

Thanks @peastman At the step of structure preparation the choice of force field is not important. If I use openff instead of Espaloma, can you give me some hints about the steps required to do this?

Best, Amin.

peastman commented 6 months ago

It should be possible to use OpenFF, but it may require some manual work. The script above starts from an OpenMM force field. OpenFF uses its own force field format based on different concepts: chemical signatures instead of atom types. Somehow you need to create an OpenMM force field for the residue you're interested in. I don't know if there's any automated way to do that. I would ask the OpenFF developers.