Dear HOOMD-developers,
I am confused about how to set the NPT ensemble using hoomd.hpmc.update.BoxMC command. Below is my script:
import math
import hoomd
gpu = hoomd.device.GPU()
sim = hoomd.Simulation(device=gpu, seed=1234)
mc = hoomd.hpmc.integrate.Sphere(default_a=0.4)
mc.shape["A"] = dict(diameter=1.0)
boxmc = hoomd.hpmc.update.BoxMC(trigger=1, betaP=3)
boxmc.volume = dict(mode='standard',weight=1.0)
sim.operations.integrator = mc
sim.create_state_from_gsd(filename='initial.gsd')
tune1 = hoomd.hpmc.tune.MoveSize.scale_solver(
moves = ['a'],
target = 0.2,
trigger = 1
)
sim.operations.tuners.append(tune1)
tune2 = hoomd.hpmc.tune.BoxMCMoveSize.scale_solver(
trigger = 1,
boxmc = boxmc,
moves=['volume'],
target=0.2
)
sim.operations.tuners.append(tune2)
logger = hoomd.logging.Logger()
logger.add(mc, quantities=['type_shapes'])
gsd_writer = hoomd.write.GSD(filename='tra.gsd',
trigger=hoomd.trigger.Periodic(1000),
mode='xb',
filter=hoomd.filter.All(),
log=logger)
sim.operations.writers.append(gsd_writer)
sim.run(1*1e5)
When I change betaP in hoomd.hpmc.update.BoxMC, it's strange that the box size doesn't change. Could you please tell me how to improve my script to call the correct NPT ensemble? I searched a lot to find a solution, however, there is no template using v3.5.0 Hoomd-blue. Thanks in advance.
sincerely,
James.