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

[BUG] Funnel metadynamics tutorial fails due to duplicate default force constants #216

Closed
lohedges opened this issue Dec 6, 2023 · 5 comments · Fixed by #217
Closed
Labels
bug Something isn't working

Comments

@lohedges
Copy link
Contributor

lohedges commented Dec 6, 2023

As reported here, the funnel metadynamics tutorial is failing with the following exception:

Traceback (most recent call last):
  File "/home/lester/Code/openbiosim/biosimspace_tutorials/02_funnel_metad/fun-metaD-work_dir/openmm_script.py", line 111, in <module>
    simulation = Simulation(prm.topology,
                 ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lester/.conda/envs/openbiosim/lib/python3.11/site-packages/openmm/app/simulation.py", line 103, in __init__
    self.context = mm.Context(self.system, self.integrator, platform, platformProperties)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lester/.conda/envs/openbiosim/lib/python3.11/site-packages/openmm/openmm.py", line 2694, in __init__
    _openmm.Context_swiginit(self, _openmm.new_Context(*args))
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
openmm.OpenMMException: Two Forces define different default values for the parameter 'k'

This is reproducible with OpenMM 8.0 and 8.1. I'm not sure when this first started happening.

@velocirraptor23
Copy link

Is this still working with other versions of openMM? Thanks for following this.

Cesar

@lohedges
Copy link
Contributor Author

lohedges commented Dec 6, 2023

I'm not sure. I've fixed the issue, though. I just need to use a different variable for the force constant in the different forces that we add, i.e. those for the lower walls, distance restraints, etc. I'm not sure why this wasn't a problem before. Perhaps a change in OpenMM 8.0?

@velocirraptor23
Copy link

Perhaps. I update constantly my software, I will keep an eye on the changes.

Bests,

Cesar

@velocirraptor23
Copy link

Seems to work now. Thanks!!!

@lohedges
Copy link
Contributor Author

lohedges commented Dec 6, 2023

No problem. Thanks again for reporting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants