Skip to content
Snippets Groups Projects
Section_howto.txt 91.61 KiB
"Previous Section"_Section_accelerate.html - "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc - "Next Section"_Section_example.html :c

:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)

:line 

6. How-to discussions :h3

This section describes how to perform common tasks using LAMMPS.

6.1 "Restarting a simulation"_#howto_1
6.2 "2d simulations"_#howto_2
6.3 "CHARMM, AMBER, and DREIDING force fields"_#howto_3
6.4 "Running multiple simulations from one input script"_#howto_4
6.5 "Multi-replica simulations"_#howto_5
6.6 "Granular models"_#howto_6
6.7 "TIP3P water model"_#howto_7
6.8 "TIP4P water model"_#howto_8
6.9 "SPC water model"_#howto_9
6.10 "Coupling LAMMPS to other codes"_#howto_10
6.11 "Visualizing LAMMPS snapshots"_#howto_11
6.12 "Triclinic (non-orthogonal) simulation boxes"_#howto_12
6.13 "NEMD simulations"_#howto_13
6.14 "Finite-size spherical and aspherical particles"_#howto_14
6.15 "Output from LAMMPS (thermo, dumps, computes, fixes, variables)"_#howto_15
6.16 "Thermostatting, barostatting and computing temperature"_#howto_16
6.17 "Walls"_#howto_17
6.18 "Elastic constants"_#howto_18
6.19 "Library interface to LAMMPS"_#howto_19
6.20 "Calculating thermal conductivity"_#howto_20
6.21 "Calculating viscosity"_#howto_21 :all(b)

The example input scripts included in the LAMMPS distribution and
highlighted in "Section_example"_Section_example.html also show how to
setup and run various kinds of simulations.

:line
:line

6.1 Restarting a simulation :link(howto_1),h4

There are 3 ways to continue a long LAMMPS simulation.  Multiple
"run"_run.html commands can be used in the same input script.  Each
run will continue from where the previous run left off.  Or binary
restart files can be saved to disk using the "restart"_restart.html
command.  At a later time, these binary files can be read via a
"read_restart"_read_restart.html command in a new script.  Or they can
be converted to text data files using the "-r command-line
switch"_Section_start.html#start_7 and read by a
"read_data"_read_data.html command in a new script.

Here we give examples of 2 scripts that read either a binary restart
file or a converted data file and then issue a new run command to
continue where the previous run left off.  They illustrate what
settings must be made in the new script.  Details are discussed in the
documentation for the "read_restart"_read_restart.html and
"read_data"_read_data.html commands.

Look at the {in.chain} input script provided in the {bench} directory
of the LAMMPS distribution to see the original script that these 2
scripts are based on.  If that script had the line

restart	        50 tmp.restart :pre

added to it, it would produce 2 binary restart files (tmp.restart.50
and tmp.restart.100) as it ran.

This script could be used to read the 1st restart file and re-run the