1 hoomd_script::init::create_random hoomd_script::pair::lj hoomd_script::integrate::mode_standard hoomd_script::integrate::nvt hoomd_script::init::reset
2 # Due to deficiencies in doxygen, the commands used in this example are listed explicitly here
3 # run this script with "python -x filename" to skip the first line, or remove this header
5 # ---- init_reset.py ----
6 from hoomd_script import *
8 # create a list ranging from 1000 to 2000 in steps of 100
9 size_array = range(1000,2000,100)
11 # loop over the system sizes in the array
12 for size in size_array:
13 # create size random particles of name A
14 init.create_random(N=size, phi_p=0.01, name='A')
16 # specify Lennard-Jones interactions between particle pairs
17 lj = pair.lj(r_cut=3.0)
18 lj.pair_coeff.set('A', 'A', epsilon=1.0, sigma=1.0)
20 # integrate at constant temperature
22 integrate.mode_standard(dt=0.005)
23 integrate.nvt(group=all, T=1.2, tau=0.5)
25 # run 10,000 time steps
28 # we need to clear all saved variables before resetting and
29 # starting the next simulation so there is no memory leak