OpenFreeEnergy / OpenFreeEnergy/openfe

Using OPC water models for RBFE calculations

Open
#869 6 comments 0 reactions 2 assignees View on GitHub

@jthorton is already working on this.

Since Jan 31, 2025.

Dominant language
Python
Stars
331
Forks
56
Avg merge
3d 9h
Merged PRs (30d)
13

Description

Dear all,

I have been trying to use other water models such as OPC (a 4 point model).

I thought that intuitively it should be as simple as:

rbfe_settings = RelativeHybridTopologyProtocol.default_settings()

rbfe_settings.forcefield_settings.forcefields=["amber/RNA.OL3.xml","amber/opc_standard.xml"]
rbfe_settings.solvation_settings.solvent_model="opc"

However, I get an error that says:

File /data/sw/mamba/envs/openfe_env/lib/python3.12/site-packages/pydantic/v1/main.py:384, in BaseModel.__setattr__(self, name, value)
    [382](https://vscode-remote+ssh-002dremote-002blinux.vscode-resource.vscode-cdn.net/data/sw/mamba/envs/openfe_env/lib/python3.12/site-packages/pydantic/v1/main.py:382) value, error_ = known_field.validate(value, dict_without_original_value, loc=name, cls=self.__class__)
    [383](https://vscode-remote+ssh-002dremote-002blinux.vscode-resource.vscode-cdn.net/data/sw/mamba/envs/openfe_env/lib/python3.12/site-packages/pydantic/v1/main.py:383) if error_:
--> [384](https://vscode-remote+ssh-002dremote-002blinux.vscode-resource.vscode-cdn.net/data/sw/mamba/envs/openfe_env/lib/python3.12/site-packages/pydantic/v1/main.py:384)     raise ValidationError([error_], self.__class__)
    [385](https://vscode-remote+ssh-002dremote-002blinux.vscode-resource.vscode-cdn.net/data/sw/mamba/envs/openfe_env/lib/python3.12/site-packages/pydantic/v1/main.py:385) else:
    [386](https://vscode-remote+ssh-002dremote-002blinux.vscode-resource.vscode-cdn.net/data/sw/mamba/envs/openfe_env/lib/python3.12/site-packages/pydantic/v1/main.py:386)     new_values[name] = value

ValidationError: 1 validation error for OpenMMSolvationSettings
solvent_model
  unexpected value; permitted: 'tip3p', 'spce', 'tip4pew', 'tip5p' (type=value_error.const; given=opc; permitted=('tip3p', 'spce', 'tip4pew', 'tip5p'))

I tried to go deep in the gufe rabbit hole yet it was a bit unclear.

I thought I could just set up another 4 point model such as tip4pew and run the system with it, as the opc parameters should override the tip4pew setup. Doing this, I could write the transformations to disk. However, when running the json files with openfe quickrun, I got the following output:

Done with all simulations! Analyzing the results....
Here is the result:
        dG = None ± None

Error: The protocol unit 'LIG1 to LIG2 repeat 0 generation 0' failed with the error message:
ValueError: Residue template U with the same override level 0 already exists.

Details provided in output.

For reference, the same simulation runs properly when using the default force field parameters.

Thanks,
O.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.