1 hoomd_script::init::create_random hoomd_script::dump::xml hoomd_script::analyze::imd hoomd_script::pair::lj
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 # ---- analyze_imd.py ----
6 from hoomd_script import *
8 # create 1000 random particles of name A
9 init.create_random(N=1000, phi_p=0.01, name='A')
11 # specify Lennard-Jones interactions between particle pairs
12 lj = pair.lj(r_cut=2.5)
13 lj.pair_coeff.set('A', 'A', epsilon=1.0, sigma=1.0)
15 # integrate at constant temperature
17 integrate.mode_standard(dt=0.005)
18 integrate.nvt(group=all, T=1.2, tau=0.5)
20 # dump an xmle file for the structure information
21 xml = dump.xml(filename='analyze_imd.xml', vis=True)
23 # setup the IMD server
24 analyze.imd(port=54321, period=500)
26 # run a very long time so the simulation can be watched in VMD