1 hoomd_script::init::read_xml hoomd_script::dump::dcd hoomd_script::pair::lj hoomd_script::bond::harmonic hoomd_script::integrate::mode_standard hoomd_script::integrate::nvt
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_xml.py ----
6 from hoomd_script import *
10 init.read_xml(filename="init_xml.xml")
12 # example4.xml defines a single polymer: use the same force field as in example 3
14 harmonic = bond.harmonic()
15 harmonic.set_coeff('polymer', k=330.0, r0=0.84)
16 lj = pair.lj(r_cut=3.0)
17 lj.pair_coeff.set('A', 'A', epsilon=1.0, sigma=1.0, alpha=0.0)
18 lj.pair_coeff.set('A', 'B', epsilon=1.0, sigma=1.0, alpha=0.0)
19 lj.pair_coeff.set('B', 'B', epsilon=1.0, sigma=1.0, alpha=1.0)
21 # dump every few steps
22 dump.dcd(filename="init_xml.dcd", period=10)
24 # integrate NVT for a bunch of time steps
26 integrate.mode_standard(dt=0.005)
27 integrate.nvt(group=all, T=1.2, tau=0.5)