<jupyter_start><jupyter_text>Passing user command line options to scriptsHOOMD parses command line options passed to scripts to set the execution mode, GPU options, and other things. HOOMD passes the contents of the --user option on to the job script. Here is an example of how to use it to set the temperature.<jupyter_code>!cat script-user.py<jupyter_output>import hoomd
import hoomd.md

# initialize
hoomd.context.initialize()
kT = float(hoomd.option.get_user()[0])

# specify potential
nl = hoomd.md.nlist.cell()
lj = hoomd.md.pair.lj(r_cut=2.5, nlist=nl)
lj.pair_coeff.set('A', 'A', epsilon=1.0, sigma=1.0)

# define integrator
all = hoomd.group.all();
hoomd.md.integrate.mode_standard(dt=0.005)
hoomd.md.integrate.langevin(group=all, kT=kT, seed=42)

# write output
hoomd.analyze.log(filename="log-output.log", quantities=['potential_energy'], period=100, overwrite=True)
hoomd.dump.gsd("trajectory.gsd", period=2e3, group=all, overwrite=True)

# run simulation
hoomd.run(1e4)<jupyter_text>HOOMD scripts are python scripts. To execute the script, run it with python. Provide command line options to the execution context __after__ the script file name.<jupyter_code>!python script.py --mode=cpu --user="1.0"<jupyter_output>HOOMD-blue v2.1.5 CUDA (7.5) DOUBLE HPMC_MIXED MPI SSE SSE2 SSE3 SSE4_1 SSE4_2 AVX 
Compiled: 03/12/2017
Copyright 2009-2016 The Regents of the University of Michigan.
-----
You are using HOOMD-blue. Please cite the following:
* <NAME>, <NAME>, and <NAME>avesset. "General purpose molecular dynamics
  simulations fully implemented on graphics processing units", Journal of
  Computational Physics 227 (2008) 5342--5359
* <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, and
  <NAME>. "Strong scaling of general-purpose molecular dynamics simulations
  on GPUs", Computer Physics Communications 192 (2015) 97--107
-----
HOOMD-blue is running on the CPU
script.py:006  |  hoomd.init.create_lattice(unitcell=hoomd.lattice.sc(a=2.0), n=5)
script.py:006  |  hoomd.init.create_lattice(unitcell=hoomd.lattice.sc(a=2.0), n=5)
notice(2): Group "all" created containing 125 particles
script.py:009  |  nl = hoomd.md.nlist.cell()
script.py:010  |  lj = hoomd.md.pair.lj(r[...]
{'fraction_non_alphanumeric': 0.12634892086330934, 'fraction_numerical': 0.044064748201438846, 'mean_word_length': 4.809399477806789, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 18, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '150015', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 862, 'n_tokens_neox': 796, 'n_words': 220, 'path': 'Initialization - User options.ipynb', 'repo_name': 'jennyfothergill/hoomd-examples', 'size': '2256'}