LAMMPS Tutorial

Inquiry

LAMMPS Tutorial

Introductions

LAMMPS is a Large-scale Atomic/Molecular Massively Parallel Simulator, an open source molecular dynamics simulation software developed by Steve Plimpton as the main author. ), soft matter (macromolecules, DNA, proteins), and coarse-grained matter. It can even be said that LAMMPS can simulate anything that can be simulated by molecular dynamics. In fact, LAMMPS, as a parallel particle simulator, can perform efficient simulations at the atomic, mesoscopic and continuum media scales. LAMMPS is also one of the easiest software to modify the source code, and is highly flexible when combined with Python.

LAMMPS Tutorial

Basic Tutorial

(1) Initialization settings

  • Units

The units command is used to set the type of atoms to be simulated.

The units style (lammps provides the styles lj, real, metal, si, electron, etc.). lj is the hard sphere model; real is the real atomic model; metal is the metal atomic model; si is the silicon (semiconductor) atomic model; electron is the electron model.

  • Dimension

The dimension command is used to define the dimension of the simulation, which by default is three-dimensional.

dimension N (N=2, 3)

  • Boundary

The boundary command is used to set the boundary conditions of the simulation.

boundary x y z (x, y, z = one or two of the four types p, s, f, m). p is a periodic boundary condition; s is a free boundary condition (but shrinkage); f is a fixed boundary condition; m is a free boundary condition with a minimum value (but shrinkage).

  • Atom_style

atom_style defines the atomic properties in the simulation system.

  • Pair_style

pair_style defines the type of interacting force fields, i.e., potential functions.

(2) Atomic definitions

  • read-data/read-restart

read-data/read-restart defines atoms by reading from the data/restart file.

  • Lattice

lattice is the lattice structure used to define the atomic type construction model.

lattice style scale keyword values... ...style indicates the dot matrix type (dot matrix types are none, sc, bcc, fcc, hcp, diamond, sq, sq2, hex, custom); scale indicates the unit length of the constructed dot matrix type; keyword indicates that zero or more keywords can be appended (keywords are origin, orient spacing, a1, a2, a3, basic).

  • Create_box

The create_box command is used to create a simulated box in the region specified by the region box command.

create_box N region-ID. N is the atom type to use for the simulation; region-ID is the ID of the region to use for the simulation domain.

  • create_atoms

create_atoms for filling the created simulated box with certain atoms.

(3) Simulation settings

  • Pair_coeff

pair_coeff for describing the pair interaction force field parameters.

pair_coeff i j args; i, j denote atomic types and args are generally the values of specific parameters of the pair interaction.

  • Neighbor

neighbor sets the parameters that affect the construction of the neighbor list; the list holds all pairs of atoms in the cutoff+skin range, and in general, the larger the skin distance, the larger the computation.

neighbor skin style; skin i.e., the value set, and style (lammps provide bin, nsq, and multi algorithms) determines the algorithm of the list.

  • group

The group command sets a set of atomic collections.

group ID style args, style has region, type, molecule, delete, etc. The group command is generally used when studying atoms of a certain type or a certain region.

  • Timestep

timestep defines the time step of the simulation, typically 1.0 fs for a time step.

  • Velocity

The velocity command is to give an initial velocity to the atoms in the simulated system. Molecular dynamics relates the sum of the energies of all the atoms in the system to the temperature of the system, so velocity generally sets the initial velocity of the atoms by giving the system an initial temperature.

  • Fix

fix for defining the operation on some atoms or systems.

fix ID group-ID style args; ID specifies the operation name number (e.g. 1, 2, 3...) ; Group-ID specifies the atoms of the operation range (e.g. all...); style indicates the operation content, how to operate; args are the relevant operation parameters for the relevant operation content.

fix-nvt: constant N (number of atoms), V (volume), T (temperature) integration over time

fix-npt: constant N, P (pressure), T integration over time

  • thermo

the thermo command is used to define the output of the sample content at certain time steps.

thermo_style.

the thermo_style command is mainly used to describe the sampled content, i.e., the content output to the screen or LOG file.

  • Dump

The dump command is mainly used to output information about individual atoms after the calculation.

The dump ID group-ID style N file args; ID indicates a name defined by itself for this dump command; group-ID indicates the group of atoms whose information needs to be output (pre-defined group).

* For Research Use Only.
Inquiry
logo
Give us a free call

Send us an email

Copyright © CD ComputaBio. All Rights Reserved.
  • twitter
Top