OpenFreeEnergy / openfe

The Open Free Energy toolkit
https://docs.openfree.energy
MIT License
135 stars 18 forks source link

Using customized force field for small molecules #851

Open wenchangzhou-qtx opened 4 months ago

wenchangzhou-qtx commented 4 months ago

Hey @IAlibay @mikemhenry,

For small molecules, can we now using customized force fields provided by users like myself, other than gaff or espaloma?

Thanks

mikemhenry commented 4 months ago

We support custom force fields if they comply with the smirnoff spec so anything that openff makes or you create with bespoke fit should work.

aminsagar commented 4 months ago

@mikemhenry I have also been trying to use espaloma as the small molecule force field. #682 It seems it should be possible to use espaloma #229 Can you please give a minimal example of using espaloma?

Thanks.

mikemhenry commented 4 months ago

Ah! Okay yes this is supported, I don't have time right now to test this, but it should be as easy as specifying espaloma-0.3.2 as the forcefeield you want to use, is that what you mean?

OH! I see in #682 it looks like openmmforcefeild needs an update to support espaloma-0.3.2 since it only supports espaloma-0.2.2 currently. Tracking that issue here https://github.com/openmm/openmmforcefields/issues/336

wenchangzhou-qtx commented 4 months ago

Thanks! @mikemhenry, on this topic, is it possible to change it inside yaml file like this?

protocol:
  settings:
    forcefield_settings:
      small_molecule_forcefield: 'espaloma-0.2.2'
    protocol_repeats: 2
mikemhenry commented 4 months ago

Yes that should work, if it doesn't please let me know!

wenchangzhou-qtx commented 4 months ago

Hey @mikemhenry, thanks for checking, I just tried but in the output json file I still have the default, openff-2.1.1 for small_molecule_forcefield and 3 for protocol_repeats, my settings.yamlfile looks like this:

mapper:
  method: lomap
  # method: kartograf

network:
  method: generate_radial_network
  settings:
    central_ligand: 'lig_ejm_31'
  # method: generate_radial_network
  # method: generate_maximal_network
  # method: generate_minimal_redundant_network

protocol:
  settings:
    forcefield_settings:
      small_molecule_forcefield: 'espaloma-0.2.2'
    protocol_repeats: 2

The command I run is openfe plan-rbfe-network -M tyk2_ligands.sdf -p tyk2_protein.pdb -o network_setup -s settings.yaml

IAlibay commented 4 months ago

@wenchangzhou-qtx, CLI YAML inputs for Protocols is not currently available in the 1.0 release of openfe. It should make it soon but for now if you want non-default settings you'll have to use the Python API.

wenchangzhou-qtx commented 4 months ago

[like] Wenchang Zhou reacted to your message:


From: Irfan Alibay @.> Sent: Tuesday, May 14, 2024 6:42:38 AM To: OpenFreeEnergy/openfe @.> Cc: Wenchang Zhou @.>; Mention @.> Subject: Re: [OpenFreeEnergy/openfe] Using customized force field for small molecules (Issue #851)

@wenchangzhou-qtxhttps://github.com/wenchangzhou-qtx, CLI YAML inputs for Protocols is not currently available in the 1.0 release of openfe. It should make it soon but for now if you want non-default settings you'll have to use the Python API.

— Reply to this email directly, view it on GitHubhttps://github.com/OpenFreeEnergy/openfe/issues/851#issuecomment-2109402277, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5FJXJJ4WJOMMOCPJQARGMLZCGW55AVCNFSM6AAAAABHQ3QEYCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBZGQYDEMRXG4. You are receiving this because you were mentioned.Message ID: @.***>