openforcefield / openff-evaluator

A physical property evaluation toolkit from the Open Forcefield Consortium.
https://docs.openforcefield.org/projects/evaluator
MIT License
54 stars 18 forks source link

some issues with pymbar and units with 0.4.0rc2 #462

Closed pavankum closed 2 years ago

pavankum commented 2 years ago

Hi @mattwthompson & @SimonBoothroyd,

Thank you for the new updates, work might still be in flux for the next release and apologies if I am stepping ahead of myself. I am passing some errors I encountered after trying out the master branch today. I ran the beginner tutorials and integration test with slurm backend.

Some of the errors with tutorials include a simulation failure resulting in a None type being passed instead of a quantity, and an attribute error. From worker-logs:

Protocol failed to execute: 115c52f236864ddba21d5fb5f8360a50|equilibration_simulation_gas

Traceback from slurm output:

Traceback (most recent call last):
  File "/dfs4/dmobley-lab/pbehara/conda-env/evaluator-test-env-07-25-22/lib/python3.9/site-packages/openff/evaluator/workflow/protocols.py", line 1245, in _execute_protocol
    protocol.execute(directory, available_resources)
  File "/dfs4/dmobley-lab/pbehara/conda-env/evaluator-test-env-07-25-22/lib/python3.9/site-packages/openff/evaluator/workflow/protocols.py", line 704, in execute
    self._execute(directory, available_resources)
  File "/dfs4/dmobley-lab/pbehara/conda-env/evaluator-test-env-07-25-22/lib/python3.9/site-packages/openff/evaluator/protocols/openmm.py", line 493, in _execute
    openmm_pressure = to_openmm(pressure)
  File "/dfs4/dmobley-lab/pbehara/conda-env/evaluator-test-env-07-25-22/lib/python3.9/site-packages/openff/utilities/utilities.py", line 75, in wrapper
    return function(*args, **kwargs)
  File "/dfs4/dmobley-lab/pbehara/conda-env/evaluator-test-env-07-25-22/lib/python3.9/site-packages/openff/units/openmm.py", line 132, in to_openmm
    value = quantity.m
AttributeError: 'NoneType' object has no attribute 'm'

For the integration test, I deleted the cached data to reduce size of the attachment, and the errors are:

Traceback (most recent call last): File "/dfs4/dmobley-lab/pbehara/conda-env/evaluator-test-env-07-25-22/lib/python3.9/site-packages/openff/evaluator/workflow/protocols.py", line 1245, in _execute_protocol protocol.execute(directory, available_resources) File "/dfs4/dmobley-lab/pbehara/conda-env/evaluator-test-env-07-25-22/lib/python3.9/site-packages/openff/evaluator/workflow/protocols.py", line 704, in execute self._execute(directory, available_resources) File "/dfs4/dmobley-lab/pbehara/conda-env/evaluator-test-env-07-25-22/lib/python3.9/site-packages/openff/evaluator/protocols/groups.py", line 240, in _execute super(ConditionalGroup, self)._execute(directory, available_resources) File "/dfs4/dmobley-lab/pbehara/conda-env/evaluator-test-env-07-25-22/lib/python3.9/site-packages/openff/evaluator/workflow/protocols.py", line 1488, in _execute self._inner_graph.execute( File "/dfs4/dmobley-lab/pbehara/conda-env/evaluator-test-env-07-25-22/lib/python3.9/site-packages/openff/evaluator/workflow/protocols.py", line 1087, in execute protocol_outputs[protocol_id] = ProtocolGraph._execute_protocol( File "/dfs4/dmobley-lab/pbehara/conda-env/evaluator-test-env-07-25-22/lib/python3.9/site-packages/openff/evaluator/workflow/protocols.py", line 1245, in _execute_protocol . . . . File "/dfs4/dmobley-lab/pbehara/conda-env/evaluator-test-env-07-25-22/lib/python3.9/site-packages/openmmtools/multistate/multistateanalyzer.py", line 430, in _get_default value = self._default(self, instance) File "/dfs4/dmobley-lab/pbehara/conda-env/evaluator-test-env-07-25-22/lib/python3.9/site-packages/openmmtools/multistate/multistateanalyzer.py", line 2118, in _decorrelated_u_ln return instance._compute_mbar_decorrelated_energies()[0] File "/dfs4/dmobley-lab/pbehara/conda-env/evaluator-test-env-07-25-22/lib/python3.9/site-packages/openmmtools/multistate/multistateanalyzer.py", line 1487, in _compute_mbar_decorrelated_energies energy_data[i] = multista beginner_tutorials.tar.gz te.utils.subsample_data_along_axis(energies, g_t, -1) File "/dfs4/dmobley-lab/pbehara/conda-env/evaluator-test-env-07-25-22/lib/python3.9/site-packages/openmmtools/multistate/utils.py", line 281, in subsample_data_along_axis indices = timeseries.subsampleCorrelatedData(np.zeros(data_shape[axis]), g=subsample_rate) AttributeError: Group 1/1 Node 1/1: module 'pymbar.timeseries' has no attribute 'subsampleCorrelatedData'


- attribute error is similar to the above where a None type is passed instead of a quantity because of failed simulation.

Exact conda envs are in respective directories and I attached the general `conda_env.yaml` too, which can be used for test environment.

cc: @jthorton 

[integration_test_no-data.tar.gz](https://github.com/openforcefield/openff-evaluator/files/9186345/integration_test_no-data.tar.gz)
[beginner_tutorials.tar.gz](https://github.com/openforcefield/openff-evaluator/files/9186347/beginner_tutorials.tar.gz)
[conda_env.yaml.txt](https://github.com/openforcefield/openff-evaluator/files/9186351/conda_env.yaml.txt)
jthorton commented 2 years ago

@pavankum did one of the tests involve a hvap calculation if so I think the unit error is the same as #450 where it is trying to convert a pressure of None for the gas calculation to an openmm unit quantity.

mattwthompson commented 2 years ago

@pavankum do you recall if these errors are reproducible just by running the tutorials from a fresh install?

pavankum commented 2 years ago

@mattwthompson Yes Matt, the errors are from evaluator master branch, and it is a fresh install using the conda_env I attached.

mattwthompson commented 2 years ago

Ah, sorry, somehow I missed those files, my mistake!

mattwthompson commented 2 years ago

I think #463 has fixed this but I haven't run the simulations to test it. It's included in version 0.4.0rc3, which should be online in an hour or so. Please re-open if they're still broken!