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

ReplicaExchangeSampler test code fails #478

Open
isjoung opened this issue Aug 19, 2020 · 0 comments
Open

ReplicaExchangeSampler test code fails #478

isjoung opened this issue Aug 19, 2020 · 0 comments

Comments

@isjoung
Copy link

isjoung commented Aug 19, 2020

Hi,
I tried to run the test code shown in ReplicaExchangeSampler documentation.

#!/usr/bin/env python
import math
from simtk import unit
from openmmtools import testsystems, states, mcmc, multistate

testsystem = testsystems.AlanineDipeptideImplicit()

import os
import tempfile

n_replicas = 3
T_min = 298.0 * unit.kelvin
T_max = 600.0 * unit.kelvin
temperature = [T_min + (T_max-T_min) * (math.exp(float(i) / float(n_replicas-1))-1.0) / (math.e - 1.0) for i in range(n_replicas)]

thermodynamic_states = [states.ThermodynamicState(system=testsystem.system, temperature=T) for T in temperature]

move = mcmc.GHMCMove(timestep=2.0*unit.femtoseconds, n_steps=50)

simulation = multistate.ReplicaExchangeSampler(mcmc_moves=move, number_of_iterations=2)

reporter = multistate.MultiStateReporter('test.nc',checkpoint_interval=1)
simulation.create(thermodynamic_states=thermodynamic_states,
            sampler_states=states.SamplerState(testsystem.positions),
            storage=reporter)

simulation.run()
print(simulation.iteration)

simulation.run(n_iterations=1)
print(simulation.iteration)

This is the output

Warning: The openmmtools.multistate API is experimental and may change in future releases
Warning: The openmmtools.multistate API is experimental and may change in future releases
Please cite the following:

        Friedrichs MS, Eastman P, Vaidyanathan V, Houston M, LeGrand S, Beberg AL, Ensign DL, Bruns CM, and Pande VS. Accelerating molecular dynamic simulations on graphics processing unit. J. Comput. Chem. 30:864, 2009. DOI: 10.1002/jcc.21209
        Eastman P and Pande VS. OpenMM: A hardware-independent framework for molecular simulations. Comput. Sci. Eng. 12:34, 2010. DOI: 10.1109/MCSE.2010.27
        Eastman P and Pande VS. Efficient nonbonded interactions for molecular dynamics on a graphics processing unit. J. Comput. Chem. 31:1268, 2010. DOI: 10.1002/jcc.21413
        Eastman P and Pande VS. Constant constraint matrix approximation: A robust, parallelizable constraint method for molecular simulations. J. Chem. Theor. Comput. 6:434, 2010. DOI: 10.1021/ct900463w
        Chodera JD and Shirts MR. Replica exchange and expanded ensemble simulations as Gibbs multistate: Simple improvements for enhanced mixing. J. Chem. Phys., 135:194110, 2011. DOI:10.1063/1.3660669
        
python(69740,0x11999fdc0) malloc: *** error for object 0x7ff60b6e1eb8: pointer being freed was not allocated
python(69740,0x11999fdc0) malloc: *** set a breakpoint in malloc_error_break to debug

The environment is
MacOS 10.15.5 Catalina
Python 3.7.4 (Clang 4.0.1 Anaconda)
openmmtools 0.20.0 py37_0 omnia

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

No branches or pull requests

1 participant