choderalab / perses

Experiments with expanded ensembles to explore chemical space
http://perses.readthedocs.io
MIT License
179 stars 50 forks source link

REST scaling for protein-ligand systems with the CLI #1197

Open ijpulidos opened 1 year ago

ijpulidos commented 1 year ago

Description

Adds handling of max temperature parameter from input yaml file with CLI.

Motivation and context

We need to be able to specify the maximum temperature from input YAML file to be able to benefit from using REST in the small molecule simulations pipeline.

Resolves #1195

How has this been tested?

Need to come up with a way of testing that REST scaling is being done from the serialized objects. I still don't know what would be the best way to accomplish this.

Change log

Enabling ``max_temperature`` parameter in input yaml file for CLI. This makes REST available for the small molecule pipeline using ``perses-cli``.
codecov[bot] commented 11 months ago

Codecov Report

Merging #1197 (7250cc8) into 0.10.x (f2f63a9) will decrease coverage by 0.02%. The diff coverage is 70.37%.

ijpulidos commented 11 months ago

I figured that a selection of is_protein was hardcoded when defining the REST region, but if I try to overcome this I'm just faced with the following issue

Traceback (most recent call last):
  File "/home/user/miniconda3/envs/perses-dev/lib/python3.9/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/user/miniconda3/envs/perses-dev/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/user/miniconda3/envs/perses-dev/lib/python3.9/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/user/workdir/repos/perses/perses/app/cli.py", line 109, in cli
    run(yaml_filename=yaml, override_string=override)
  File "/home/user/workdir/repos/perses/perses/app/setup_relative_calculation.py", line 820, in run
    setup_dict = run_setup(setup_options)
  File "/home/user/workdir/repos/perses/perses/app/setup_relative_calculation.py", line 639, in run_setup
    _validate_endstate_energies_for_htf(htf, top_prop, phase,
  File "/home/user/workdir/repos/perses/perses/app/setup_relative_calculation.py", line 1140, in _validate_endstate_energies_for_htf
    zero_state_error, one_state_error = validate_endstate_energies(topology_proposal,
  File "/home/user/workdir/repos/perses/perses/dispersed/utils.py", line 898, in validate_endstate_energies
    nonalch_zero, nonalch_one, alch_zero, alch_one = generate_endpoint_thermodynamic_states(hybrid_system, top_proposal, repartitioned_endstate)
  File "/home/user/workdir/repos/perses/perses/dispersed/utils.py", line 613, in generate_endpoint_thermodynamic_states
    check_system(system)
  File "/home/user/workdir/repos/perses/perses/dispersed/utils.py", line 64, in check_system
    force = forces['PeriodicTorsionForce']
KeyError: 'PeriodicTorsionForce'

For which I don't have a good clue of what could be causing it.