diff --git a/doc/src/2001/README.html b/doc/src/2001/README.html new file mode 100644 index 0000000000..d36aa917aa --- /dev/null +++ b/doc/src/2001/README.html @@ -0,0 +1,174 @@ + + +
+ + + ++LAMMPS = Large-scale Atomic/Molecular Massively Parallel Simulator
++This is the documentation for the LAMMPS 2001 version, written in F90, +which has been superceded by more current versions. See the LAMMPS WWW +Site for more information. +
+LAMMPS is a classical molecular dynamics code designed for simulating +molecular and atomic systems on parallel computers using +spatial-decomposition techniques. It runs on any parallel platform that +supports F90 and the MPI message-passing library or on single-processor +workstations.
++LAMMPS 2001 is copyrighted code that is distributed freely as +open-source software under the GNU Public License (GPL). See the +LICENSE file or www.gnu.org for more +details. Basically the GPL allows you as a user to use, modify, or +distribute LAMMPS however you wish, so long as any software you +distribute remains under the GPL. +
+Features of LAMMPS 2001 include:
++For users of LAMMPS 99, this version is written in F90 to take +advantage of dynamic memory allocation. This means the user does not +have to fiddle with parameter settings and re-compile the code so +often for different problems. This enhancment means there are new +rules for the ordering of commands in a LAMMPS input script, as well +as a few new commands to guide the memory allocator. Users should read +the beginning sections of the input_commands file for an +explanation.
++More details about the code can be found here, in the HTML- or text-based +documentation. The LAMMPS Web page is at www.cs.sandia.gov/~sjplimp/lammps.html +, which includes benchmark timings and a list of papers written using +LAMMPS results. They illustrate the kinds of scientific problems that +can be modeled with LAMMPS. These two papers describe the parallel +algorithms used in the code. Please cite these if you incorporate +LAMMPS results in your work. And if you send me citations for your +papers, I'll be pleased to add them to the LAMMPS WWW page. +
++S. J. Plimpton, R. Pollock, M. Stevens, "Particle-Mesh Ewald and +rRESPA for Parallel Molecular Dynamics Simulations", in Proc of +the Eighth SIAM Conference on Parallel Processing for Scientific +Computing, Minneapolis, MN, March 1997.
++S. J. Plimpton, "Fast Parallel Algorithms for Short-Range Molecular Dynamics", J Comp Phys, 117, 1-19 (1995).
++LAMMPS was originally developed as part of a 5-way CRADA collaboration +between 3 industrial partners (Cray Research, Bristol-Myers Squibb, and +Dupont) and 2 DoE laboratories (Sandia National Laboratories and +Lawrence Livermore National Laboratories).
++The primary author of LAMMPS is Steve Plimpton, but others have written +or worked on significant portions of the code:
++Other CRADA partners involved in the design and testing of LAMMPS are
++If you have questions about LAMMPS, please contact me: +
++Return to top-level of LAMMPS documentation.
++When you unzip/untar the LAMMPS distribution you should have several +directories:
++The src directory contains the F90 and C source files for LAMMPS as +well as several sample Makefiles for different machines. To make LAMMPS +for a specfic machine, you simply type
++make machine
++from within the src directoy. E.g. "make sgi" or "make t3e". This +should create an executable such as lmp_sgi or lmp_t3e. For optimal +performance you'll want to use a good F90 compiler to make LAMMPS; on +Linux boxes I've been told the Leahy F90 compiler is a good choice. +(If you don't have an F90 compiler, I can give you an older F77-based +version of LAMMPS 99, but you'll lose the dynamic memory and some +other new features in LAMMPS 2001.)
++In the src directory, there is one top-level Makefile and several +low-level machine-specific files named Makefile.xxx where xxx = the +machine name. If a low-level Makefile exists for your platform, you do +not need to edit the top-level Makefile. However you should check the +system-specific section of the low-level Makefile to insure the +various paths are correct for your environment. If a low-level +Makefile does not exist for your platform, you will need to add a +suitable target to the top-level Makefile. You will also need to +create a new low-level Makefile using one of the existing ones as a +template. If you wish to make LAMMPS for a single-processor +workstation that doesn't have an installed MPI library, you can +specify the "serial" target which uses a directory of MPI stubs to +link against - e.g. "make serial". You will need to make the +stub library (type "make" in STUBS directory) for your +workstation before doing this.
++Note that the two-level Makefile system allows you to make LAMMPS for +multiple platforms. Each target creates its own object directory for +separate storage of its *.o files.
++There are a few compiler switches of interest which can be specified +in the low-level Makefiles. If you use a F90FLAGS switch of -DSYNC +then synchronization calls will be made before the timing routines in +integrate.f. This may slow down the code slightly, but will make the +individual timings reported at the end of a run more accurate. The +F90FLAGS setting of -DSENDRECV will use MPI_Sendrecv calls for data +exchange between processors instead of MPI_Irecv, MPI_Send, +MPI_Wait. Sendrecv is often slower, but on some platforms can be +faster, so it is worth trying, particularly if your communication +timings seem slow.
++The CCFLAGS setting in the low-level Makefiles requires a FFT setting, +for example -DFFT_SGI or -DFFT_T3E. This is for inclusion of the +appropriate machine-specific native 1-d FFT libraries on various +platforms. Currently, the supported machines and switches (used in +fft_3d.c) are FFT_SGI, FFT_DEC, FFT_INTEL, FFT_T3E, and FFT_FFTW. The +latter is a publicly available portable FFT library, FFTW, which you can install on any +machine. If none of these options is suitable for your machine, please +contact me, and we'll discuss how to add the capability to call your +machine's native FFT library. You can also use FFT_NONE if you have no +need to use the PPPM option in LAMMPS.
++For Linux and T3E compilation, there is a also a CCFLAGS setting for KLUDGE +needed (see Makefile.linux and Makefile.t3e). This is to enable F90 to +call C with appropriate underscores added to C function names. +
+LAMMPS is run by redirecting a text file (script) of input commands into it.
++lmp_sgi < in.lj
++lmp_t3e < in.lj
++The script file contains commands that specify the parameters for the +simulation as well as to read other necessary files such as a data file +that describes the initial atom positions, molecular topology, and +force-field parameters. The input_commands + page describes all the possible commands that can be used. The data_format page describes the format of +the data file.
++LAMMPS can be run on any number of processors, including a single +processor. In principle you should get identical answers on any number +of processors and on any machine. In practice, numerical round-off can +cause slight differences and eventual divergence of dynamical +trajectories.
++When LAMMPS runs, it estimates the array sizes it should allocate based +on the problem you are simulating and the number of processors you +are running on. If you run out of physical memory, you will get a F90 +allocation error and the code should hang or crash. The only thing you +can do about this is run on more processors or run a smaller problem. If +you get an error message to the screen about "boosting" +something, it means LAMMPS under-estimated the size needed for one (or +more) data arrays. The "extra memory" command can be used in +the input script to augment these sizes at run time. A few arrays are +hard-wired to sizes that should be sufficient for most users. These are +specified with parameter settings in the global.f file. If you get a +message to "boost" one of these parameters you will have to +change it and re-compile LAMMPS.
++Some LAMMPS errors are detected at setup; others like neighbor list +overflow may not occur until the middle of a run. Except for F90 +allocation errors which may cause the code to hang (with an error +message) since only one processor may incur the error, LAMMPS should +always print a message to the screen and exit gracefully when it +encounters a fatal error. If the code ever crashes or hangs without +spitting out an error message first, it's probably a bug, so let me +know about it. Of course this applies to algorithmic or parallelism +issues, not to physics mistakes, like specifying too big a timestep or +putting 2 atoms on top of each other! One exception is that different +MPI implementations handle buffering of messages differently. If the +code hangs without an error message, it may be that you need to +specify an MPI setting or two (usually via an environment variable) to +enable buffering or boost the sizes of messages that can be +buffered.
++There are several directories of sample problems in the examples +directory. All of them use an input file (in.*) of commands and a data +file (data.*) of initial atomic coordinates and produce one or more +output files. Sample outputs on different machines and numbers of +processors are included to compare your answers to. See the README +file in the examples sub-directory for more information on what LAMMPS +features the examples illustrate.
++(1) lj = atomic simulations of Lennard-Jones systems. +
+(2) class2 = phenyalanine molecule using the DISCOVER cff95 class 2 +force field. +
+(3) lc = liquid crystal molecules with various Coulombic options and +periodicity settings. +
+(4) flow = 2d flow of Lennard-Jones atoms in a channel using various +constraint options. +
+(5) polymer = bead-spring polymer models with one or two chain types. +
++The converters directory has source code and scripts for tools that +perform input/output file conversions between MSI Discover, AMBER, and +LAMMPS formats. See the README files for the individual tools for +additional information. +
+The tools directory has several serial programs that create and +massage LAMMPS data files. +
+(1) setup_chain.f = create a data file of polymer bead-spring chains +
+(2) setup_lj.f = create a data file of an atomic LJ mixture of species +
+(3) setup_flow_2d.f = create a 2d data file of LJ particles with walls for + a flow simulation +
+(4) replicate.c = replicate or scale an existing data file into a new one +
+(5) peek_restart.f = print-out info from a binary LAMMPS restart file +
+(6) restart2data.f = convert a binary LAMMPS restart file into a text data file +
+See the comments at the top of each source file for information on how +to use the tool. +
+User-written routines can be compiled and linked with LAMMPS, then +invoked with the "diagnostic" command as LAMMPS runs. These routines +can be used for on-the-fly diagnostics or a variety of other purposes. +The examples/lc directory shows an example of using the diagnostic +command with the in.lc.big.fixes input script. A sample diagnostic +routine is given there also: diagnostic_temp_molecules.f. + + diff --git a/doc/src/2001/data_format.html b/doc/src/2001/data_format.html new file mode 100644 index 0000000000..0fe7f1a8f4 --- /dev/null +++ b/doc/src/2001/data_format.html @@ -0,0 +1,250 @@ + + +
+ + + ++Return to top-level of LAMMPS documentation
++This file describes the format of the data file read into LAMMPS with +the "read data" command. The data file contains basic +information about the size of the problem to be run, the initial atomic +coordinates, molecular topology, and (optionally) force-field +coefficients. It will be easiest to understand this file if you read it +while looking at a sample data file from the examples.
++This page has 2 sections:
+ ++Blank lines are important. After the header section, new entries are +separated by blank lines.
++Indentation and space between words/numbers on one line is not +important except that keywords (e.g. Masses, Bond Coeffs) must be +left-justified and capitalized as shown.
++The header section (thru box bounds) must appear first in the file, the +remaining entries (Masses, various Coeffs, Atoms, Bonds, etc) can come +in any order.
++These entries must be in the file: header section, Masses, Atoms.
++These entries must be in the file if there are a non-zero number of +them: Bonds, Angles, Dihedrals, Impropers. Force field coefficients +can be specified in the input script, so do not have to appear in the +data file. The one exception to this is class 2 force field +coefficients which can only be specified in the data file. +
+The Nonbond Coeffs entry contains one line for each atom type. These +are the coefficients for an interaction between 2 atoms of the same +type. The cross-type coeffs are computed by the appropriate class I or +class II mixing rules, or can be specified explicitly using the +"nonbond coeff" command in the input command script. See the force_fields page for more information.
++In the Atoms entry, the atoms can be in any order so long as there are +N entries. The 1st number on the line is the atom-tag (number from 1 to +N) which is used to identify the atom throughout the simulation. The +molecule-tag is a second identifier which is attached to the atom; it +can be 0, or a counter for the molecule the atom is part of, or any +other number you wish. The q value is the charge of the atom in +electron units (e.g. +1 for a proton). The xyz values are the initial +position of the atom. For 2-d simulations specify z as 0.0.
++The final 3 nx,ny,nz values on a line of the Atoms entry are optional. +LAMMPS only reads them if the "true flag" command is +specified in the input command script. Otherwise they are initialized +to 0 by LAMMPS. Their meaning, for each dimension, is that +"n" box-lengths are added to xyz to get the atom's +"true" un-remapped position. This can be useful in pre- or +post-processing to enable the unwrapping of long-chained molecules +which wind thru the periodic box one or more times. The value of +"n" can be positive, negative, or zero. For 2-d simulations +specify nz as 0.
++Atom velocities are initialized to 0.0 if there is no Velocities entry. +In the Velocities entry, the atoms can be in any order so long as there +are N entries. The 1st number on the line is the atom-tag (number from +1 to N) which is used to identify the atom which the given velocity +will be assigned to.
++Entries for Velocities, Bonds, Angles, Dihedrals, Impropers must appear +in the file after an Atoms entry.
++For simulations with periodic boundary conditions, xyz coords are +remapped into the periodic box (from as far away as needed), so the +initial coordinates need not be inside the box. The nx,ny,nz values +(as read in or as set to zero by LAMMPS) are appropriately adjusted by +this remapping.
++The number of coefficients specified on each line of coefficient +entries (Nonbond Coeffs, Bond Coeffs, etc) depends on the +"style" of interaction. This must be specified in the input +command script before the "read data" command is issued, unless the +default is used. See the input_commands page for a description +of the various style options. The input_commands + and force_fields pages explain the +meaning and valid values for each of the coefficients.
++Here is a sample file with annotations in parenthesis and lengthy +sections replaced by dots (...). Note that the blank lines are +important in this example.
++ +LAMMPS Description (1st line of file) + +100 atoms (this must be the 3rd line, 1st 2 lines are ignored) +95 bonds (# of bonds to be simulated) +50 angles (include these lines even if number = 0) +30 dihedrals +20 impropers + +5 atom types (# of nonbond atom types) +10 bond types (# of bond types = sets of bond coefficients) +18 angle types +20 dihedral types (do not include a bond,angle,dihedral,improper type +2 improper types line if number of bonds,angles,etc is 0) + +-0.5 0.5 xlo xhi (for periodic systems this is box size, +-0.5 0.5 ylo yhi for non-periodic it is min/max extent of atoms) +-0.5 0.5 zlo zhi (do not include this line for 2-d simulations) + +Masses + + 1 mass + ... + N mass (N = # of atom types) + +Nonbond Coeffs + + 1 coeff1 coeff2 ... + ... + N coeff1 coeff2 ... (N = # of atom types) + +Bond Coeffs + + 1 coeff1 coeff2 ... + ... + N coeff1 coeff2 ... (N = # of bond types) + +Angle Coeffs + + 1 coeff1 coeff2 ... + ... + N coeff1 coeff2 ... (N = # of angle types) + +Dihedral Coeffs + + 1 coeff1 coeff2 ... + ... + N coeff1 coeff2 ... (N = # of dihedral types) + +Improper Coeffs + + 1 coeff1 coeff2 ... + ... + N coeff1 coeff2 ... (N = # of improper types) + +BondBond Coeffs + + 1 coeff1 coeff2 ... + ... + N coeff1 coeff2 ... (N = # of angle types) + +BondAngle Coeffs + + 1 coeff1 coeff2 ... + ... + N coeff1 coeff2 ... (N = # of angle types) + +MiddleBondTorsion Coeffs + + 1 coeff1 coeff2 ... + ... + N coeff1 coeff2 ... (N = # of dihedral types) + +EndBondTorsion Coeffs + + 1 coeff1 coeff2 ... + ... + N coeff1 coeff2 ... (N = # of dihedral types) + +AngleTorsion Coeffs + + 1 coeff1 coeff2 ... + ... + N coeff1 coeff2 ... (N = # of dihedral types) + +AngleAngleTorsion Coeffs + + 1 coeff1 coeff2 ... + ... + N coeff1 coeff2 ... (N = # of dihedral types) + +BondBond13 Coeffs + + 1 coeff1 coeff2 ... + ... + N coeff1 coeff2 ... (N = # of dihedral types) + +AngleAngle Coeffs + + 1 coeff1 coeff2 ... + ... + N coeff1 coeff2 ... (N = # of improper types) + +Atoms + + 1 molecule-tag atom-type q x y z nx ny nz (nx,ny,nz are optional - + ... see "true flag" input command) + ... + N molecule-tag atom-type q x y z nx ny nz (N = # of atoms) + +Velocities + + 1 vx vy vz + ... + ... + N vx vy vz (N = # of atoms) + +Bonds + + 1 bond-type atom-1 atom-2 + ... + N bond-type atom-1 atom-2 (N = # of bonds) + +Angles + + 1 angle-type atom-1 atom-2 atom-3 (atom-2 is the center atom in angle) + ... + N angle-type atom-1 atom-2 atom-3 (N = # of angles) + +Dihedrals + + 1 dihedral-type atom-1 atom-2 atom-3 atom-4 (atoms 2-3 form central bond) + ... + N dihedral-type atom-1 atom-2 atom-3 atom-4 (N = # of dihedrals) + +Impropers + + 1 improper-type atom-1 atom-2 atom-3 atom-4 (atom-2 is central atom) + ... + N improper-type atom-1 atom-2 atom-3 atom-4 (N = # of impropers) ++ + diff --git a/doc/src/2001/deficiencies.html b/doc/src/2001/deficiencies.html new file mode 100644 index 0000000000..2b197e9cce --- /dev/null +++ b/doc/src/2001/deficiencies.html @@ -0,0 +1,42 @@ + + + + + + +
+Return to top-level of LAMMPS documentation.
++This is a brief list of features lacking in the current version of +LAMMPS. Some of these deficiencies are because of lack of +time/interest; others are just hard!
++Return to top-level of LAMMPS documentation
++This file outlines the force-field formulas used in LAMMPS. Read this +file in conjunction with the data_format + and units files.
++The sections of this page are as follows:
++Whatever Coulomb style is specified in the input command file, the +short-range Coulombic interactions are computed by this formula, +modified by an appropriate smoother for the smooth, Ewald, PPPM, +charmm, and debye styles.
++ E = C q1 q2 / (epsilon * r) + + r = distance (computed by LAMMPS) + C = hardwired constant to convert to energy units + q1,q2 = charge of each atom in electron units (proton = +1), + specified in "Atoms" entry in data file + epsilon = dielectric constant (vacuum = 1.0), + set by user in input command file ++For the debye style, the smoother is exp(-kappa*r) where kappa is an +input parameter. +
+The style of nonbond potential is specified in the input command file.
++ + E = 4 epsilon [ (sigma/r)^12 - (sigma/r)^6 ] + + standard Lennard Jones potential + + r = distance (computed by LAMMPS) + + coeff1 = epsilon (energy) + coeff2 = sigma (distance) + + 2 coeffs are listed in data file or set in input script + 1 cutoff is set in input script + ++
+ + E = 4 epsilon [ (sigma/r)^12 - (sigma/r)^6 ] for r < r_inner + = spline fit for r_inner < r < cutoff + = 0 for r > cutoff + + switching function (spline fit) is applied to standard LJ + within a switching region (from r_inner to cutoff) so that + energy and force go smoothly to zero + spline coefficients are computed by LAMMPS + so that at inner cutoff (r_inner) the potential, force, + and 1st-derivative of force are all continuous, + and at outer cutoff (cutoff) the potential and force + both go to zero + + r = distance (computed by LAMMPS) + + coeff1 = epsilon (energy) + coeff2 = sigma (distance) + + 2 coeffs are listed in data file or set in input script + 2 cutoffs (r_inner and cutoff) are set in input script + ++
+ + E = 4 epsilon [ (sigma/(r - delta))^12 - (sigma/(r - delta))^6 ] + + same as lj/cutoff except that r is shifted by delta + + r = distance (computed by LAMMPS) + + coeff1 = epsilon (energy) + coeff2 = sigma (distance) + coeff3 = delta (distance) + + 3 coeffs are listed in data file or set in input script + 1 cutoff is set in input script + ++
+ + E = A * [ 1 + cos( pi * r / cutoff ) ] + + useful for pushing apart overlapping atoms by ramping A over time + + r = distance (computed by LAMMPS) + + coeff1 = prefactor A at start of run (energy) + coeff2 = prefactor A at end of run (energy) + + 2 coeffs are listed in data file or set in input script + 1 cutoff is set in input script + ++
+ + E = epsilon [ 2 (sigma/r)^9 - 3 (sigma/r)^6 ] + + used with class2 bonded force field + + r = distance (computed by LAMMPS) + + coeff1 = epsilon (energy) + coeff2 = sigma (distance) + + 2 coeffs are listed in data file or set in input script + 1 cutoff is set in input script ++
+ + E = 4 epsilon [ (sigma/r)^12 - (sigma/r)^6 ] for r < r_inner + = switch * E for r_inner < r < cutoff + = 0 for r > cutoff + + where + + switch = [(cutoff^2 - r^2)^2 * (cutoff^2 + 2*r^2 - 3*r_inner)] / + [(cutoff^2 - r_inner^2)^3] + + switching function is applied to standard LJ + within a switching region (from r_inner to cutoff) so that + energy and force go smoothly to zero + switching function causes that at inner cutoff (r_inner) + the potential and force are continuous, + and at outer cutoff (cutoff) the potential and force + both go to zero + + r = distance (computed by LAMMPS) + + coeff1 = epsilon (energy) + coeff2 = sigma (distance) + coeff3 = epsilon for 1-4 interactions (energy) + coeff4 = sigma for 1-4 interactions (distance) + + 4 coeffs are listed in data file or set in input script + 2 cutoffs (r_inner and cutoff) are set in input script ++
+The coefficients for each nonbond style are input in either the data +file by the "read data" command or in the input script using +the "nonbond coeff" command. In the former case, only one set +of coefficients is input for each atom type. The cross-type coeffs are +computed using one of three possible mixing rules:
++ + geometric: epsilon_ij = sqrt(epsilon_i * epsilon_j) + sigma_ij = sqrt(sigma_i * sigma_j) + + arithmetic: epsilon_ij = sqrt(epsilon_i * epsilon_j) + sigma_ij = (sigma_i + sigma_j) / 2 + + sixthpower: epsilon_ij = + (2 * sqrt(epsilon_i*epsilon_j) * sigma_i^3 * sigma_j^3) / + (sigma_i^6 + sigma_j^6) + sigma_ij= ((sigma_i**6 + sigma_j**6) / 2) ^ (1/6) + ++
+The default mixing rule for nonbond styles lj/cutoff, lj/switch, +lj/shift, and soft is "geometric". The default for nonbond +style class2/cutoff is "sixthpower".
++The default can be overridden using the "mixing style" +command. Two exceptions to this are for the nonbond style soft, for +which only an epsilon prefactor is input. This is always mixed +geometrically. Also, for nonbond style lj/shift, the delta +coefficient is always mixed using the rule
++The style of bond potential is specified in the input command file.
++ + E = K (r - r0)^2 + + standard harmonic spring + + r = distance (computed by LAMMPS) + + coeff1 = K (energy/distance^2) (the usual 1/2 is included in the K) + coeff2 = r0 (distance) + + 2 coeffs are listed in data file or set in input script + ++
+ + E = -0.5 K R0^2 * ln[1 - (r/R0)^2] + + 4 epsilon [(sigma/r)^12 - (sigma/r)^6] + epsilon + + finite extensible nonlinear elastic (FENE) potential for + polymer bead-spring models + see Kremer, Grest, J Chem Phys, 92, p 5057 (1990) + + r = distance (computed by LAMMPS) + + coeff1 = K (energy/distance^2) + coeff2 = R0 (distance) + coeff3 = epsilon (energy) + coeff4 = sigma (distance) + + 1st term is attraction, 2nd term is repulsion (shifted LJ) + 1st term extends to R0 + 2nd term only extends to the minimum of the LJ potential, + a cutoff distance computed by LAMMPS (2^(1/6) * sigma) + + 4 coeffs are listed in data file or set in input script + ++
+ + E = -0.5 K R0^2 * ln[1 - ((r - delta)/R0)^2] + + 4 epsilon [(sigma/(r - delta))^12 - (sigma/(r - delta))^6] + epsilon + + same as FENE/standard expect that r is shifted by delta + + r = distance (computed by LAMMPS) + + coeff1 = K (energy/distance^2) + coeff2 = R0 (distance) + coeff3 = epsilon (energy) + coeff4 = sigma (distance) + coeff5 = delta (distance) + + 1st term is attraction, 2nd term is repulsion (shifted LJ) + 1st term extends to R0 + 2nd term only extends to the minimum of the LJ potential, + a cutoff distance computed by LAMMPS (2^(1/6) * sigma + delta) + + 5 coeffs are listed in data file or set in input script + ++
+ + E = epsilon (r - r0)^2 / [ lamda^2 - (r - r0)^2 ] + + non-harmonic spring of equilibrium length r0 + with finite extension of lamda + see Rector, Van Swol, Henderson, Molecular Physics, 82, p 1009 (1994) + + r = distance (computed by LAMMPS) + + coeff1 = epsilon (energy) + coeff2 = r0 (distance) + coeff3 = lamda (distance) + + 3 coeffs are listed in data file or set in input script + ++
+ + E = K2 (r - r0)^2 + K3 (r - r0)^3 + K4 (r - r0)^4 + + r = distance (computed by LAMMPS) + + coeff1 = r0 (distance) + coeff2 = K2 (energy/distance^2) + coeff3 = K3 (energy/distance^3) + coeff4 = K4 (energy/distance^4) + + 4 coeffs are listed in data file - cannot be set in input script ++
+The style of angle potential is specified in the input command file.
++ + E = K (theta - theta0)^2 + + theta = radians (computed by LAMMPS) + + coeff1 = K (energy/radian^2) (the usual 1/2 is included in the K) + coeff2 = theta0 (degrees) (converted to radians within LAMMPS) + + 2 coeffs are listed in data file or set in input script + ++
+ + E = K2 (theta - theta0)^2 + K3 (theta - theta0)^3 + + K4 (theta - theta0)^4 + + theta = radians (computed by LAMMPS) + + coeff1 = theta0 (degrees) (converted to radians within LAMMPS) + coeff2 = K2 (energy/radian^2) + coeff3 = K3 (energy/radian^3) + coeff4 = K4 (energy/radian^4) + + 4 coeffs are listed in data file - cannot be set in input script + ++
+ (harmonic + Urey-Bradley) + + E = K (theta - theta0)^2 + K_UB (r_13 - r_UB)^2 + + theta = radians (computed by LAMMPS) + r_13 = distance (computed by LAMMPS) + + coeff1 = K (energy/radian^2) (the usual 1/2 is included in the K) + coeff2 = theta0 (degrees) (converted to radians within LAMMPS) + coeff3 = K_UB (energy/distance^2) + coeff4 = r_UB (distance) + + 4 coeffs are listed in data file or set in input script + ++
+ E = K (1 + cos(theta)) + + theta = radians (computed by LAMMPS) + + coeff1 = K (energy) + + 1 coeff is listed in data file or set in input script + ++
+The style of dihedral potential is specified in the input command +file. IMPORTANT NOTE for all these dihedral styles: in the LAMMPS +force field the trans position = 180 degrees, while in some force +fields trans = 0 degrees.
+ ++ + E = K [1 + d * cos (n*phi) ] + + phi = radians (computed by LAMMPS) + + coeff1 = K (energy) + coeff2 = d (+1 or -1) + coeff3 = n (1,2,3,4,6) + + Additional cautions when comparing to other force fields: + + some force fields reverse the sign convention on d so that + E = K [1 - d * cos(n*phi)] + some force fields divide/multiply K by the number of multiple + torsions that contain the j-k bond in an i-j-k-l torsion + some force fields let n be positive or negative which + corresponds to d = 1,-1 + + 3 coeffs are listed in data file or set in input script ++
+ + E = SUM(n=1,3) { K_n [ 1 - cos( n*Phi - Phi0_n ) ] } + + phi = radians (computed by LAMMPS) + + coeff1 = K_1 (energy) + coeff2 = Phi0_1 (degrees) (converted to radians within LAMMPS) + coeff3 = K_2 (energy) + coeff4 = Phi0_2 (degrees) (converted to radians within LAMMPS) + coeff5 = K_3 (energy) + coeff6 = Phi0_3 (degrees) (converted to radians within LAMMPS) + + 6 coeffs are listed in data file - cannot be set in input script ++
+ + E = SUM(n=1,5) { A_n * cos(Phi)^(n-1) } + + phi = radians (computed by LAMMPS) + + coeff1 = A_1 + coeff2 = A_2 + coeff3 = A_3 + coeff4 = A_4 + coeff5 = A_5 + + 5 coeffs are listed in data file or set in input script ++
+(harmonic + 1-4 interactions) + + E = K [1 + cos (n*phi + d) ] + + phi = radians (computed by LAMMPS) + + coeff1 = K (energy) + coeff2 = n (1,2,3,4,6) + coeff3 = d (0 or 180 degrees) (converted to radians within LAMMPS) + coeff4 = weighting factor to turn on/off 1-4 neighbor nonbond interactions + + coeff4 weight values are from 0.0 to 1.0 and are used to multiply the + energy and force interaction (both Coulombic and LJ) between the 2 atoms + weight of 0.0 means no interaction + weight of 1.0 means full interaction + + must be used with the special bonds charmm command + "special bonds 0 0 0") which shuts off the uniform special bonds and + allows pair-specific special bonds for the 1-4 interactions to be + defined in the data file + + LAMMPS assumes that all 1-4 interaction distances, which are + generally less than 6 Angstroms, are less than the smallest of the + inner LJ and Coulombic cutoffs, which are generally at least 8 + Angstroms. + + 4 coeffs are listed in data file or set in input script ++
+The style of improper potential is specified in the input command file.
++ + E = K (chi - chi0)^2 + + chi = radians (computed by LAMMPS) + + coeff1 = K (energy/radian^2) (the usual 1/2 is included in the K) + coeff2 = chi0 (degrees) (converted to radians within LAMMPS) + + 2 coeffs are listed in data file or set in input script ++
+ + E = K [1 + d * cos (n*chi) ] + + chi = radians (computed by LAMMPS) + + coeff1 = K (energy) + coeff2 = d (+1 or -1) + coeff3 = n (0,1,2,3,4,6) + + 3 coeffs are listed in data file or set in input script ++
+ + same formula, coeffs, and meaning as "harmonic" except that LAMMPS + averages all 3 angle-contributions to chi + in class 2 this is called a Wilson out-of-plane interaction + + 2 coeffs are listed in data file - cannot be set in input script ++
+If class 2 force fields are selected in the input command file, +additional cross terms are computed as part of the force field. All +class 2 coefficients must be set in the data file; they cannot be set +in the input script.
++ + E = K (r - r0) * (r' - r0') + + r,r' = distance (computed by LAMMPS) + + coeff1 = K (energy/distance^2) + coeff2 = r0 (distance) + coeff3 = r0' (distance) + + 3 coeffs are input in data file ++
+ + E = K_n (r - r0_n) * (theta - theta0) + + r = distance (computed by LAMMPS) + theta = radians (computed by LAMMPS) + + coeff1 = K_1 (energy/distance-radians) + coeff2 = K_2 (energy/distance-radians) + coeff3 = r0_1 (distance) + coeff4 = r0_2 (distance) + + Note: theta0 is known from angle coeffs so don't need it specified here + + 4 coeffs are listed in data file ++
+ + E = (r - r0) * [ F1*cos(phi) + F2*cos(2*phi) + F3*cos(3*phi) ] + + r = distance (computed by LAMMPS) + phi = radians (computed by LAMMPS) + + coeff1 = F1 (energy/distance) + coeff2 = F2 (energy/distance) + coeff3 = F3 (energy/distance) + coeff4 = r0 (distance) + + 4 coeffs are listed in data file ++
+ + E = (r - r0_n) * [ F1_n*cos(phi) + F2_n*cos(2*phi) + F3_n*cos(3*phi) ] + + r = distance (computed by LAMMPS) + phi = radians (computed by LAMMPS) + + coeff1 = F1_1 (energy/distance) + coeff2 = F2_1 (energy/distance) + coeff3 = F3_1 (energy/distance) + coeff4 = F1_2 (energy/distance) + coeff5 = F2_3 (energy/distance) + coeff6 = F3_3 (energy/distance) + coeff7 = r0_1 (distance) + coeff8 = r0_2 (distance) + + 8 coeffs are listed in data file ++
+ + E = (theta - theta0) * [ F1_n*cos(phi) + F2_n*cos(2*phi) + F3_n*cos(3*phi) ] + + theta = radians (computed by LAMMPS) + phi = radians (computed by LAMMPS) + + coeff1 = F1_1 (energy/radians) + coeff2 = F2_1 (energy/radians) + coeff3 = F3_1 (energy/radians) + coeff4 = F1_2 (energy/radians) + coeff5 = F2_3 (energy/radians) + coeff6 = F3_3 (energy/radians) + coeff7 = theta0_1 (degrees) (converted to radians within LAMMPS) + coeff8 = theta0_2 (degrees) (converted to radians within LAMMPS) + + 8 coeffs are listed in data file ++
+ + E = K (theta - theta0) * (theta' - theta0') * (phi - phi0) + + theta,theta' = radians (computed by LAMMPS) + phi = radians (computed by LAMMPS) + + coeff1 = K (energy/radians^3) + coeff2 = theta0 (degrees) (converted to radians within LAMMPS) + coeff3 = theta0' (degrees) (converted to radians within LAMMPS) + + Note: phi0 is known from dihedral coeffs so don't need it specified here + + 3 coeffs are listed in data file + ++
+ + E = K * (r1 - r10)*(r3 - r30) + + r1,r3 = bond lengths of bonds 1 and 3 (computed by LAMMPS) + + coeff1 = K (energy/distance^2) + coeff2 = r10 (distance) = equilibrium bond length for bond 1 + coeff3 = r30 (distance) = equilibrium bond length for bond 3 + + K is only non-zero for aromatic rings + + 3 coeffs are listed in data file + ++
+ + E = K_n (theta - theta0_n) * (theta' - theta0_n') + + theta,theta' = radians (computed by LAMMPS) + + coeff1 = K_1 (energy/radians^2) + coeff2 = K_2 (energy/radians^2) + coeff3 = K_3 (energy/radians^2) + coeff4 = theta0_1 (degrees) (converted to radians within LAMMPS) + coeff5 = theta0_2 (degrees) (converted to radians within LAMMPS) + coeff6 = theta0_3 (degrees) (converted to radians within LAMMPS) + + 6 coeffs are listed in data file ++ + diff --git a/doc/src/2001/history.html b/doc/src/2001/history.html new file mode 100644 index 0000000000..25336f7015 --- /dev/null +++ b/doc/src/2001/history.html @@ -0,0 +1,205 @@ + + + + + + +
+Return to top-level of LAMMPS documentation.
++This is a brief history of features added to each version of LAMMPS.
++Return to top-level of LAMMPS documentation.
++This page contains a complete list of valid LAMMPS commands which are +read-in from an input script. It will be easiest to understand if you +read it while looking at sample input scripts in the examples +directory.
++The script of input commands is read by LAMMPS, one line at a time. +Each command causes LAMMPS to take some action. Usually it simply +causes some internal variable(s) to be set. Or it may cause a data file +to be read in or a simulation to be run. Note that most commands have +default settings, which means you only need use a particular command if +you do not want the default setting.
++Each LAMMPS input script contains exactly one "read data" (or +"read restart") command which defines the problem to be +simulated. All other commands can be split into three categories: (a) +commands that (if used) must appear before the "read data" +command because they define settings needed to correctly read-in the +problem and allocate memory for it, (b) commands that must appear after +the "read data" command because they act on the specified +problem, and (c) commands that can appear either before or after the +"read data" command. Commands in category (c) are used before +the "read data" command if a default setting needs to be +changed before the problem description is read-in. They can be used +after the "read data" command if the user wishes to change a +setting before the next "run" or "minimize" command +is used. Other than these restrictions, commands can generally appear +in any order in the input script, although some commands require others +to have been previously specified.
++Each LAMMPS input script also contains one or more "run" or +"minimize" commands. These trigger an actual dynamics or +minimization computation to be done. Following a run, new commands from +categories (b) and (c) can be used to change various settings, and +additional "run" commands can then be used to continue the +previous simulation. LAMMPS continues to read successive lines from the +input script until the end-of-file is reached, which causes LAMMPS to +terminate.
++This page gives examples of each command, some of which can be +specified in multiple styles. Typically the commands take one or more +parameters. The keyword for each command should begin in the leftmost +column and all characters in the command and its parameters should be +in lower-case (except the word NULL or characters in filenames). +Parameters can be separated by arbitrary numbers of spaces and/or tabs, +so long as the command fits on one line. The remainder of the line +after the last parameter is ignored.
++The next section outlines the structure of a LAMMPS input script. The +final section gives a detailed description of the commands in +alphabetic order, each with its associated parameters and default +settings.
+ ++Any line starting with a # is a comment. +Comments can appear anywhere in the input script.
++(1) Initialization settings (must appear +before "read data" or "read restart")
++(2) Optional Settings (can appear before +and/or after "read data" or "read restart")
++(3) Read in a Problem via a "read data" or "read restart" command
++(4) Optional Settings (same as (2))
++(5) Problem Settings (must appear after "read data" or +"read restart")
++(6) Perform a Simulation via a "run" or "minimize" command
++Repeat (4), (5), and (6) as desired ...
++(if used, must appear before "read data" or "read +restart" command)
++units real + +extra memory 2.0 1.5 2.0 2.5 +dimension 3 +processor grid 10 10 10 +periodicity 0 0 0 +slab volume 3.0 +newton flag 3 +true flag 0 +maximum cutoff 10.0 +mixing style geometric +restart version 5 ++
+(if used, can appear before and/or after "read data" or +"read restart" command)
++neighbor 2.0 1 1 10 1 + +nonbond style none +nonbond style lj/cutoff 10.0 0 +nonbond style lj/smooth 8.0 10.0 +nonbond style lj/shift 10.0 0 +nonbond style soft 2.5 +nonbond style class2/cutoff 10.0 0 +nonbond style lj/charmm 15.0 15.1 + +coulomb style none +coulomb style cutoff 10.0 +coulomb style smooth 8.0 10.0 +coulomb style ewald 10.0 1.0E-4 +coulomb style pppm 10.0 1.0E-4 +coulomb style charmm/switch 15.0 15.1 +coulomb style debye 10.0 0.5 + +bond style none +bond style harmonic +bond style fene/standard +bond style fene/shift +bond style nonlinear +bond style class2 + +angle style none +angle style harmonic +angle style class2 +angle style charmm +angle style cosine + +dihedral style none +dihedral style harmonic +dihedral style mutliharmonic +dihedral style class2 +dihedral style charmm + +improper style none +improper style harmonic +improper style cvff +improper style class2 ++
+read data data.lj +read restart restart.100000 ++
+(if used, must appear after "read data" or "read +restart" command)
++create group types 1 3 +create group molecules 200 300 +create group region 0.0 1.0 0.0 1.0 INF 1.0 +create group remainder + +rotation zero 1 + +create temp uniform 300.0 12345678 +create temp gaussian 300.0 12345678 +create temp velocity 0.0 0.0 0.0 ++
+(if used, must appear after "read data" or "read +restart" command)
++nonbond coeff 1 2 1.0 3.45 10.0 (nonbond style lj/cutoff) +nonbond coeff 1 2 1.0 3.45 8.0 10.0 (nonbond style lj/smooth) +nonbond coeff 1 2 1.0 3.45 2.0 10.0 (nonbond style lj/shift) +nonbond coeff 1 2 1.0 30.0 2.5 (nonbond style soft) +nonbond coeff 1 2 1.0 3.45 10.0 (nonbond style class2/cutoff) +nonbond coeff 1 2 1.0 3.45 1.0 3.45 (nonbond style lj/charmm) + +special bonds amber +special bonds 0.0 0.0 0.5 + +pppm mesh 32 32 64 +pppm order 5 +dielectric 1.0 + +bond coeff 1 100.0 3.45 (bond style harmonic) +bond coeff 1 30.0 1.5 1.0 1.0 (bond style fene/standard ) +bond coeff 1 30.0 1.5 1.0 1.0 0.2 (bond style fene/shift) +bond coeff 1 28.0 0.748308 0.166667 (bond style nonlinear) +angle coeff 1 30.0 108.0 (angle style harmonic) +angle coeff 1 30.0 108.0 30.0 2.5 (angle style charmm) +angle coeff 1 30.0 (angle style cosine) +dihedral coeff 1 10.0 1 3 (dihedral style harmonic) +dihedral coeff 1 2.0 2.0 2.0 2.0 2.0 (dihedral style multiharmonic) +dihedral coeff 1 2.0 5 180.0 0.5 (dihedral style charmm) +improper coeff 1 20.0 0.0 (improper style harmonic) +improper coeff 1 20.0 10.0 (improper style cvff) ++
+(if used, must appear after "read data" or "read +restart" command)
++fix style none +fix style 1 setforce 0.0 NULL 0.0 +fix style 1 addforce 1.0 0.0 0.0 +fix style 1 aveforce 1.0 0.0 0.0 +fix style 1 rescale 300.0 300.0 100 20.0 0.5 +fix style 1 hoover/drag 50.0 50.0 0.001 +fix style 1 langevin 50.0 50.0 0.01 12345 1 1 1 +fix style 1 springforce 10.0 NULL NULL 1.0 +fix style 1 dragforce 10.0 -5.0 NULL 2.0 1.0 +fix style 1 shake 3 0.001 100 + +assign fix 1 atom 200 +assign fix 1 molecule 50 +assign fix 1 type 2 +assign fix 1 region 0.0 1.0 INF INF 0.0 1.0 +assign fix 1 bondtype 4 +assign fix 1 angletype 18 10 +assign fix 1 remainder ++
+(if used, must appear after "read data" or "read +restart" command)
++temp control none +temp control rescale 300.0 300.0 100 20.0 0.5 +temp control replace 300.0 300.0 50 12345678 +temp control langevin 50.0 50.0 0.01 123456 +temp control nose/hoover 300.0 300.0 0.01 + +press control none +press control nose/hoover xyz 0.0 0.0 0.001 +press control nose/hoover xz 0.0 10.0 5.0 5.0 0.0 10.0 0.001 +press control nose/hoover yz NULL NULL 5.0 5.0 0.0 10.0 0.001 +press control nose/hoover aniso 0.0 0.0 0.0 0.0 1.0 10.0 0.001 +press control nose/hoover aniso 0.0 0.0 0.0 0.0 NULL NULL 0.001 + +volume control none +volume control linear x 0.0 10.0 +volume control linear y -1.0 15.0 +volume control linear z -10.0 10.0 ++
+(if used, must appear after "read data" or "read +restart" command)
++thermo flag 50 +thermo style 0 + +dump atoms 100 filename +dump velocities 100 filename +dump forces 100 filename + +restart 1000 1 filename +restart 1000 2 file1 file2 +diagnostic diffusion 100 filename 3 1.0 -1.0 2.5 ++
+(if used, must appear after "read data" or "read +restart" command)
++timestep 1.0 +respa 2 2 4 +reset timestep 0 ++
+(if used, must appear after "read data" or "read +restart" command)
++min style hftn +min flag 10 ++
+run 10000 +minimize 0.0001 9999 50000 ++
+coeffs: harmonic + (1) K (energy units) + (2) theta (degrees) + class2 + currently not enabled for "angle coeff" command + must be specified in data file (see "read data" command) + charmm + (1) K (energy units) + (2) theta (degrees) + (3) K_UB (energy/distance^2) + (4) r_UB (distance) + cosine + (1) K (energy units) + +define (or override) angle coefficients for an individual angle type +use appropriate number of coeffs for a particular style +see force_fields.html for meaning of coefficients for each style +these coefficients can also be set in data file + by a "Angle Coeffs" entry, the most recently defined + coefficients are used +cannot use this command before a "read data" or "read restart" is performed, + because memory is not yet allocated for the necessary arrays ++
+define style of angle interactions to use for all 3-body terms +must be used before the "read data" command (if not using the + default) to tell the program how to read the "Angle Coeffs" entry + in the data file +can be used after the "read data" command to change the style to none +coefficients for all angle types must be defined in the data (or restart) + file by a "Angle Coeffs" entry or by "angle coeff" + commands before a run is performed + +Default = harmonic ++
+styles: ++
+coeffs: atom + (1) global atom # + molecule + (1) molecule # + type + (1) atom type + region + (1) lower x bound of region + (2) upper x bound of region + (3) lower y bound of region + (4) upper y bound of region + (5) lower z bound of region + (6) upper z bound of region + bondtype + (1) bond type + angletype + (1) angle type + (2) bond type used within that angle + remainder + no other parameters required + +assign a group of atoms or a bond type to a particular constraint +use appropriate number of coeffs for a particular style +the constraint itself must first be defined by a + "fix style" command +multiple groups of atoms or bond types can be assigned to the same constraint +the bondtype option can only be assigned to a "fix style" of "shake", + multiple bondtypes can be SHAKEn, so long as the size of clusters of + atoms does not exceed the limit described in the "fix style" command +the angletype option can only be assigned to a "fix style" of "shake", + only a single angletype can be SHAKEn, it is designed to be used + in conjunction with "fix style bondtype" to make clusters of size 3 + entirely rigid (e.g. water) +the angletype option enables an additional check when SHAKE constraints + are computed: if a cluster is of size 3 and both bonds in + the cluster are of a bondtype specified by the 2nd paramter of + angletype, then the cluster is SHAKEn with an additional angle + constraint that makes it rigid, using the equilibrium angle appropriate + to the specified angletype +IMPORTANT NOTE: the angletype option has one additional affect, namely + that no angle forces for any angle of type angletype are computed + (since it is assumed those angles will be frozen by being SHAKEn), thus + it will likely cause unintended behavior if the bonds in some atom pairs + within angles of type angletype do not have the appropriate bondtype, + since they will not be SHAKEn but neither will the angle force by computed +for style region, a coeff of INF means + or - infinity (all the way + to the boundary) +an atom can be assigned to multiple constraints, the contraints will be + applied in the reverse order they are assigned to that atom + (e.g. each timestep, the last fix assigned to an atom will be applied + to it first, then the next-to-last applied second, etc) + ++
+coeffs: harmonic + (1) K (energy units) + (2) r0 (distance units) + fene/standard + (1) k for FENE portion (energy/distance^2 units) + (2) r0 for FENE portion (distance units) + (3) epsilon for LJ portion (energy units) + (4) sigma for LJ portion (distance units) + fene/shift + (1) k for FENE (energy/distance^2 units) + (2) r0 for FENE after shift is performed (distance units) + (3) epsilon for LJ (energy units) + (4) sigma for LJ after shift is performed (distance units) + (5) delta shift distance (distance units) + nonlinear + (1) epsilon (energy units) + (2) r0 (distance units) + (3) lamda (distance units) + class2 + currently not enabled for "bond coeff" command + must be specified in data file (see "read data" command) + +define (or override) bond coefficients for an individual bond type +use appropriate number of coeffs for a particular style +see force_fields.html for meaning of coefficients for each style +these coefficients can also be set in data file + by a "Bond Coeffs" entry, the most recently defined + coefficients are used +cannot use this command before a "read data" or "read restart" is performed, + because memory is not yet allocated for the necessary arrays ++
+define style of bond interactions to use between all bonded atoms +must be used before the "read data" command (if not using the + default) to tell the program how to read the "Bond + Coeffs" entry in the data file (if one exists) +can be used after the "read data" command to change the style, + in this case "bond coeff" commands must also be used to set new + coefficients for each bond type (unless the new style is "none") +coefficients for all bond types must be defined in the data (or restart) + file by a "Bond Coeffs" entry or by "bond coeff" + commands before a run is performed + +Default = harmonic ++
+blank lines are ignored +lines starting with a # are echoed into the log file +for commands, everything on a line after the last parameter is ignored ++
+styles: ++
+coeffs: none + no other parameters required + cutoff + (1) cutoff distance (distance units) + smooth + (1) inner cutoff (distance units) + (2) outer cutoff (distance units) + ewald + (1) cutoff distance for near-field portion (distance units) + (2) accuracy criterion + pppm + (1) cutoff distance for near-field portion (distance units) + (2) accuracy criterion + charmm/switch + (1) inner cutoff (distance units) + (2) outer cutoff (distance units) + debye + (1) cutoff distance (distance units) + (2) kappa (inverse distance units) + +use appropriate number of coeffs for a particular style +normally this command should be used before "read data" or "read restart" + (if simulating a charged system) to tell LAMMPS how big a force cutoff + is being used, the "maximum cutoff" command can also serve this + purpose +restart files do not store "coulomb style" choice or cutoff, so + this should be specified in the input script when running from a restart + file +this command can also be used after "read data" or "read restart" to + change the style of Coulomb interactions or the cutoff +if simulated system has no charges, should set "coulomb style none" to + prevent LAMMPS from doing useless nonbond work, LAMMPS will set + this for you and issue a warning +cutoff distance can be smaller or larger than simulation box dimensions +accuracy criterion means "one part in value" - e.g. 1.0E-4 +Ewald and PPPM accuracy criterion are used in conjunction with cutoff + to partition work between short-range and long-range routines +accuracy criterion effectively determines how many k-space vectors are used + to approximate the energy and forces +for PPPM, accuracy criterion determines mesh spacing (see "particle mesh" + command) +3-d periodic boundary conditions are normally used in conjunction with + Ewald and PPPM, see "slab volume" command for 2-d Ewald/PPPM +cannot use any Coulomb styles other than none with nonbond style = lj/shift or + nonbond style = soft +Coulomb style = smooth should be used with nonbond style = lj/smooth, + and both should use same inner and outer cutoffs +nonbond style = lj/charmm should be used with coulomb style = charmm/switch +for smooth and charmm/switch styles, outer cutoff must be > inner cutoff +for smooth and charmm/switch styles, atom pairs less than the inner cutoff + distance use usual Coulomb, pairs between inner and outer are smoothed, + and the potential goes to 0.0 at the outer cutoff +for smooth style, force is continuously differentiable everywhere +for debye style, an exp(-kappa*r) screening is added to the Coulombic + interaction + +Default = cutoff 10.0 for real units + cutoff 2.5 for lj units ++
+styles: ++
+coeffs: types + (1) lowest atom type + (2) highest atom type + molecules + (1) lowest molecule ID + (2) highest molecule ID + region + (1) lower x bound of region + (2) upper x bound of region + (3) lower y bound of region + (4) upper y bound of region + (5) lower z bound of region + (6) upper z bound of region + remainder + no other parameters required + +used with "create temp" commmand to initialize velocities of atoms +by default, the "create temp" command initializes the velocities of all atoms, + this command limits the initialization to a group of atoms +this command is only in force for the next "create temp" command, any + subsequent "create temp" command is applied to all atoms (unless the + "create group" command is used again) +for style types, only atoms with a type such that lo-type <= type <= hi-type + will be initialized by "create temp" +for style types, lo-type can equal hi-type if just want to specify one type +for style molecules, only atoms belonging to molecules with an ID # such + that lo-ID <= type <= hi-ID will be initialized by "create temp" +for style molecules, lo-ID can equal hi-ID if just want to specify one molecule +for style region, only atoms within the specified spatial region + will be initialized by "create temp" +for style region, a coeff of INF means + or - infinity (all the way + to the boundary) +for style remainder, only previously uninitialized atoms + will be initialized by "create temp" ++
+styles: ++
+coeffs: uniform + (1) target T (temperature units) + (2) random # seed (0 < seed <= 8 digits) + gaussian + (1) target T (temperature units) + (2) random # seed (0 < seed <= 8 digits) + velocity + (1) x velocity component (velocity units) + (2) y velocity component (velocity units) + (3) z velocity component (velocity units) + +initialize velocities of atoms to a specified temperature +use appropriate number of coeffs for a particular style +cannot be done before a data or restart file is read +by default, velocities are created for all atoms - this can be overridden + by first using a "create group" command +for uniform and Gaussian styles velocities are created in + processor-independent fashion - is slower but gives the same initial + state independent of # of processors +for uniform and Gaussian styles the momentum of the initialized atoms is + also zeroed, but only if all atoms are being initialized +for uniform and Gaussian styles, RN are generated with Park/Miller RNG +for velocity style in 2-d simulations, still specify z velocity component, + even though it is ignored ++
+call a user-defined diagnostic routine every this many timesteps +this command can be used multiple times to call different routines + at different frequencies, that use different parameters, and that + send output to different files +value of 0 for 2nd parameter means never call this particular routine +this command causes any previous file associated with this user routine + to be closed +new filename can exist, will be overwritten +if the file name specified is "none", then no file is opened +each routine that is added to diagnostic.f and enabled with a + "diagnostic" command will be called at the beginning and end of + each "run" and every so many timesteps during the run +see *** comments in diagnostic.f for changes that must be made in + that file to enable user diagnostics, LAMMPS must then be re-compiled + and re-linked +see the diagnostic.f file for further information on how to create + routines that operate on internal LAMMPS data, do their own file output, + perform different operations (e.g. setup and clean-up) depending + on when they are called, etc +the optional 5th-9th parameters are stored as internal LAMMPS variables + which can be accessed by the diagnostic routine ++
+set dielectric constant to this value + +Default = 1.0 ++
+coeffs: harmonic + (1) K (energy units) + (2) d (+1 or -1) + (3) n (1,2,3,4,6) + multiharmonic + (1) A_1 (energy units) + (2) A_2 (energy units) + (3) A_3 (energy units) + (4) A_4 (energy units) + (5) A_5 (energy units) + class2 + currently not enabled for "dihedral coeff" command + must be specified in data file (see "read data" command) + charmm + (1) K (energy units) + (2) n (1,2,3,4,6) + (3) d (0 or 180 degrees) (converted to radians within LAMMPS) + (4) weighting factor to turn on/off 1-4 neighbor nonbond interactions + +define (or override) dihedral coefficients for an individual dihedral type +use appropriate number of coeffs for a particular style +see force_fields.html for meaning of coefficients for each style +these coefficients can also be set in data file + by a "Dihedral Coeffs" entry, the most recently defined + coefficients are used +cannot use this command before a "read data" or "read restart" is performed, + because memory is not yet allocated for the necessary arrays ++
+define style of dihedral interactions to use for all 4-body terms +must be used before the "read data" command (if not using the + default) to tell the program how to read the "Dihedral + Coeffs" entry in the data file +can be used after the "read data" command to change the style to none +coefficients for all dihedral types must be defined in the data (or restart) + file by a "Dihedral Coeffs" entry or by "dihedral coeff" + commands before a run is performed + +Default = harmonic ++
+for a 2-d run, assumes all z-coords are set to 0.0 in "read data" or + "read restart" files and program creates no z velocities +this command sets the processor grid to default values for 2-d or 3-d + so must be used before "processor grid" command +must be set before data or restart file is read + +Default = 3 ++
+dump all atom positions to a file every this many timesteps + (every this many iteration when the minimizer is invoked) +when rRESPA is enabled, this is steps of outermost loop (longest timesteps) +positions are also dumped at the start and end of each run +when dumped during minimization, all dumps will have the same timestamp + since the timestep does not change during minimization +value of 0 means never dump +any previous file is closed +new filename can exist, will be overwritten +atom positions in dump file are in "box" units (0.0 to 1.0) in each dimension +IMPORTANT NOTE: due to the way periodic boundary conditions are enforced + (only when neighbor lists are rebuilt), atom coords appearing in the dump + file can be slightly outside the specified box + +Default = 0 ++
+dump all atom forces to a file every this many timesteps + (every this many iteration when the minimizer is invoked) +when rRESPA is enabled, this is steps of outermost loop (longest timesteps) +forces are also dumped at the start and end of each run +when dumped during minimization, all dumps will have the same timestamp + since the timestep does not change during minimization +any previous file is closed +new filename can exist, will be overwritten +value of 0 means never dump + +Default = 0 ++
+dump all atom velocities to a file every this many timesteps +when rRESPA is enabled, this is steps of outermost loop (longest timesteps) +velocities are also dumped at the start and end of every run +any previous file is closed +new filename can exist, will be overwritten +value of 0 means never dump + +Default = 0 ++
+ +factors that affect how much extra memory is allocated when a problem is setup +factor of 1.0 means no padding (use exactly what LAMMPS estimates is + needed), factor of 2.0 means 2x longer arrays, etc +typically don't need to change default settings unless LAMMPS tells you + to "boost" some factor at run-time +final section of log file lists optimal settings for these parameters, + i.e. the job could have been run with those "extra memory" settings + and would have used minimal memory +must be set before data or restart file is read + +Default = 1.5 for all 4 parameters ++
+styles: ++
+coeffs: none + no other parameters required (use "none" as 1st parameter) + setforce + (1) x component of set force (in force units) + (2) y component of set force (in force units) + (3) z component of set force (in force units) + addforce + (1) x component of added force (in force units) + (2) y component of added force (in force units) + (3) z component of added force (in force units) + aveforce + (1) x comp of added average force per atom (in force units) + (2) y comp of added average force per atom (in force units) + (3) z comp of added average force per atom (in force units) + rescale + (1) desired T at beginning of run + (2) desired T at end of run + (3) check for rescaling every this many timesteps + (4) T window outside of which velocities will be rescaled + (5) fractional amount (0.0 to 1.0) of rescaling to perform + hoover/drag + (1) desired T at beginning of run + (2) desired T at end of run + (3) damping constant for drag (roughly inverse time units) + langevin + (1) desired T at beginning of run + (2) desired T at end of run + (3) Langevin damping parameter (inverse time units) + (4) random seed to use for white noise (0 < seed <= 8 digits) + (5) 0/1 = off/on x dimension + (6) 0/1 = off/on y dimension + (7) 0/1 = off/on z dimension + springforce + (1) x position of spring origin + (2) y position + (3) z position + (4) force constant k (so that k*distance = force units) + dragforce + (1) x position to drag atom towards + (2) y position + (3) z position + (4) force magnitude f (in force units) + (5) delta outside of which to apply force (in distance units) + shake + (1) max # of SHAKE iterations within each atom cluster + (2) SHAKE tolerance (accuracy of one part in tolerance) + (3) print bond statistics every this many steps (0 = never) + +define a constraint +cannot skip a constraint number, all must be used before a run is performed +use appropriate number of coeffs for a particular style +which atoms or bonds the constraint will affect is set by the + "assign fix" command +all of the constraints (except for rescale) are applied every timestep +all specified temperatures are in temperature units +for style setforce, a coeff of NULL means do not alter that force component +for style aveforce, average force on the group of fixed atoms is computed, + then new average force is added in and actual force on each atom is set + to new total value -> has effect of applying same force to entire group + of atoms +thermostatting constraints (rescale, hoover/drag, langevin) cannot be used in + conjuction with global "temp control", since they conflict and will + cause atom velocities to be reset twice +thermostatting constraints (rescale, hoover/drag, langevin) cannot be used + when performing a minimization +if multiple Langevin constraints are specified the Marsaglia RNG will + only use the last RNG seed specified for initialization +meaning of rescale and Langevin thermostatting coefficients is same as in + "temp control" command +for rescale style, it can be used as a coarse temperature rescaler, + for example "rescale 200.0 300.0 100 10.0 1.0" will ramp the temperature + up during the simulation, resetting it to the target temperatue as needed +for rescale style, it can be used to create an instantaneous + drag force that slowly rescales the temperature without oscillation, + for example "rescale 300.0 300.0 1 0.0 0.0001" will force (or keep) + the temperature to be 300.0, the time frame over which this occurs + will become longer as the last parameter is made smaller +for hoover/drag style, the drag force accumulates over time so some + oscillation in temperature can occur, for example + "rescale 300.0 300.0 1 0.0 0.0001" will force (or keep) + the temperature to be 300.0, the time frame over which the oscillations + occur will become longer as the last parameter is made smaller +style springforce is designed to be applied to an entire group of atoms + en masse (e.g. an umbrella force on an entire molecule) +for springforce style, the center of mass r0 of the group of atoms is computed, + then a restoring force = -k*(r-r0)*mass/masstotal is applied to each + atom in the group where mass = mass of the atom and masstotal = mass of + all the atoms in the group - thus "k" should represent the total + force on the group of atoms (not per atom) +for springforce style, a xyz position of NULL means do not include that + dimension in the distance or force computation +for dragforce style, apply a drag force of magnitude f to each atom in the + group in the direction (r-r0) where r0 = (x,y,z) - do not apply the force if + the atom is within a distance delta of r0 +for dragforce style, a xyz position of NULL means do not include that + dimension in the distance or force computation +for shake style, certain bonds in the system are constrained every timestep + to be at their equilibrium length, this is done by applying a SHAKE-like + constraint to the forces on the atoms so that their position at the next + timestep will preserve the atom separations +for shake style, only atoms in small clusters can be constrained - + e.g. water molecules, CH3 groups, but not the C backbone of a + long polymer chain - a cluster is defined as a central atom + connected to others in the cluster by constrained bonds connected + together by constrained bonds - the max size of such a cluster is + 4 atoms to enable easier parallelization +for shake style, the max iteration count need not be large (e.g. 3) since + iterations are only done within a cluster and converge quickly +see the "minimize" command for what constraints are allowed for use + with the minimizer +see the "respa" command for how constraints are applied when rRESPA + timestepping is enabled + +Default = none ++
+coeffs: harmonic + (1) K (energy units) + (2) chi (degrees) + cvff + (1) K (energy units) + (2) d (+1 or -1) + (3) n (0,1,2,3,4,6) + class2 + currently not enabled for "improper coeff" command + must be specified in data file (see "read data" command) + +define (or override) improper coefficients for an individual improper type +use appropriate number of coeffs for a particular style +see force_fields.html for meaning of coefficients for each style +these coefficients can also be set in data file + by a "Improper Coeffs" entry, the most recently defined + coefficients are used +cannot use this command before a "read data" or "read restart" is performed, + because memory is not yet allocated for the necessary arrays ++
+define style of improper interactions to use for all trigonal centers +in class2 case, dictates that angle-angle terms be included for all + trigonal and tetrahedral centers +angle for harmonic is improper torsion, angle for class2 is Wilson out-of-plane +must be used before the "read data" command (if not using the + default) to tell the program how to read the "Improper + Coeffs" entry in the data file +can be used after the "read data" command to change the style to none +coefficients for all improper types must be defined in the data (or restart) + file by a "Improper Coeffs" entry or by "improper coeff" + commands before a run is performed + +Default = harmonic ++
+specifies the longest force cutoff that will be used in any runs +this value is used by LAMMPS to accurately allocate memory + for neighbor arrays +if the value is inaccurate (e.g. the command is not used), it is not an + error, but LAMMPS may allocate insufficient memory for neighbor lists +this command is not typically needed if the "nonbond style" and "coulomb style" + commands are used before the "read data" or "read restart" command, since + they specify the appropriate cutoffs +an exception to this is if a short cutoff is used initially, + but a longer cutoff will be used for a subsequent run (in the same + input script), in this case the "maximum cutoff" command should be + used to insure enough memory is allocated for the later run +note that a restart file contains nonbond cutoffs (so it is not necessary + to use a "nonbond style" command before "read restart"), but LAMMPS + still needs to know what the maximum cutoff will be before the + restart file is read +must be set before data or restart file is read + +Default = cutoffs for nonbond and Coulomb styles ++
+write out minimization info every this many iterations +value of 0 means never write + +Default = 1 ++
+choose minimization algorithm to use when "minimize" command is performed +currently, the hftn style is the only option available + +Default = hftn ++
+perform an energy minimization of the atomic coordinates of the system +uses algorithm selected with "min style" command +minimize commands can be interspersed with "run" commands + to alternate between dynamics and relaxation of the system +minimization stops if any of 3 criteria are met: + (1) largest force component < stopping tolerance + (2) # of iterations > max iterations + (3) # of force and energy evaluations > max evaluations +output from the minimizer is specified by the "dump atoms", "dump forces", + and "restart" commands +when using constraints with the minimizer, fixes are + applied when atoms move except for the following +fixes associated with temperature control are not allowed + (rescale, hoover/drag, langevin) +the minimizer does not invoke the "fix style shake" contraints on + bond lengths +the minimizer does not invoke pressure control or volume control settings +for good convergence, should specify use of smooth nonbond force fields + that have continuous second derivatives, e.g. set "coulomb style" to + "smooth" or "pppm", set "nonbond style" to "lj/smooth" or + use a long cutoff ++
+styles: ++
+determine the kind of mixing rule that is applied to generate nonbond + coefficients for interactions between type i and type j atoms +mixing rules are applied only when nonbond coeffs are input in a "read data" file +for nonbond style "soft", only epsilons (prefactor A) are input - they are + always mixed geometrically, regardless of mixing style setting +for nonbond style "lj/charmm", mixing style is always arithmetic, + regardless of mixing style setting +must be set before data file is read + +Default = geometric for all nonbond styles except + arithmetic for nonbond style lj/charmm + sixthpower for nonbond style class2/cutoff ++
+factors that affect how and when neighbor lists are constructed +the binning style is almost always faster than the N^2 style +skin must be large enough that all atoms needed for bond + interactions are also acquired by interprocessor communication +last parameter incurs extra checking and communication to test against + skin thickness, but may mean neighbor list is created less often +when rRESPA is run, the 3rd and 4th parameters refer to the + nonbond (short-range) timestepping +normally this command should be used before the data or restart file is read, + since the skin distance is used to estimate memory needed for + neighbor lists +this command can also be used after the "read data" or "read restart" command + to change the style of neighbor list construction, but if the + skin distance is changed it can cause LAMMPS to run out of neighbor + list memory, the "maximum cutoff" command can be used to avoid this + problem + +Default = 2.0 1 1 10 1 for real units + 0.3 1 1 10 1 for lj units ++
+turn off or on Newton's 3rd law for bond and non-bond force computation ++
+no Newton's 3rd law means more force computation and less communication +yes Newton's 3rd law means less force computation and more communication +which choice is faster is problem dependent on N, # of processors, + and cutoff length(s) +expect for round-off errors, setting this flag should not affect answers, + only run time +must be set before data or restart file is read + +Default = 3 ++
+coeffs: lj/cutoff + (1) epsilon (energy units) + (2) sigma (distance units) + (3) cutoff (distance units) + lj/smooth + (1) epsilon (energy units) + (2) sigma (distance units) + (3) inner cutoff (distance units) + (4) outer cutoff (distance units) + lj/shift + (1) epsilon (energy units) + (2) sigma (distance units) + (3) delta shift distance (distance units) + (4) cutoff (distance units) + soft + (1) prefactor A at start of run (energy units) + (2) prefactor A at end of run (energy units) + (3) cutoff (distance units) + class2/cutoff + (1) epsilon (energy units) + (2) sigma (distance units) + (3) cutoff (distance units) + lj/charmm + (1) epsilon (energy units) + (2) sigma (distance units) + (3) epsilon for 1-4 interactions (energy units) + (4) sigma for 1-4 interactions (distance units) + +define (or override) nonbond coefficients for an individual atom type pair +use appropriate number of coeffs for a particular style +1st atom type must be <= 2nd atom type +all cutoffs are in global units, not local sigma units + (e.g. in reduced units a setting of "lj/cutoff 1.0 1.2 2.5" means a + cutoff of 2.5, not 1.2*2.5) +turn off a particular type pair interaction by setting the + cutoff to 0.0 (both cutoffs to zero for lj/smooth option) +for soft style, prefactor A is ramped from starting value to + ending value during run +these coefficients (except the cutoffs) can also be set in data file + by a "Nonbond Coeffs" entry and associated mixing rules, the cutoffs can + be set (globally) via the "nonbond style" command, the most + recently defined coefficients/cutoffs are used +cannot use this command before a "read data" or "read restart" is performed, + because memory is not yet allocated for the necessary arrays ++
+styles: ++
+coeffs: none + no other parameters required + lj/cutoff + (1) cutoff (distance units) + (2) offset flag (0 or 1) + lj/smooth + (1) inner cutoff (distance units) + (2) outer cutoff (distance units) + lj/shift + (1) cutoff (distance units) + (2) offset flag (0 or 1) + soft + (1) cutoff (distance units) + class2/cutoff + (1) cutoff (distance units) + (2) offset flag (0 or 1) + lj/charmm + (1) inner cutoff (distance units) + (2) outer cutoff (distance units) + +define style of pairwise nonbond interactions to use between all atom types +use appropriate number of coeffs for a particular style +this is separate from charge interactions (see "coulomb style" command) +normally this command should be used before "read data" + to tell LAMMPS how big a force cutoff is being used, the + "maximum cutoff" command can also serve this purpose +when running from a restart file, the restart file contains the nonbond + style and nonbond cutoffs (but not the offset flag), so it is often + not necessary to use a "nonbond style" command before "read restart", + however LAMMPS still needs to know what the maximum cutoff will be + before the restart file is read, see "maximum cutoff" command + for more details +this command can also be used after "read data" or "read restart" to + change the style of nonbond interactions and/or the cutoff +cutoff distance can be smaller or larger than simulation box dimensions +nonbond style determines how many nonbond coefficients the program expects to + find in a "Nonbond Coeffs" entry in the data file or when using the + "nonbond coeff" command, thus the style must be set (if not using default) + before using the "read data" command (if the data file contains a + "Nonbond Coeffs" entry) or a "nonbond coeff" command +coefficients for all atom type pairs must be defined in data (or restart) + file by a "Nonbond Coeffs" entry or by "nonbond coeffs" commands before + a run is performed +this command sets the cutoff(s) for all type pair interactions, thus + overriding any previous settings by a "nonbond coeff" command or + that were read in from a data or restart file +for lj/cutoff, lj/shift, class2/cutoff styles, + offset flag only affects printout of thermodynamic energy + (not forces or dynamics), determines whether offset energy + is added in to LJ potential to make value at cutoff = 0.0, + flag = 0 -> do not add in offset energy, + flag = 1 -> add in offset energy +for lj/smooth and lj/charmm styles, outer cutoff must be > inner cutoff +for lj/smooth and lj/charmm styles, atom pairs less than the inner cutoff + distance use straight LJ, pairs between inner and outer use a smoothed LJ, + and the potential goes to 0.0 at the outer cutoff +for lj/smooth and lj/charmm styles, energy and forces are continuous at inner + cutoff and go smoothly to zero at outer cutoff +for lj/shift and soft styles, must set "coulomb style" to "none" +for lj/charmm style, must set "coulomb style" to "charmm/switch", "pppm", + or "ewald" +for lj/shift style, delta shift distances for each atom pair are set by + "Nonbond Coeffs" entry in data file or by "nonbond coeffs" command +for soft style, values of the prefactor "A", which is ramped from one + value to another during the run, are set by "Nonbond Coeffs" entry + in data file or by "nonbond coeffs" command + +Default = lj/cutoff 10.0 0 for real units + lj/cutoff 2.5 0 for lj units ++
+turn on/off periodicity in any of three dimensions +used in inter-particle distance computation and when particles move + to map (or not map) them back into periodic box +for a 2-d run (see "dimension" command), 3rd parameter must be + specified, but doesn't matter if it is 0 or 1 +must be set before data or restart file is read + +Default = 0 0 0 (periodic in all dimensions) ++
+specify the mesh size used by "coulomb style pppm" +mesh dimensions that are power-of-two are fastest for FFTs, but any sizes + can be used that are supported by native machine libraries +this command is optional - if not used, a default + mesh size will be chosen to satisfy accuracy criterion - if used, the + specifed mesh size will override the default ++
+specify the order of the interpolation function that is used by "coulomb + style pppm" to map particle charge to the particle mesh +order is roughly equivalent to how many mesh points a point charge + overlaps onto in each dimension + +Default = 5 ++
+styles: ++
+coupling: ++
+coeffs: none + no other parameters required + nose/hoover xyz + (1) desired P at beginning of run + (2) desired P at end of run + nose/hoover xy or yz or xz or aniso + (1) desired Px at beginning of run (or NULL, see below) + (2) desired Px at end of run + (3) desired Py at beginning of run + (4) desired Py at end of run + (5) desired Pz at beginning of run + (6) desired Pz at end of run + (7) frequency constant for volume adjust (inverse time units) + +enable constant pressure simulations +all specified pressures are in pressure units +any dimension being varied by pressure control must be periodic +for xyz coupling, all 3 dimensions expand/contract together uniformly + using total scalar pressure as the driving force +for xy/yz/xz coupling, the 2 specified dimensions expand/contract together + uniformly using pressure components averaged over those 2 dimensions + as the driving force, the non-specified dimension will expand/contract + independently using its pressure component as the driving force +for anisotropic, all 3 dimensions expand/contract independently using + individual pressure components as the 3 driving forces +in all cases, the simulation box stays rectilinear (not Parinello-Rahman) +for dimensions coupled together, their specified P values should be the same +a non-coupled dimension (e.g. dimension z for xy option or any dimension + for aniso option) can have 2 NULL values as specified pressures, + which means apply no pressure control in that dimension (constant volume) +target pressure at intermediate points during a run is a ramped value + between the beginning and ending pressure(s) +for nose/hoover style, frequency constant is like an inverse "piston" + mass which determines how rapidly the pressure fluctuates in response to a + restoring force, large frequency -> small mass -> rapid fluctations +for nose/hoover style, units of frequency/damping constant are + inverse time, so a value of 0.001 means relax in a timespan on the + order of 1000 fmsec (real units) or 1000 tau (LJ units) +IMPORTANT NOTE: the computation of P in LAMMPS does not include + a long-range Van der Waals correction, this introduces a known + error when performing constant P simulations since the correction + factor changes as the box size varies + +Default = none ++
+specify 3-d grid of processors to map to physical simulation domain +for 2-d problem, specify N by M by 1 grid +program will choose these values to best map processor grid to physical + simulation box, only use this command if wish to override program choice +product of 3 parameters must equal total # of processors +must be set before data or restart file is read + +Default = none ++
+read the initial atom positions and bond info from the specified file +the format for the data file is specified in the file data_format +if a "Velocities" entry is not in data file, all atom velocities + are set to 0.0 +if a "Coeffs" entry is in data file, the appropriate "style" command + command must be used first (unless default setting is used) to tell + LAMMPS how many coefficients to expect +a "Nonbond Coeffs" entry only contains one set of coefficients for each + atom type, after being read-in mixing rules are applied to + compute the cross-type coefficients, see the "mixing style" command + and data_format file for more information ++
+read atom and force-field information from specified file +allows continuation of a previous run +file is binary to enable exact restarts +do not have to restart on same # of processors, but can only do exact + restarts on same # of processors due to roundoff +when restart file is read, warnings are issued if certain parameters + in the restart file do not match current settings (e.g. newton flag, + dimension, periodicity, units) - this usually indicates an error +the restart file stores the "nonbond style" and many-body styles and + coefficients and cutoffs, so these do not have to be re-specified in the + input script, unless you want to change them +the restart file does not store "coulomb style" choice or cutoff, so + this should be re-specified in the input script +the restart file stores the constraint assignments for each atom generated + by using the "assign fix" command, it does NOT store the constraint + parameters themselves, so they must be re-specified with "fix style" + commands after the restart file is read - one exception to this is that + SHAKE constraints (bondtype or angletype) are not stored with the + atoms, so they must be re-specified when performing a restart with both + the "fix style" and "assign fix" commands ++
+explicitly reset the timestep to this value +the "read data" and "read restart" commands set the timestep to zero + and the file value respectively, so this should be done after those commands ++
+factors that affect sub-cycling of force calculations within rRESPA hierarchy +bonded intramolecular forces are calculated every innermost sub-timestep +bonded 3- and 4-body forces are computed every 1st parameter sub-timesteps +short-range nonbond pairwise forces (LJ, Coulombic) are computed every + (2nd parameter * 1st parameter) sub-timesteps +long-range (Ewald, PPPM) forces are computed every + (3rd parameter * 2nd parameter * 1st parameter) sub-timesteps +the timestepping for all 3 inner loops (bond, 3/4-body, nonbond) is performed + as sub-cycling within the long-range timestepping loop +the fastest (innermost) timestep size is set by the "timestep" command +when running rRESPA, all input commands that specify numbers of timesteps + (e.g. run, thermo flag, restart, etc) refer to the outermost loop + of long-range timestepping +the only exception to this rule is the "neighbor" command, where the timestep + parameters refer to the short-range (nonbond) timestepping +when using constraints (via the "fix style" and "assign fix" commands) + with rRESPA, the setforce and aveforce constraints are applied at every + level of the hierarchy (whenever forces are computed), the other + constraints are applied only at the short-range (nonbond) level +when using "temp control langevin" with rRESPA, thermostatting is applied + at the short-range (nonbond) level +rRESPA cannot be used with "fix style shake" +setting all 3 parameters to 1 turns off rRESPA + +Default = 1 1 1 (no rRESPA) ++
+create a restart file every this many timesteps +value of 0 means never create one +if the style is 1, restart information will be written to files + named filename.timestep and no 4th parameter is needed +if the style is 2, restart information will be written alternately to files + given by the 3rd and 4th parameters, so only 2 restart files ever exist +when the minimizer is invoked this command means create a restart file + at the end of the minimization with the filename filename.timestep.min +a restart file stores atom and force-field information in binary form +allows program to restart from where it left off (see "read restart" commmand) + +Default = 0 ++
+tell LAMMPS that a restart file from an older version of LAMMPS will be read-in + via a "read restart" command +this command is necessary because older restart files have a different format +valid settings are 2001 (LAMMPS 2001), 2000 (LAMMPS 2000), + 6 (LAMMPS 99) or 5 (LAMMPS 5.0) +restart files from earlier versions of LAMMPS are not readable without + some source code modifications +restart files are always written out in the current-version format + regardless of this setting +this must be set before the "read restart" command is executed + +Default = current version of code = 2001 ++
+zero out angular momentum when creating velocities for a group of atoms +value of 0 means don't zero out, value of 1 means zero it + +Default = 0 ++
+run or continue dynamics for specified # of timesteps +when rRESPA is enabled, this is steps of outermost loop (longest timesteps) +must have performed "read data" or "read restart" + command first ++
+invoke 2-d slab Ewald/PPPM and set extended slab volume via this ratio +2-d slab Ewald/PPPM can be used for a system that is periodic in x-y, + but not in z +this ratio dampens inter-slab interactions in the z dimension + by providing empty volume between slabs and removing + dipole inter-slab interactions +ratio value is the size of the extended dimension in z divided by + the actual dimension in z +recommended ratio value is 3.0: larger is inefficient, smaller + risks unwanted inter-slab interactions +when 2-d slab Ewald/PPPM is used, z-direction periodicity must be + turned off - e.g. periodicity 0 0 1 +when 2-d slab Ewald/PPPM is used, user must prevent particle migration + beyond initial z-bounds, typically by providing walls +2-d slab Ewald/PPPM can only be used only with electrostatically + neutral systems +2-d slab Ewald/PPPM can only be used (for the moment) with constant + volume simulations (no pressure control) - the pressure computation + (printed as thermodynamic data) does not include any slab correction + factor or a volume correction for the extended z direction +must be set before data or restart file is read + +Default = none (normal 3-D Ewald/PPPM) ++
+weighting factors to turn on/off nonbond interactions of atom pairs that + are "close" in the molecular topology +1-2 neighbors are a pair of atoms connected by a bond +1-3 neighbors are a pair of atoms 2 hops away, etc. +weight values are from 0.0 to 1.0 and are used to multiply the + energy and force interaction (both Coulombic and LJ) between the 2 atoms +weight of 0.0 means no interaction +weight of 1.0 means full interaction +can either specify a single keyword (charmm, amber) or can give + 3 numeric values +using the charmm keyword means use the CHARMM force field + settings of 0.0 0.0 0.0, requiring that pair-specific 1-4 interactions + be read in individually (see "dihedral style charmm" command) +using the amber keyword means use the AMBER force field + settings of 0.0 0.0 N, where N = 0.5 for Van der Waals 1-4 interactions + and 1.0/1.2 for Coulombic 1-4 interactions + +Default = CHARMM force field values of 0.0 0.0 0.0 ++
+styles: ++
+coeffs: none + no other parameters required + rescale + (1) desired T at beginning of run + (2) desired T at end of run + (3) check for rescaling every this many timesteps + (4) T window outside of which velocities will be rescaled + (5) fractional amount (0.0 to 1.0) of rescaling to perform + replace + (1) desired T at beginning of run + (2) desired T at end of run + (3) do Gaussian replacement every this many timesteps + (4) random # seed to use for replacement (0 < seed <= 8 digits) + langevin + (1) desired T at beginning of run + (2) desired T at end of run + (3) Langevin damping parameter (inverse time units) + (4) random seed to use for white noise (0 < seed <= 8 digits) + nose/hoover + (1) desired T at beginning of run + (2) desired T at end of run + (3) frequency constant for friction force (inverse time units) + +enable constant temperature simulations +use appropriate number of coeffs for a particular style +all specified temperatures are in temperature units +target temperature at intermediate points during run is a ramped value + between the beginning and ending temperatures +for rescale style, temperature is controlled by explicitly rescaling + velocities towards the target temperature +for rescale style, rescaling is only done if current temperature is + beyond the target temperature plus or minus the window value +for rescale style, the amount of rescaling is contfolled by the fractional + amount (0.0 to 1.0), e.g. a value of 0.5 means set the velocities + to halfway between the current and target temperature +for rescale style, it can be used as a coarse temperature rescaler, + for example "rescale 200.0 300.0 100 10.0 1.0" will ramp the temperature + up during the simulation, resetting it to the target temperatue as needed +for rescale style, it can be used to create an instantaneous + drag force that slowly rescales the temperature without oscillation, + for example "rescale 300.0 300.0 1 0.0 0.0001" will force (or keep) + the temperature to be 300.0, the time frame over which this occurs + will become longer as the last parameter is made smaller +for replace style, Gaussian RNs from the Marsaglia RNG are used +for langevin style, uniform RNs from the Marsaglia RNG are used +for replace and langevin styles, the seed is used to initialize the + Marsaglia RNG, on successive runs the RNG will just continue on +for replace and langevin styles, generated RNs depend on # of processors + so will not get same answers independent of # of processors +for replace and langevin styles, RNG states are not saved in restart file, + so cannot do an exact restart +for langevin style, damping parameter means small value -> less damping +for nose/hoover style, frequency constant is like an inverse + "piston" mass which determines how rapidly the temperature + fluctuates in response to a restoring force, large frequency -> + small mass -> rapid fluctations +for nose/hoover style, cannot use a end-of-run T of 0.0, must be finite +for langevin and nose/hoover styles, units of frequency/damping constant are + inverse time, so a value of 0.01 means relax in a timespan on the + order of 100 fmsec (real units) or 100 tau (LJ units) + +Default = none ++
+print thermodynamic info to screen and log file every this many timesteps +value of 0 means never print + +Default = 0 ++
+determines format of thermodynamic output to screen and log file ++
+Default = 0 ++
+timestep size for MD run (time units) +when rRESPA is enabled, the timestep size is for the innermost (bond) loop + +Default = 1.0 ++
+read atom positions (see "read data" command) and dump atom positions + (see "dump atoms" command) in one of 2 formats ++
+for each dimension, box count of "n" means add that many box lengths + to get "true" un-remapped position, "n" can be positive, negative, or zero +must be set before data or restart file is read + +Default = 0 ++
+set units to one of two options for all subsequent input parameters + +option real = conventional units: ++
+option lj = LJ reduced units: ++
+for LJ units, LAMMPS sets global epsilon,sigma,mass all equal to 1.0 +subsequent input numbers in data and command file must be in these units +output numbers to screen and log and dump files will be in these units +this command (if it appears) must be the first command (aside from + comments) in the input script +must be set before data or restart file is read + +Default = real ++
+styles: ++
+enable volume changes (density changes) during a simulation +specified box boundaries are in distance units +each dimension is controlled separately +dimensions not specified by a "volume control" command can be left + alone (constant volume or nonperiodic) or controlled by + a "press control" command +any dimension being varied by volume control must be periodic +the lo/hi values are the desired global simulation box boundaries at + the end of the simulation run +at each timestep, the box is expanded/contracted uniformly from its initial + lo/hi values to the specified ending lo/hi values +initial lo/hi values are specified in the data or restart file or + inherited from the end of the previous run +at each timestep, all atom coordinates are also scaled to the new box + +Default = none ++ + diff --git a/doc/src/2001/units.html b/doc/src/2001/units.html new file mode 100644 index 0000000000..c2ddf14300 --- /dev/null +++ b/doc/src/2001/units.html @@ -0,0 +1,119 @@ + + + + + + +
+Return to top-level LAMMPS documentation.
++This file describes the units associated with many of the key variables +and equations used inside the LAMMPS code. Units used for input command +parameters are described in the input_commands file. The input command +"units" selects between conventional and Lennard-Jones units. +See the force_fields file for more information on units for the force +field parameters that are input from data files or input scripts.
++Conventional units:
++LJ reduced units:
++This listing of variables assumes conventional units; to convert to LJ +reduced units, simply substitute the appropriate term from the list +above. E.g. x is in sigmas in LJ units. Per-mole in any of the units +simply means for 6.023 x 10^23 atoms.
++
++Meaning Variable Units + +positions x Angstroms +velocities v Angstroms / click (see below) +forces f Kcal / (mole - Angstrom) +masses mass gram / mole +charges q electron units (-1 for an electron) + (1 e.u. = 1.602 x 10^-19 coul) + +time --- clicks (1 click = 48.88821 fmsec) +timestep dt clicks +input timestep dt_in fmsec +time convert dtfactor 48.88821 fmsec / click + +temperature t_current degrees K + t_start + t_stop +input damping t_freq_in inverse fmsec +internal temp t_freq inverse clicks + damping + +dielec const dielectric 1.0 (unitless) +Boltmann const boltz 0.001987191 Kcal / (mole - degree K) + +virial virial[xyz] Kcal/mole = r dot F +pressure factor pfactor 68589.796 (convert internal to atmospheres) +internal p_current Kcal / (mole - Angs^3) + pressure p_start + p_stop +input press p_start_in atmospheres + p_stop_in +output press log file atmospheres +input damping p_freq_in inverse time +internal press p_freq inverse clicks + damping + +pot eng e_potential Kcal/mole +kin eng e_kinetic Kcal/mole +eng convert efactor 332.0636 (Kcal - Ang) / (q^2 - mole) + (convert Coulomb eng to Kcal/mole) + +LJ coeffs lja,ljb Kcal-Angs^(6,12)/mole + +bond various see force_fields file + parameters 2,3,4-body + terms ++ + diff --git a/doc/src/99/README.html b/doc/src/99/README.html new file mode 100644 index 0000000000..528c1e161d --- /dev/null +++ b/doc/src/99/README.html @@ -0,0 +1,161 @@ + + + + + + +
+LAMMPS = Large-scale Atomic/Molecular Massively Parallel Simulator
++This is the documentation for the LAMMPS 99 version, written in F77, +which has been superceded by more current versions. See the LAMMPS WWW +Site for more information. +
+LAMMPS is a classical molecular dynamics code designed for simulating +molecular and atomic systems on parallel computers using +spatial-decomposition techniques. It runs on any parallel platform that +supports the MPI message-passing library or on single-processor +workstations.
++LAMMPS 99 is copyrighted code that is distributed freely as +open-source software under the GNU Public License (GPL). See the +LICENSE file or www.gnu.org for more +details. Basically the GPL allows you as a user to use, modify, or +distribute LAMMPS however you wish, so long as any software you +distribute remains under the GPL. +
+Features of LAMMPS 99 include:
++More details about the code can be found here, +in the HTML-based documentation. There is also a conference paper +describing the parallel algorithms used in the code:
++S. J. Plimpton, R. Pollock, M. Stevens, "Particle-Mesh Ewald and +rRESPA for Parallel Molecular Dynamics Simulations", in Proc of +the Eighth SIAM Conference on Parallel Processing for Scientific +Computing, Minneapolis, MN, March 1997.
++LAMMPS was originally developed as part of a 5-way CRADA collaboration +between 3 industrial partners (Cray Research, Bristol-Myers Squibb, and +Dupont) and 2 DoE laboratories (Sandia National Laboratories and +Lawrence Livermore National Laboratories).
++The primary author of LAMMPS is Steve Plimpton, but others have written +or worked on significant portions of the code:
++Other CRADA partners involved in the design and testing of LAMMPS are
++LAMMPS is copyrighted code that is distributed freely as open-source +software under the GNU Public License (GPL). See the LICENSE file or +www.gnu.org for more details. +Basically the GPL allows you as a user to use, modify, or distribute +LAMMPS however you wish, so long as any software you distribute +remains under the GPL. +
+If you have questions about LAMMPS, please contact me: +
++Return to top-level of LAMMPS documentation.
++When you unzip/untar the LAMMPS distribution you should have 5 +directories:
++The src directory contains the F77 and C source files for LAMMPS as +well as several sample Makefiles for different machines. To make LAMMPS +for a specfic machine, you simply type
++make machine
++from within the src directoy. E.g. "make sgi" or "make +t3e". This should create an executable named lmp_sgi or lmp_t3e.
++In the src directory, there is one top-level Makefile and several +low-level machine-specific files named Makefile.xxx where xxx = the +machine name. If a low-level Makefile exists for your platform, you do +not need to edit the top-level Makefile. However you should check the +system-specific section of the low-level Makefile to make sure the +various paths are correct for your environment. If a low-level Makefile +does not exist for your platform, you will need to add a suitable +target to the top-level Makefile. You will also need to create a new +low-level Makefile using one of the existing ones as a template. If you +wish to make LAMMPS for a single-processor workstation that doesn't +have an installed MPI library, you can specify the serial target which +uses a directory of MPI stubs to link against - e.g. "make +serial". You will need to make the stub library (see STUBS +directory) on your workstation before doing this.
++Note that the two-level Makefile system allows you to make LAMMPS for +multiple platforms. Each target creates its own object directory for +separate storage of its *.o files.
++There are a couple compiler switches of interest which can be specified +in the low-level Makefiles. If you use a F77FLAGS switch of -DSYNC then +synchronization calls will be made before the timing routines in +integrate.f. This may slow down the code slightly, but will make the +reported timings at the end of a run more accurate. The CCFLAGS setting +in the low-level Makefiles requires a FFT setting, for example +-DFFT_SGI or -DFFT_T3E. This is for inclusion of the appropriate +machine-specific native 1-d FFT libraries on various platforms. +Currently, the supported machines and switches (used in fft_3d.c) are +FFT_SGI, FFT_DEC, FFT_INTEL, FFT_T3E, and FFT_FFTW. The latter is a +publicly available portable FFT library, FFTW, +which you can install on any machine. If none of these options is +suitable for your machine, please contact me, and we'll discuss how to +add the capability to call your machine's native FFT library.
++LAMMPS is run by redirecting a file of input commands into it.
++lmp_sgi < in.lj
++lmp_t3e < in.lj
++The input file contains commands that specify the parameters for the +simulation as well as read other necessary files such as a data file +that describes the initial atom positions, molecular topology, and +force-field parameters. The input_commands + page describes all the possible commands that can be used. The data_format page describes the format of +the data file.
++LAMMPS can be run on any number of processors, including a single +processor. In principle you should get identical answers on any number +of processors and on any machine. In practice, numerical round-off can +cause slight differences and eventual divergence of dynamical +trajectories.
++When LAMMPS runs, if you get an error message to the screen about +"boosting" something, it means one (or more) data arrays are +not allocated large enough. Some of these errors are detected at setup, +others like neighbor list overflow may not occur until the middle of a +run. When the latter happens the program will either gracefully stop +(if all processors incurred the same error) or hang (with an error +message). Unfortunately in the current version of LAMMPS which uses +static memory allocation, changing the array size(s) requires you to +edit the appropriate line(s) in the param.h file and recompile the code.
++I've tried to be careful about detecting memory-overflow errors in +LAMMPS. If the code ever crashes or hangs without spitting out an error +message first, it's probably a bug, so let me know about it. Of course +this applies to problems due to algorithmic or parallelism issues, not +to physics mistkaes, like specifying too big a timestep or putting 2 +atoms on top of each other! One exception is that different MPI +implementations handle buffering of messages differently. If the code +hangs without an error message, it may be that you need to specify an +MPI setting or two (usually via an environment variable) to enable +buffering or boost the sizes of messages that can be buffered.
++There are several sample problems in the examples directory. All of +them use an input file (in.*) of commands and a data file (data.*) of +initial atomic coordinates and produce one or more output files. The +*.xxx.P files are outputs on P processors on a particular machine which +you can compare your answers to.
++(1) lj
++Simple atomic simulations of Lennard-Jones atoms of 1 or 3 species with +various ensembles -- NVE, NVT, NPT.
++(2) charge
++A few timestep simulation of a box of charged atoms for testing the +Coulombic options -- cutoff, Ewald, particle-mesh Ewald (PPPM).
++(3) class2
++A simple test run of phenyalanine using DISCOVER cff95 class II force +fields.
++(4) min
++An energy minimization of a transcription protein.
++(5) lc
++Small (250 atom) and large (6750 atom) simulations of liquid crystal +molecules with various Coulombic options and periodicity settings. The +large-system date file was created by using the "replicate" +tool on the small-system data file.
++(6) flow
++2-d flow of Lennard-Jones atoms in a channel using various contraint +options.
++(7) polymer
++Simulations of bead-spring polymer models with one chain type and two +chain types (different size monomers). The two-chain system also has +freely diffusing monomers. This illustrates use of the setup_chain +program in the tools directory and also how to use soft potentials to +untangle the initial configurations.
++The msi2lmp directory has source code for a tool that converts MSI +Discover files to LAMMPS input data files. This tool requires you to +have the Discover force-field description files in order to convert +those parameters to LAMMPS parameters. See the README file in the +msi2lmp directory for additional information.
++The tools directory has a C file called replicate.c which is useful for +generating new LAMMPS data files from existing ones - e.g. scaling the +atom coordinates, replicating the system to make a larger one, etc. See +the comments at the top of replicate.c for instructions on how to use +it.
++The tools directory has a F77 program called setup_lj (compile and link +with print.c) which can be used to generate a 3-d box of Lennard Jones +atoms (one or more atom types) like those used in examples/lj.
++The tools directory also has a F77 program called setup_chain.f +(compile and link with print.c) which can be used to generate random +initial polymer configurations for bead-spring models like those used +in examples/polymer. It uses an input polymer definition file (see +examples/polymer for two sample def files) that specfies how many +chains of what length, a random number seed, etc.
+ + diff --git a/doc/src/99/crib.html b/doc/src/99/crib.html new file mode 100755 index 0000000000..0944980b17 --- /dev/null +++ b/doc/src/99/crib.html @@ -0,0 +1,629 @@ + + + + + + ++Return to top-level of LAMMPS documentation.
++This file contains one-line descriptions of the key variables and +parameters used in LAMMPS. The variables are listed by their data type:
++Note: this file is somewhat out-of-date for LAMMPS 99.
++
+ + diff --git a/doc/src/99/data_format.html b/doc/src/99/data_format.html new file mode 100644 index 0000000000..6a766e9f0f --- /dev/null +++ b/doc/src/99/data_format.html @@ -0,0 +1,239 @@ + + + + + + ++Return to top-level of LAMMPS documentation
++This file describes the format of the data file read into LAMMPS with +the "read data" command. The data file contains basic +information about the size of the problem to be run, the initial atomic +coordinates, molecular topology, and (optionally) force-field +coefficients. It will be easiest to understand this file if you read it +while looking at a sample data file from the examples.
++This page has 2 sections:
+ ++Blank lines are important. After the header section, new entries are +separated by blank lines.
++Indentation and space between words/numbers on one line is not +important except that entry keywords (e.g. Masses, Bond Coeffs) must be +left-justified and capitalized as shown.
++The header section (thru box bounds) must appear first in the file, the +remaining entries (Masses, various Coeffs, Atoms, Bonds, etc) can come +in any order.
++These entries must be in the file: header section, Masses, Atoms.
++These entries must be in the file if there are a non-zero number of +them: Bonds, Angles, Dihedrals, Impropers, Bond Coeffs, Angle Coeffs, +Dihedral Coeffs, Improper Coeffs. Cross-term coefficients for a +particular kind of interaction (e.g. BondAngle Coeffs for bonds) must +appear if class II force fields have been turned on in the input +command file via a "style" command.
++The Nonbond Coeffs entry contains one line for each atom type. These +are the coefficients for an interaction between 2 atoms of the same +type. The cross-type coeffs are computed by the appropriate class I or +class II mixing rules, or can be specified explicitly using the +"nonbond coeff" command in the input command script. See the force_fields page for more information.
++The Nonbond Coeffs and Bond Coeffs entries are optional since they can +be specified from the input command script. This is not true if bond +style is set to class II since those coeffs can only be specified in +this data file.
++In the Atoms entry, the atoms can be in any order so long as there are +N entries. The 1st number on the line is the atom-tag (number from 1 to +N) which is used to identify the atom throughout the simulation. The +molecule-tag is a second identifier which is attached to the atom; it +can be 0, or a counter for the molecule the atom is part of, or any +other number you wish. The q value is the charge of the atom in +electron units (e.g. +1 for a proton). The xyz values are the initial +position of the atom. For 2-d simulations specify z as 0.0.
++The final 3 nx,ny,nz values on a line of the Atoms entry are optional. +LAMMPS only reads them if the "true flag" command is +specified in the input command script. Otherwise they are initialized +to 0 by LAMMPS. Their meaning, for each dimension, is that +"n" box-lengths are added to xyz to get the atom's +"true" un-remapped position. This can be useful in pre- or +post-processing to enable the unwrapping of long-chained molecules +which wrap thru the periodic box one or more times. The value of +"n" can be positive, negative, or zero. For 2-d simulations +specify nz as 0.
++For simulations with periodic boundary conditions, xyz are remapped +into the periodic box (from as far away as needed), so the initial +coordinates need not be inside the box. The nx,ny,nz values (as read in +or as set to zero by LAMMPS) are appropriately adjusted by this +remapping.
++The number of coefficients specified on each line of coefficient +entries (Nonbond Coeffs, Bond Coeffs, etc) depends on the +"style" of interaction. This is specified in the input +command script, unless the default is used. See the input_commands page for a description +of the various style options. The input_commands + and force_fields pages explain the +meaning and valid ranges for each of the coefficients.
++Here is a sample file with annotations in parenthesis and lengthy +sections replaced by dots (...). Note that the blank lines are +important in this example.
++ +LAMMPS Description (1st line of file) + +100 atoms (this must be the 3rd line, 1st 2 lines are ignored) +95 bonds (# of bonds to be simulated) +50 angles (include these lines even if number = 0) +30 dihedrals +20 impropers + +5 atom types (# of nonbond atom types) +10 bond types (# of bond types = sets of bond coefficients) +18 angle types +20 dihedral types (do not include a bond,angle,dihedral,improper type +2 improper types line if number of bonds,angles,etc is 0) + +-0.5 0.5 xlo xhi (for periodic systems this is box size, +-0.5 0.5 ylo yhi for non-periodic it is min/max extent of atoms) +-0.5 0.5 zlo zhi (do not include this line for 2-d simulations) + +Masses + + 1 mass + ... + N mass (N = # of atom types) + +Nonbond Coeffs + + 1 coeff1 coeff2 ... + ... + N coeff1 coeff2 ... (N = # of atom types) + +Bond Coeffs + + 1 coeff1 coeff2 ... + ... + N coeff1 coeff2 ... (N = # of bond types) + +Angle Coeffs + + 1 coeff1 coeff2 ... + ... + N coeff1 coeff2 ... (N = # of angle types) + +Dihedral Coeffs + + 1 coeff1 coeff2 ... + ... + N coeff1 coeff2 ... (N = # of dihedral types) + +Improper Coeffs + + 1 coeff1 coeff2 ... + ... + N coeff1 coeff2 ... (N = # of improper types) + +BondBond Coeffs + + 1 coeff1 coeff2 ... + ... + N coeff1 coeff2 ... (N = # of angle types) + +BondAngle Coeffs + + 1 coeff1 coeff2 ... + ... + N coeff1 coeff2 ... (N = # of angle types) + +MiddleBondTorsion Coeffs + + 1 coeff1 coeff2 ... + ... + N coeff1 coeff2 ... (N = # of dihedral types) + +EndBondTorsion Coeffs + + 1 coeff1 coeff2 ... + ... + N coeff1 coeff2 ... (N = # of dihedral types) + +AngleTorsion Coeffs + + 1 coeff1 coeff2 ... + ... + N coeff1 coeff2 ... (N = # of dihedral types) + +AngleAngleTorsion Coeffs + + 1 coeff1 coeff2 ... + ... + N coeff1 coeff2 ... (N = # of dihedral types) + +BondBond13 Coeffs + + 1 coeff1 coeff2 ... + ... + N coeff1 coeff2 ... (N = # of dihedral types) + +AngleAngle Coeffs + + 1 coeff1 coeff2 ... + ... + N coeff1 coeff2 ... (N = # of improper types) + +Atoms + + 1 molecule-tag atom-type q x y z nx ny nz (nx,ny,nz are optional - + ... see "true flag" input command) + ... + N molecule-tag atom-type q x y z nx ny nz (N = # of atoms) + +Bonds + + 1 bond-type atom-1 atom-2 + ... + N bond-type atom-1 atom-2 (N = # of bonds) + +Angles + + 1 angle-type atom-1 atom-2 atom-3 (atom-2 is the center atom in angle) + ... + N angle-type atom-1 atom-2 atom-3 (N = # of angles) + +Dihedrals + + 1 dihedral-type atom-1 atom-2 atom-3 atom-4 (atoms 2-3 form central bond) + ... + N dihedral-type atom-1 atom-2 atom-3 atom-4 (N = # of dihedrals) + +Impropers + + 1 improper-type atom-1 atom-2 atom-3 atom-4 (atom-1 is central atom) + ... + N improper-type atom-1 atom-2 atom-3 atom-4 (N = # of impropers) ++ + diff --git a/doc/src/99/force_fields.html b/doc/src/99/force_fields.html new file mode 100644 index 0000000000..2907789e91 --- /dev/null +++ b/doc/src/99/force_fields.html @@ -0,0 +1,550 @@ + + + + + + +
+Return to top-level of LAMMPS documentation
++This file outlines the force-field formulas used in LAMMPS. Read this +file in conjunction with the data_format + and units file.
++The sections of this page are as follows:
++Whatever Coulomb style is specified in the input command file, the +short-range Coulombic interactions are computed by this formula, +modified by an appropriate smoother for the smooth, Ewald, and PPPM +styles.
++ E = C q1 q2 / (epsilon * r) + + r = distance (computed by LAMMPS) + C = hardwired constant to convert to energy units + q1,q2 = charge of each atom in electron units (proton = +1), + specified in "Atoms" entry in data file + epsilon = dielectric constant (vacuum = 1.0), + set by user in input command file ++
+The style of nonbond potential is specified in the input command file.
++ + E = 4 epsilon [ (sigma/r)^12 - (sigma/r)^6 ] + + standard Lennard Jones potential + + r = distance (computed by LAMMPS) + + coeff1 = epsilon (energy) + coeff2 = sigma (distance) + + 2 coeffs are listed in data file or set in input script + 1 cutoff is set in input script + ++
+ + E = 4 epsilon [ (sigma/r)^12 - (sigma/r)^6 ] for r < r_inner + = spline fit for r_inner < r < cutoff + = 0 for r > cutoff + + switching function (spline fit) is applied to standard LJ + within a switching region (from r_inner to cutoff) so that + energy and force go smoothly to zero + spline coefficients are computed by LAMMPS + so that at inner cutoff (r_inner) the potential, force, + and 1st-derivative of force are all continuous, + and at outer cutoff (cutoff) the potential and force + both go to zero + + r = distance (computed by LAMMPS) + + coeff1 = epsilon (energy) + coeff2 = sigma (distance) + + 2 coeffs are listed in data file or set in input script + 2 cutoffs (r_inner and cutoff) are set in input script + ++
+ + E = 4 epsilon [ (sigma/(r - delta))^12 - (sigma/(r - delta))^6 ] + + same as lj/cutoff except that r is shifted by delta + + r = distance (computed by LAMMPS) + + coeff1 = epsilon (energy) + coeff2 = sigma (distance) + coeff3 = delta (distance) + + 3 coeffs are listed in data file or set in input script + 1 cutoff is set in input script + ++
+ + E = A * [ 1 + cos( pi * r / cutoff ) ] + + useful for pushing apart overlapping atoms by ramping A over time + + r = distance (computed by LAMMPS) + + coeff1 = prefactor A at start of run (energy) + coeff2 = prefactor A at end of run (energy) + + 2 coeffs are listed in data file or set in input script + 1 cutoff is set in input script + ++
+ + E = epsilon [ 2 (sigma/r)^9 - 3 (sigma/r)^6 ] + + used with class2 bonded force field + + r = distance (computed by LAMMPS) + + coeff1 = epsilon (energy) + coeff2 = sigma (distance) + + 2 coeffs are listed in data file or set in input script + 1 cutoff is set in input script ++
+The coefficients for each nonbond style are input in either the data +file by the "read data" command or in the input script using +the "nonbond coeff" command. In the former case, only one set +of coefficients is input for each atom type. The cross-type coeffs are +computed using one of three possible mixing rules:
++ + geometric: epsilon_ij = sqrt(epsilon_i * epsilon_j) + sigma_ij = sqrt(sigma_i * sigma_j) + + arithmetic: epsilon_ij = sqrt(epsilon_i * epsilon_j) + sigma_ij = (sigma_i + sigma_j) / 2 + + sixthpower: epsilon_ij = + (2 * sqrt(epsilon_i*epsilon_j) * sigma_i^3 * sigma_j^3) / + (sigma_i^6 + sigma_j^6) + sigma_ij= ((sigma_i**6 + sigma_j**6) / 2) ^ (1/6) + ++
+The default mixing rule for nonbond styles lj/cutoff, lj/switch, +lj/shift, and soft is "geometric". The default for nonbond +style class2/cutoff is "sixthpower".
++The default can be overridden using the "mixing style" +command. The one exception to this is for the nonbond style soft, for +which only an epsilon prefactor is input. This is always mixed +geometrically.
++Also, for nonbond style lj/shift, the delta coefficient is always mixed +using the rule
++The style of bond potential is specified in the input command file.
++ + E = K (r - r0)^2 + + standard harmonic spring + + r = distance (computed by LAMMPS) + + coeff1 = K (energy/distance^2) (the usual 1/2 is included in the K) + coeff2 = r0 (distance) + + 2 coeffs are listed in data file or set in input script + ++
+ + E = -0.5 K R0^2 * ln[1 - (r/R0)^2] + + 4 epsilon [(sigma/r)^12 - (sigma/r)^6] + epsilon + + finite extensible nonlinear elastic (FENE) potential for + polymer bead-spring models + see Kremer, Grest, J Chem Phys, 92, p 5057 (1990) + + r = distance (computed by LAMMPS) + + coeff1 = K (energy/distance^2) + coeff2 = R0 (distance) + coeff3 = epsilon (energy) + coeff4 = sigma (distance) + + 1st term is attraction, 2nd term is repulsion (shifted LJ) + 1st term extends to R0 + 2nd term only extends to the minimum of the LJ potential, + a cutoff distance computed by LAMMPS (2^(1/6) * sigma) + + 4 coeffs are listed in data file or set in input script + ++
+ + E = -0.5 K R0^2 * ln[1 - ((r - delta)/R0)^2] + + 4 epsilon [(sigma/(r - delta))^12 - (sigma/(r - delta))^6] + epsilon + + same as FENE/standard expect that r is shifted by delta + + r = distance (computed by LAMMPS) + + coeff1 = K (energy/distance^2) + coeff2 = R0 (distance) + coeff3 = epsilon (energy) + coeff4 = sigma (distance) + coeff5 = delta (distance) + + 1st term is attraction, 2nd term is repulsion (shifted LJ) + 1st term extends to R0 + 2nd term only extends to the minimum of the LJ potential, + a cutoff distance computed by LAMMPS (2^(1/6) * sigma + delta) + + 5 coeffs are listed in data file or set in input script + ++
+ + E = epsilon (r - r0)^2 / [ lamda^2 - (r - r0)^2 ] + + non-harmonic spring of equilibrium length r0 + with finite extension of lamda + see Rector, Van Swol, Henderson, Molecular Physics, 82, p 1009 (1994) + + r = distance (computed by LAMMPS) + + coeff1 = epsilon (energy) + coeff2 = r0 (distance) + coeff3 = lamda (distance) + + 3 coeffs are listed in data file or set in input script + ++
+ + E = K2 (r - r0)^2 + K3 (r - r0)^3 + K4 (r - r0)^4 + + r = distance (computed by LAMMPS) + + coeff1 = r0 (distance) + coeff2 = K2 (energy/distance^2) + coeff3 = K3 (energy/distance^3) + coeff4 = K4 (energy/distance^4) + + 4 coeffs are listed in data file - cannot be set in input script ++
+The style of angle potential is specified in the input command file.
++ + E = K (theta - theta0)^2 + + theta = radians (computed by LAMMPS) + + coeff1 = K (energy/radian^2) (the usual 1/2 is included in the K) + coeff2 = theta0 (degrees) (converted to radians within LAMMPS) + + 2 coeffs are listed in data file + ++
+ + E = K2 (theta - theta0)^2 + K3 (theta - theta0)^3 + + K4 (theta - theta0)^4 + + theta = radians (computed by LAMMPS) + + coeff1 = theta0 (degrees) (converted to radians within LAMMPS) + coeff2 = K2 (energy/radian^2) + coeff3 = K3 (energy/radian^3) + coeff4 = K4 (energy/radian^4) + + 4 coeffs are listed in data file ++
+The style of dihedral potential is specified in the input command file.
++ + E = K [1 + d * cos (n * phi) ] + + phi = radians (computed by LAMMPS) + + coeff1 = K (energy) + coeff2 = d (always +1 or -1) + coeff3 = n (1,2,3,4,6) + + Cautions when comparing to other force fields: + + some force fields reverse the sign convention on d so that + E = K [1 - d * cos(n*phi)] + some force fields divide/multiply K by the number of multiple + torsions that contain the j-k bond in an i-j-k-l torsion + some force fields let n be positive or negative which + corresponds to d = 1,-1 + in the LAMMPS force field, the trans position = 180 degrees, while + in some force fields trans = 0 degrees + + 3 coeffs are listed in data file ++
+ + E = SUM(n=1,3) { K_n [ 1 - cos( n*Phi - Phi0_n ) ] } + + phi = radians (computed by LAMMPS) + + coeff1 = K_1 (energy) + coeff2 = Phi0_1 (degrees) (converted to radians within LAMMPS) + coeff3 = K_2 (energy) + coeff4 = Phi0_2 (degrees) (converted to radians within LAMMPS) + coeff5 = K_3 (energy) + coeff6 = Phi0_3 (degrees) (converted to radians within LAMMPS) + + 6 coeffs are listed in data file ++
+The style of improper potential is specified in the input command file.
++ + E = K (chi - chi0)^2 + + chi = radians (computed by LAMMPS) + + coeff1 = K (energy/radian^2) (the usual 1/2 is included in the K) + coeff2 = chi0 (degrees) (converted to radians within LAMMPS) + + in data file, listing of 4 atoms requires atom-1 as central atom + some force fields (AMBER,Discover) have atom-2 as central atom - it is really + an out-of-plane torsion, may need to treat as dihedral in LAMMPS + + 2 coeffs are listed in data file ++
+ + same formula, coeffs, and meaning as "harmonic" except that LAMMPS + averages all 3 angle-contributions to chi + in class II this is called a Wilson out-of-plane interaction + + 2 coeffs are listed in data file ++
+If class II force fields are selected in the input command file, +additional cross terms are computed as part of the force field.
++ + E = K (r - r0) * (r' - r0') + + r,r' = distance (computed by LAMMPS) + + coeff1 = K (energy/distance^2) + coeff2 = r0 (distance) + coeff3 = r0' (distance) + + 3 coeffs are input in data file ++
+ + E = K_n (r - r0_n) * (theta - theta0) + + r = distance (computed by LAMMPS) + theta = radians (computed by LAMMPS) + + coeff1 = K_1 (energy/distance-radians) + coeff2 = K_2 (energy/distance-radians) + coeff3 = r0_1 (distance) + coeff4 = r0_2 (distance) + + Note: theta0 is known from angle coeffs so don't need it specified here + + 4 coeffs are listed in data file ++
+ + E = (r - r0) * [ F1*cos(phi) + F2*cos(2*phi) + F3*cos(3*phi) ] + + r = distance (computed by LAMMPS) + phi = radians (computed by LAMMPS) + + coeff1 = F1 (energy/distance) + coeff2 = F2 (energy/distance) + coeff3 = F3 (energy/distance) + coeff4 = r0 (distance) + + 4 coeffs are listed in data file ++
+ + E = (r - r0_n) * [ F1_n*cos(phi) + F2_n*cos(2*phi) + F3_n*cos(3*phi) ] + + r = distance (computed by LAMMPS) + phi = radians (computed by LAMMPS) + + coeff1 = F1_1 (energy/distance) + coeff2 = F2_1 (energy/distance) + coeff3 = F3_1 (energy/distance) + coeff4 = F1_2 (energy/distance) + coeff5 = F2_3 (energy/distance) + coeff6 = F3_3 (energy/distance) + coeff7 = r0_1 (distance) + coeff8 = r0_2 (distance) + + 8 coeffs are listed in data file ++
+ + E = (theta - theta0) * [ F1_n*cos(phi) + F2_n*cos(2*phi) + F3_n*cos(3*phi) ] + + theta = radians (computed by LAMMPS) + phi = radians (computed by LAMMPS) + + coeff1 = F1_1 (energy/radians) + coeff2 = F2_1 (energy/radians) + coeff3 = F3_1 (energy/radians) + coeff4 = F1_2 (energy/radians) + coeff5 = F2_3 (energy/radians) + coeff6 = F3_3 (energy/radians) + coeff7 = theta0_1 (degrees) (converted to radians within LAMMPS) + coeff8 = theta0_2 (degrees) (converted to radians within LAMMPS) + + 8 coeffs are listed in data file ++
+ + E = K (theta - theta0) * (theta' - theta0') * (phi - phi0) + + theta,theta' = radians (computed by LAMMPS) + phi = radians (computed by LAMMPS) + + coeff1 = K (energy/radians^3) + coeff2 = theta0 (degrees) (converted to radians within LAMMPS) + coeff3 = theta0' (degrees) (converted to radians within LAMMPS) + + Note: phi0 is known from dihedral coeffs so don't need it specified here + + 3 coeffs are listed in data file + ++
+ + (undocumented) + ++
+ + E = K_n (theta - theta0_n) * (theta' - theta0_n') + + theta,theta' = radians (computed by LAMMPS) + + coeff1 = K_1 (energy/radians^2) + coeff2 = K_2 (energy/radians^2) + coeff3 = K_3 (energy/radians^2) + coeff4 = theta0_1 (degrees) (converted to radians within LAMMPS) + coeff5 = theta0_2 (degrees) (converted to radians within LAMMPS) + coeff6 = theta0_3 (degrees) (converted to radians within LAMMPS) + + 6 coeffs are listed in data file ++ + diff --git a/doc/src/99/history.html b/doc/src/99/history.html new file mode 100644 index 0000000000..861ef480a3 --- /dev/null +++ b/doc/src/99/history.html @@ -0,0 +1,127 @@ + + + + + + +
+Return to top-level of LAMMPS documentation.
++This is a brief history of features added to each version of LAMMPS.
++Return to top-level of LAMMPS documentation.
++This page contains a complete list of valid LAMMPS inputs. It will be +easiest to understand if you read it while looking at sample input +files such as those in the examples directory.
++The input file of commands is read by LAMMPS, one line at a time. Each +command causes LAMMPS to take some action. Usually it simply causes +some internal variable(s) to be set. Or it may cause a file to be read +in or a simulation to be run. In general, commands can be listed in any +order, although some commands require others to have been executed +previously.
++LAMMPS continues to read successive lines from the input command file +until the end-of-file is reached which causes LAMMPS to terminate. Thus +new simulations can be run or current simulations continued by simply +specifying additional commands in the input command file.
++The next section of this page gives an example of each command, some of +which can be specified in multiple styles. Typically the commands take +one or more parameters. The keyword for each command should begin in +the leftmost column and all characters in the command and its +parameters should be in lower-case. Parameters can be separated by +arbitrary numbers of spaces and/or tabs (so long as the command fits on +one line). The remainder of the line after the last parameter is +ignored.
++The final section of this page gives a more detailed description of +each command with its associated parameters. It also lists the default +parameters associated with each command. When performing a simulation, +you only need specify a particular command if you do not want to use +the default settings.
+ ++comments + +units real +dimension 3 +periodicity 0 0 0 +processor grid 10 10 10 +newton flag 3 +timestep 1.0 +respa 2 2 4 +neighbor 2.0 0 1 10 1 +special bonds 0.0 0.0 0.4 ++
+thermo flag 50 +thermo style 0 +true flag 0 + +dump atoms 100 filename +dump velocities 100 filename +dump forces 100 filename + +restart 1000 file1 file2 +diagnostic diffusion 100 filename 3 1.0 -1.0 2.5 ++
+temp control none +temp control rescale 300.0 300.0 100 20.0 +temp control replace 300.0 300.0 50 12345678 +temp control langevin 50.0 50.0 0.01 123456 +temp control nose/hoover 300.0 300.0 0.01 + +press control none +press control nose/hoover 1.0 1.0 0.001 +press_x control nose/hoover 1.0 1.0 0.001 +press_y control nose/hoover 1.0 1.0 0.001 +press_z control nose/hoover 1.0 1.0 0.001 ++
+nonbond style none +nonbond style lj/cutoff 10.0 0 +nonbond coeff 1 2 1.0 3.45 10.0 +nonbond style lj/smooth 8.0 10.0 +nonbond coeff 1 2 1.0 3.45 8.0 10.0 +nonbond style lj/shift 10.0 0 +nonbond coeff 1 2 1.0 3.45 2.0 10.0 +nonbond style soft 2.5 +nonbond coeff 1 2 1.0 30.0 2.5 +nonbond style class2/cutoff 10.0 0 +nonbond coeff 1 2 1.0 3.45 10.0 +mixing style geometric + +coulomb style none +coulomb style cutoff 10.0 +coulomb style smooth 8.0 10.0 +coulomb style ewald 10.0 1.0E-4 +coulomb style pppm 10.0 1.0E-4 +pppm mesh 32 32 64 +pppm order 5 +dielectric 1.0 ++
+bond style none +bond style harmonic +bond coeff 1 100.0 3.45 +bond style fene/standard +bond coeff 1 30.0 1.5 1.0 1.0 +bond style fene/shift +bond coeff 1 30.0 1.5 1.0 1.0 0.2 +bond style nonlinear +bond coeff 1 28.0 0.748308 0.166667 +bond style class2 + +angle style none +angle style harmonic +angle style class2 + +dihedral style none +dihedral style harmonic +dihedral style class2 + +improper style none +improper style harmonic +improper style class2 ++
+read data filename +read restart filename ++
+create group types 1 3 +create group region 0.0 1.0 0.0 1.0 INF 1.0 +create group remainder + +create temp uniform 300.0 12345678 +create temp gaussian 300.0 12345678 +create temp velocity 0.0 0.0 0.0 ++
+fix style none +fix style 1 setforce 0.0 NULL 0.0 +fix style 1 addforce 1.0 0.0 0.0 +fix style 1 aveforce 1.0 0.0 0.0 +fix style 1 rescale 300.0 300.0 100 20.0 +fix style 1 langevin 50.0 50.0 0.01 12345 1 1 1 +fix style 1 nose/hoover 50.0 50.0 0.01 +fix style 1 springforce 10.0 NULL NULL 1.0 +fix style 1 dragforce 10.0 -5.0 NULL 2.0 1.0 + +assign fix 1 atom 200 +assign fix 1 molecule 50 +assign fix 1 type 2 +assign fix 1 region 0.0 1.0 INF INF 0.0 1.0 +assign fix 1 remainder ++
+reset timestep 0 + +run 1000 + +min style hftn +min file filename +minimize 0.0001 9999 50000 ++
+define style of angle interactions to use for all 3-body terms +angle style determines how many angle coefficients the program expects to + find in a "Angle Coeffs" entry in the data file, + thus the style must be set (if not using default) + before using the "read data" command (if the data file contains a + "Angle Coeffs" entry) +coefficients for all angle types must be defined in data (or restart) + file by "Angle Coeffs" entry before a run is performed +style of "none" erases all previously defined angle coefficients, must + reset style to something else before defining new coefficients + +Default = harmonic ++
+styles: ++
+coeffs: atom + (1) global atom # + molecule + (1) molecule # + type + (1) atom type + region + (1) lower x bound of region + (2) upper x bound of region + (3) lower y bound of region + (4) upper y bound of region + (5) lower z bound of region + (6) upper z bound of region + remainder + no other parameters required + +assign a group of atoms to a particular constraint +use appropriate number of coeffs for a particular style +the constraint itself is defined by the "fix style" command +multiple groups of atoms can be assigned to the same constraint +an atom can be assigned to multiple constraints, the contraints will be + applied in the reverse order they are assigned to that atom + (e.g. each timestep, the last fix assigned to an atom will be applied + to it first, then the next-to-last applied second, etc) +for style region, a coeff of INF means + or - infinity (all the way + to the boundary) ++
+coeffs: harmonic + (1) K (energy units) + (2) r0 (distance units) + fene/standard + (1) k for FENE portion (energy/distance^2 units) + (2) r0 for FENE portion (distance units) + (3) epsilon for LJ portion (energy units) + (4) sigma for LJ portion (distance units) + fene/shift + (1) k for FENE (energy/distance^2 units) + (2) r0 for FENE after shift is performed (distance units) + (3) epsilon for LJ (energy units) + (4) sigma for LJ after shift is performed (distance units) + (5) delta shift distance (distance units) + nonlinear + (1) epsilon (energy units) + (2) r0 (distance units) + (3) lamda (distance units) + class 2 + currently not enabled for "bond coeff" command + must be specified in data file (see "read data" command) + +define (or override) bond coefficients for an individual bond type +use appropriate number of coeffs for a particular style +these coefficients can also be set in data file + by "Bond Coeffs" entry, the most recently defined coefficients are used + +Default = no settings ++
+define style of bond interactions to use between all bonded atoms +bond style determines how many bond coefficients the program expects to + find in a "Bond Coeffs" entry in the data file or when using the + "bond coeff" command, thus the style must be set (if not using default) + before using the "read data" command (if the data file contains a + "Bond Coeffs" entry) +coefficients for all bond types must be defined in data (or restart) + file by "Bond Coeffs" entry or by "bond coeffs" commands before a run + is performed +style of "none" erases all previously defined bond coefficients, must + reset style to something else before defining new coefficients + +Default = harmonic ++
+blank lines are ignored +everything on a line after the last parameter is ignored +lines starting with a # are echoed into the log file ++
+styles: ++
+coeffs: none + no other parameters required + cutoff + (1) cutoff distance (distance units) + smooth + (1) inner cutoff (distance units) + (2) outer cutoff (distance units) + ewald + (1) cutoff distance for near-field portion (distance units) + (2) accuracy criterion + pppm + (1) cutoff distance for near-field portion (distance units) + (2) accuracy criterion + +use appropriate number of coeffs for a particular style +if simulated system has no charges, must set "coulomb style none" to + prevent LAMMPS from doing useless nonbond work +accuracy criterion means "one part in value" - e.g. 1.0E-4 +Ewald and PPPM accuracy criterion are used in conjunction with cutoff + to partition work between short-range and long-range routines +accuracy criterion effectively determines how many k-space vectors are used + to approximate the energy and forces +for PPPM, accuracy criterion determines mesh spacing (see "particle mesh" + command) +for PPPM, must be running on power-of-2 number of processors for FFTs +must use periodic boundary conditions in conjuction with Ewald and PPPM +cannot use any styles other than none with nonbond style = lj/shift or + nonbond style = soft +Coulomb style = smooth should be used with nonbond style = lj/switch, + and both should use same inner and outer cutoffs +for smooth style, outer cutoff must be > inner cutoff +for smooth style, atom pairs less than the inner cutoff distance use + usual Coulomb, pairs between inner and outer are smoothed, and the + potential goes to 0.0 at the outer cutoff +for smooth style, force is continuously differentiable everywhere + +Default = cutoff 10.0 ++
+styles: ++
+coeffs: types + (1) lowest atom type + (2) highest atom type + region + (1) lower x bound of region + (2) upper x bound of region + (3) lower y bound of region + (4) upper y bound of region + (5) lower z bound of region + (6) upper z bound of region + remainder + no other parameters required + +used with "create temp" commmand to initialize velocities of atoms +by default, the "create temp" command initializes the velocities of all atoms, + this command limits the initialization to a group of atoms +this command is only in force for the next "create temp" command, any + subsequent "create temp" command is applied to all atoms (unless the + "create group" command is used again) +for style types, only atoms with a type such that lo-type <= type <= hi-type + will be initialized by "create temp" +for style types, lo-type can equal hi-type if just want to specify one type +for style region, only atoms within the specified spatial region + will be initialized by "create temp" +for style region, a coeff of INF means + or - infinity (all the way + to the boundary) +for style remainder, only previously uninitialized atoms + will be initialized by "create temp" ++
+styles: ++
+coeffs: uniform + (1) target T (temperature units) + (2) random # seed (0 < seed <= 8 digits) + gaussian + (1) target T (temperature units) + (2) random # seed (0 < seed <= 8 digits) + velocity + (1) x velocity component (velocity units) + (2) y velocity component (velocity units) + (3) z velocity component (velocity units) + +initialize velocities of atoms to a specified temperature +use appropriate number of coeffs for a particular style +cannot be done before a data or restart file is read +by default, velocities are created for all atoms - this can be overridden + by "create group" command +for uniform and Gaussian styles velocities are created in + processor-independent fashion - is slower but gives the same initial + state independent of # of processors +for uniform and Gaussian styles the momentum of the initialized atoms is + also zeroed, but only if all atoms are being initialized +for uniform and Gaussian styles, RN are generated with Park/Miller RNG +for velocity style in 2-d simulations, still specify z velocity component, + even though it is ignored ++
+call a user-defined diagnostic routine every this many timesteps +this command can be used multiple times to call different routines + at different frequencies, that use different parameters, and that + send output to different files +value of 0 for 2nd parameter means never call this particular routine +this command causes any previous file associated with this user routine + to be closed +new filename can exist, will be overwritten +if the file name specified is "none", then no file is opened +each routine that is added to diagnostic.f and enabled with a + "diagnostic" command will be called at the beginning and end of + each "run" and every so many timesteps during the run +the diagnostic.f file has further information on how to create + routines that operate on internal LAMMPS data, do their own file output, + perform different operations (e.g. setup and clean-up) depending + on when they are called, etc +the user routines must be compiled and linked into LAMMPS +the optional 5th-9th parameters are stored in program variables which + can be accessed by the diagnostic routine + +Default = none ++
+set dielectric constant to this value + +Default = 1.0 ++
+define style of dihedral interactions to use for all 4-body terms +dihedral style determines how many dihedral coefficients the program expects to + find in a "Dihedral Coeffs" entry in the data file, + thus the style must be set (if not using default) + before using the "read data" command (if the data file contains a + "Dihedral Coeffs" entry) +coefficients for all dihedral types must be defined in data (or restart) + file by "Dihedral Coeffs" entry before a run is performed +style of "none" erases all previously defined dihedral coefficients, must + reset style to something else before defining new coefficients + +Default = harmonic ++
+for a 2-d run, assumes all z-coords are set to 0.0 in "read data" or + "read restart" files and program creates no z velocities +this command sets the processor grid to default values for 2-d or 3-d + so must be used before "processor grid" command +must be set before data or restart file is read + +Default = 3 ++
+dump all atom positions to a file every this many timesteps +positions are also dumped at the start and end of every run +value of 0 means never dump +any previous file is closed +new filename can exist, will be overwritten +atom positions in dump file are in "box" units (0.0 to 1.0) in each dimension + +Default = 0 ++
+dump all atom forces to a file every this many timesteps +forces are also dumped at the start and end of every run +any previous file is closed +new filename can exist, will be overwritten +value of 0 means never dump + +Default = 0 ++
+dump all atom velocities to a file every this many timesteps +velocities are also dumped at the start and end of every run +any previous file is closed +new filename can exist, will be overwritten +value of 0 means never dump + +Default = 0 ++
+styles: ++
+coeffs: none + no other parameters required (use "none" as 1st parameter) + setforce + (1) x component of set force (in force units) + (2) y component of set force (in force units) + (3) z component of set force (in force units) + addforce + (1) x component of added force (in force units) + (2) y component of added force (in force units) + (3) z component of added force (in force units) + aveforce + (1) x comp of added average force per atom (in force units) + (2) y comp of added average force per atom (in force units) + (3) z comp of added average force per atom (in force units) + rescale + (1) desired T at beginning of run + (2) desired T at end of run + (3) check for rescaling every this many timesteps + (4) T window outside of which velocities will be rescaled + langevin + (1) desired T at beginning of run + (2) desired T at end of run + (3) Langevin damping parameter (inverse time units) + (4) random seed to use for white noise (0 < seed <= 8 digits) + (5) 0/1 = off/on x dimension + (6) 0/1 = off/on y dimension + (7) 0/1 = off/on z dimension + nose/hoover + (1) desired T at beginning of run + (2) desired T at end of run + (3) frequency constant for friction force (inverse time units) + springforce + (1) x position of spring origin + (2) y position + (3) z position + (4) force constant k (so that k*distance = force units) + dragforce + (1) x position to drag atom towards + (2) y position + (3) z position + (4) force magnitude f (in force units) + (5) delta outside of which to apply force (in distance units) + +define a constraint +cannot skip a constraint number, all must be used before a run is performed +use appropriate number of coeffs for a particular style +which atoms the constraint will affect is set by the "assign fix" command +all of the constraints (except for rescale) are applied every timestep +all specified temperatures are in temperature units +for style setforce, a coeff of NULL means do not alter that force component +for style aveforce, average force on the group of fixed atoms is computed, + then new average force is added in and actual force on each atom is set + to new total value -> has effect of applying same force to entire group + of atoms +thermostatting constraints (rescale, langevin, nose/hoover) cannot be used in + conjuction with global "temp control", since they conflict and will + cause atom velocities to be reset twice +if multiple Langevin constraints are specified the Marsaglia RNG will + only use the last RNG seed specified for initialization +meaning of thermostatting coefficients is same as in "temp control" command +style springforce is designed to be applied to an entire group of atoms + en masse (e.g. an umbrella force on an entire molecule) +for style springforce, the center of mass r0 of the group of atoms is computed, + then a restoring force = -k*(r-r0)*mass/masstotal is applied to each + atom in the group where mass = mass of the atom and masstotal = mass of + all the atoms in the group - thus "k" should represent the total + force on the group of atoms (not per atom) +for style springforce, a xyz position of NULL means do not include that + dimension in the distance or force computation +for style dragforce, apply a drag force of magnitude f to each atom in the + group in the direction (r-r0) where r0 = (x,y,z) - do not apply the force if + the atom is within a distance delta of r0 +for style dragforce, a xyz position of NULL means do not include that + dimension in the distance or force computation + +Default = none ++
+define style of improper interactions to use for all trigonal centers +in class2 case, dictates that angle-angle terms be included for all + trigonal and tetrahedral centers +in above formulas, phi = improper torsion, chi = Wilson out-of-plane +improper style determines how many improper coefficients the program + expects to find in a "Improper Coeffs" entry in the data file, + thus the style must be set (if not using default) + before using the "read data" command (if the data file contains a + "Improper Coeffs" entry) +coefficients for all improper types must be defined in data (or restart) + file by "Improper Coeffs" entry before a run is performed +style of "none" erases all previously defined improper coefficients, must + reset style to something else before defining new coefficients + +Default = harmonic ++
+name of file to write minimization iteration info to +filename can exist, will be overwritten when minimization occurs +if no file is specified, no minimization output will be written to a file + +Default = none ++
+choose minimization algorithm to use when "minimize" command is performed +currently, only htfn style is available + +Default = htfn ++
+perform an energy minimization of the atomic coordinates of the system +uses algorithm selected with "min style" command +minimization stops if any of 3 criteria are met: + (1) largest force component < stopping tolerance + (2) # of iterations > max iterations + (3) # of force and energy evaluations > max evaluations +for good convergence, should specify use of smooth nonbond force fields + that have continuous second derivatives, set "coulomb style" to "smooth", + set nonbond style to "lj/smooth" or use a long cutoff ++
+styles: ++
+determine the kind of mixing rule that is applied to generate nonbond + coefficients for interactions between type i and type j atoms +mixing rules are used only when nonbond coeffs are input in a "read data" file +for nonbond style "soft", only epsilons (prefactor A) are input - they are + always mixed geometrically, regardless of mixing style setting + +Default = geometric for all nonbond styles except class2/cutoff + sixthpower for nonbond style class2/cutoff ++
+factors that affect how and when neighbor lists are constructed +skin must be large enough that all atoms needed for bond + interactions are also acquired by interprocessor communication +last parameter incurs extra checking and communication to test against + skin thickness, but may mean neighbor list is created less often +when RESPA is run, the 3rd and 4th parameters refer to the + nonbond (short-range) timestepping +defaults = 2.0 0 1 10 1 ++
+turn off or on Newton's 3rd law for bond and non-bond force computation ++
+no Newton's 3rd law means more force computation and less communication +yes Newton's 3rd law means less force computation and more communication +which choice is faster is problem dependent on N, # of processors, + and cutoff length(s) +expect for round-off errors, setting this flag should not affect answers, + only run time +must be set before data or restart file is read + +Default = 3 ++
+coeffs: lj/cutoff + (1) epsilon (energy units) + (2) sigma (distance units) + (3) cutoff (distance units) + lj/smooth + (1) epsilon (energy units) + (2) sigma (distance units) + (3) inner cutoff (distance units) + (4) outer cutoff (distance units) + lj/shift + (1) epsilon (energy units) + (2) sigma (distance units) + (3) delta shift distance (distance units) + (4) cutoff (distance units) + soft + (1) prefactor A at start of run (energy units) + (2) prefactor A at end of run (energy units) + (3) cutoff (distance units) + class2/cutoff + (1) epsilon (energy units) + (2) sigma (distance units) + (3) cutoff (distance units) + +define (or override) nonbond coefficients for an individual atom type pair +use appropriate number of coeffs for a particular style +1st atom type must be <= 2nd atom type +all cutoffs are in global units, not local sigma units + (e.g. in reduced units a setting of "lj/cutoff 1.0 1.2 2.5" means a + cutoff of 2.5, not 1.2*2.5) +turn off a particular type pair interaction by setting the + cutoff to 0.0 (both cutoffs to zero for lj/smooth option) +for soft style, prefactor A is ramped from starting value to + ending value during run +these coefficients (except the cutoffs) can also be set in data file + by "Nonbond Coeffs" entry and associated mixing rules, the cutoffs can + be set (globally) via the "nonbond style" command, the most + recently defined coefficients/cutoffs are used + +Default = no settings ++
+styles: ++
+coeffs: none + no other parameters required + lj/cutoff + (1) cutoff (distance units) + (2) offset flag (0 or 1) + lj/smooth + (1) inner cutoff (distance units) + (2) outer cutoff (distance units) + lj/shift + (1) cutoff (distance units) + (2) offset flag (0 or 1) + soft + (1) cutoff (distance units) + class2/cutoff + (1) cutoff (distance units) + (2) offset flag (0 or 1) + +define style of pairwise nonbond interactions to use between all atom types +use appropriate number of coeffs for a particular style +this is separate from charge interactions (see "coulomb style" command) +nonbond style determines how many nonbond coefficients the program expects to + find in a "Nonbond Coeffs" entry in the data file or when using the + "nonbond coeff" command, thus the style must be set (if not using default) + before using the "read data" command (if the data file contains a + "Nonbond Coeffs" entry) +coefficients for all atom type pairs must be defined in data (or restart) + file by "Nonbond Coeffs" entry or by "nonbond coeffs" commands before a run + is performed +style of "none" erases all previously defined nonbond coefficients, must + reset style to something else before defining new coefficients +for all styles (except none), this command sets the cutoff(s) for all type + pair interactions, thus overriding any previous settings by a "nonbond + coeff" command or that were read in from a restart file +for lj/cutoff, lj/shift, class2/cutoff styles, + offset flag only affects printout of thermodynamic energy + (not forces or dynamics), determines whether offset energy + is added in to LJ potential to make value at cutoff = 0.0, + flag = 0 -> do not add in offset energy, + flag = 1 -> add in offset energy +for lj/smooth style, outer cutoff must be > inner cutoff +for lj/smooth style, atom pairs less than the inner cutoff distance use + straight LJ, pairs between inner and outer use a smoothed LJ, and the + potential goes to 0.0 at the outer cutoff +for lj/smooth style, energy and forces are continuous at inner cutoff and go + smoothly to zero at outer cutoff +for lj/shift and soft styles, must set "coulomb style" to "none" +for lj/shift style, delta shift distances for each atom pair are set by + "Nonbond Coeffs" entry in data file or by "nonbond coeffs" command +for soft style, values of the prefactor "A", which is ramped from one + value to another during the run, are set by "Nonbond Coeffs" entry + in data file or by "nonbond coeffs" command + +Default = lj/cutoff 10.0 0 ++
+turn on/off periodicity in any of three dimensions +used in inter-particle distance computation and when particles move + to map (or not map) them back into periodic box +for a 2-d run (see "dimension" command), 3rd parameter must be + specified, but doesn't matter if it is 0 or 1 +must be set before data or restart file is read + +Default = 0 0 0 (periodic in all dimensions) ++
+specify the mesh size used by coulomb style pppm +mesh dimensions that are power-of-two are fastest for FFTs, but any size + can be used that are supported by native machine libraries +this command is optional - if not used, a default + mesh size will be chosen to satisfy accuracy criterion - if used, the + specifed mesh size will override the default + +Default = none ++
+specify the order of the interpolation function that is used by coulomb + style pppm to map particle charge to the particle mesh +order is roughly equivalent to how many mesh points a point charge + overlaps onto + +Default = 5 ++
+styles: ++
+coeffs: none + no other parameters required + nose/hoover + (1) desired P at beginning of run + (2) desired P at end of run + (3) frequency constant for volume adjust (inverse time units) + +use appropriate number of coeffs for a particular style +all specified pressures are in pressure units +target pressure at intermediate points during run is a ramped value + between the beginning and ending pressure +for nose/hoover style, frequency constant is like an inverse "piston" + mass which determines how rapidly the pressure fluctuates in response to a + restoring force, large frequency -> small mass -> rapid fluctations +for nose/hoover style, units of frequency/damping constant are + inverse time, so a value of 0.001 means relax in a timespan on the + order of 1000 fmsec (real units) or 1000 tau (LJ units) + +Default = none ++
+styles: ++
+coeffs: none + no other parameters required + nose/hoover + (1) desired P at beginning of run + (2) desired P at end of run + (3) frequency constant for volume adjust (inverse time units) + +commands for anisotropic pressure control, any combination is allowed +for a component with style = none, the cell dimension in that direction + is held constant (constant volume) +use appropriate number of coeffs for a particular style +all specified pressures are in pressure units +target pressure at intermediate points during run is a ramped value + between the beginning and ending pressure +cannot be used with isotropic "press control" command +for nose/hoover style, frequency constant is like an inverse "piston" + mass which determines how rapidly the pressure fluctuates in response to a + restoring force, large frequency -> small mass -> rapid fluctations +for nose/hoover style, units of frequency/damping constant are + inverse time, so a value of 0.001 means relax in a timespan on the + order of 1000 fmsec (real units) or 1000 tau (LJ units) + +Default = none ++
+specify 3-d grid of processors to map to physical simulation domain +for 2-d problem, specify N by M by 1 grid +program will choose these values to best map processor grid to physical + simulation box, only use this command if wish to override program choice +product of 3 parameters must equal total # of processors +must be set before data or restart file is read + +Default = none ++
+read the initial atom positions and bond info from the specified file +the format for the data file is specified in the file data_format +if a "Coeffs" entry is in data file, the appropriate "style" command + command must be used first (unless default setting is used) to tell + LAMMPS how many coefficients to expect +most "Coeffs" entries must be present in this file if a particular "style" + is desired, an exception are the "Nonbond Coeffs" and "Bond Coeffs" entries + which can be omitted if all the settings are made via "nonbond coeff" + and "bond coeff" commands +a "Nonbond Coeffs" entry only contains one set of coefficients for each + atom type, after being read-in the appropriate class I or class II mixing + rules are applied to compute the cross-type coefficients (see the file + data_format for more information) ++
+read atom positions and velocities and nonbond and bond coefficients + from specified file +allows continuation of a previous run +file is binary to enable exact restarts +do not have to restart on same # of processors, but can only do exact + restarts on same # of processors +when restart file is read, warnings are issued if certain parameters + in the restart file do not match current settings (e.g. newton flag, + dimension, periodicity, units) - this usually indicates an error +the restart file stores all nonbond and many-body styles and coefficients, + so reading the file will overwrite any current settings +the restart file stores the constraint assignments for each atom, but + not the constraints themselves, so they must still be specified with + the "fix style" command +for a restart do not use the "read data" and "create temp" commands ++
+explicitly reset the timestep to this value +the "read data" and "read restart" commands set the timestep to zero + and file value respectively, so this should be done after those commands ++
+factors that affect sub-cycling of force calculations within RESPA hierarchy +bonded intramolecular forces are calculated every innermost sub-timestep +bonded 3- and 4-body forces are computed every 1st parameter sub-timesteps +short-range nonbond pairwise forces (LJ, Coulombic) are computed every + (2nd parameter * 1st parameter) sub-timesteps +long-range (Ewald, PPPM) forces are computed every + (3rd parameter * 2nd parameter * 1st parameter) sub-timesteps +the timestepping for all 3 inner loops (bond, 3/4-body, nonbond) is performed + as sub-cycling within the long-range timestepping loop +the fastest (innermost) timestep size is set by the "timestep" command +when running RESPA, all input commands that specify numbers of timesteps + (e.g. run, thermo flag, restart flag, etc) refer to the outermost loop + of long-range timestepping +the only exception to this rule is the "neighbor" command, where the timestep + parameters refer to the nonbond (short-range) timestepping +setting all 3 parameters to 1 turns off RESPA + +Default = 1 1 1 (no RESPA) ++
+create a restart file every this many timesteps +value of 0 means never create one +program will toggle between 2 filenames as the run progresses + so always have at least one good file even if the program dies in mid-write +restart file stores atom positions and velocities in binary form +allows program to restart from where it left off (see "read restart" commmand) + +Default = 0 ++
+run or continue dynamics for specified # of timesteps +must have performed "read data"/"create temp" or "read restart" + commands first ++
+weighting factors to turn on/off nonbond interactions of atom pairs that + are "close" in the molecular topology +1st nearest neighbors are a pair of atoms connected by a bond +2nd nearest neighbors are a pair of atoms 2 hops away, etc. +weight values are from 0.0 to 1.0 and are used to multiply the + energy and force interaction (both Coulombic and LJ) between the 2 atoms +weight of 0.0 means no interaction +weight of 1.0 means full interaction + +Default = 0.0 0.0 0.4 (CHARMM standard) ++
+styles: ++
+coeffs: none + no other parameters required + rescale + (1) desired T at beginning of run + (2) desired T at end of run + (3) check for rescaling every this many timesteps + (4) T window outside of which velocities will be rescaled + replace + (1) desired T at beginning of run + (2) desired T at end of run + (3) do Gaussian replacement every this many timesteps + (4) random # seed to use for replacement (0 < seed <= 8 digits) + langevin + (1) desired T at beginning of run + (2) desired T at end of run + (3) Langevin damping parameter (inverse time units) + (4) random seed to use for white noise (0 < seed <= 8 digits) + nose/hoover + (1) desired T at beginning of run + (2) desired T at end of run + (3) frequency constant for friction force (inverse time units) + +use appropriate number of coeffs for a particular style +all specified temperatures are in temperature units +target temperature at intermediate points during run is a ramped value + between the beginning and ending temperatures +for rescale style, temperature is controlled by explicitly rescaling + velocities to exactly the target temperature +for rescale style, rescaling is only done if current temperature is + beyond the target temperature plus or minus the window value +for replace style, Gaussian RNs from the Marsaglia RNG are used +for langevin style, uniform RNs from the Marsaglia RNG are used +for replace and langevin styles, the seed is used to initialize the + Marsaglia RNG, on successive runs the RNG will just continue on +for replace and langevin styles, generated RNs depend on # of processors + so will not get same answers independent of # of processors +for replace and langevin styles, RNG states are not saved in restart file, + so cannot do an exact restart +for langevin style, damping parameter means small value -> less damping +for nose/hoover style, frequency constant is like an inverse "piston" + mass which determines how rapidly the temperature fluctuates in response to a + restoring force, large frequency -> small mass -> rapid fluctations +for langevin and nose/hoover styles, units of frequency/damping constant are + inverse time, so a value of 0.01 means relax in a timespan on the + order of 100 fmsec (real units) or 100 tau (LJ units) + +Default = none ++
+print thermodynamic info to screen and log file every this many timesteps +value of 0 means never print + +Default = 0 ++
+determines format of thermodynamic output to screen and log file ++
+Default = 0 ++
+timestep size for MD run (time units) +when RESPA is run, the timestep size is for the innermost (bond) loop + +Default = 1.0 ++
+read atom positions (see "read data" command) and dump atom positions + (see "dump flag" command) in one of 2 formats ++
+for each dimension, box count of "n" means add that many box lengths + to get "true" un-remapped position, "n" can be positive, negative, or zero + +Default = 0 ++
+set units to one of two options for all subsequent input parameters + +option real = conventional units: ++
+option lj = LJ reduced units: ++
+for LJ units, LAMMPS sets global epsilon,sigma,mass all equal to 1.0 +subsequent input numbers in data and command file must be in these units +output numbers to screen and log and dump files will be in these units +must be set before data or restart file is read + +Default = real ++ + diff --git a/doc/src/99/units.html b/doc/src/99/units.html new file mode 100644 index 0000000000..bddf47e0eb --- /dev/null +++ b/doc/src/99/units.html @@ -0,0 +1,119 @@ + + + + + + +
+Return to top-level LAMMPS documentation.
++This file describes the units associated with many of the key variables +and equations used inside the LAMMPS code. Units used for input command +parameters are described in the input_commands file. The input command +"units" selects between conventional and Lennard-Jones units. +See the force_fields file for more information on units for the force +field parameters that are input from data files.
++Conventional units:
++LJ reduced units:
++This listing of variables assumes conventional units; to convert to LJ +reduced units, simply substitute the appropriate term from the list +above. E.g. x is in sigmas in LJ units. Per-mole in any of the units +simply means for 6.023 x 10^23 atoms.
++
++Meaning Variable Units + +positions x Angstroms +velocities v Angstroms / click (see below) +forces f Kcal / (mole - Angstrom) +masses mass gram / mole +charges q electron units (-1 for an electron) + (1 e.u. = 1.602 x 10^-19 coul) + +time --- clicks (1 click = 48.88821 fmsec) +timestep dt clicks +input timestep dt_in fmsec +time convert dtfactor 48.88821 fmsec / click + +temperature t_current degrees K + t_start + t_stop +input damping t_freq_in inverse fmsec +internal temp t_freq inverse clicks + damping + +dielec const dielectric 1.0 (unitless) +Boltmann const boltz 0.001987191 Kcal / (mole - degree K) + +virial virial[xyz] Kcal/mole = r dot F +pressure factor pfactor 68589.796 (convert internal to atmospheres) +internal p_current Kcal / (mole - Angs^3) + pressure p_start + p_stop +input press p_start_in atmospheres + p_stop_in +output press log file atmospheres +input damping p_freq_in inverse time +internal press p_freq inverse clicks + damping + +pot eng e_potential Kcal/mole +kin eng e_kinetic Kcal/mole +eng convert efactor 332.0636 (Kcal - Ang) / (q^2 - mole) + (convert Coulomb eng to Kcal/mole) + +LJ coeffs lja,ljb Kcal-Angs^(6,12)/mole + +bond various see force_fields file + parameters 2,3,4-body + terms ++ + diff --git a/doc/src/Developer/classes.fig b/doc/src/Developer/classes.fig new file mode 100644 index 0000000000..a2d9b6d6f1 --- /dev/null +++ b/doc/src/Developer/classes.fig @@ -0,0 +1,198 @@ +#FIG 3.2 Produced by xfig version 3.2.5a +Portrait +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 2232 1170 3540 1170 3540 1505 2232 1505 2232 1170 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 2220 1830 3015 1830 3015 2219 2220 2219 2220 1830 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 2226 3285 3300 3285 3300 3665 2226 3665 2226 3285 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 2223 5190 3225 5190 3225 5525 2223 5525 2223 5190 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 2232 7125 3090 7125 3090 7478 2232 7478 2232 7125 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 2226 10230 3300 10230 3300 10565 2226 10565 2226 10230 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4026 10305 4980 10305 4980 10592 4026 10592 4026 10305 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4029 9900 5205 9900 5205 10250 4029 10250 4029 9900 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4038 9315 5370 9315 5370 9659 4038 9659 4038 9315 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4023 8955 4530 8955 4530 9278 4023 9278 4023 8955 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4029 8475 5190 8475 5190 8762 4029 8762 4029 8475 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4008 8115 5430 8115 5430 8408 4008 8408 4008 8115 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4026 7425 4995 7425 4995 7712 4026 7712 4026 7425 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4035 6720 4650 6720 4650 7025 4035 7025 4035 6720 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4044 7080 4830 7080 4830 7358 4044 7358 4044 7080 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4032 6105 5205 6105 5205 6419 4032 6419 4032 6105 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4026 5715 5115 5715 5115 6062 4026 6062 4026 5715 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4023 3585 4605 3585 4605 3872 4023 3872 4023 3585 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3954 1680 5175 1680 5175 1997 3954 1997 3954 1680 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 2.00 120.00 240.00 + 1620 5235 2100 615 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 2.00 120.00 240.00 + 1605 5445 2070 10695 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 2.00 120.00 240.00 + 3120 1935 3855 1800 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 2.00 120.00 240.00 + 3150 2115 3765 2250 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 2.00 120.00 240.00 + 3135 7230 3945 6840 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 2.00 120.00 240.00 + 3150 7335 3945 8610 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 2.00 120.00 240.00 + 5265 8610 6195 8400 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 2.00 120.00 240.00 + 5280 8655 6180 8820 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 2.00 120.00 240.00 + 3345 10290 3930 10020 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 2.00 120.00 240.00 + 3360 10395 3930 10425 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 2.00 120.00 240.00 + 3360 10455 3930 10755 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 2193 360 3435 360 3435 647 2193 647 2193 360 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 2.00 120.00 240.00 + 3398 3472 3923 3307 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 2.00 120.00 240.00 + 3413 3601 3923 3721 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 2.00 120.00 240.00 + 3285 2806 3870 2802 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 2.00 120.00 240.00 + 3315 5372 3900 5368 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 6354 2280 7470 2280 7470 2585 6354 2585 6354 2280 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 6348 1875 7320 1875 7320 2222 6348 2222 6348 1875 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3954 2070 5505 2070 5505 2372 3954 2372 3954 2070 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 2.00 120.00 240.00 + 5634 2137 6230 2045 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 2.00 120.00 240.00 + 5670 2310 6265 2418 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3900 2640 5400 2640 5400 2975 3900 2975 3900 2640 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4038 3165 5385 3165 5385 3497 4038 3497 4038 3165 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4245 4110 5730 4110 5730 4499 4245 4499 4245 4110 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4233 4545 6390 4545 6390 4862 4233 4862 4233 4545 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4026 5190 5385 5190 5385 5525 4026 5525 4026 5190 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4038 7755 5310 7755 5310 8075 4038 8075 4038 7755 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 6270 8250 7365 8250 7365 8610 6270 8610 6270 8250 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 6273 8655 7380 8655 7380 8978 6273 8978 6273 8655 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4041 10620 5985 10620 5985 10943 4041 10943 4041 10620 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 2217 10830 3135 10830 3135 11156 2217 11156 2217 10830 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 2229 9780 3240 9780 3240 10118 2229 10118 2229 9780 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 2214 9015 3285 9015 3285 9362 2214 9362 2214 9015 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 2208 5850 3420 5850 3420 6209 2208 6209 2208 5850 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 2217 4275 3615 4275 3615 4634 2217 4634 2217 4275 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 2235 2655 3150 2655 3150 3000 2235 3000 2235 2655 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 60 5115 1500 5115 1500 5610 60 5610 60 5115 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 2.00 120.00 240.00 + 3486 6018 4011 5853 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 2.00 120.00 240.00 + 3486 6129 3996 6249 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 2.00 120.00 240.00 + 3361 9291 3991 9531 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 2.00 120.00 240.00 + 3345 9129 4005 9099 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 2.00 120.00 240.00 + 3691 4412 4216 4277 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 2.00 120.00 240.00 + 3695 4561 4175 4711 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 2220 735 3129 735 3129 1043 2220 1043 2220 735 +4 0 1 50 -1 18 18 0.0000 4 225 1275 2265 1455 Universe\001 +4 0 1 50 -1 18 18 0.0000 4 285 735 2265 2175 Input\001 +4 0 1 50 -1 18 18 0.0000 4 225 780 2265 2925 Atom\001 +4 0 1 50 -1 18 18 0.0000 4 285 1020 2265 3600 Update\001 +4 0 1 50 -1 18 18 0.0000 4 285 1320 2265 4575 Neighbor\001 +4 0 1 50 -1 18 18 0.0000 4 225 945 2265 5475 Comm\001 +4 0 1 50 -1 18 18 0.0000 4 225 1110 2265 6150 Domain\001 +4 0 1 50 -1 18 18 0.0000 4 225 810 2265 7425 Force\001 +4 0 1 50 -1 18 18 0.0000 4 285 975 2265 9300 Modify\001 +4 0 1 50 -1 18 18 0.0000 4 285 900 2265 10050 Group\001 +4 0 1 50 -1 18 18 0.0000 4 285 990 2265 10500 Output\001 +4 0 1 50 -1 18 18 0.0000 4 225 825 2265 11100 Timer\001 +4 0 0 50 -1 18 18 0.0000 4 225 1170 3990 1950 Variable\001 +4 0 4 50 -1 18 18 0.0000 4 225 1470 3990 2325 Command\001 +4 0 4 50 -1 18 18 0.0000 4 285 1275 4065 3450 Integrate\001 +4 0 4 50 -1 18 18 0.0000 4 225 525 4065 3825 Min\001 +4 0 0 50 -1 18 18 0.0000 4 285 1230 4065 5475 Irregular\001 +4 0 4 50 -1 18 18 0.0000 4 285 1020 4065 6000 Region\001 +4 0 0 50 -1 18 18 0.0000 4 225 975 4065 6375 Lattice\001 +4 0 4 50 -1 18 18 0.0000 4 225 435 4065 9225 Fix\001 +4 0 4 50 -1 18 18 0.0000 4 285 1305 4065 9600 Compute\001 +4 0 4 50 -1 18 18 0.0000 4 225 570 4065 6975 Pair\001 +4 0 4 50 -1 18 18 0.0000 4 285 840 4065 7665 Angle\001 +4 0 4 50 -1 18 18 0.0000 4 225 1215 4065 8010 Dihedral\001 +4 0 4 50 -1 18 18 0.0000 4 285 1305 4065 8355 Improper\001 +4 0 4 50 -1 18 18 0.0000 4 285 1095 4065 8700 KSpace\001 +4 0 4 50 -1 18 18 0.0000 4 285 855 4065 10545 Dump\001 +4 0 0 50 -1 18 18 0.0000 4 225 1815 4065 10890 WriteRestart\001 +4 0 0 50 -1 18 18 0.0000 4 225 930 6315 8550 FFT3D\001 +4 0 0 50 -1 18 18 0.0000 4 285 1005 6315 8925 Remap\001 +4 0 0 50 -1 18 18 0.0000 4 225 885 6390 2175 Finish\001 +4 0 0 50 -1 18 18 0.0000 4 285 1050 6390 2550 Special\001 +4 0 4 50 -1 18 18 0.0000 4 225 1305 3990 2925 AtomVec\001 +4 0 4 50 -1 18 18 0.0000 4 225 765 4065 7320 Bond\001 +4 0 0 50 -1 18 18 0.0000 4 225 1095 4065 10200 Thermo\001 +4 0 0 50 -1 18 18 0.0000 4 285 1380 4305 4425 NeighList\001 +4 0 0 50 -1 18 18 0.0000 4 285 2025 4305 4800 NeighRequest\001 +4 0 1 50 -1 18 18 0.0000 4 285 1155 2250 600 Memory\001 +4 0 0 50 -1 18 18 0.0000 4 225 1305 120 5475 LAMMPS\001 +4 0 1 50 -1 18 18 0.0000 4 225 735 2265 1005 Error\001 diff --git a/doc/src/Developer/classes.pdf b/doc/src/Developer/classes.pdf new file mode 100644 index 0000000000..566089ac9e Binary files /dev/null and b/doc/src/Developer/classes.pdf differ diff --git a/doc/src/Developer/developer.pdf b/doc/src/Developer/developer.pdf new file mode 100644 index 0000000000..3cef2c9d8d Binary files /dev/null and b/doc/src/Developer/developer.pdf differ diff --git a/doc/src/Developer/developer.tex b/doc/src/Developer/developer.tex new file mode 100644 index 0000000000..3ba9018fb9 --- /dev/null +++ b/doc/src/Developer/developer.tex @@ -0,0 +1,698 @@ +\documentclass{article} +\usepackage{graphicx} + +\begin{document} + +\centerline{\Large \bf LAMMPS Developer Guide} +\centerline{\bf 23 Aug 2011} + +\vspace{0.5in} + +This document is a developer guide to the LAMMPS molecular dynamics +package, whose WWW site is at lammps.sandia.gov. It describes the +internal structure and algorithms of the code. Sections will be added +as we have time, and in response to requests from developers and +users. + +\tableofcontents + +\pagebreak +\section{LAMMPS source files} + +LAMMPS source files are in two directories of the distribution +tarball. The src directory has the majority of them, all of which are +C++ files (*.cpp and *.h). Many of these files are in the src +directory itself. There are also dozens of "packages", which can be +included or excluded when LAMMPS is built. See the +doc/Section\_build.html section of the manual for more information +about packages, or type "make" from within the src directory, which +lists package-related commands, such as ``make package-status''. The +source files for each package are in an all-uppercase sub-directory of +src, like src/MOLECULE or src/USER-CUDA. If the package is currently +installed, copies of the package source files will also exist in the +src directory itself. The src/STUBS sub-directory is not a package +but contains a dummy version of the MPI library, used when building a +serial version of the code. + +The lib directory also contains source code for external libraries, +used by a few of the packages. Each sub-directory, like meam or gpu, +contains the source files, some of which are in different languages +such as Fortran. The files are compiled into libraries from within +each sub-directory, e.g. performing a "make" in the lib/meam directory +creates a libmeam.a file. These libraries are linked to during a +LAMMPS build, if the corresponding package is installed. + +LAMMPS C++ source files almost always come in pairs, such as run.cpp +and run.h. The pair of files defines a C++ class, the Run class in +this case, which contains the code invoked by the "run" command in a +LAMMPS input script. As this example illustrates, source file and +class names often have a one-to-one correspondence with a command used +in a LAMMPS input script. Some source files and classes do not have a +corresponding input script command, e.g. force.cpp and the Force +class. They are discussed in the next section. + +\pagebreak +\section{Class hierarchy of LAMMPS} + +Though LAMMPS has a lot of source files and classes, its class +hierarchy is quite simple, as outlined in Fig \ref{fig:classes}. Each +boxed name refers to a class and has a pair of associated source files +in lammps/src, e.g. memory.cpp and memory.h. More details on the +class and its methods and data structures can be found by examining +its *.h file. + +LAMMPS (lammps.cpp/h) is the top-level class for the entire code. It +holds an "instance" of LAMMPS and can be instantiated one or more +times by a calling code. For example, the file src/main.cpp simply +instantiates one instance of LAMMPS and passes it the input script. + +The file src/library.cpp contains a C-style library interface to the +LAMMPS class. See the lammps/couple and lammps/python directories for +examples of simple programs that use LAMMPS through its library +interface. A driver program can instantiate the LAMMPS class multiple +times, e.g. to embed several atomistic simulation regions within a +mesoscale or continuum simulation domain. + +There are a dozen or so top-level classes within the LAMMPS class that +are visible everywhere in the code. They are shaded blue in Fig +\ref{fig:classes}. Thus any class can refer to the y-coordinate of +local atom $I$ as atom$\rightarrow$x[i][1]. This visibility is +enabled by a bit of cleverness in the Pointers class (see +src/pointers.h) which every class inherits from. + +There are a handful of virtual parent classes in LAMMPS that define +what LAMMPS calls "styles". They are shaded red in Fig +\ref{fig:classes}. Each of these are parents of a number of child +classes that implement the interface defined by the parent class. For +example, the fix style has around 100 child classes. They are the +possible fixes that can be specified by the fix command in an input +script, e.g. fix nve, fix shake, fix ave/time, etc. The corresponding +classes are Fix (for the parent class), FixNVE, FixShake, FixAveTime, +etc. The source files for these classes are easy to identify in the +src directory, since they begin with the word "fix", e,g, +fix\_nve.cpp, fix\_shake,cpp, fix\_ave\_time.cpp, etc. + +The one exception is child class files for the "command" style. These +implement specific commands in the input script that can be invoked +before/after/between runs or which launch a simulation. Examples are +the create\_box, minimize, run, and velocity commands which encode the +CreateBox, Minimize, Run, and Velocity classes. The corresponding +files are create\_box,cpp, minimize.cpp, run.cpp, and velocity.cpp. +The list of command style files can be found by typing "grep +COMMAND\_CLASS *.h" from within the src directory, since that word in +the header file identifies the class as an input script command. +Similar words can be grepped to list files for the other LAMMPS +styles. E.g. ATOM\_CLASS, PAIR\_CLASS, BOND\_CLASS, REGION\_CLASS, +FIX\_CLASS, COMPUTE\_CLASS, DUMP\_CLASS, etc. + +\begin{figure}[htb] + \begin{center} + \includegraphics[height=4in]{classes.pdf} + \end{center} + \caption{Class hierarchy within LAMMPS source code.} +\label{fig:classes} +\end{figure} + +More details on individual classes in Fig \ref{fig:classes} are as +follows: + +\begin{itemize} + +\item The Memory class handles allocation of all large vectors and + arrays. + +\item The Error class prints all error and warning messages. + +\item The Universe class sets up partitions of processors so that + multiple simulations can be run, each on a subset of the processors + allocated for a run, e.g. by the mpirun command. + +\item The Input class reads an input script, stores variables, and + invokes stand-alone commands that are child classes of the Command + class. + +\item As discussed above, the Command class is a parent class for + certain input script commands that perform a one-time operation + before/after/between simulations or which invoke a simulation. They + are instantiated from within the Input class, invoked, then + immediately destructed. + +\item The Finish class is instantiated to print statistics to the + screen after a simulation is performed, by commands like run and + minimize. + +\item The Special class walks the bond topology of a molecular system + to find 1st, 2nd, 3rd neighbors of each atom. It is invoked by + several commands, like read\_data, read\_restart, and replicate. + +\item The Atom class stores all per-atom arrays. More precisely, they + are allocated and stored by the AtomVec class, and the Atom class + simply stores a pointer to them. The AtomVec class is a parent + class for atom styles, defined by the atom\_style command. + +\item The Update class holds an integrator and a minimizer. The + Integrate class is a parent style for the Verlet and rRESPA time + integrators, as defined by the run\_style input command. The Min + class is a parent style for various energy minimizers. + +\item The Neighbor class builds and stores neighbor lists. The + NeighList class stores a single list (for all atoms). The + NeighRequest class is called by pair, fix, or compute styles when + they need a particular kind of neighbor list. + +\item The Comm class performs interprocessor communication, typically + of ghost atom information. This usually involves MPI message + exchanges with 6 neighboring processors in the 3d logical grid of + processors mapped to the simulation box. Sometimes the Irregular + class is used, when atoms may migrate to arbitrary processors. + +\item The Domain class stores the simulation box geometry, as well as + geometric Regions and any user definition of a Lattice. The latter + are defined by region and lattice commands in an input script. + +\item The Force class computes various forces between atoms. The Pair + parent class is for non-bonded or pair-wise forces, which in LAMMPS + lingo includes many-body forces such as the Tersoff 3-body + potential. The Bond, Angle, Dihedral, Improper parent classes are + styles for bonded interactions within a static molecular topology. + The KSpace parent class is for computing long-range Coulombic + interactions. One of its child classes, PPPM, uses the FFT3D and + Remap classes to communicate grid-based information with neighboring + processors. + +\item The Modify class stores lists of Fix and Compute classes, both + of which are parent styles. + +\item The Group class manipulates groups that atoms are assigned to + via the group command. It also computes various attributes of + groups of atoms. + +\item The Output class is used to generate 3 kinds of output from a + LAMMPS simulation: thermodynamic information printed to the screen + and log file, dump file snapshots, and restart files. These + correspond to the Thermo, Dump, and WriteRestart classes + respectively. The Dump class is a parent style. + +\item The Timer class logs MPI timing information, output at the end + of a run. + +\end{itemize} + +%%\pagebreak +%%\section{Spatial decomposition and parallel operations} +%%distributed memory +%%Ref to JCP paper +%%diagram of 3d grid of procs and spatial decomp +%%6-way comm +%%ghost atoms, PBC added when comm (in atom class) + +%%\pagebreak +%%\section{Fixes, computes, variables} +%%fixes intercolate in timestep, store per-atom info +%%computes based on current snapshot +%%equal- and atom-style variables +%%output they produce - see write-up in HowTo + +\pagebreak +\section{How a timestep works} + +The first and most fundamental operation within LAMMPS to understand +is how a timestep is structured. Timestepping is performed by the +Integrate class within the Update class. Since Integrate is a parent +class, corresponding to the run\_style input script command, it has +child classes. In this section, the timestep implemented by the +Verlet child class is described. A similar timestep is implemented by +the Respa child class, for the rRESPA hierarchical timestepping +method. The Min parent class performs energy minimization, so does +not perform a literal timestep. But it has logic similar to what is +described here, to compute forces and invoke fixes at each iteration +of a minimization. Differences between time integration and +minimization are highlighted at the end of this section. + +The Verlet class is encoded in the src/verlet.cpp and verlet.h files. +It implements the velocity-Verlet timestepping algorithm. The +workhorse method is Verlet::run(), but first we highlight several +other methods in the class. + +\begin{itemize} + +\item The init() method is called at the beginning of each dynamics + run. It simply sets some internal flags, based on user settings in + other parts of the code. + +\item The setup() or setup\_minimal() methods are also called before + each run. The velocity-Verlet method requires current forces be + calculated before the first timestep, so these routines compute + forces due to all atomic interactions, using the same logic that + appears in the timestepping described next. A few fixes are also + invoked, using the mechanism described in the next section. Various + counters are also initialized before the run begins. The + setup\_minimal() method is a variant that has a flag for performing + less setup. This is used when runs are continued and information + from the previous run is still valid. For example, if repeated + short LAMMPS runs are being invoked, interleaved by other commands, + via the ``pre no'' and ``every'' options of the run command, the + setup\_minimal() method is used. + +\item The force\_clear() method initializes force and other arrays to + zero before each timestep, so that forces (torques, etc) can be + accumulated. + +\end{itemize} + +Now for the Verlet::run() method. Its structure in hi-level pseudo +code is shown in Fig \ref{fig:verlet}. In the actual code in +src/verlet.cpp some of these operations are conditionally invoked. + +\begin{figure}[htb] + \begin{center} + \begin{verbatim} +loop over N timesteps: + ev_set() + + fix->initial_integrate() + fix->post_integrate() + + nflag = neighbor->decide() + if nflag: + fix->pre_exchange() + domain->pbc() + domain->reset_box() + comm->setup() + neighbor->setup_bins() + comm->exchange() + comm->borders() + fix->pre_neighbor() + neighbor->build() + else + comm->forward_comm() + + force_clear() + fix->pre_force() + + pair->compute() + bond->compute() + angle->compute() + dihedral->compute() + improper->compute() + kspace->compute() + + comm->reverse_comm() + + fix->post_force() + fix->final_integrate() + fix->end_of_step() + + if any output on this step: output->write() + \end{verbatim} + \end{center} + \caption{Pseudo-code for the Verlet::run() method.} +\label{fig:verlet} +\end{figure} + +The ev\_set() method (in the parent Integrate class), sets two flags +({\em eflag} and {\em vflag}) for energy and virial computation. Each +flag encodes whether global and/or per-atom energy and virial should +be calculated on this timestep, because some fix or variable or output +will need it. These flags are passed to the various methods that +compute particle interactions, so that they can skip the extra +calculations if the energy and virial are not needed. See the +comments with the Integrate::ev\_set() method which document the flag +values. + +At various points of the timestep, fixes are invoked, +e.g. fix$\rightarrow$initial\_integrate(). In the code, this is +actually done via the Modify class which stores all the Fix objects +and lists of which should be invoked at what point in the timestep. +Fixes are the LAMMPS mechanism for tailoring the operations of a +timestep for a particular simulation. As described elsewhere +(unwritten section), each fix has one or more methods, each of which +is invoked at a specific stage of the timestep, as in Fig +\ref{fig:verlet}. All the fixes defined in an input script with an +initial\_integrate() method are invoked at the beginning of each +timestep. Fix nve, nvt, npt are examples, since they perform the +start-of-timestep velocity-Verlet integration to update velocities by +a half-step, and coordinates by a full step. The post\_integrate() +method is next. Only a few fixes use this, e.g. to reflect particles +off box boundaries in the FixWallReflect class. + +The decide() method in the Neighbor class determines whether neighbor +lists need to be rebuilt on the current timestep. If not, coordinates +of ghost atoms are acquired by each processor via the forward\_comm() +method of the Comm class. If neighbor lists need to be built, several +operations within the inner if clause of Fig \ref{fig:verlet} are +first invoked. The pre\_exchange() method of any defined fixes is +invoked first. Typically this inserts or deletes particles from the +system. + +Periodic boundary conditions are then applied by the Domain class via +its pbc() method to remap particles that have moved outside the +simulation box back into the box. Note that this is not done every +timestep. but only when neighbor lists are rebuilt. This is so that +each processor's sub-domain will have consistent (nearby) atom +coordinates for its owned and ghost atoms. It is also why dumped atom +coordinates can be slightly outside the simulation box. + +The box boundaries are then reset (if needed) via the reset\_box() +method of the Domain class, e.g. if box boundaries are shrink-wrapped +to current particle coordinates. A change in the box size or shape +requires internal information for communicating ghost atoms (Comm +class) and neighbor list bins (Neighbor class) be updated. The +setup() method of the Comm class and setup\_bins() method of the +Neighbor class perform the update. + +The code is now ready to migrate atoms that have left a processor's +geometric sub-domain to new processors. The exchange() method of the +Comm class performs this operation. The borders() method of the Comm +class then identifies ghost atoms surrounding each processor's +sub-domain and communicates ghost atom information to neighboring +processors. It does this by looping over all the atoms owned by a +processor to make lists of those to send to each neighbor processor. +On subsequent timesteps, the lists are used by the +Comm::forward\_comm() method. + +Fixes with a pre\_neighbor() method are then called. These typically +re-build some data structure stored by the fix that depends on the +current atoms owned by each processor. + +Now that each processor has a current list of its owned and ghost +atoms, LAMMPS is ready to rebuild neighbor lists via the build() +method of the Neighbor class. This is typically done by binning all +owned and ghost atoms, and scanning a stencil of bins around each +owned atom's bin to make a Verlet list of neighboring atoms within the +force cutoff plus neighbor skin distance. + +In the next portion of the timestep, all interaction forces between +particles are computed, after zeroing the per-atom force vector via +the force\_clear() method. If the newton flag is set to ``on'' by the +newton command, forces on both owned and ghost atoms are calculated. + +Pairwise forces are calculated first, which enables the global virial +(if requested) to be calculated cheaply (at the end of the +Pair::compute() method), by a dot product of atom coordinates and +forces. By including owned and ghost atoms in the dot product, the +effect of periodic boundary conditions is correctly accounted for. +Molecular topology interactions (bonds, angles, dihedrals, impropers) +are calculated next. The final contribution is from long-range +Coulombic interactions, invoked by the KSpace class. + +If the newton flag is on, forces on ghost atoms are communicated and +summed back to their corresponding owned atoms. The reverse\_comm() +method of the Comm class performs this operation, which is essentially +the inverse operation of sending copies of owned atom coordinates to +other processor's ghost atoms. + +At this point in the timestep, the total force on each atom is known. +Additional force constraints (external forces, SHAKE, etc) are applied +by Fixes that have a post\_force() method. The second half of the +velocity-Verlet integration is then performed (another half-step +update of the velocities) via fixes like nve, nvt, npt. + +At the end of the timestep, fixes that define an end\_of\_step() +method are invoked. These typically perform a diagnostic calculation, +e.g. the ave/time and ave/spatial fixes. The final operation of the +timestep is to perform any requested output, via the write() method of +the Output class. There are 3 kinds of LAMMPS output: thermodynamic +output to the screen and log file, snapshots of atom data to a dump +file, and restart files. See the thermo\_style, dump, and restart +commands for more details. + +The iteration performed by an energy minimization is similar to the +dynamics timestep of Fig \ref{fig:verlet}. Forces are computed, +neighbor lists are built as needed, atoms migrate to new processors, +and atom coordinates and forces are communicated to neighboring +processors. The only difference is what Fix class operations are +invoked when. Only a subset of LAMMPS fixes are useful during energy +minimization, as explained in their individual doc pages. The +relevant Fix class methods are min\_pre\_exchange(), +min\_pre\_force(), and min\_post\_force(). Each is invoked at the +appropriate place within the minimization iteration. For example, the +min\_post\_force() method is analogous to the post\_force() method for +dynamics; it is used to alter or constrain forces on each atom, which +affects the minimization procedure. + +\pagebreak +\section{Extending LAMMPS} + +The Section\_modify.html file in the doc directory of +the LAMMPS distribution gives an overview of how LAMMPS can +be extended by writing new classes that derive from existing +parent classes in LAMMPS. Here, some specific coding +details are provided for writing a new fix. + +\subsection{New fixes} + +(this section provided by Kirill Lykov) +\vspace{0.25cm} + +Writing fixes is a flexible way of extending LAMMPS. Users can +implement many things using fixes: + +\begin{itemize} +\item changing particles attributes (positions, velocities, forces, etc.). +Example: FixFreeze. +\item reading/writing data. Example: FixRestart. +\item implementing boundary conditions. Example: FixWall. +\item saving information about particles for future use (previous positions, +for instance). Example: FixStoreState. +\end{itemize} + +All fixes are derived from class Fix and must have constructor with the +signature: FixMine(class LAMMPS *, int, char **). + +Every fix must be registered in LAMMPS by writing the following lines +of code in the header before include guards: + + \begin{center} + \begin{verbatim} +#ifdef FIX_CLASS +FixStyle(your/fix/name,FixMine) +#else + \end{verbatim} + \end{center} + +Where "your/fix/name" is a name of your fix in the script and FixMine +is the name of the class. This code allows LAMMPS to find your fix +when it parses input script. In addition, your fix header must be +included in the file "style\_fix.h". In case if you use LAMMPS make, +this file is generated automatically - all files starting with prefix +fix\_ are included, so call your header the same way. Otherwise, donÕt +forget to add your include into "style\_fix.h". + +Let's write a simple fix which will print average velocity at the end +of each timestep. First of all, implement a constructor: + + \begin{center} + \begin{verbatim} +FixPrintVel::FixPrintVel(LAMMPS *lmp, int narg, char **arg) +: Fix(lmp, narg, arg) +{ + if (narg < 4) + error->all(FLERR,"Illegal fix print command"); + + nevery = atoi(arg[3]); + if (nevery <= 0) + error->all(FLERR,"Illegal fix print command"); +} + \end{verbatim} + \end{center} + +In the constructor you should parse your fix arguments which are +specified in the script. All fixes have pretty the same syntax: fix +[fix\_identifier] [group\_name] [fix\_name] [fix\_arguments]. The +first 3 parameters are parsed by Fix class constructor, while +[fix\_arguments] should be parsed by you. In our case, we need to +specify how often we want to print an average velocity. For instance, +once in 50 timesteps: fix 1 print/vel 50. There is a special variable +in Fix class called nevery which specifies how often method +end\_of\_step() is called. Thus all we need to do is just set it up. + +The next method we need to implement is setmask(): +\begin{center} +\begin{verbatim} +int FixPrintVel::setmask() +{ + int mask = 0; + mask |= FixConst::END_OF_STEP; + return mask; +} +\end{verbatim} +\end{center} + +Here user specifies which methods of your fix should be called during +the execution. For instance, END\_OF\_STEP corresponds to the +end\_of\_step() method. Overall, there are 8 most important methods, +methods are called in predefined order during the execution of the +verlet algorithm as was mentioned in the Section 3: + +\begin{itemize} +\item initial\_integrate() +\item post\_integrate() +\item pre\_exchange() +\item pre\_neighbor() +\item pre\_force() +\item post\_force() +\item final\_integrate() +\item end\_of\_step() +\end{itemize} + +Fix developer must understand when he wants to execute his code. In +case if we want to write FixPrintVel, we need only end\_of\_step(): + +\begin{center} +\begin{verbatim} +void FixPrintVel::end_of_step() +{ + // for add3, scale3 + using namespace MathExtra; + + double** v = atom->v; + int nlocal = atom->nlocal; + double localAvgVel[4]; // 4th element for particles count + memset(localAvgVel, 0, 4 * sizeof(double)); + for (int particleInd = 0; particleInd < nlocal; ++particleInd) { + add3(localAvgVel, v[particleInd], localAvgVel); + } + localAvgVel[3] = nlocal; + double globalAvgVel[4]; + memset(globalAvgVel, 0, 4 * sizeof(double)); + MPI_Allreduce(localAvgVel, globalAvgVel, 4, MPI_DOUBLE, MPI_SUM, world); + scale3(1.0 / globalAvgVel[3], globalAvgVel); + if (comm->me == 0) { + printf("\%e, \%e, \%e\n", + globalAvgVel[0], globalAvgVel[1], globalAvgVel[2]); + } +} +\end{verbatim} +\end{center} + +In the code above, we use MathExtra routines defined in +"math\_extra.h". There are bunch of math functions to work with +arrays of doubles as with math vectors. + +In this code we use an instance of Atom class. This object is stored +in the Pointers class (see "pointers.h"). This object contains all +global information about the simulation system. Data from Pointers +class available to all classes inherited from it using protected +inheritance. Hence when you write you own class, which is going to use +LAMMPS data, don't forget to inherit from Pointers. When writing +fixes we inherit from class Fix which is inherited from Pointers so +there is no need to inherit from it directly. + +The code above computes average velocity for all particles in the +simulation. Yet you have one unused parameter in fix call from the +script - [group\_name]. This parameter specifies the group of atoms +used in the fix. So we should compute average for all particles in the +simulation if group\_name == all, but it can be any group. The group +information is specified by groupbit which is defined in class Fix: + +\begin{center} +\begin{verbatim} +for (int particleInd = 0; particleInd < nlocal; ++particleInd) { + if (atom->mask[particleInd] & groupbit) { + //Do all job here + } +} +\end{verbatim} +\end{center} + +Class Atom encapsulates atoms positions, velocities, forces, etc. User +can access them using particle index. Note, that particle indexes are +usually changed every timestep because of sorting. + +Lets consider another Fix example. We want to have a fix which stores +atoms position from previous time step in your fix. The local atoms +indexes will not be valid on the next iteration. In order to handle +this situation there are several methods which should be implemented: + +\begin{itemize} +\item \verb|double memory_usage| - return how much memory fix uses +\item \verb|void grow_arrays(int)| - do reallocation of the per particle arrays + in your fix +\item \verb|void copy_arrays(int i, int j)| - copy i-th per-particle information + to j-th. Used when atoms sorting is performed +\item \verb|void set_arrays(int i)| - sets i-th particle related information to zero +\end{itemize} + +Note, that if your class implements these methods, it must call add calls of +add\_callback and delete\_callback to constructor and destructor: + +\begin{center} +\begin{verbatim} +FixSavePos::FixSavePos(LAMMPS *lmp, int narg, char **arg) { + //... + atom->add_callback(0); +} + +FixSavePos::~FixSavePos() { + atom->delete_callback(id, 0); +} +\end{verbatim} +\end{center} + +Since we want to store positions of atoms from previous timestep, we +need to add double** x to the header file. Than add allocation code to +constructor: + +\verb|memory->create(this->x, atom->nmax, 3, "FixSavePos:x");|. Free memory +at destructor: \verb|memory->destroy(x);| + +Finally, implement mentioned methods: + +\begin{center} +\begin{verbatim} +double FixSavePos::memory_usage() +{ + int nmax = atom->nmax; + double bytes = 0.0; + bytes += nmax * 3 * sizeof(double); + return bytes; +} + +void FixSavePos::grow_arrays(int nmax) +{ + memory->grow(this->x, nmax, 3, "FixSavePos:x"); +} + +void FixSavePos::copy_arrays(int i, int j) +{ + memcpy(this->x[j], this->x[i], sizeof(double) * 3); +} + +void FixSavePos::set_arrays(int i) +{ + memset(this->x[i], 0, sizeof(double) * 3); +} + +int FixSavePos::pack_exchange(int i, double *buf) +{ + int m = 0; + buf[m++] = x[i][0]; + buf[m++] = x[i][1]; + buf[m++] = x[i][2]; + + return m; +} + +int FixSavePos::unpack_exchange(int nlocal, double *buf) +{ + int m = 0; + x[nlocal][0] = buf[m++]; + x[nlocal][1] = buf[m++]; + x[nlocal][2] = buf[m++]; + + return m; +} +\end{verbatim} +\end{center} + +Now, a little bit about memory allocation. We used Memory class which +is just a bunch of template functions for allocating 1D and 2D +arrays. So you need to add include "memory.h" to have access to them. + +Finally, if you need to write/read some global information used in +your fix to the restart file, you might do it by setting flag +restart\_global = 1 in the constructor and implementing methods void +write\_restart(FILE *fp) and void restart(char *buf). + +\end{document} diff --git a/doc/src/PDF/PDLammps_EPS.pdf b/doc/src/PDF/PDLammps_EPS.pdf new file mode 100644 index 0000000000..65b313719c Binary files /dev/null and b/doc/src/PDF/PDLammps_EPS.pdf differ diff --git a/doc/src/PDF/PDLammps_VES.pdf b/doc/src/PDF/PDLammps_VES.pdf new file mode 100644 index 0000000000..6875e23a55 Binary files /dev/null and b/doc/src/PDF/PDLammps_VES.pdf differ diff --git a/doc/src/PDF/PDLammps_overview.pdf b/doc/src/PDF/PDLammps_overview.pdf new file mode 100644 index 0000000000..965f842bab Binary files /dev/null and b/doc/src/PDF/PDLammps_overview.pdf differ diff --git a/doc/src/PDF/SMD_LAMMPS_userguide.pdf b/doc/src/PDF/SMD_LAMMPS_userguide.pdf new file mode 100644 index 0000000000..50a5b7bb66 Binary files /dev/null and b/doc/src/PDF/SMD_LAMMPS_userguide.pdf differ diff --git a/doc/src/PDF/SPH_LAMMPS_userguide.pdf b/doc/src/PDF/SPH_LAMMPS_userguide.pdf new file mode 100755 index 0000000000..7ca4a72910 Binary files /dev/null and b/doc/src/PDF/SPH_LAMMPS_userguide.pdf differ diff --git a/doc/src/PDF/colvars-refman-lammps.pdf b/doc/src/PDF/colvars-refman-lammps.pdf new file mode 100644 index 0000000000..83b51844f2 Binary files /dev/null and b/doc/src/PDF/colvars-refman-lammps.pdf differ diff --git a/doc/src/PDF/kspace.pdf b/doc/src/PDF/kspace.pdf new file mode 100755 index 0000000000..9b4946f81c Binary files /dev/null and b/doc/src/PDF/kspace.pdf differ diff --git a/doc/src/PDF/pair_gayberne_extra.pdf b/doc/src/PDF/pair_gayberne_extra.pdf new file mode 100644 index 0000000000..c82233992d Binary files /dev/null and b/doc/src/PDF/pair_gayberne_extra.pdf differ diff --git a/doc/src/PDF/pair_gayberne_extra.tex b/doc/src/PDF/pair_gayberne_extra.tex new file mode 100644 index 0000000000..5f0d97d7ab --- /dev/null +++ b/doc/src/PDF/pair_gayberne_extra.tex @@ -0,0 +1,167 @@ +\documentstyle[12pt]{article} + +\begin{document} + +\begin{center} + +\large{Additional documentation for the Gay-Berne ellipsoidal potential \\ + as implemented in LAMMPS} + +\end{center} + +\centerline{Mike Brown, Sandia National Labs, April 2007} + +\vspace{0.3in} + +The Gay-Berne anisotropic LJ interaction between pairs of dissimilar +ellipsoidal particles is given by + +$$ U ( \mathbf{A}_1, \mathbf{A}_2, \mathbf{r}_{12} ) = U_r ( +\mathbf{A}_1, \mathbf{A}_2, \mathbf{r}_{12}, \gamma ) \cdot \eta_{12} ( +\mathbf{A}_1, \mathbf{A}_2, \upsilon ) \cdot \chi_{12} ( \mathbf{A}_1, +\mathbf{A}_2, \mathbf{r}_{12}, \mu ) $$ + +where $\mathbf{A}_1$ and $\mathbf{A}_2$ are the transformation +matrices from the simulation box frame to the body frame and +$\mathbf{r}_{12}$ is the center to center vector between the +particles. $U_r$ controls the shifted distance dependent interaction +based on the distance of closest approach of the two particles +($h_{12}$) and the user-specified shift parameter gamma: + +$$ U_r = 4 \epsilon ( \varrho^{12} - \varrho^6) $$ + +$$ \varrho = \frac{\sigma}{ h_{12} + \gamma \sigma} $$ + +Let the shape matrices $\mathbf{S}_i=\mbox{diag}(a_i, b_i, c_i)$ be +given by the ellipsoid radii. The $\eta$ orientation-dependent energy +based on the user-specified exponent $\upsilon$ is given by + +$$ \eta_{12} = [ \frac{ 2 s_1 s_2 }{\det ( \mathbf{G}_{12} )}]^{ +\upsilon / 2 } , $$ + +$$ s_i = [a_i b_i + c_i c_i][a_i b_i]^{ 1 / 2 }, $$ + +and + +$$ \mathbf{G}_{12} = \mathbf{A}_1^T \mathbf{S}_1^2 \mathbf{A}_1 + +\mathbf{A}_2^T \mathbf{S}_2^2 \mathbf{A}_2 = \mathbf{G}_1 + +\mathbf{G}_2. $$ + +Let the relative energy matrices $\mathbf{E}_i = \mbox{diag} +(\epsilon_{ia}, \epsilon_{ib}, \epsilon_{ic})$ be given by +the relative well depths (dimensionless energy scales +inversely proportional to the well-depths of the respective +orthogonal configurations of the interacting molecules). The +$\chi$ orientation-dependent energy based on the user-specified +exponent $\mu$ is given by + +$$ \chi_{12} = [2 \hat{\mathbf{r}}_{12}^T \mathbf{B}_{12}^{-1} +\hat{\mathbf{r}}_{12}]^\mu, $$ + +$$ \hat{\mathbf{r}}_{12} = { \mathbf{r}_{12} } / |\mathbf{r}_{12}|, $$ + +and + +$$ \mathbf{B}_{12} = \mathbf{A}_1^T \mathbf{E}_1^2 \mathbf{A}_1 + +\mathbf{A}_2^T \mathbf{E}_2^2 \mathbf{A}_2 = \mathbf{B}_1 + +\mathbf{B}_2. $$ + +Here, we use the distance of closest approach approximation given by the +Perram reference, namely + +$$ h_{12} = r - \sigma_{12} ( \mathbf{A}_1, \mathbf{A}_2, +\mathbf{r}_{12} ), $$ + +$$ r = |\mathbf{r}_{12}|, $$ + +and + +$$ \sigma_{12} = [ \frac{1}{2} \hat{\mathbf{r}}_{12}^T +\mathbf{G}_{12}^{-1} \hat{\mathbf{r}}_{12}.]^{ -1/2 } $$ + +Forces and Torques: Because the analytic forces and torques have not +been published for this potential, we list them here: + +$$ \mathbf{f} = - \eta_{12} ( U_r \cdot { \frac{\partial \chi_{12} +}{\partial r} } + \chi_{12} \cdot { \frac{\partial U_r }{\partial r} } +) $$ + +where the derivative of $U_r$ is given by (see Allen reference) + +$$ \frac{\partial U_r }{\partial r} = \frac{ \partial U_{SLJ} }{ +\partial r } \hat{\mathbf{r}}_{12} + r^{-2} \frac{ \partial U_{SLJ} }{ +\partial \varphi } [ \mathbf{\kappa} - ( \mathbf{\kappa}^T \cdot +\hat{\mathbf{r}}_{12}) \hat{\mathbf{r}}_{12} ], $$ + +$$ \frac{ \partial U_{SLJ} }{ \partial \varphi } = 24 \epsilon ( 2 +\varrho^{13} - \varrho^7 ) \sigma_{12}^3 / 2 \sigma, $$ + +$$ \frac{ \partial U_{SLJ} }{ \partial r } = 24 \epsilon ( 2 +\varrho^{13} - \varrho^7 ) / \sigma, $$ + +and + +$$ \mathbf{\kappa} = \mathbf{G}_{12}^{-1} \cdot \mathbf{r}_{12}. $$ + +The derivate of the $\chi$ term is given by + +$$ \frac{\partial \chi_{12} }{\partial r} = - r^{-2} \cdot 4.0 \cdot [ +\mathbf{\iota} - ( \mathbf{\iota}^T \cdot \hat{\mathbf{r}}_{12} ) +\hat{\mathbf{r}}_{12} ] \cdot \mu \cdot \chi_{12}^{ ( \mu -1 ) / \mu +}, $$ + +and + +$$ \mathbf{\iota} = \mathbf{B}_{12}^{-1} \cdot \mathbf{r}_{12}. $$ + +The torque is given by: + +$$ \mathbf{\tau}_i = U_r \eta_{12} \frac{ \partial \chi_{12} }{ +\partial \mathbf{q}_i } + \chi_{12} ( U_r \frac{ \partial \eta_{12} }{ +\partial \mathbf{q}_i } + \eta_{12} \frac{ \partial U_r }{ \partial +\mathbf{q}_i } ), $$ + +$$ \frac{ \partial U_r }{ \partial \mathbf{q}_i } = \mathbf{A}_i \cdot +(- \mathbf{\kappa}^T \cdot \mathbf{G}_i \times \mathbf{f}_k ), $$ + +$$ \mathbf{f}_k = - r^{-2} \frac{ \delta U_{SLJ} }{ \delta \varphi } +\mathbf{\kappa}, $$ + +and + +$$ \frac{ \partial \chi_{12} }{ \partial \mathbf{q}_i } = 4.0 \cdot +r^{-2} \cdot \mathbf{A}_i (- \mathbf{\iota}^T \cdot \mathbf{B}_i +\times \mathbf{\iota} ). $$ + +For the derivative of the $\eta$ term, we were unable to find a matrix +expression due to the determinant. Let $a_{mi}$ be the mth row of the +rotation matrix $A_i$. Then, + +$$ \frac{ \partial \eta_{12} }{ \partial \mathbf{q}_i } = \mathbf{A}_i +\cdot \sum_m \mathbf{a}_{mi} \times \frac{ \partial \eta_{12} }{ +\partial \mathbf{a}_{mi} } = \mathbf{A}_i \cdot \sum_m \mathbf{a}_{mi} +\times \mathbf{d}_{mi}, $$ + +where $d_mi$ represents the mth row of a derivative matrix $D_i$, + +$$ \mathbf{D}_i = - \frac{1}{2} \cdot ( \frac{2s1s2}{\det ( +\mathbf{G}_{12} ) } )^{ \upsilon / 2 } \cdot {\frac{\upsilon}{\det ( +\mathbf{G}_{12} ) }} \cdot \mathbf{E}, $$ + +where the matrix $E$ gives the derivate with respect to the rotation +matrix, + +$$ \mathbf{E} = [ e_{my} ] = \frac{ \partial \eta_{12} }{ \partial +\mathbf{A}_i }, $$ + +and + +$$ e_{my} = \det ( \mathbf{G}_{12} ) \cdot \mbox{trace} [ +\mathbf{G}_{12}^{-1} \cdot ( \hat{\mathbf{p}}_y \otimes \mathbf{a}_m + +\mathbf{a}_m \otimes \hat{\mathbf{p}}_y ) \cdot s_{mm}^2 ]. $$ + +Here, $p_v$ is the unit vector for the axes in the lab frame $(p1=[1, 0, +0], p2=[0, 1, 0], and p3=[0, 0, 1])$ and $s_{mm}$ gives the mth radius of +the ellipsoid $i$. + +\end{document} diff --git a/doc/src/PDF/pair_resquared_extra.pdf b/doc/src/PDF/pair_resquared_extra.pdf new file mode 100644 index 0000000000..c7956b37ee Binary files /dev/null and b/doc/src/PDF/pair_resquared_extra.pdf differ diff --git a/doc/src/PDF/pair_resquared_extra.tex b/doc/src/PDF/pair_resquared_extra.tex new file mode 100644 index 0000000000..945ee562d7 --- /dev/null +++ b/doc/src/PDF/pair_resquared_extra.tex @@ -0,0 +1,113 @@ +\documentstyle[12pt]{article} + +\begin{document} + +\begin{center} + +\large{Additional documentation for the RE-squared ellipsoidal potential \\ + as implemented in LAMMPS} + +\end{center} + +\centerline{Mike Brown, Sandia National Labs, October 2007} + +\vspace{0.3in} + +Let the shape matrices $\mathbf{S}_i=\mbox{diag}(a_i, b_i, c_i)$ be +given by the ellipsoid radii. Let the relative energy matrices +$\mathbf{E}_i = \mbox{diag} (\epsilon_{ia}, \epsilon_{ib}, +\epsilon_{ic})$ be given by the relative well depths +(dimensionless energy scales inversely proportional to the well-depths +of the respective orthogonal configurations of the interacting molecules). +Let $\mathbf{A}_1$ and $\mathbf{A}_2$ be the transformation matrices +from the simulation box frame to the body frame and $\mathbf{r}$ +be the center to center vector between the particles. Let $A_{12}$ be +the Hamaker constant for the interaction given in LJ units by +$A_{12}=4\pi^2\epsilon_{\mathrm{LJ}}(\rho\sigma^3)^2$. + +\vspace{0.3in} + +The RE-squared anisotropic interaction between pairs of +ellipsoidal particles is given by + +$$ U=U_A+U_R, $$ + +$$ U_\alpha=\frac{A_{12}}{m_\alpha}(\frac\sigma{h})^{n_\alpha} +(1+o_\alpha\eta\chi\frac\sigma{h}) \times \prod_i{ +\frac{a_ib_ic_i}{(a_i+h/p_\alpha)(b_i+h/p_\alpha)(c_i+h/p_\alpha)}}, $$ + +$$ m_A=-36, n_A=0, o_A=3, p_A=2, $$ + +$$ m_R=2025, n_R=6, o_R=45/56, p_R=60^{1/3}, $$ + +$$ \chi = 2 \hat{\mathbf{r}}^T \mathbf{B}^{-1} +\hat{\mathbf{r}}, $$ + +$$ \hat{\mathbf{r}} = { \mathbf{r} } / |\mathbf{r}|, $$ + +$$ \mathbf{B} = \mathbf{A}_1^T \mathbf{E}_1 \mathbf{A}_1 + +\mathbf{A}_2^T \mathbf{E}_2 \mathbf{A}_2 $$ + +$$ \eta = \frac{ \det[\mathbf{S}_1]/\sigma_1^2+ +det[\mathbf{S}_2]/\sigma_2^2}{[\det[\mathbf{H}]/ +(\sigma_1+\sigma_2)]^{1/2}}, $$ + +$$ \sigma_i = (\hat{\mathbf{r}}^T\mathbf{A}_i^T\mathbf{S}_i^{-2} +\mathbf{A}_i\hat{\mathbf{r}})^{-1/2}, $$ + +$$ \mathbf{H} = \frac{1}{\sigma_1}\mathbf{A}_1^T \mathbf{S}_1^2 \mathbf{A}_1 + +\frac{1}{\sigma_2}\mathbf{A}_2^T \mathbf{S}_2^2 \mathbf{A}_2 $$ + + +Here, we use the distance of closest approach approximation given by the +Perram reference, namely + +$$ h = |r| - \sigma_{12}, $$ + +$$ \sigma_{12} = [ \frac{1}{2} \hat{\mathbf{r}}^T +\mathbf{G}^{-1} \hat{\mathbf{r}}]^{ -1/2 }, $$ + +and + +$$ \mathbf{G} = \mathbf{A}_1^T \mathbf{S}_1^2 \mathbf{A}_1 + +\mathbf{A}_2^T \mathbf{S}_2^2 \mathbf{A}_2 $$ + +\vspace{0.3in} + +The RE-squared anisotropic interaction between a +ellipsoidal particle and a Lennard-Jones sphere is defined +as the $\lim_{a_2->0}U$ under the constraints that +$a_2=b_2=c_2$ and $\frac{4}{3}\pi a_2^3\rho=1$: + +$$ U_{\mathrm{elj}}=U_{A_{\mathrm{elj}}}+U_{R_{\mathrm{elj}}}, $$ + +$$ U_{\alpha_{\mathrm{elj}}}=(\frac{3\sigma^3c_\alpha^3} +{4\pi h_{\mathrm{elj}}^3})\frac{A_{12_{\mathrm{elj}}}} +{m_\alpha}(\frac\sigma{h_{\mathrm{elj}}})^{n_\alpha} +(1+o_\alpha\chi_{\mathrm{elj}}\frac\sigma{h_{\mathrm{elj}}}) \times +\frac{a_1b_1c_1}{(a_1+h_{\mathrm{elj}}/p_\alpha) +(b_1+h_{\mathrm{elj}}/p_\alpha)(c_1+h_{\mathrm{elj}}/p_\alpha)}, $$ + +$$ A_{12_{\mathrm{elj}}}=4\pi^2\epsilon_{\mathrm{LJ}}(\rho\sigma^3), $$ + +with $h_{\mathrm{elj}}$ and $\chi_{\mathrm{elj}}$ calculated as above +by replacing $B$ with $B_{\mathrm{elj}}$ and $G$ with $G_{\mathrm{elj}}$: + +$$ \mathbf{B}_{\mathrm{elj}} = \mathbf{A}_1^T \mathbf{E}_1 \mathbf{A}_1 + I, $$ + +$$ \mathbf{G}_{\mathrm{elj}} = \mathbf{A}_1^T \mathbf{S}_1^2 \mathbf{A}_1.$$ + +\vspace{0.3in} + +The interaction between two LJ spheres is calculated as: + +$$ + U_{\mathrm{lj}} = 4 \epsilon \left[ \left(\frac{\sigma}{|\mathbf{r}|}\right)^{12} - + \left(\frac{\sigma}{|\mathbf{r}|}\right)^6 \right] +$$ + +\vspace{0.3in} + +The analytic derivatives are used for all force and torque calculation. + +\end{document} diff --git a/doc/src/USER/atc/man_add_molecule.html b/doc/src/USER/atc/man_add_molecule.html new file mode 100644 index 0000000000..99270c7276 --- /dev/null +++ b/doc/src/USER/atc/man_add_molecule.html @@ -0,0 +1,59 @@ + + + + +
fix_modify_AtC add_molecule <small|large> <TAG> <GROUP_NAME>
+
group WATERGROUP type 1 2
+ fix_modify AtC add_molecule small water WATERGROUP
+
Associates a tag with all molecules corresponding to a specified group.
+
No defaults for this command.
+fix_modify_AtC add_species <TAG> <group|type> <ID>
+
fix_modify AtC add_species gold type 1
+ group GOLDGROUP type 1
+ fix_modify AtC add_species gold group GOLDGROUP
Associates a tag with all atoms of a specified type or within a specified group.
+
No defaults for this command.
+fix_modify AtC atom_element_map <eulerian|lagrangian> <frequency>
+
fix_modify atc atom_element_map eulerian 100
Changes frame of reference from eulerian to lagrangian and sets the frequency for which the map from atoms to elements is reformed and all the attendant data is recalculated.
+Cannot change map type after initialization.
+lagrangian
+fix_modify AtC atom_weight <method> <arguments>
+ fix_modify atc atom_weight constant myatoms 11.8
+ fix_modify atc atom_weight lattice
+ fix_modify atc atom_weight read-in atm_wt_file.txt
+
Command for assigning the value of atomic weights used for atomic integration in atom-continuum coupled simulations.
+Use of lattice option requires a lattice type and parameter is already specified.
+lattice
+fix_modify AtC <include | omit> atomic_charge
+ fix_modify atc compute include atomic_charge
Determines whether AtC tracks the total charge as a finite element field
+Required for: electrostatics
+if the atom charge is defined, default is on, otherwise default is off
+fix_modify AtC boundary type <atom-type-id>
+ fix_modify AtC boundary type ghost_atoms
Command to define the atoms that represent the ficticious boundary internal to the FE mesh. For fully overlapped MD/FE domains with periodic boundary conditions no boundary atoms should be defined.
+none
+fix_modify AtC boundary_dynamics < on | damped_harmonic | prescribed | coupled | none > [args]
+
Sets different schemes for controlling boundary atoms. On will integrate the boundary atoms using the velocity-verlet algorithm. Damped harmonic uses a mass/spring/dashpot for the boundary atoms with added arguments of the damping and spring constants followed by the ratio of the boundary type mass to the desired mass. Prescribed forces the boundary atoms to follow the finite element displacement. Coupled does the same.
+Boundary atoms must be specified. When using swaps between internal and boundary atoms, the initial configuration must have already correctly partitioned the two.
+prescribed on
+fix_modify AtC boundary_faceset <is | add> [args]
+fix_modify AtC boundary_faceset is obndy
+This command species the faceset name when using a faceset to compute the MD/FE boundary fluxes. The faceset must already exist.
+This is only valid when fe_md_boundary is set to faceset.
+fix_modify AtC output boundary_integral [field] faceset [name]
+ fix_modify AtC output boundary_integral stress faceset loop1
+
Calculates a surface integral of the given field dotted with the outward normal of the faces and puts output in the "GLOBALS" file
+Must be used with the hardy/field type of AtC fix ( see fix atc command )
+none
+fix_modify AtC consistent_fe_initialization <on | off>
+ fix_modify atc consistent_fe_initialization on
Determines whether AtC initializes FE intrinsic fields (e.g., temperature) to match the projected MD values. This is particularly useful for fully overlapping simulations.
+Can be used with: thermal, two_temperature. Cannot be used with time filtering on. Does not include boundary nodes.
+Default is off
+fix_modify AtC output contour_integral [field] faceset [name] <axis [x | y | z ]>
+ fix_modify AtC output contour_integral stress faceset loop1
+
Calculates a surface integral of the given field dotted with the outward normal of the faces and puts output in the "GLOBALS" file
+Must be used with the hardy/field type of AtC fix ( see fix atc command )
+none
+fix_modify AtC control <physics_type> <solution_parameter>
+
+
fix_modify AtC transfer <physics_type> control max_iterations <max_iterations>
+
fix_modify AtC transfer <physics_type> control tolerance <tolerance>
+
fix_modify AtC control thermal max_iterations 10
+ fix_modify AtC control momentum tolerance 1.e-5
+
Sets the numerical parameters for the matrix solvers used in the specified control algorithm. Many solution approaches require iterative solvers, and these methods enable users to provide the maximum number of iterations and the relative tolerance.
+only for be used with specific controllers : thermal, momentum
+ They are ignored if a lumped solution is requested
max_iterations is the number of rows in the matrix
+ tolerance is 1.e-10
fix_modify AtC control momentum none
+
fix_modify AtC control momentum rescale <frequency>
+
fix_modify AtC control momentum glc_displacement
+
fix_modify AtC control momentum glc_velocity
+
fix_modify AtC control momentum hoover
+
fix_modify AtC control momentum flux [faceset face_set_id, interpolate]
+fix_modify AtC control momentum glc_velocity
+ fix_modify AtC control momentum flux faceset bndy_faces
+
only to be used with specific transfers : elastic
+ rescale not valid with time filtering activated
none
+fix_modify AtC control thermal <control_type> <optional_args>
+fix_modify AtC control thermal rescale <frequency>
+
fix_modify AtC control thermal hoover
+
fix_modify AtC control thermal flux <boundary_integration_type(optional)> <face_set_id(optional)>
+
fix_modify AtC control thermal none
+ fix_modify AtC control thermal rescale 10
+ fix_modify AtC control thermal hoover
+ fix_modify AtC control thermal flux
+ fix_modify AtC control thermal flux faceset bndy_faces
+
Sets the energy exchange mechansim from the finite elements to the atoms, managed through a control algorithm. Rescale computes a scale factor for each atom to match the finite element temperature. Hoover is a Gaussian least-constraint isokinetic thermostat enforces that the nodal restricted atomic temperature matches the finite element temperature. Flux is a similar mode, but rather adds energy to the atoms based on conservation of energy. Hoover and flux allows the prescription of sources or fixed temperatures on the atoms.
+only for be used with specific transfers : thermal (rescale, hoover, flux), two_temperature (flux)
+ rescale not valid with time filtering activated
none
+ rescale frequency is 1
+ flux boundary_integration_type is interpolate
fix_modify AtC control thermal correction_max_iterations <max_iterations>
+ fix_modify AtC control thermal correction_max_iterations 10
+
Sets the maximum number of iterations to compute the 2nd order in time correction term for lambda with the fractional step method. The method uses the same tolerance as the controller's matrix solver.
+only for use with thermal physics using the fractional step method.
+correction_max_iterations is 20
+fix_modify AtC decomposition <type>
+ fix_modify atc decomposition distributed_memory
+
Command for assigning the distribution of work and memory for parallel runs.
+replicated_memory is appropriate for simulations were the number of nodes << number of atoms
+replicated_memory
+fix_modify AtC extrinsic electron_integration <integration_type> <num_subcyle_steps(optional)>
+
fix_modify AtC extrinsic electron_integration implicit
+ fix_modify AtC extrinsic electron_integration explicit 100
+
Switches between integration scheme for the electron temperature. The number of subcyling steps used to integrate the electron temperature 1 LAMMPS timestep can be manually adjusted to capture fast electron dynamics.
+For use only with two_temperature type of AtC fix ( see fix atc command )
+
implicit
+ subcycle_steps = 1
fix_modify AtC equilibrium_start <on|off>
+ fix_modify atc equilibrium_start on
+
Starts filtered calculations assuming they start in equilibrium, i.e. perfect finite element force balance.
+only needed before filtering is begun
+on
+fix_modify AtC extrinsic exchange <on|off>
+ fix_modify AtC extrinsic exchange on
+
Switches energy exchange between the MD system and electron system on and off
+Only valid for use with two_temperature type of AtC fix.
+see fix atc command
+on
+fix_modify AtC fe_md_boundary <faceset | interpolate | no_boundary> [args]
+ fix_modify atc fe_md_boundary interpolate
+
Specifies different methods for computing fluxes between between the MD and FE integration regions. Faceset defines a faceset separating the MD and FE regions and uses finite element face quadrature to compute the flux. Interpolate uses a reconstruction scheme to approximate the flux, which is more robust but less accurate if the MD/FE boundary does correspond to a faceset. No boundary results in no fluxes between the systems being computed.
+If faceset is used, all the AtC non-boundary atoms must lie within and completely fill the domain enclosed by the faceset.
+see for how to specify the faceset name.
+Interpolate.
+ fix_modify AtC fem create mesh 10 1 1 feRegion p p p
fix_modify AtC filter scale <scale>
+
fix_modify AtC filter scale 10.0
+
Filters the MD dynamics to construct a more appropriate continuous field. Equilibrating first filters the time derivatives without changing the dynamics to provide a better initial condition to the filtered dynamics
+only for be used with specific transfers: thermal, two_temperature
+fix_modify AtC filter fix_modify AtC filter type
+0.
+fix_modify AtC filter type <exponential | step | no_filter>
+
fix_modify AtC filter type exponential
+
Specifies the type of time filter used.
+only for be used with specific transfers: thermal, two_temperature
+fix_modify AtC filter fix_modify AtC filter scale
+No default.
+fix <fixID> <group> atc <type> <parameter_file>
+ fix AtC internal atc thermal Ar_thermal.dat
+ fix AtC internal atc two_temperature Ar_ttm.mat
+ fix AtC internal atc hardy
+ fix AtC internal atc field
+
This fix is the beginning to creating a coupled FE/MD simulation and/or an on-the-fly estimation of continuum fields. The coupled versions of this fix do Verlet integration and the /post-processing does not. After instantiating this fix, several other fix_modify commands will be needed to set up the problem, e.g. define the finite element mesh and prescribe initial and boundary conditions.
+The following coupling example is typical, but non-exhaustive:
+
# ... commands to create and initialize the MD system
+
# initial fix to designate coupling type and group to apply it to
+ # tag group physics material_file
+ fix AtC internal atc thermal Ar_thermal.mat
+
+ # create a uniform 12 x 2 x 2 mesh that covers region contain the group
+ # nx ny nz region periodicity
+ fix_modify AtC mesh create 12 2 2 mdRegion f p p
+
+ # specify the control method for the type of coupling
+ # physics control_type
+ fix_modify AtC thermal control flux
+
+ # specify the initial values for the empirical field "temperature"
+ # field node_group value
+ fix_modify AtC initial temperature all 30.
+
+ # create an output stream for nodal fields
+ # filename output_frequency
+ fix_modify AtC output atc_fe_output 100
+
+
run 1000
+
likewise for this post-processing example:
+
# ... commands to create and initialize the MD system
+
# initial fix to designate post-processing and the group to apply it to
+ # no material file is allowed nor required
+ fix AtC internal atc hardy
+
+ # for hardy fix, specific kernel function (function type and range) to # be used as a localization function
+ fix AtC kernel quartic_sphere 10.0
+
+ # create a uniform 1 x 1 x 1 mesh that covers region contain the group
+ # with periodicity this effectively creats a system average
+ fix_modify AtC mesh create 1 1 1 box p p p
+
+ # change from default lagrangian map to eulerian
+ # refreshed every 100 steps
+ fix_modify AtC atom_element_map eulerian 100
+
+ # start with no field defined
+ # add mass density, potential energy density, stress and temperature
+ fix_modify AtC fields add density energy stress temperature
+
+ # create an output stream for nodal fields
+ # filename output_frequency
+ fix_modify AtC output nvtFE 100 text
+
run 1000
+
the mesh's linear interpolation functions can be used as the localization function
+ by using the field option:
+
fix AtC internal atc field
+
+ fix_modify AtC mesh create 1 1 1 box p p p
+
+ ...
+
+
Note coupling and post-processing can be combined in the same simulations using separate fixes.
+ For detailed exposition of the theory and algorithms please see:
+
Please refer to the standard finite element (FE) texts, e.g. T.J.R Hughes The finite element method , Dover 2003, for the basics of FE simulation.
+Thermal and two_temperature (coupling) types use a Verlet time-integration algorithm. The hardy type does not contain its own time-integrator and must be used with a separate fix that does contain one, e.g. nve, nvt, etc.
+Currently,
+fix_modify commands for setup:
+
fix_modify commands for boundary and initial conditions:
+
fix_modify commands for control and filtering:
+
fix_modify commands for output:
+
fix_modify commands for post-processing:
+
miscellaneous fix_modify commands:
+
Note: a set of example input files with the attendant material files are included with this package
+none
+fix_modify AtC fix_flux <field> <face_set> <value | function>
+ fix_modify atc fix_flux temperature faceSet 10.0
+
Command for fixing normal fluxes e.g. heat_flux. This command only prescribes the normal component of the physical flux, e.g. heat (energy) flux. The units are in AtC units, i.e. derived from the LAMMPS length, time, and mass scales.
+Only normal fluxes (Neumann data) can be prescribed.
+fix_modify AtC fix <field> <nodeset> <constant | function>
+ fix_modify AtC fix temperature groupNAME 10.
+ fix_modify AtC fix temperature groupNAME 0 0 0 10.0 0 0 1.0
+
Creates a constraint on the values of the specified field at specified nodes.
+keyword 'all' reserved in nodeset name
+none
+fix_modify AtC computes <add | delete> [per-atom compute id] <volume | number>
+
compute virial all stress/atom
+ fix_modify AtC computes add virial volume
+ fix_modify AtC computes delete virial
+
+ compute centrosymmetry all centro/atom
+ fix_modify AtC computes add centrosymmetry number
+
Calculates continuum fields corresponding to specified per-atom computes created by LAMMPS
+
Must be used with the hardy/field type of AtC fix ( see fix atc command )
+ Per-atom compute must be specified before corresponding continuum field can be requested
+
See manual page for compute
+No defaults exist for this command
+fix_modify AtC fields <all | none>
+ fix_modify AtC fields <add | delete> <list_of_fields>
+
fix_modify AtC fields add velocity temperature
Allows modification of the fields calculated and output by the transfer class. The commands are cumulative, e.g.
+ fix_modify AtC fields none
+ followed by
+ fix_modify AtC fields add velocity temperature
+ will only output the velocity and temperature fields.
Must be used with the hardy/field type of AtC fix, see fix atc command. Currently, the stress and heat flux formulas are only correct for central force potentials, e.g. Lennard-Jones and EAM but not Stillinger-Weber.
+See fix_modify AtC gradients , fix_modify AtC rates and fix_modify AtC computes
+By default, no fields are output
+fix_modify AtC gradients <add | delete> <list_of_fields>
+
fix_modify AtC gradients add temperature velocity stress
+ fix_modify AtC gradients delete velocity
+
Requests calculation and ouput of gradients of the fields from the transfer class. These gradients will be with regard to spatial or material coordinate for eulerian or lagrangian analysis, respectively, as specified by atom_element_map (see fix_modify AtC atom_element_map )
+Must be used with the hardy/field type of AtC fix ( see fix atc command )
+No gradients are calculated by default
+fix_modify AtC kernel <type> <parameters>
+ fix_modify AtC kernel cell 1.0 1.0 1.0
+ fix_modify AtC kernel quartic_sphere 10.0
Must be used with the hardy AtC fix
+ For bar kernel types, half-width oriented along x-direction
+ For cylinder kernel types, cylindrical axis is assumed to be in z-direction
+ ( see fix atc command )
No default
+fix_modify AtC on_the_fly <bond | kernel> <optional on | off>
+ - bond | kernel (keyword) = specifies on-the-fly calculation of bond or kernel matrix elements
+
fix_modify AtC on_the_fly bond on
+ fix_modify AtC on_the_fly kernel
+ fix_modify AtC on_the_fly kernel off
+
Overrides normal mode of pre-calculating and storing bond pair-to-node a nd kernel atom-to-node matrices. If activated, will calculate elements of t hese matrices during repeated calls of field computations (i.e. "on-the-fly") and not store them for future use.
+ on flag is optional - if omitted, on_the_fly will be activated for the s pecified matrix. Can be deactivated using off flag.
+
Must be used with the hardy/field type of AtC fix ( see fix atc command )
+By default, on-the-fly calculation is not active (i.e. off). However, code does a memory allocation check to determine if it can store all needed bond and kernel matrix ele ments. If this allocation fails, on-the-fly is activated.
+
fix_modify AtC rates <add | delete> <list_of_fields>
+
fix_modify AtC rates add temperature velocity stress
+ fix_modify AtC rates delete stress
+
Requests calculation and ouput of rates (time derivatives) of the fields from the transfer class. For eulerian analysis (see fix_modify AtC atom_element_map ), these rates are the partial time derivatives of the nodal fields, not the full (material) time derivatives.
+
Must be used with the hardy/field type of AtC fix ( see fix atc command )
+No rates are calculated by default
+fix_modify AtC initial <field> <nodeset> <constant | function>
+ fix_modify atc initial temperature groupNAME 10.
Sets the initial values for the specified field at the specified nodes.
+keyword 'all' reserved in nodeset name
+none
+fix_modify AtC internal_atom_integrate <on | off> fix_modify AtC internal_atom_integrate on
Has AtC perform time integration for the atoms in the group on which it operates. This does not include boundary atoms.
+on for coupling methods, off for post-processors off
+fix_modify AtC internal_element_set <element-set-name>
+ fix_modify AtC internal_element_set myElementSet
fix_modify AtC internal_element_set off
Enables AtC to base the region for internal atoms to be an element set. If no ghost atoms are used, all the AtC atoms must be constrained to remain in this element set by the user, e.g., with walls. If boundary atoms are used in conjunction with Eulerian atom maps AtC will partition all atoms of a boundary or internal type to be of type internal if they are in the internal region or to be of type boundary otherwise.
+If boundary atoms are used in conjunction with Eulerian atom maps, the Eulerian reset frequency must be an integer multiple of the Lammps reneighbor frequency
+see atom_element_map_type and boundary
+off
+fix_modify atc internal_quadrature <on | off> [region]
+ fix_modify atc internal_quadrature off
Command to use or not use atomic quadrature on internal elements fully filled with atoms. By turning the internal quadrature off these elements do not contribute to the governing PDE and the fields at the internal nodes follow the weighted averages of the atomic data.
+Optional region tag specifies which finite element nodes will be treated as being within the MD region. This option is only valid with internal_quadrature off.
+on
+fix_modify AtC kernel <type> <parameters>
+fix_modify AtC kernel cell 1.0 1.0 1.0 fix_modify AtC kernel quartic_sphere 10.0
+Must be used with the hardy AtC fix
+ For bar kernel types, half-width oriented along x-direction
+ For cylinder kernel types, cylindrical axis is assumed to be in z-direction
+ ( see fix atc command )
No default
+fix_modify AtC control localized_lambda <on|off>
+ fix_modify atc control localized_lambda on
+
Turns on localization algorithms for control algorithms to restrict the influence of FE coupling or boundary conditions to a region near the boundary of the MD region. Control algorithms will not affect atoms in elements not possessing faces on the boundary of the region. Flux-based control is localized via row-sum lumping while quantity control is done by solving a truncated matrix equation.
+Default is off.
+fix_modify AtC control lumped_lambda_solve <on|off>
+ fix_modify atc control lumped_lambda_solve on
+
Command to use or not use lumped matrix for lambda solve
+fix_modify AtC control mask_direction <direction> <on|off>
+ fix_modify atc control mask_direction 0 on
+
Command to mask out certain dimensions from the atomic regulator
+fix_modify AtC mass_matrix <fe | md_fe>
+ fix_modify atc mass_matrix fe
Determines whether AtC uses the FE mass matrix based on Gaussian quadrature or based on atomic quadrature in the MD region. This is useful for fully overlapping simulations to improve efficiency.
+Should not be used unless the FE region is contained within the MD region, otherwise the method will be unstable and inaccurate
+Default is off
+fix_modify AtC material [elementset_name] [material_id]
+
fix_modify AtC material gap_region 2
Sets the material model in elementset_name to be of type material_id.
+The element set must already be created and the material must be specified in the material file given the the atc fix on construction
+All elements default to the first material in the material file.
+fix_modify AtC mesh add_to_nodeset <id> <xmin> <xmax> <ymin> <ymax> <zmin> <zmax>
+ fix_modify AtC mesh add_to_nodeset lbc -11.9 -11 -12 12 -12 12
Command to add nodes to an already existing FE nodeset.
+Coordinates are assumed to be in lattice units.
+fix_modify AtC mesh create <nx> <ny> <nz> <region-id> <f|p> <f|p> <f|p>
+
fix_modify AtC mesh create 10 1 1 feRegion p p p
+
Creates a uniform mesh in a rectangular region
+Creates only uniform rectangular grids in a rectangular region
+fix_modify AtC mesh quadrature
+When created, mesh defaults to gauss2 (2-point Gaussian) quadrature. Use "mesh quadrature" command to change quadrature style.
+fix_modify AtC create_elementset <id> <xmin> <xmax> <ymin> <ymax> <zmin> <zmax>
+ fix_modify AtC mesh create_elementset middle -4.1 4.1 -100 100 -100 1100
Command to assign an id to a set of FE elements to be used subsequently in defining material and mesh-based operations.
+Only viable for rectangular grids.
+Coordinates are assumed to be in lattice units.
+fix_modify AtC mesh create_faceset <id> box <xmin> <xmax> <ymin> <ymax> <zmin> <zmax> <in|out> [units]
+ fix_modify AtC mesh create_faceset obndy box -4.0 4.0 -12 12 -12 12 out
Command to assign an id to a set of FE faces.
+Only viable for rectangular grids.
+The default options are units = lattice and the use of outer faces
+fix_modify AtC mesh create_faceset <id> plane <x|y|z> <val1> <x|y|z> <lval2> <uval2> [units]
+ fix_modify AtC mesh create_faceset xyplane plane y 0 x -4 0
Command to assign an id to a set of FE faces.
+Only viable for rectangular grids.
+The default option is units = lattice.
+fix_modify AtC mesh create_nodeset <id> <xmin> <xmax> <ymin> <ymax> <zmin> <zmax>
+ fix_modify AtC mesh create_nodeset lbc -12.1 -11.9 -12 12 -12 12
Command to assign an id to a set of FE nodes to be used subsequently in defining boundary conditions.
+Coordinates are assumed to be in lattice units.
+fix_modify AtC mesh delete_elements <element_set>
+ fix_modify AtC delete_elements gap
Deletes a group of elements from the mesh.
+none
+fix_modify AtC nodeset_to_elementset <nodeset_id> <elementset_id> <max/min>
+ fix_modify AtC mesh nodeset_to_elementset myNodeset myElementset min
Command to create an elementset from an existing nodeset. Either the minimal element set of elements with all nodes in the set, or maximal element set with all elements with at least one node in the set, can be created
+None.
+Unless specified, the maximal element set is created
+fix_modify AtC mesh output <file_prefix>
+ fix_modify AtC mesh output meshData
+
Command to output mesh and associated data: nodesets, facesets, and elementsets. This data is only output once upon initialization since currently the mesh is static. Creates (binary, "gold" format) Ensight output of mesh data.
+none
+none
+fix_modify AtC mesh quadrature <quad>
+ fix_modify AtC mesh quadrature face
(Re-)assigns the quadrature style for the existing mesh.
+none
+fix_modify AtC mesh read <filename> <f|p> <f|p> <f|p>
+ fix_modify AtC mesh read myComponent.mesh p p p
+ fix_modify AtC mesh read myOtherComponent.exo
Reads a mesh from a text or exodus file, and assigns periodic boundary conditions if needed.
+periodicity flags are false by default
+fix_modify AtC mesh write <filename>
+ fix_modify AtC mesh write myMesh.mesh
+
Writes a mesh to a text file.
+fix_modify AtC time_integration <descriptor>
+
various time integration methods for the finite elements
+
verlet - atomic velocity update with 2nd order Verlet, nodal temperature update with 2nd order Verlet, kinetostats based on controlling force
+ fractional_step - atomic velocity update with 2nd order Verlet, mixed nodal momentum update, 2nd order Verlet for continuum and exact 2nd order Verlet for atomic contributions, kinetostats based on controlling discrete momentum changes
+ gear - atomic velocity update with 2nd order Verlet, nodal temperature update with 3rd or 4th order Gear, kinetostats based on controlling power
+
fix_modify atc time_integration verlet
+ fix_modify atc time_integration fractional_step
+
see fix atc command
+none
+fix_modify AtC output <filename_prefix> <frequency> [text | full_text | binary | vector_components | tensor_components ] fix_modify AtC output index [step | time ]
+ fix_modify AtC output heatFE 100
+ fix_modify AtC output hardyFE 1 text tensor_components
+ fix_modify AtC output hardyFE 10 text binary tensor_components
+ fix_modify AtC output index step
+
Creates text and/or binary (Ensight, "gold" format) output of nodal/mesh data which is transfer/physics specific. Output indexed by step or time is possible.
+see fix atc command
+no default format output indexed by time
+fix_modify AtC output volume_integral <eset_name> <field> {`
+ fix_modify AtC output eset1 mass_density
+
Performs volume integration of specified field over elementset and outputs resulting variable values to GLOBALS file.
+see fix atc command
+none
+fix_modify AtC output nodeset <nodeset_name> <operation>
+ fix_modify AtC output nodeset nset1 sum
+
Performs operation over the nodes belonging to specified nodeset and outputs resulting variable values to GLOBALS file.
+see fix atc command
+none
+fix_modify AtC pair_interactions <on|off>
+ fix_modify AtC bond_interactions <on|off>
+
fix_modify AtC bond_interactions on
+
include bonds and/or pairs in the stress and heat flux computations
+pair interactions: on, bond interactions: off
+fix_modify AtC poisson_solver mesh create <nx> <ny> <nz> <region-id> <f|p> <f|p> <f|p>
+ fix_modify AtC poisson_solver mesh create 10 1 1 feRegion p p p
Creates a uniform mesh in a rectangular region
+creates only uniform rectangular grids in a rectangular region
+none
+fix_modify AtC read_restart [file_name]
+
fix_modify AtC read_restart ATC_state
+
Reads the current state of the fields from a named text-based restart file.
+The restart file only contains fields and their time derivatives. The reference positions of the atoms and the commands that initialize the fix are not saved e.g. an identical mesh containing the same atoms will have to be recreated.
+see write_restart fix_modify AtC write_restart
+none
+fix_modify_AtC remove_molecule <TAG>
+
fix_modify AtC remove_molecule water
+
Removes tag designated for tracking a specified set of molecules.
+
No defaults for this command.
+fix_modify AtC remove_source <field> <element_set>
+ fix_modify atc remove_source temperature groupNAME
Remove a domain source.
+keyword 'all' reserved in element_set name
+fix_modify_AtC delete_species <TAG>
+
fix_modify AtC remove_species gold
+
Removes tag designated for tracking a specified species.
+
No defaults for this command.
+fix_modify AtC reset_atomic_reference_positions
+ fix_modify atc reset_atomic_reference_positions
Resets the atomic positions ATC uses to perform point to field operations. In can be used to use perfect lattice sites in ATC but a thermalized or deformed lattice in LAMMPS.
Default is off
fix_modify AtC reset_time
+ fix_modify atc reset_time 0.0
+
Resets the simulation time counter.
+fix_modify AtC kernel_bandwidth
+ fix_modify atc reset_time 8
+
Sets a maximum parallel bandwidth for the kernel functions during parallel communication. If the command is not issued, the default will be to assume the bandwidth of the kernel matrix corresponds to the number of sampling locations.
+Only is used if kernel functions are being used.
+Number of sample locations.
+fix_modify AtC sample_frequency [freq]
+ fix_modify AtC sample_frequency 10
Specifies a frequency at which fields are computed for the case where time filters are being applied.
Must be used with the hardy/field AtC fix ( see fix atc command ) and is only relevant when time filters are being used.
none
fix_modify AtC set reference_potential_energy <value_or_filename(optional)>
+ fix_modify AtC set reference_potential_energy
+ fix_modify AtC set reference_potential_energy -0.05
+ fix_modify AtC set reference_potential_energy myPEvalues
+
Used to set various quantities for the post-processing algorithms. It sets the zero point for the potential energy density using the value provided for all nodes, or from the current configuration of the lattice if no value is provided, or values provided within the specified filename.
+Must be used with the hardy/field type of AtC fix ( see fix atc command )
+Defaults to lammps zero point i.e. isolated atoms
+fix_modify AtC source <field> <element_set> <value | function>
+ fix_modify atc source temperature middle temporal_ramp 10. 0.
Add domain sources to the mesh. The units are consistent with LAMMPS's units for mass, length and time and are defined by the PDE being solved, e.g. for thermal transfer the balance equation is for energy and source is energy per time.
+keyword 'all' reserved in element_set name
+see fix_modify AtC remove_source
+none
+fix_modify AtC source_integration < fe | atom>
+ fix_modify atc source_integration atom
Default is fe
+fix_modify AtC temperature_definition <kinetic|total>
+ fix_modify atc temperature_definition kinetic
+
Change the definition for the atomic temperature used to create the finite element temperature. The kinetic option is based only on the kinetic energy of the atoms while the total option uses the total energy (kinetic + potential) of an atom.
+This command is only valid when using thermal coupling. Also, while not a formal restriction, the user should ensure that associating a potential energy with each atom makes physical sense for the total option to be meaningful.
+kinetic
+fix_modify AtC time_integration <descriptor>
+
various time integration methods for the finite elements
+
gear - atomic velocity update with 2nd order Verlet, nodal temperature update with 3rd or 4th order Gear, thermostats based on controlling power
+ fractional_step - atomic velocity update with 2nd order Verlet, mixed nodal temperature update, 3/4 Gear for continuum and 2 Verlet for atomic contributions, thermostats based on controlling discrete energy changes
+
fix_modify atc time_integration gear
+ fix_modify atc time_integration fractional_step
+
see fix atc command
+none
+fix_modify AtC filter <on | off | equilibrate>
+
fix_modify atc transfer filter on
+
Filters the MD dynamics to construct a more appropriate continuous field. Equilibrating first filters the time derivatives without changing the dynamics to provide a better initial condition to the filtered dynamics
+only for be used with specific transfers: thermal, two_temperature
+fix_modify AtC filter scale
+ fix_modify AtC equilibrium_start
off
+fix_modify AtC track_displacement <on/off>
+
fix_modify atc track_displacement on
+
Determines whether displacement is tracked or not. For solids problems this is a useful quantity, but for fluids it is not relevant.
+Some constitutive models require the displacement field
+on
+fix_modify AtC fix_flux <field> <face_set> <value | function>
+ fix_modify atc unfix_flux temperature faceSet
+
Command for removing prescribed normal fluxes e.g. heat_flux, stress.
+fix_modify AtC unfix <field> <nodeset>
+ fix_modify AtC unfix temperature groupNAME
Removes constraint on field values for specified nodes.
+keyword 'all' reserved in nodeset name
+none
+fix_modify AtC write_atom_weights <filename> <frequency>
+ fix_modify atc write_atom_weights atm_wt_file.txt 10
+
Command for writing the values of atomic weights to a specified file.
+fix_modify AtC write_restart [file_name]
+
fix_modify AtC write_restart restart.mydata
+
Dumps the current state of the fields to a named text-based restart file. This done when the command is invoked and not repeated, unlike the similar lammps command.
+The restart file only contains fields and their time derivatives. The reference positions of the atoms and the commands that initialize the fix are not saved e.g. an identical mesh containing the same atoms will have to be recreated.
+see read_restart fix_modify AtC read_restart
+none
+