openfe icon indicating copy to clipboard operation
openfe copied to clipboard

Using customized force field for small molecules

Open wenchangzhou-qtx opened this issue 1 year ago • 8 comments
trafficstars

Hey @IAlibay @mikemhenry,

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

Thanks

wenchangzhou-qtx avatar May 10 '24 15:05 wenchangzhou-qtx

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.

mikemhenry avatar May 10 '24 22:05 mikemhenry

@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.

aminsagar avatar May 11 '24 11:05 aminsagar

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

mikemhenry avatar May 13 '24 20:05 mikemhenry

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

wenchangzhou-qtx avatar May 13 '24 21:05 wenchangzhou-qtx

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

mikemhenry avatar May 13 '24 23:05 mikemhenry

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.yaml file 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

wenchangzhou-qtx avatar May 14 '24 01:05 wenchangzhou-qtx

@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.

IAlibay avatar May 14 '24 06:05 IAlibay

[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: @.***>

wenchangzhou-qtx avatar May 14 '24 12:05 wenchangzhou-qtx