Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

online_analysis_interval can no longer be None #708

Closed
xiki-tempula opened this issue Jun 30, 2023 · 2 comments
Closed

online_analysis_interval can no longer be None #708

xiki-tempula opened this issue Jun 30, 2023 · 2 comments

Comments

@xiki-tempula
Copy link

I want to disable the online_analysis_interval. In the doc (https://openmmtools.readthedocs.io/en/stable/api/generated/openmmtools.multistate.MultiStateSampler.html#openmmtools.multistate.MultiStateSampler), it is said that

online_analysis_intervalNone or Int >= 1, optional, default: 200
Choose the interval at which to perform online analysis of the free energy.

After every interval, the simulation will be stopped and the free energy estimated.

If the error in the free energy estimate is at or below online_analysis_target_error, then the simulation will be considered completed.

If set to None, then no online analysis is performed

This used to work for the old versions, however in 0.23.0, I got the error of

  File "/tmp/pytest-of-zwu/pytest-6/test_difficult_molecule_C__C_H0/vac/prod/lambda_0/OpenMMTools_script.py", line 56, in <module>
    simulation.create(
  File "/exs/shared/collaboration/teams/mdteam/envs/asfe/lib/python3.10/site-packages/openmmtools/multistate/multistatesampler.py", line 595, in create
    if self.online_analysis_interval % self._reporter.checkpoint_interval != 0:
TypeError: unsupported operand type(s) for %: 'NoneType' and 'int'

Please find the file to reproduce the bug.
Archive.zip

@mikemhenry
Copy link
Contributor

Thank you for the bug report!

Sorry about that! I will add a check where we first check to see if it is None before we make sure that it is an interval.

@mikemhenry
Copy link
Contributor

New 0.23.1 package is on conda-forge now which fixes this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants