Closed pgrinaway closed 7 years ago
Any idea what might be going wrong here?
(I should add that adding a pressure argument makes no difference)
Hmm. Let me see if I can reproduce it!
Ah! You need to use either this
context, integrator = cache.global_context_cache.get_context(thermodynamic_state)
sampler_state.apply_to_context(context, ignore_velocities=True)
print(thermodynamic_state.reduced_potential(context))
Or this
context, integrator = cache.global_context_cache.get_context(thermodynamic_state)
sampler_state.apply_to_context(context, ignore_velocities=True)
sampler_state.update_from_context(context)
print(thermodynamic_state.reduced_potential(sampler_state))
Oh, whoops
Thanks! That seems to work!
No problem!
I tried this code:
And I get the following exception: