Open clarktemple03 opened 2 years ago
Thanks for the feedback. We would need to dig into this, but as far as I know there is no easy way to access the replica positions directly from the python objects. I know you should be able to do this extracting the information from the checkpoint file, which is not ideal.
Shouldn't the context be available though at some point since the simulations need to be updated in time? Couldn't the information be extracted if individual steps are taken and then querying
I am attempting to run Replica Exchange for a system and would ideally like to access the context during the course of the simulation run in order to extract the forces. However I cannot seem to grab the appropriate context to do so.
Below is a code snippet for a simple 2-bead harmonic oscillator I wrote as a test for replica exchange. The primary issue is that . To my understanding of the documentation when one calls the local_context_cache it requires both the thermodynamic state and the integrator that is being used otherwise it spits out the first context associated to the thermodynamic state. At the end of the script I try to obtain the integrators for the two thermodynamic states separately, but it still gives only the context of the first thermodynamic state in both cases. I think the issue comes in defining context_cache from move but it would seem if I had the context cache I would not need to find the context.
This produces the following output which is only extracting the coordinates from the second thermodynamic state
Any help would be appreciated!