Hello everyone, I am trying to accomplish a simple MD simulation of a two-atom Lennard-Jones system. The variables of temperature and pressure remain constant during an NVT equilibration but the moment it switches to NVT it starts to fluctuate wildly. Excerpt of code:
def MD_Simulation (Temp, file_name, log, system_name):
all = hoomd.group.all()
quantities=['volume','lx','ly','lz','potential_energy','kinetic_energy','temperature','pressure']
hoomd.analyze.log(filename=log,
quantities=quantities,
period=100,
overwrite=False) # keep appending the existing file
d = hoomd.dump.dcd(file_name, period=100, group=all, overwrite=True, unwrap_full=False);
hoomd.md.integrate.mode_standard(dt=0.005);
nvt = hoomd.md.integrate.langevin(group=all, kT=0.8, seed=10)
nvt.set_params(kT=Temp)
npt = hoomd.md.integrate.npt(group=all, kT=Temp, tau=5.0, P=0.1, tauP = 5.0, couple="xyz")
npt.set_params(P=0.3)
npt.disable()
hoomd.run(5000)
nvt.disable()
npt.enable()
hoomd.run(15000)
npt.disable()
ase.io.write(system_name, current_config)