You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello Everyone.
I tried setting up Temperature REMD simulations using two scripts. The first one is using ReplicaExchangeSampler
# Set up the temperature range for replicas
n_replicas = 20
min_temp = 300 * unit.kelvin
max_temp = 600 * unit.kelvin
temperatures = get_temperature_list(min_temp,max_temp,n_replicas)
print (temperatures)
# Define simulation parameters
collision_rate = 1.0 / unit.picoseconds
timestep = 4 * unit.femtoseconds
nsteps = 100 # Number of steps for each iteration of replica exchange
n_iterations = 5000 # Number of iterations for the replica exchange
# Create thermodynamic states and integrators for each replica
thermodynamic_states = []
samplers = []
for temp in temperatures:
integrator = LangevinMiddleIntegrator(temp, collision_rate, timestep)
thermodynamic_state = states.ThermodynamicState(system=system, temperature=temp)
thermodynamic_states.append(thermodynamic_state)
sampler_state = states.SamplerState(modeller.positions, box_vectors=modeller.topology.getPeriodicBoxVectors())
samplers.append(mcmc.MCMCSampler(thermodynamic_state, sampler_state, integrator))
# Set up the replica exchange simulation
output_directory = "./output_test_2"
storage_file = f'{output_directory}/repex.nc'
reporter = MultiStateReporter(storage=storage_file, checkpoint_interval=200)
simulation = multistate.ReplicaExchangeSampler(mcmc_moves=mcmc.LangevinDynamicsMove(timestep=timestep, collision_rate=collision_rate, n_steps=nsteps),number_of_iterations=n_iterations)
simulation.create(thermodynamic_states=thermodynamic_states, sampler_states=[sampler.sampler_state for sampler in samplers], storage=reporter)
#Minimize
simulation.minimize()
# Run the replica exchange simulation
simulation.run()
@amin-sagar you were right with your initial suspicion. The MC moves are different and they use different integrators, this probably explains the difference in performance. I'd suggest trying to use the same MC moves and integrators.
Hello Everyone.
I tried setting up Temperature REMD simulations using two scripts. The first one is using ReplicaExchangeSampler
The second one is using Parallel Tempering
The speeds from the two approaches are very different.
With the first one (ReplicaExchangeSampler), I get
While with parallel tempering, I get
Is this expected because of the difference of the kind of MC moves?
Or am I doing something wrong which makes the results not comparable?
Best,
Amin.
The text was updated successfully, but these errors were encountered: