diff --git a/doc/Manual.html b/doc/Manual.html index eaeb2bf1e..73ed0ae8d 100644 --- a/doc/Manual.html +++ b/doc/Manual.html @@ -1,190 +1,190 @@
LAMMPS stands for Large-scale Atomic/Molecular Massively Parallel Simulator.
LAMMPS is a classical molecular dynamics simulation code designed to run efficiently on parallel computers. It was developed at Sandia National Laboratories, a US Department of Energy facility, with funding from the DOE. It is an open-source code, distributed freely under the terms of the GNU Public License (GPL).
The developers of LAMMPS are Steve Plimpton, Paul Crozier, and -Aidan Thompson who can be contacted at "sjplimp, pscrozi, athomps at +Aidan Thompson who can be contacted at sjplimp,pscrozi,athomps at sandia.gov. The LAMMPS WWW Site at http://lammps.sandia.gov has more information about the code and its uses.
The LAMMPS documentation is organized into the following sections. If you find errors or omissions in this manual or have suggestions for useful information to add, please send an email to the developers so we can improve the LAMMPS documentation.
PDF file of the entire manual, generated by htmldoc
This section describes the various kinds of errors you can encounter when using LAMMPS.
9.1 Common problemsIf two LAMMPS runs do not produce the same answer on different machines or different numbers of processors, this is typically not a bug. In theory 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 molecular dynamics phase space trajectories within a few 100s or few 1000s of timesteps. However, the statistical properties of the two runs (e.g. average energy or temperature) should still be the same.
If the velocity command is used to set initial atom velocities, a particular atom can be assigned a different velocity when the problem on different machines. Obviously, this means the phase space trajectories of the two simulations will rapidly diverge. See the discussion of the loop option in the velocity command for details.
A LAMMPS simulation typically has two stages, setup and run. Most LAMMPS errors are detected at setup time; others like a bond stretching too far may not occur until the middle of a run.
LAMMPS tries to flag errors and print informative error messages so you can fix the problem. Of course LAMMPS cannot figure out your physics mistakes, like choosing too big a timestep, specifying invalid force field coefficients, or putting 2 atoms on top of each other! If you find errors that LAMMPS doesn't catch that you think it should flag, please send an email to the developers.
If you get an error message about an invalid command in your input script, you can determine what command is causing the problem by looking in the log.lammps file or using the echo command to see it on the screen. For a given command, LAMMPS expects certain arguments in a specified order. If you mess this up, LAMMPS will often flag the error, but it may read a bogus argument and assign a value that is valid, but not what you wanted. E.g. trying to read the string "abc" as an integer value and assigning the associated variable a value of 0.
Generally, LAMMPS will print a message to the screen and exit gracefully when it encounters a fatal error. Sometimes it will print a WARNING and continue on; you can decide if the WARNING is important or not. If LAMMPS crashes or hangs without spitting out an error message first then it could be a bug (see this section) or one of the following cases:
LAMMPS runs in the available memory a processor allows to be allocated. Most reasonable MD runs are compute limited, not memory limited, so this shouldn't be a bottleneck on most platforms. Almost all large memory allocations in the code are done via C-style malloc's which will generate an error message if you run out of memory. Smaller chunks of memory are allocated via C++ "new" statements. If you are unlucky you could run out of memory just when one of these small requests is made, in which case the code will crash or hang (in parallel), since LAMMPS doesn't trap on those errors.
Illegal arithmetic can cause LAMMPS to run slow or crash. This is typically due to invalid physics and numerics that your simulation is computing. If you see wild thermodynamic values or NaN values in your LAMMPS output, something is wrong with your simulation.
In parallel, one way LAMMPS can hang is due to how different MPI implementations handle buffering of messages. 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.
If you are confident that you have found a bug in LAMMPS, please send an email to the developers.
First, check the "New features and bug fixes" section of the LAMMPS WWW site to see if the bug has already been reported or fixed.
If not, the most useful thing you can do for us is to isolate the problem. Run it on the smallest number of atoms and fewest number of processors and with the simplest input script that reproduces the bug.
In your email, describe the problem and any ideas you have as to what is causing it or where in the code the problem might be. We'll request your input script and data files if necessary.
These are two alphabetic lists of the ERROR and WARNING messages LAMMPS prints out and the reason why. If the explanation here is not sufficient, the documentation for the offending command may help. Grepping the source files for the text of the error message and staring at the source code and comments is also not a bad idea! Note that sometimes the same message can be printed from multiple places in the code.
This section lists features we are planning to add to LAMMPS, features of previous versions of LAMMPS, and features of other parallel molecular dynamics codes I've distributed.
10.1 Coming attractionsThe current version of LAMMPS incorporates nearly all the features -from previous parallel MD codes I developed. These include earlier -versions of LAMMPS itself, Warp and ParaDyn for metals, and GranFlow -for granular materials. +from previous parallel MD codes developed at Sandia. These include +earlier versions of LAMMPS itself, Warp and ParaDyn for metals, and +GranFlow for granular materials.
-These are new features I'd like to eventually add to LAMMPS. Some are -being worked on; some haven't been implemented because of lack of time -or interest; others are just a lot of work! +
These are new features we'd like to eventually add to LAMMPS. Some +are being worked on; some haven't been implemented because of lack of +time or interest; others are just a lot of work!
LAMMPS development began in the mid 1990s under a cooperative research & development agreement (CRADA) between two DOE labs (Sandia and LLNL) and 3 companies (Cray, Bristol Myers Squibb, and Dupont). Soon after the CRADA ended, a final F77 version of the code, LAMMPS 99, was released. As development of LAMMPS continued at Sandia, the memory management in the code was converted to F90; a final F90 version was released as LAMMPS 2001.
The current LAMMPS is a rewrite in C++ and was first publicly released in 2004. It includes many new features, including features from other parallel molecular dynamics codes written at Sandia, namely ParaDyn, Warp, and GranFlow. ParaDyn is a parallel implementation of the popular serial DYNAMO code developed by Stephen Foiles and Murray Daw for their embedded atom method (EAM) metal potentials. ParaDyn uses atom- and force-decomposition algorithms to run in parallel. Warp is also a parallel implementation of the EAM potentials designed for large problems, with boundary conditions specific to shearing solids in varying geometries. GranFlow is a granular materials code with potentials and boundary conditions peculiar to granular systems. All of these codes (except ParaDyn) use spatial-decomposition techniques for their parallelism.
These older codes are available for download from the LAMMPS WWW site, except for Warp & GranFlow which were primarily used internally. A brief listing of their features is given here.
LAMMPS 2001
LAMMPS 99
Warp
ParaDyn
GranFlow
The following sections describe what commands can be used to perform certain kinds of LAMMPS simulations.
4.1 Restarting a simulationThe example input scripts included in the LAMMPS distribution and highlighted in this section also show how to setup and run various kinds of problems.
There are 3 ways to continue a long LAMMPS simulation. Multiple run commands can be used in the same input script. Each run will continue from where the previous run left off. Or binary restart files can be saved to disk using the restart command. At a later time, these binary files can be read via a read_restart command in a new script. Or they can be converted to text data files and read by a read_data command in a new script. This section discusses the restart2data tool that is used to perform the conversion.
Here we give examples of 2 scripts that read either a binary restart file or a converted data file and then issue a new run command to continue where the previous run left off. They illustrate what settings must be made in the new script. Details are discussed in the documentation for the read_restart and read_data commands.
Look at the in.chain input script provided in the bench directory of the LAMMPS distribution to see the original script that these 2 scripts are based on. If that script had the line
restart 50 tmp.restart
added to it, it would produce 2 binary restart files (tmp.restart.50 and tmp.restart.100) as it ran.
This script could be used to read the 1st restart file and re-run the last 50 timesteps:
read_restart tmp.restart.50
neighbor 0.4 bin neigh_modify every 1 delay 1
fix 1 all nve fix 2 all langevin 1.0 1.0 10.0 904297
timestep 0.012
run 50
Note that the following commands do not need to be repeated because their settings are included in the restart file: units, atom_style, special_bonds, pair_style, bond_style. However these commands do need to be used, since their settings are not in the restart file: neighbor, fix, timestep.
If you actually use this script to perform a restarted run, you will notice that the thermodynamic data match at step 50 (if you also put a "thermo 50" command in the original script), but do not match at step 100. This is because the fix langevin command uses random numbers in a way that does not allow for perfect restarts.
As an alternate approach, the restart file could be converted to a data file using this tool:
restart2data tmp.restart.50 tmp.restart.data
Then, this script could be used to re-run the last 50 steps:
units lj atom_style bond pair_style lj/cut 1.12 pair_modify shift yes bond_style fene special_bonds 0.0 1.0 1.0
read_data tmp.restart.data
neighbor 0.4 bin neigh_modify every 1 delay 1
fix 1 all nve fix 2 all langevin 1.0 1.0 10.0 904297
timestep 0.012
reset_timestep 50 run 50
Note that nearly all the settings specified in the original in.chain script must be repeated, except the pair_coeff and bond_coeff commands since the new data file lists the force field coefficients. Also, the reset_timestep command is used to tell LAMMPS the current timestep. This value is stored in restart files, but not in data files.
Use the dimension command to specify a 2d simulation.
Make the simulation box periodic in z via the boundary command. This is the default.
If using the create box command to define a simulation box, set the z dimensions narrow, but finite, so that the create_atoms command will tile the 3d simulation box with a single z plane of atoms - e.g.
create box 1 -10 10 -10 10 -0.25 0.25
If using the read data command to read in a file of atom coordinates, set the "zlo zhi" values to be finite but narrow, similar to the create_box command settings just described. For each atom in the file, assign a z coordinate so it falls inside the z-boundaries of the box - e.g. 0.0.
Use the fix enforce2d command as the last defined fix to insure that the z-components of velocities and forces are zeroed out every timestep. The reason to make it the last fix is so that any forces induced by other fixes will be zeroed out.
Many of the example input scripts included in the LAMMPS distribution are for 2d models.
There are many different ways to compute forces in the CHARMM and AMBER molecular dynamics codes, only some of which are available as options in LAMMPS. A force field has 2 parts: the formulas that define it and the coefficients used for a particular system. Here we only discuss formulas implemented in LAMMPS. Setting coefficients is done in the input data file via the read_data command or in the input script with commands like pair_coeff or bond_coeff. See this section for additional tools that can use CHARMM or AMBER to assign force field coefficients and convert their output into LAMMPS input.
+See (MacKerell) for a description of the CHARMM force +field. See (Cornell) for a description of the AMBER force +field. +
These style choices compute force field formulas that are consistent with common options in CHARMM or AMBER. See each command's documentation for the formula it computes.
This can be done in several ways. See the documentation for individual commands for more details on how these examples work.
If "multiple simulations" means continue a previous simulation for more timesteps, then you simply use the run command multiple times. For example, this script
units lj atom_style atomic read_data data.lj run 10000 run 10000 run 10000 run 10000 run 10000
would run 5 successive simulations of the same system for a total of 50,000 timesteps.
If you wish to run totally different simulations, one after the other, the clear command can be used in between them to re-initialize LAMMPS. For example, this script
units lj atom_style atomic read_data data.lj run 10000 clear units lj atom_style atomic read_data data.lj.new run 10000
would run 2 independent simulations, one after the other.
For large numbers of independent simulations, you can use variables and the next and jump commands to loop over the same input script multiple times with different settings. For example, this script, named in.polymer
variable d index run1 run2 run3 run4 run5 run6 run7 run8 cd $d read_data data.polymer run 10000 cd .. clear next d jump in.polymer
would run 8 simulations in different directories, using a data.polymer file in each directory. The same concept could be used to run the same system at 8 different temperatures, using a temperature variable and storing the output in different log and dump files, for example
variable a loop 8 variable t index 0.8 0.85 0.9 0.95 1.0 1.05 1.1 1.15 log log.$a read data.polymer velocity all create $t 352839 fix 1 all nvt $t $t 100.0 dump 1 all atom 1000 dump.$a run 100000 next t next a jump in.polymer
All of the above examples work whether you are running on 1 or multiple processors, but assumed you are running LAMMPS on a single partition of processors. LAMMPS can be run on multiple partitions via the "-partition" command-line switch as described in this section of the manual.
In the last 2 examples, if LAMMPS were run on 3 partitions, the same scripts could be used if the "index" and "loop" variables were replaced with universe-style variables, as described in the variable command. Also, the "next t" and "next a" commands would need to be replaced with a single "next a t" command. With these modifications, the 8 simulations of each script would run on the 3 partitions one after the other until all were finished. Initially, 3 simulations would be started simultaneously, one on each partition. When one finished, that partition would then start the 4th simulation, and so forth, until all 8 were completed.
The temper command can be used to perform a parallel tempering or replica-exchange simulation where multiple copies of a simulation are run at different temperatures on different sets of processors, and Monte Carlo temperature swaps are performed between pairs of copies.
Use the -procs and -in command-line switches to launch LAMMPS on multiple partitions.
In your input script, define a set of temperatures, one for each processor partition, using the variable command:
variable t proc 300.0 310.0 320.0 330.0
Define a fix of style nvt or langevin to control the temperature of each simulation:
fix myfix all nvt $t $t 100.0
Use the temper command in place of a run command to perform a simulation where tempering exchanges will take place:
temper 100000 100 $t myfix 3847 58382
To run a simulation of a granular model, you will want to use the following commands:
Use one of these 3 pair potentials:
These commands implement fix options specific to granular systems:
The fix style freeze zeroes both the force and torque of frozen atoms, and should be used for granular system instead of the fix style setforce.
For computational efficiency, you can eliminate needless pairwise computations between frozen atoms by using this command:
The TIP3P water model as implemented in CHARMM (MacKerell) specifies a 3-site rigid water molecule with charges and Lennard-Jones parameters assigned to each of the 3 atoms. In LAMMPS the fix shake command can be used to hold the two O-H bonds and the H-O-H angle rigid. A bond style of harmonic and an angle style of harmonic or charmm should also be used.
These are the additional parameters (in real units) to set for O and H atoms and the water molecule to run a rigid TIP3P-CHARMM model with a cutoff. The K values can be used if a flexible TIP3P model (without fix shake) is desired. If the LJ epsilon and sigma for HH and OH are set to 0.0, it corresponds to the original 1983 TIP3P model (Jorgensen).
O mass = 15.9994
H mass = 1.008
O charge = -0.834
H charge = 0.417
LJ epsilon of OO = 0.1521
LJ sigma of OO = 3.1507
LJ epsilon of HH = 0.0460
LJ sigma of HH = 0.4000
LJ epsilon of OH = 0.0836
LJ sigma of OH = 1.7753
K of OH bond = 450
r0 of OH bond = 0.9572
K of HOH angle = 55
theta of HOH angle = 104.52
These are the parameters to use for TIP3P with a long-range Coulombic solver (Ewald or PPPM in LAMMPS):
O mass = 15.9994
H mass = 1.008
O charge = -0.830
H charge = 0.415
LJ epsilon of OO = 0.102
LJ sigma of OO = 3.1507
LJ epsilon, sigma of OH, HH = 0.0
K of OH bond = 450
r0 of OH bond = 0.9572
K of HOH angle = 55
theta of HOH angle = 104.52
The four-point TIP4P rigid water model extends the traditional three-point TIP3P model by adding an additional site, usually massless, where the charge associated with the oxygen atom is placed. This site M is located at a fixed distance away from the oxygen along the bisector of the HOH bond angle. A bond style of harmonic and an angle style of harmonic or charmm should also be used.
Two different four-point models (cutoff and long-range Coulombics) can be implemented using LAMMPS pair styles with tip4p in their style name. For both models, the bond lengths and bond angles should be held fixed using the fix shake command.
These are the additional parameters (in real units) to set for O and H atoms and the water molecule to run a rigid TIP4P model with a cutoff (Jorgensen). Note that the OM distance is specified in the pair_style command, not as part of the pair coefficients.
O mass = 15.9994
H mass = 1.008
O charge = -1.040
H charge = 0.520
r0 of OH bond = 0.9572
theta of HOH angle = 104.52
OM distance = 0.15
LJ epsilon of O-O = 0.1550
LJ sigma of O-O = 3.1536
LJ epsilon, sigma of OH, HH = 0.0
These are the parameters to use for TIP4P with a long-range Coulombic solver (Ewald or PPPM in LAMMPS):
O mass = 15.9994
H mass = 1.008
O charge = -1.0484
H charge = 0.5242
r0 of OH bond = 0.9572
theta of HOH angle = 104.52
OM distance = 0.1250
LJ epsilon of O-O = 0.16275
LJ sigma of O-O = 3.16435
LJ epsilon, sigma of OH, HH = 0.0
The SPC water model specifies a 3-site rigid water molecule with charges and Lennard-Jones parameters assigned to each of the 3 atoms. In LAMMPS the fix shake command can be used to hold the two O-H bonds and the H-O-H angle rigid. A bond style of harmonic and an angle style of harmonic or charmm should also be used.
These are the additional parameters (in real units) to set for O and H atoms and the water molecule to run a rigid SPC model with long-range Coulombics (Ewald or PPPM in LAMMPS).
O mass = 15.9994
H mass = 1.008
O charge = -0.820
H charge = 0.410
LJ epsilon of OO = 0.1553
LJ sigma of OO = 3.166
LJ epsilon, sigma of OH, HH = 0.0
r0 of OH bond = 1.0
theta of HOH angle = 109.47
LAMMPS is designed to allow it to be coupled to other codes. For example, a quantum mechanics code might compute forces on a subset of atoms and pass those forces to LAMMPS. Or a continuum finite element (FE) simulation might use atom positions as boundary conditions on FE nodal points, compute a FE solution, and return interpolated forces on MD atoms.
LAMMPS can be coupled to other codes in at least 3 ways. Each has advantages and disadvantages, which you'll have to think about in the context of your application.
(1) Define a new fix command that calls the other code. In this scenario, LAMMPS is the driver code. During its timestepping, the fix is invoked, and can make library calls to the other code, which has been linked to LAMMPS as a library. This is the way the POEMS package that performs constrained rigid-body motion on groups of atoms is hooked to LAMMPS. See the fix_poems command for more details. See this section of the documention for info on how to add a new fix to LAMMPS.
(2) Define a new LAMMPS command that calls the other code. This is conceptually similar to method (1), but in this case LAMMPS and the the other code are on a more equal footing. Note that now the other code is not called during the timesteps of a LAMMPS run, but between runs. The LAMMPS input script can be used to alternate LAMMPS runs with calls to the other code, invoked via the new command. The run command facilitates this with its every option, which makes it easy to run a few steps, invoke the command, run a few steps, invoke the command, etc.
In this scenario, the other code can be a library, called by the command, or it could be a stand-alone code, invoked by a system() call made by the command (assuming your parallel machine allows one or more processors to start up another program). In the latter case the stand-alone code could communicate with LAMMPS thru files that the command writes and reads.
See this section of the documention for how to add a new command to LAMMPS.
(3) Use LAMMPS as a library called by another code. In this case the other code is the driver and calls LAMMPS as needed. Or a wrapper code could link and call both LAMMPS and another code as libraries. Again, the run command has options that allow it to be invoked with minimal overhead (no setup or clean-up) if you wish to do multiple short runs, driven by another program.
This section of the documention describes how to build LAMMPS as a library. Once this is done, you can interface with LAMMPS either via C++, C, or Fortran (or any other language that supports a vanilla C-like interface, e.g. a scripting language). For example, from C++ you could create an "instance" of LAMMPS, and initialize it, pass it an input script to process, or execute individual commands, all by invoking the correct class methods in LAMMPS. From C or Fortran you would make function calls to do the same things. Library.cpp and library.h contain such a C interface that illustrates this with the functions:
void lammps_open(int, char **, MPI_Comm); void lammps_close(); void lammps_file(char *); char *lammps_command(char *);
The functions contain the C++ code you would need to put in a C++ application that was invoking LAMMPS directly.
Two of the routines in library.cpp are of particular note. The lammps_open() function initiates LAMMPS and takes an MPI communicator as an argument. LAMMPS will run on the set of processors in the communicator. This means the calling code can run LAMMPS on all or a subset of processors. For example, a wrapper script might decide to alternate between LAMMPS and another code, allowing them both to run on all the processors. Or it might allocate half the processors to LAMMPS and half to the other code and run both codes simultaneously before syncing them up periodically.
Library.cpp also contains a lammps_command() function to which the caller passes a single LAMMPS command (a string). Thus the calling code can read or generate a series of LAMMPS commands (e.g. an input script) one line at a time and pass it thru the library interface to setup a problem and then run it.
A few other sample routines are included in library.cpp, but the key idea is that you can write any routines you wish to define an interface for how your code talks to LAMMPS and add them to library.cpp and library.h. The routines you add can access any LAMMPS data. The umbrella.cpp code in examples/couple is a simple example of how a stand-alone code can link LAMMPS as a library, run LAMMPS on a subset of processors, grab data from LAMMPS, change it, and put it back into LAMMPS.
(Cornell) Corenll, Cieplak, Bayly, Gould, Merz, Ferguson, +Spellmeyer, Fox, Caldwell, Kollman, JACS 117, 5179-5197 (1995). +
(Horn) Horn, Swope, Pitera, Madura, Dick, Hura, and Head-Gordon, J Chem Phys, 120, 9665 (2004).
(MacKerell) MacKerell, Bashford, Bellott, Dunbrack, Evanseck, Field, Fischer, Gao, Guo, Ha, et al, J Phys Chem, 102, 3586 (1998).
(Jorgensen) Jorgensen, Chandrasekhar, Madura, Impey, Klein, J Chem Phys, 79, 926 (1983).
diff --git a/doc/Section_howto.txt b/doc/Section_howto.txt index 2b44097e8..46622b3e9 100644 --- a/doc/Section_howto.txt +++ b/doc/Section_howto.txt @@ -1,586 +1,594 @@ "Previous Section"_Section_commands.html - "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc - "Next Section"_Section_example.html :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line 4. How-to discussions :h3 The following sections describe what commands can be used to perform certain kinds of LAMMPS simulations. 4.1 "Restarting a simulation"_#4_1 4.2 "2d simulations"_#4_2 4.3 "CHARMM and AMBER force fields"_#4_3 4.4 "Running multiple simulations from one input script"_#4_4 4.5 "Parallel tempering"_#4_5 4.6 "Granular models"_#4_6 4.7 "TIP3P water model"_#4_7 4.8 "TIP4P water model"_#4_8 4.9 "SPC water model"_#4_9 4.10 "Coupling LAMMPS to other codes"_#4_10 :all(b) The example input scripts included in the LAMMPS distribution and highlighted in "this section"_Section_example.html also show how to setup and run various kinds of problems. :line 4.1 Restarting a simulation :link(4_1),h4 There are 3 ways to continue a long LAMMPS simulation. Multiple "run"_run.html commands can be used in the same input script. Each run will continue from where the previous run left off. Or binary restart files can be saved to disk using the "restart"_restart.html command. At a later time, these binary files can be read via a "read_restart"_read_restart.html command in a new script. Or they can be converted to text data files and read by a "read_data"_read_data.html command in a new script. "This section"_Section_tools.html discusses the {restart2data} tool that is used to perform the conversion. Here we give examples of 2 scripts that read either a binary restart file or a converted data file and then issue a new run command to continue where the previous run left off. They illustrate what settings must be made in the new script. Details are discussed in the documentation for the "read_restart"_read_restart.html and "read_data"_read_data.html commands. Look at the {in.chain} input script provided in the {bench} directory of the LAMMPS distribution to see the original script that these 2 scripts are based on. If that script had the line restart 50 tmp.restart :pre added to it, it would produce 2 binary restart files (tmp.restart.50 and tmp.restart.100) as it ran. This script could be used to read the 1st restart file and re-run the last 50 timesteps: read_restart tmp.restart.50 :pre neighbor 0.4 bin neigh_modify every 1 delay 1 :pre fix 1 all nve fix 2 all langevin 1.0 1.0 10.0 904297 :pre timestep 0.012 :pre run 50 :pre Note that the following commands do not need to be repeated because their settings are included in the restart file: {units, atom_style, special_bonds, pair_style, bond_style}. However these commands do need to be used, since their settings are not in the restart file: {neighbor, fix, timestep}. If you actually use this script to perform a restarted run, you will notice that the thermodynamic data match at step 50 (if you also put a "thermo 50" command in the original script), but do not match at step 100. This is because the "fix langevin"_fix_langevin.html command uses random numbers in a way that does not allow for perfect restarts. As an alternate approach, the restart file could be converted to a data file using this tool: restart2data tmp.restart.50 tmp.restart.data :pre Then, this script could be used to re-run the last 50 steps: units lj atom_style bond pair_style lj/cut 1.12 pair_modify shift yes bond_style fene special_bonds 0.0 1.0 1.0 :pre read_data tmp.restart.data :pre neighbor 0.4 bin neigh_modify every 1 delay 1 :pre fix 1 all nve fix 2 all langevin 1.0 1.0 10.0 904297 :pre timestep 0.012 :pre reset_timestep 50 run 50 :pre Note that nearly all the settings specified in the original {in.chain} script must be repeated, except the {pair_coeff} and {bond_coeff} commands since the new data file lists the force field coefficients. Also, the "reset_timestep"_reset_timestep.html command is used to tell LAMMPS the current timestep. This value is stored in restart files, but not in data files. :line 4.2 2d simulations :link(4_2),h4 Use the "dimension"_dimension.html command to specify a 2d simulation. Make the simulation box periodic in z via the "boundary"_boundary.html command. This is the default. If using the "create box"_create_box.html command to define a simulation box, set the z dimensions narrow, but finite, so that the create_atoms command will tile the 3d simulation box with a single z plane of atoms - e.g. "create box"_create_box.html 1 -10 10 -10 10 -0.25 0.25 :pre If using the "read data"_read_data.html command to read in a file of atom coordinates, set the "zlo zhi" values to be finite but narrow, similar to the create_box command settings just described. For each atom in the file, assign a z coordinate so it falls inside the z-boundaries of the box - e.g. 0.0. Use the "fix enforce2d"_fix_enforce2d.html command as the last defined fix to insure that the z-components of velocities and forces are zeroed out every timestep. The reason to make it the last fix is so that any forces induced by other fixes will be zeroed out. Many of the example input scripts included in the LAMMPS distribution are for 2d models. :line 4.3 CHARMM and AMBER force fields :link(4_3),h4 There are many different ways to compute forces in the "CHARMM"_charmm and "AMBER"_amber molecular dynamics codes, only some of which are available as options in LAMMPS. A force field has 2 parts: the formulas that define it and the coefficients used for a particular system. Here we only discuss formulas implemented in LAMMPS. Setting coefficients is done in the input data file via the "read_data"_read_data.html command or in the input script with commands like "pair_coeff"_pair_coeff.html or "bond_coeff"_bond_coeff.html. See "this section"_Section_tools.html for additional tools that can use CHARMM or AMBER to assign force field coefficients and convert their output into LAMMPS input. +See "(MacKerell)"_#MacKerell for a description of the CHARMM force +field. See "(Cornell)"_#Cornell for a description of the AMBER force +field. + :link(charmm,http://www.scripps.edu/brooks) :link(amber,http://amber.scripps.edu) These style choices compute force field formulas that are consistent with common options in CHARMM or AMBER. See each command's documentation for the formula it computes. "bond_style"_bond_style.html harmonic "angle_style"_angle_style.html charmm "dihedral_style"_dihedral_style.html charmm "pair_style"_pair_style.html lj/charmm/coul/charmm "pair_style"_pair_style.html lj/charmm/coul/charmm/implicit "pair_style"_pair_style.html lj/charmm/coul/long :ul "special_bonds"_special_bonds.html charmm "special_bonds"_special_bonds.html amber :ul :line 4.4 Running multiple simulations from one input script :link(4_4),h4 This can be done in several ways. See the documentation for individual commands for more details on how these examples work. If "multiple simulations" means continue a previous simulation for more timesteps, then you simply use the "run"_run.html command multiple times. For example, this script units lj atom_style atomic read_data data.lj run 10000 run 10000 run 10000 run 10000 run 10000 :pre would run 5 successive simulations of the same system for a total of 50,000 timesteps. If you wish to run totally different simulations, one after the other, the "clear"_clear.html command can be used in between them to re-initialize LAMMPS. For example, this script units lj atom_style atomic read_data data.lj run 10000 clear units lj atom_style atomic read_data data.lj.new run 10000 :pre would run 2 independent simulations, one after the other. For large numbers of independent simulations, you can use "variables"_variable.html and the "next"_next.html and "jump"_jump.html commands to loop over the same input script multiple times with different settings. For example, this script, named in.polymer variable d index run1 run2 run3 run4 run5 run6 run7 run8 cd $d read_data data.polymer run 10000 cd .. clear next d jump in.polymer :pre would run 8 simulations in different directories, using a data.polymer file in each directory. The same concept could be used to run the same system at 8 different temperatures, using a temperature variable and storing the output in different log and dump files, for example variable a loop 8 variable t index 0.8 0.85 0.9 0.95 1.0 1.05 1.1 1.15 log log.$a read data.polymer velocity all create $t 352839 fix 1 all nvt $t $t 100.0 dump 1 all atom 1000 dump.$a run 100000 next t next a jump in.polymer :pre All of the above examples work whether you are running on 1 or multiple processors, but assumed you are running LAMMPS on a single partition of processors. LAMMPS can be run on multiple partitions via the "-partition" command-line switch as described in "this section"_Section_start.html#2_4 of the manual. In the last 2 examples, if LAMMPS were run on 3 partitions, the same scripts could be used if the "index" and "loop" variables were replaced with {universe}-style variables, as described in the "variable"_variable.html command. Also, the "next t" and "next a" commands would need to be replaced with a single "next a t" command. With these modifications, the 8 simulations of each script would run on the 3 partitions one after the other until all were finished. Initially, 3 simulations would be started simultaneously, one on each partition. When one finished, that partition would then start the 4th simulation, and so forth, until all 8 were completed. :line 4.5 Parallel tempering :link(4_5),h4 The "temper"_temper.html command can be used to perform a parallel tempering or replica-exchange simulation where multiple copies of a simulation are run at different temperatures on different sets of processors, and Monte Carlo temperature swaps are performed between pairs of copies. Use the -procs and -in "command-line switches"_Section_start.html#2_4 to launch LAMMPS on multiple partitions. In your input script, define a set of temperatures, one for each processor partition, using the "variable"_variable.html command: variable t proc 300.0 310.0 320.0 330.0 :pre Define a fix of style "nvt"_fix_nvt.html or "langevin"_fix_langevin.html to control the temperature of each simulation: fix myfix all nvt $t $t 100.0 :pre Use the "temper"_temper.html command in place of a "run"_run.html command to perform a simulation where tempering exchanges will take place: temper 100000 100 $t myfix 3847 58382 :pre :line 4.6 Granular models :link(4_6),h4 To run a simulation of a granular model, you will want to use the following commands: "atom_style"_atom_style.html granular "fix nve/gran"_fix_nve_gran.html "fix gravity"_fix_gravity.html "thermo_style"_thermo_style.html gran :ul Use one of these 3 pair potentials: "pair_style"_pair_style.html gran/history "pair_style"_pair_style.html gran/no_history "pair_style"_pair_style.html gran/hertzian :ul These commands implement fix options specific to granular systems: "fix freeze"_fix_freeze.html "fix gran/diag"_fix_gran_diag.html "fix insert"_fix_insert.html "fix viscous"_fix_viscous.html "fix wall/gran"_fix_wall_gran.html :ul The fix style {freeze} zeroes both the force and torque of frozen atoms, and should be used for granular system instead of the fix style {setforce}. For computational efficiency, you can eliminate needless pairwise computations between frozen atoms by using this command: "neigh_modify"_neigh_modify.html exclude :ul :line 4.7 TIP3P water model :link(4_7),h4 The TIP3P water model as implemented in CHARMM "(MacKerell)"_#MacKerell specifies a 3-site rigid water molecule with charges and Lennard-Jones parameters assigned to each of the 3 atoms. In LAMMPS the "fix shake"_fix_shake.html command can be used to hold the two O-H bonds and the H-O-H angle rigid. A bond style of {harmonic} and an angle style of {harmonic} or {charmm} should also be used. These are the additional parameters (in real units) to set for O and H atoms and the water molecule to run a rigid TIP3P-CHARMM model with a cutoff. The K values can be used if a flexible TIP3P model (without fix shake) is desired. If the LJ epsilon and sigma for HH and OH are set to 0.0, it corresponds to the original 1983 TIP3P model "(Jorgensen)"_#Jorgensen. O mass = 15.9994 H mass = 1.008 :all(b),p O charge = -0.834 H charge = 0.417 :all(b),p LJ epsilon of OO = 0.1521 LJ sigma of OO = 3.1507 LJ epsilon of HH = 0.0460 LJ sigma of HH = 0.4000 LJ epsilon of OH = 0.0836 LJ sigma of OH = 1.7753 :all(b),p K of OH bond = 450 r0 of OH bond = 0.9572 :all(b),p K of HOH angle = 55 theta of HOH angle = 104.52 :all(b),p These are the parameters to use for TIP3P with a long-range Coulombic solver (Ewald or PPPM in LAMMPS): O mass = 15.9994 H mass = 1.008 :all(b),p O charge = -0.830 H charge = 0.415 :all(b),p LJ epsilon of OO = 0.102 LJ sigma of OO = 3.1507 LJ epsilon, sigma of OH, HH = 0.0 :all(b),p K of OH bond = 450 r0 of OH bond = 0.9572 :all(b),p K of HOH angle = 55 theta of HOH angle = 104.52 :all(b),p :line 4.8 TIP4P water model :link(4_8),h4 The four-point TIP4P rigid water model extends the traditional three-point TIP3P model by adding an additional site, usually massless, where the charge associated with the oxygen atom is placed. This site M is located at a fixed distance away from the oxygen along the bisector of the HOH bond angle. A bond style of {harmonic} and an angle style of {harmonic} or {charmm} should also be used. Two different four-point models (cutoff and long-range Coulombics) can be implemented using LAMMPS pair styles with {tip4p} in their style name. For both models, the bond lengths and bond angles should be held fixed using the "fix shake"_fix_shake.html command. These are the additional parameters (in real units) to set for O and H atoms and the water molecule to run a rigid TIP4P model with a cutoff "(Jorgensen)"_#Jorgensen. Note that the OM distance is specified in the "pair_style"_pair_style.html command, not as part of the pair coefficients. O mass = 15.9994 H mass = 1.008 :all(b),p O charge = -1.040 H charge = 0.520 :all(b),p r0 of OH bond = 0.9572 theta of HOH angle = 104.52 :all(b),p OM distance = 0.15 :all(b),p LJ epsilon of O-O = 0.1550 LJ sigma of O-O = 3.1536 LJ epsilon, sigma of OH, HH = 0.0 :all(b),p These are the parameters to use for TIP4P with a long-range Coulombic solver (Ewald or PPPM in LAMMPS): O mass = 15.9994 H mass = 1.008 :all(b),p O charge = -1.0484 H charge = 0.5242 :all(b),p r0 of OH bond = 0.9572 theta of HOH angle = 104.52 :all(b),p OM distance = 0.1250 :all(b),p LJ epsilon of O-O = 0.16275 LJ sigma of O-O = 3.16435 LJ epsilon, sigma of OH, HH = 0.0 :all(b),p :line 4.9 SPC water model :link(4_9),h4 The SPC water model specifies a 3-site rigid water molecule with charges and Lennard-Jones parameters assigned to each of the 3 atoms. In LAMMPS the "fix shake"_fix_shake.html command can be used to hold the two O-H bonds and the H-O-H angle rigid. A bond style of {harmonic} and an angle style of {harmonic} or {charmm} should also be used. These are the additional parameters (in real units) to set for O and H atoms and the water molecule to run a rigid SPC model with long-range Coulombics (Ewald or PPPM in LAMMPS). O mass = 15.9994 H mass = 1.008 :all(b),p O charge = -0.820 H charge = 0.410 :all(b),p LJ epsilon of OO = 0.1553 LJ sigma of OO = 3.166 LJ epsilon, sigma of OH, HH = 0.0 :all(b),p r0 of OH bond = 1.0 theta of HOH angle = 109.47 :all(b),p :line 4.10 Coupling LAMMPS to other codes :link(4_10),h4 LAMMPS is designed to allow it to be coupled to other codes. For example, a quantum mechanics code might compute forces on a subset of atoms and pass those forces to LAMMPS. Or a continuum finite element (FE) simulation might use atom positions as boundary conditions on FE nodal points, compute a FE solution, and return interpolated forces on MD atoms. LAMMPS can be coupled to other codes in at least 3 ways. Each has advantages and disadvantages, which you'll have to think about in the context of your application. (1) Define a new "fix"_fix.html command that calls the other code. In this scenario, LAMMPS is the driver code. During its timestepping, the fix is invoked, and can make library calls to the other code, which has been linked to LAMMPS as a library. This is the way the "POEMS"_poems package that performs constrained rigid-body motion on groups of atoms is hooked to LAMMPS. See the "fix_poems"_fix_poems.html command for more details. See "this section"_Section_modify.html of the documention for info on how to add a new fix to LAMMPS. :link(poems,http://www.rpi.edu/~anderk5/lab) (2) Define a new LAMMPS command that calls the other code. This is conceptually similar to method (1), but in this case LAMMPS and the the other code are on a more equal footing. Note that now the other code is not called during the timesteps of a LAMMPS run, but between runs. The LAMMPS input script can be used to alternate LAMMPS runs with calls to the other code, invoked via the new command. The "run"_run.html command facilitates this with its {every} option, which makes it easy to run a few steps, invoke the command, run a few steps, invoke the command, etc. In this scenario, the other code can be a library, called by the command, or it could be a stand-alone code, invoked by a system() call made by the command (assuming your parallel machine allows one or more processors to start up another program). In the latter case the stand-alone code could communicate with LAMMPS thru files that the command writes and reads. See "this section"_Section_modify.html of the documention for how to add a new command to LAMMPS. (3) Use LAMMPS as a library called by another code. In this case the other code is the driver and calls LAMMPS as needed. Or a wrapper code could link and call both LAMMPS and another code as libraries. Again, the "run"_run.html command has options that allow it to be invoked with minimal overhead (no setup or clean-up) if you wish to do multiple short runs, driven by another program. "This section"_Section_start.html#2_2 of the documention describes how to build LAMMPS as a library. Once this is done, you can interface with LAMMPS either via C++, C, or Fortran (or any other language that supports a vanilla C-like interface, e.g. a scripting language). For example, from C++ you could create an "instance" of LAMMPS, and initialize it, pass it an input script to process, or execute individual commands, all by invoking the correct class methods in LAMMPS. From C or Fortran you would make function calls to do the same things. Library.cpp and library.h contain such a C interface that illustrates this with the functions: void lammps_open(int, char **, MPI_Comm); void lammps_close(); void lammps_file(char *); char *lammps_command(char *); :pre The functions contain the C++ code you would need to put in a C++ application that was invoking LAMMPS directly. Two of the routines in library.cpp are of particular note. The lammps_open() function initiates LAMMPS and takes an MPI communicator as an argument. LAMMPS will run on the set of processors in the communicator. This means the calling code can run LAMMPS on all or a subset of processors. For example, a wrapper script might decide to alternate between LAMMPS and another code, allowing them both to run on all the processors. Or it might allocate half the processors to LAMMPS and half to the other code and run both codes simultaneously before syncing them up periodically. Library.cpp also contains a lammps_command() function to which the caller passes a single LAMMPS command (a string). Thus the calling code can read or generate a series of LAMMPS commands (e.g. an input script) one line at a time and pass it thru the library interface to setup a problem and then run it. A few other sample routines are included in library.cpp, but the key idea is that you can write any routines you wish to define an interface for how your code talks to LAMMPS and add them to library.cpp and library.h. The routines you add can access any LAMMPS data. The umbrella.cpp code in examples/couple is a simple example of how a stand-alone code can link LAMMPS as a library, run LAMMPS on a subset of processors, grab data from LAMMPS, change it, and put it back into LAMMPS. :line +:link(Cornell) +[(Cornell)] Corenll, Cieplak, Bayly, Gould, Merz, Ferguson, +Spellmeyer, Fox, Caldwell, Kollman, JACS 117, 5179-5197 (1995). + :link(Horn) [(Horn)] Horn, Swope, Pitera, Madura, Dick, Hura, and Head-Gordon, J Chem Phys, 120, 9665 (2004). :link(MacKerell) [(MacKerell)] MacKerell, Bashford, Bellott, Dunbrack, Evanseck, Field, Fischer, Gao, Guo, Ha, et al, J Phys Chem, 102, 3586 (1998). :link(Jorgensen) [(Jorgensen)] Jorgensen, Chandrasekhar, Madura, Impey, Klein, J Chem Phys, 79, 926 (1983). diff --git a/doc/Section_start.html b/doc/Section_start.html index 26541a71c..6c2b63473 100644 --- a/doc/Section_start.html +++ b/doc/Section_start.html @@ -1,613 +1,614 @@This section describes how to unpack, make, and run LAMMPS, for both new and experienced users.
2.1 What's in the LAMMPS distributionWhen you download LAMMPS you will need to unzip and untar the downloaded file with the following commands, after placing the file in an appropriate directory.
gunzip lammps*.tar.gz tar xvf lammps*.tar
This will create a LAMMPS directory containing two files and several sub-directories:
README | text file |
LICENSE | the GNU General Public License (GPL) |
bench | benchmark problems |
doc | documentation |
examples | simple test problems |
potentials | embedded atom method (EAM) potential files |
src | source files |
tools | pre- and post-processing tools |
Read this first:
Building LAMMPS can be non-trivial. You will likely need to edit a makefile, there are compiler options, additional libraries can be used (MPI, FFT), etc. Please read this section carefully. If you are not comfortable with makefiles, or building codes on a Unix platform, or running an MPI job on your machine, please find a local expert to help you. Many of the emails we get about build and run problems are not really about LAMMPS - they are peculiar to the user's system, compilers, libraries, etc. Such questions are better answered by a local expert.
If you have a build problem that you are convinced is a LAMMPS issue (e.g. the compiler complains about a line of LAMMPS source code), then please send an email to the developers. Note that doesn't include linking problems - that's a question for a local expert!
Also, if you succeed in building LAMMPS on a new kind of machine (which there isn't a similar Makefile for in the distribution), send it to the developers and we'll include it in future LAMMPS releases.
Building a LAMMPS executable:
The src directory contains the C++ source and header files for LAMMPS. It also contains a top-level Makefile and a MAKE directory with low-level Makefile.* files for several machines. From within the src directory, type "make" or "gmake". You should see a list of available choices. If one of those is the machine and options you want, you can type a command like:
make linux gmake mac
If you get no errors and an executable like lmp_linux or lmp_mac is produced, you're done; it's your lucky day. The remainder of this section addressed the following topics: errors that occur when making LAMMPS, editing a new low-level Makefile.foo, how to make LAMMPS with and without packages, and additional build tips.
Errors that occur when making LAMMPS:
(1) If the make command breaks immediately with errors that indicate it can't find files with a "*" in their names, this can be because your machine's make doesn't support wildcard expansion in a makefile. Try gmake instead of make. If that doesn't work, try using a -f switch with your make command to use Makefile.list which explicitly lists all the needed files, e.g.
make makelist make -f Makefile.list linux gmake -f Makefile.list mac
The first "make" command will create a current Makefile.list with all the file names in your src dir. The 2nd "make" command (make or gmake) will use it to build LAMMPS.
(2) Other errors typically occur because the low-level Makefile isn't setup correctly for your machine. If your platform is named "foo", you need to create a Makefile.foo in the MAKE directory. Use whatever existing file is closest to your platform as a starting point. See the next section for more instructions.
Editing a new low-level Makefile.foo:
These are the issues you need to address when editing a low-level Makefile for your machine. With a couple exceptions, the only portion of the file you should need to edit is the "System-specific Settings" section.
(1) Change the first line of Makefile.foo to include the word "foo" and whatever other options you set. This is the line you will see if you just type "make".
(2) Set the paths and flags for your C++ compiler, including optimization flags. You can use g++, the open-source GNU compiler, which is available on all Unix systems. Vendor compilers often produce faster code. On boxes with Intel CPUs, I use the free Intel icc compiler, which you can download from Intel's compiler site.
(3) If you want LAMMPS to run in parallel, you must have an MPI library installed on your platform. Makefile.foo needs to specify where the mpi.h file (-I switch) and the libmpi.a library (-L switch) is found. On my Linux box, I use Argonne's MPICH 1.2 which can be downloaded from the Argonne MPI site. LAM MPI should also work. If you are running on a big parallel platform, your system people or the vendor should have already installed a version of MPI, which will be faster than MPICH or LAM, so find out how to link against it. If you use MPICH or LAM, you will have to configure and build it for your platform. The MPI configure script should have compiler options to enable you to use the same compiler you are using for the LAMMPS build, which can avoid problems that may arise when linking LAMMPS to the MPI library.
(4) If you just want LAMMPS to run on a single processor, you can use the STUBS library in place of MPI, since you don't need an MPI library installed on your system. See the Makefile.serial file for how to specify the -I and -L switches. You will also need to build the STUBS library for your platform before making LAMMPS itself. From the STUBS dir, type "make" and it will hopefully create a libmpi.a suitable for linking to LAMMPS. If the build fails, you will need to edit the STUBS/Makefile for your platform.
The file STUBS/mpi.cpp has a CPU timer function MPI_Wtime() that calls gettimeofday() . If your system doesn't support gettimeofday() , you'll need to insert code to call another timer. Note that the ANSI-standard function clock() rolls over after an hour or so, and is therefore insufficient for timing long LAMMPS runs.
(5) If you want to use the particle-particle particle-mesh (PPPM) option in LAMMPS for long-range Coulombics, you must have a 1d FFT library installed on your platform. This is specified by a switch of the form -DFFT_XXX where XXX = INTEL, DEC, SGI, SCSL, or FFTW. All but the last one are native vendor-provided libraries. FFTW is a fast, portable library that should work on any platform. You can download it from www.fftw.org. Use version 2.1.X, not the newer 3.0.X. Building FFTW for my box was as simple as ./configure; make. Whichever FFT library you have on your platform, you'll need to set the appropriate -I and -L switches in Makefile.foo.
If you examine fft3d.c and fft3d.h you'll see it's possible to add other vendor FFT libraries via #ifdef statements in the appropriate places. If you successfully add a new FFT option, like -DFFT_IBM, please send the developers an email; we'd like to add it to LAMMPS.
(6) If you don't plan to use PPPM, you don't need an FFT library. Use a -DFFT_NONE switch in the CCFLAGS setting of Makefile.foo, or exclude the KSPACE package (see below).
(7) There are a few other -D compiler switches you can set as part of CCFLAGS. The read_data and dump commands will read/write gzipped files if you compile with -DGZIP. It requires that your Unix support the "popen" command. Using one of the -DPACK_ARRAY, -DPACK_POINTER, and -DPACK_MEMCPY options can make for faster parallel FFTs (in the PPPM solver) on some platforms. The -DPACK_ARRAY setting is the default.
(8) The DEPFLAGS setting is how the C++ compiler creates a dependency file for each source file. This speeds re-compilation when source (*.cpp) or header (*.h) files are edited. Some compilers do not support dependency file creation, or may use a different switch than -D. GNU g++ works with -D. If your compiler can't create dependency files (a long list of errors involving *.d files), then you'll need to create a Makefile.foo patterned after Makefile.tflop, which uses different rules that do not involve dependency files.
That's it. Once you have a correct Makefile.foo and you have pre-built the MPI and FFT libraries it will use, all you need to do from the src directory is type one of these 2 commands:
make foo gmake foo
You should get the executable lmp_foo when the build is complete.
How to make LAMMPS with and without packages:
The source code for LAMMPS is structured as a large set of core files that are always used plus additional packages, which are groups of files that enable a specific set of features. For example, force fields for molecular systems or granular systems are in packages. You can see the list of packages by typing "make package". The current list of packages is as follows:
class2 | class 2 force fields |
dpd | dissipative particle dynamics (DPD) force field |
granular | force fields and boundary conditions for granular systems |
kspace | long-range Ewald and particle-mesh (PPPM) solvers |
manybody | metal, 3-body, bond-order potentials |
molecule | force fields for molecular systems |
poems | coupled rigid body motion |
xtc | dump atom snapshots in XTC format |
Any or all of these packages can be included or excluded when LAMMPS -is built. The default is to include only the kspace and molecule -packages. You may wish to exclude certain packages if you will never -run certain kinds of simulations. This will produce a smaller -executable which in some cases will also run a bit faster. +is built. The default is to include only the kspace, manybody, and +molecule packages. You may wish to exclude certain packages if you +will never run certain kinds of simulations. This will produce a +smaller executable which in some cases will also run a bit faster.
Packages are included or excluded by typing "make yes-name" or "make no-name", where "name" is the name of the package. You can also type "make yes-all" or "make no-all" to include/exclude all optional packages. These commands work by simply moving files back and forth between the main src directory and sub-directories with the package name, so that the files are not seen when LAMMPS is built. After you have included or excluded a package, you must re-make LAMMPS.
Additional make options exist to help manage LAMMPS files that exist in both the src directory and in package sub-directories. Typing "make package-update" will overwrite src files with files from the package directories if the package has been included. Typing "make package-overwrite" will overwrite files in the package directories with src files. Typing "make package-check" will list differences between src and package versions of the same files.
To use the poems package you must build LAMMPS with the POEMS library, which computes the constrained rigid-body motion of articulated (jointed) multibody systems. POEMS was written and is distributed by Prof Kurt Anderson's group at Rensselaer Polytechnic Institute (RPI). It is included in the LAMMPS distribution. To build LAMMPS with POEMS, you must use a low-level LAMMPS Makefile that includes the POEMS directory in its paths. See Makefile.g++.poems as an example. You must also build POEMS itself as a library before building LAMMPS, so that LAMMPS can link against it. The POEMS library is built by typing "make" from within the poems directory in the LAMMPS distribution. By default this uses Makefile which uses the gcc compiler. If you need to use another compiler (so that the POEMS library and LAMMPS are consistent), use another poems/Makefile.* or create your own and invoke it as "make -f Makefile.*".
Building LAMMPS as a library:
LAMMPS can be built as a library, which can then be called from another application or a scripting language. See this section for more info on coupling LAMMPS to other codes. Building LAMMPS as a library is done by typing
make makelib make -f Makefile.lib foo
where foo is the machine name. The first "make" command will create a current Makefile.lib with all the file names in your src dir. The 2nd "make" command will use it to build LAMMPS as a library. This requires that Makefile.foo have a library target (lib) and system-specific settings for ARCHIVE and ARFLAGS. See Makefile.linux for an example. The build will create the file liblmp_foo.a which another application can link to. The callable functions in the library are listed in library.h, but you can add as many functions as you wish to library.h and library.cpp, which can access LAMMPS data and return it to the caller or set LAMMPS data values as specified by the caller. These 3 functions are included in the library:
void lammps_open(int, char **, MPI_Comm); void lammps_close(); int lammps_command(char *);
The lammps_open() function is used to initialize LAMMPS, passing in a list of strings as if they were command-line arguments when LAMMPS is run from the command line and a MPI communicator for LAMMPS to run under. The lammps_close() function is used to shut down LAMMPS and free all its memory. The lammps_command() function is used to pass a string to LAMMPS as if it were an input command read from an input script. See the library.h file for more information about the arguments and return values for these 3 functions.
Additional build tips:
(1) Building LAMMPS for multiple platforms.
You can make LAMMPS for multiple platforms from the same src directory. Each target creates its own object sub-dir called Obj_name where it stores the system-specific *.o files.
(2) Cleaning up.
Typing "make clean" will delete all *.o object files created when LAMMPS is built.
(3) On some 64-bit machines, compiling with -O3 appears to break the Coulombic tabling option used by the pair_style lj/cut/coul/long and lj/charmm/coul/long styles. By default, tabling is used by these styles since it can offer a 2x speed-up. It can be disabled via the pair_modify command. Alternatively, the associated files (e.g. pair_lj_cut_coul_long.cpp) can be compiled with -O2, or with the compiler flag -fno-strict-aliasing. Either of those build changes seems to fix the problem.
(4) Building for a Macintosh.
OS X is BSD Unix, so it already works. See the Makefile.mac file.
(5) Building for MicroSoft Windows.
I've never done this, but LAMMPS is just standard C++ with MPI and FFT calls. You should be able to use cygwin to build LAMMPS with a Unix make. Or you should be able to pull all the source files into Visual C++ (ugh) or some similar development environment and build it. In the src/MAKE/Windows directory are some notes from users on how they built LAMMPS under Windows, so you can look at their instructions for tips. Good luck - I can't help you on this one.
By default, LAMMPS runs by reading commands from stdin; e.g. lmp_linux < in.file. This means you first create an input script (e.g. in.file) containing the desired commands. This section describes how input scripts are structured and what commands they contain.
You can test LAMMPS on any of the sample inputs provided in the examples directory. Input scripts are named in.* and sample outputs are named log.*.name.P where name is a machine and P is the number of processors it was run on.
Here is how you might run one of the Lennard-Jones tests on a Linux box, using mpirun to launch a parallel job:
cd src make linux cp lmp_linux ../examples/lj cd ../examples/lj mpirun -np 4 lmp_linux < in.lj.nve
The screen output from LAMMPS is described in the next section. As it runs, LAMMPS also writes a log.lammps file with the same information. Note that this sequence of commands copied the LAMMPS executable (lmp_linux) to the directory with the input files. If you don't do this, LAMMPS may look for input files or create output files in the directory where the executable is, rather than where you run it from.
If LAMMPS encounters errors in the input script or while running a simulation it will print an ERROR message and stop or a WARNING message and continue. See this section for a discussion of the various kinds of errors LAMMPS can or can't detect, a list of all ERROR and WARNING messages, and what to do about them.
LAMMPS can run a problem on any number of processors, including a single processor. In theory 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 molecular dynamics phase space trajectories.
LAMMPS can run as large a problem as will fit in the physical memory of one or more processors. If you run out of memory, you must run on more processors or setup a smaller problem.
At run time, LAMMPS recognizes several optional command-line switches which may be used in any order. For example, lmp_ibm might be launched as follows:
mpirun -np 16 lmp_ibm -var f tmp.out -log my.log -screen none < in.alloy
These are the command-line options:
-echo style
Set the style of command echoing. The style can be none or screen or log or both. Depending on the style, each command read from the input script will be echoed to the screen and/or logfile. This can be useful to figure out which line of your script is causing an input error. The default value is log. The echo style can also be set by using the echo command in the input script itself.
-partition 8x2 4 5 ...
Invoke LAMMPS in multi-partition mode. When LAMMPS is run on P processors and this switch is not used, LAMMPS runs in one partition, i.e. all P processors run a single simulation. If this switch is used, the P processors are split into separate partitions and each partition runs its own simulation. The arguments to the switch specify the number of processors in each partition. Arguments of the form MxN mean M partitions, each with N processors. Arguments of the form N mean a single partition with N processors. The sum of processors in all partitions must equal P. Thus the command "-partition 8x2 4 5" has 10 partitions and runs on a total of 25 processors.
The input script specifies what simulation is run on which partition; see the variable and next commands. Simulations running on different partitions can also communicate with each other; see the temper command.
-in file
Specify a file to use as an input script. This is an optional switch when running LAMMPS in one-partition mode. If it is not specified, LAMMPS reads its input script from stdin - e.g. lmp_linux < in.run. This is a required switch when running LAMMPS in multi-partition mode, since multiple processors cannot all read from stdin.
-log file
Specify a log file for LAMMPS to write status information to. In one-partition mode, if the switch is not used, LAMMPS writes to the file log.lammps. If this switch is used, LAMMPS writes to the specified file. In multi-partition mode, if the switch is not used, a log.lammps file is created with hi-level status information. Each partition also writes to a log.lammps.N file where N is the partition ID. If the switch is specified in multi-partition mode, the hi-level logfile is named "file" and each partition also logs information to a file.N. For both one-partition and multi-partition mode, if the specified file is "none", then no log files are created. Using a log command in the input script will override this setting.
-screen file
Specify a file for LAMMPS to write it's screen information to. In one-partition mode, if the switch is not used, LAMMPS writes to the screen. If this switch is used, LAMMPS writes to the specified file instead and you will see no screen output. In multi-partition mode, if the switch is not used, hi-level status information is written to the screen. Each partition also writes to a screen.N file where N is the partition ID. If the switch is specified in multi-partition mode, the hi-level screen dump is named "file" and each partition also writes screen information to a file.N. For both one-partition and multi-partition mode, if the specified file is "none", then no screen output is performed.
-var name value
Specify a variable that will be defined for substitution purposes when the input script is read. "Name" is the variable name which can be a single character (referenced as $x in the input script) or a full string (referenced as ${abc}). The value can be any string. Using this command-line option is equivalent to putting the line "variable name index value" at the beginning of the input script. See the variable command for more info on defining variables and this section for more info on using variables in scripts.
As LAMMPS reads an input script, it prints information to both the screen and a log file about significant actions it takes to setup a simulation. When the simulation is ready to begin, LAMMPS performs various initializations and prints the amount of memory (in MBytes per processor) that the simulation requires. It also prints details of the initial thermodynamic state of the system. During the run itself, thermodynamic information is printed periodically, every few timesteps. When the run concludes, LAMMPS prints the final thermodynamic state and a total run time for the simulation. It then appends statistics about the CPU time and storage requirements for the simulation. An example set of statistics is shown here:
Loop time of 49.002 on 2 procs for 2004 atoms
Pair time (%) = 35.0495 (71.5267) Bond time (%) = 0.092046 (0.187841) Kspce time (%) = 6.42073 (13.103) Neigh time (%) = 2.73485 (5.5811) Comm time (%) = 1.50291 (3.06703) Outpt time (%) = 0.013799 (0.0281601) Other time (%) = 2.13669 (4.36041)
Nlocal: 1002 ave, 1015 max, 989 min Histogram: 1 0 0 0 0 0 0 0 0 1 Nghost: 8720 ave, 8724 max, 8716 min Histogram: 1 0 0 0 0 0 0 0 0 1 Neighs: 354141 ave, 361422 max, 346860 min Histogram: 1 0 0 0 0 0 0 0 0 1
Total # of neighbors = 708282 Ave neighs/atom = 353.434 Ave special neighs/atom = 2.34032 Number of reneighborings = 42 Dangerous reneighborings = 2
The first section gives the breakdown of the CPU run time (in seconds) into major categories. The second section lists the number of owned atoms (Nlocal), ghost atoms (Nghost), and pair-wise neighbors stored per processor. The max and min values give the spread of these values across processors with a 10-bin histogram showing the distribution. The total number of histogram counts is equal to the number of processors.
The last section gives aggregate statistics for pair-wise neighbors and special neighbors that LAMMPS keeps track of (see the special_bonds command). The number of times neighbor lists were rebuilt during the run is given as well as the number of potentially "dangerous" rebuilds. If atom movement triggered neighbor list rebuilding (see the neigh_modify command), then dangerous reneighborings are those that were triggered on the first timestep atom movement was checked for. If this count is non-zero you may wish to reduce the delay factor to insure no force interactions are missed by atoms moving beyond the neighbor skin distance before a rebuild takes place.
If an energy minimization was performed via the minimize command, additional information is printed, e.g.
Minimization stats: E initial, next-to-last, final = -0.895962 -2.94193 -2.94342 Gradient 2-norm init/final= 1920.78 20.9992 Gradient inf-norm init/final= 304.283 9.61216 Iterations = 36 Force evaluations = 177
The first line lists the initial and final energy, as well as the energy on the next-to-last iteration. The next 2 lines give a measure of the gradient of the energy (force on all atoms). The 2-norm is the "length" of this force vector; the inf-norm is the largest component. The last 2 lines are statistics on how many iterations and force-evaluations the minimizer required. Multiple force evalulations are typically done at each iteration to perform a 1d line minimization in the search direction.
If a kspace_style long-range Coulombics solve was performed during the run (PPPM, Ewald), then additional information is printed, e.g.
FFT time (% of Kspce) = 0.200313 (8.34477) FFT Gflps 3d 1d-only = 2.31074 9.19989
The first line gives the time spent doing 3d FFTs (4 per timestep) and the fraction it represents of the total KSpace time (listed above). Each 3d FFT requires computation (3 sets of 1d FFTs) and communication (transposes). The total flops performed is 5Nlog_2(N), where N is the number of points in the 3d grid. The FFTs are timed with and without the communication and a Gflop rate is computed. The 3d rate is with communication; the 1d rate is without (just the 1d FFTs). Thus you can estimate what fraction of your FFT time was spent in communication, roughly 75% in the example above.
LAMMPS 2003 is a complete C++ rewrite of LAMMPS 2001, which was written in F90. Features of earlier versions of LAMMPS are listed in this section. The F90 and F77 versions (2001 and 99) are also freely distributed as open-source codes; check the LAMMPS WWW Site for distribution information if you prefer those versions. The 99 and 2001 versions are no longer under active development; they do not have all the features of LAMMPS 2003.
If you are a previous user of LAMMPS 2001, these are the most significant changes you will notice in LAMMPS 2003:
(1) The names and arguments of many input script commands have changed. All commands are now a single word (e.g. read_data instead of read data).
(2) All the functionality of LAMMPS 2001 is included in LAMMPS 2003, but you may need to specify the relevant commands in different ways.
(3) The format of the data file can be streamlined for some problems. See the read_data command for details. The data file section "Nonbond Coeff" has been renamed to "Pair Coeff" in LAMMPS 2003.
(4) Binary restart files written by LAMMPS 2001 cannot be read by LAMMPS 2003 with a read_restart command. This is because they were output by F90 which writes in a different binary format than C or C++ writes or reads. Use the restart2data tool provided with LAMMPS 2001 to convert the 2001 restart file to a text data file. Then edit the data file as necessary before using the LAMMPS 2003 read_data command to read it in.
(5) There are numerous small numerical changes in LAMMPS 2003 that mean you will not get identical answers when comparing to a 2001 run. However, your initial thermodynamic energy and MD trajectory should be close if you have setup the problem for both codes the same.
diff --git a/doc/Section_start.txt b/doc/Section_start.txt index 1a1fe9d68..2334834a6 100644 --- a/doc/Section_start.txt +++ b/doc/Section_start.txt @@ -1,604 +1,605 @@ "Previous Section"_Section_intro.html - "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc - "Next Section"_Section_commands.html :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line 2. Getting Started :h3 This section describes how to unpack, make, and run LAMMPS, for both new and experienced users. 2.1 "What's in the LAMMPS distribution"_#2_1 2.2 "Making LAMMPS"_#2_2 2.3 "Running LAMMPS"_#2_3 2.4 "Command-line options"_#2_4 2.5 "Screen output"_#2_5 2.6 "Tips for users of previous versions"_#2_6 :all(b) :line 2.1 What's in the LAMMPS distribution :h4,link(2_1) When you download LAMMPS you will need to unzip and untar the downloaded file with the following commands, after placing the file in an appropriate directory. gunzip lammps*.tar.gz tar xvf lammps*.tar :pre This will create a LAMMPS directory containing two files and several sub-directories: README: text file LICENSE: the GNU General Public License (GPL) bench: benchmark problems doc: documentation examples: simple test problems potentials: embedded atom method (EAM) potential files src: source files tools: pre- and post-processing tools :tb(s=:) :line 2.2 Making LAMMPS :h4,link(2_2) [{Read this first:}] Building LAMMPS can be non-trivial. You will likely need to edit a makefile, there are compiler options, additional libraries can be used (MPI, FFT), etc. Please read this section carefully. If you are not comfortable with makefiles, or building codes on a Unix platform, or running an MPI job on your machine, please find a local expert to help you. Many of the emails we get about build and run problems are not really about LAMMPS - they are peculiar to the user's system, compilers, libraries, etc. Such questions are better answered by a local expert. If you have a build problem that you are convinced is a LAMMPS issue (e.g. the compiler complains about a line of LAMMPS source code), then please send an email to the "developers"_http://lammps.sandia.gov/authors.html. Note that doesn't include linking problems - that's a question for a local expert! Also, if you succeed in building LAMMPS on a new kind of machine (which there isn't a similar Makefile for in the distribution), send it to the developers and we'll include it in future LAMMPS releases. [{Building a LAMMPS executable:}] The src directory contains the C++ source and header files for LAMMPS. It also contains a top-level Makefile and a MAKE directory with low-level Makefile.* files for several machines. From within the src directory, type "make" or "gmake". You should see a list of available choices. If one of those is the machine and options you want, you can type a command like: make linux gmake mac :pre If you get no errors and an executable like lmp_linux or lmp_mac is produced, you're done; it's your lucky day. The remainder of this section addressed the following topics: errors that occur when making LAMMPS, editing a new low-level Makefile.foo, how to make LAMMPS with and without packages, and additional build tips. [{Errors that occur when making LAMMPS:}] (1) If the make command breaks immediately with errors that indicate it can't find files with a "*" in their names, this can be because your machine's make doesn't support wildcard expansion in a makefile. Try gmake instead of make. If that doesn't work, try using a -f switch with your make command to use Makefile.list which explicitly lists all the needed files, e.g. make makelist make -f Makefile.list linux gmake -f Makefile.list mac :pre The first "make" command will create a current Makefile.list with all the file names in your src dir. The 2nd "make" command (make or gmake) will use it to build LAMMPS. (2) Other errors typically occur because the low-level Makefile isn't setup correctly for your machine. If your platform is named "foo", you need to create a Makefile.foo in the MAKE directory. Use whatever existing file is closest to your platform as a starting point. See the next section for more instructions. [{Editing a new low-level Makefile.foo:}] These are the issues you need to address when editing a low-level Makefile for your machine. With a couple exceptions, the only portion of the file you should need to edit is the "System-specific Settings" section. (1) Change the first line of Makefile.foo to include the word "foo" and whatever other options you set. This is the line you will see if you just type "make". (2) Set the paths and flags for your C++ compiler, including optimization flags. You can use g++, the open-source GNU compiler, which is available on all Unix systems. Vendor compilers often produce faster code. On boxes with Intel CPUs, I use the free Intel icc compiler, which you can download from "Intel's compiler site"_intel. :link(intel,http://www.intel.com/software/products/noncom) (3) If you want LAMMPS to run in parallel, you must have an MPI library installed on your platform. Makefile.foo needs to specify where the mpi.h file (-I switch) and the libmpi.a library (-L switch) is found. On my Linux box, I use Argonne's MPICH 1.2 which can be downloaded from the "Argonne MPI site"_http://www-unix.mcs.anl.gov/mpi. LAM MPI should also work. If you are running on a big parallel platform, your system people or the vendor should have already installed a version of MPI, which will be faster than MPICH or LAM, so find out how to link against it. If you use MPICH or LAM, you will have to configure and build it for your platform. The MPI configure script should have compiler options to enable you to use the same compiler you are using for the LAMMPS build, which can avoid problems that may arise when linking LAMMPS to the MPI library. (4) If you just want LAMMPS to run on a single processor, you can use the STUBS library in place of MPI, since you don't need an MPI library installed on your system. See the Makefile.serial file for how to specify the -I and -L switches. You will also need to build the STUBS library for your platform before making LAMMPS itself. From the STUBS dir, type "make" and it will hopefully create a libmpi.a suitable for linking to LAMMPS. If the build fails, you will need to edit the STUBS/Makefile for your platform. The file STUBS/mpi.cpp has a CPU timer function MPI_Wtime() that calls gettimeofday() . If your system doesn't support gettimeofday() , you'll need to insert code to call another timer. Note that the ANSI-standard function clock() rolls over after an hour or so, and is therefore insufficient for timing long LAMMPS runs. (5) If you want to use the particle-particle particle-mesh (PPPM) option in LAMMPS for long-range Coulombics, you must have a 1d FFT library installed on your platform. This is specified by a switch of the form -DFFT_XXX where XXX = INTEL, DEC, SGI, SCSL, or FFTW. All but the last one are native vendor-provided libraries. FFTW is a fast, portable library that should work on any platform. You can download it from "www.fftw.org"_http://www.fftw.org. Use version 2.1.X, not the newer 3.0.X. Building FFTW for my box was as simple as ./configure; make. Whichever FFT library you have on your platform, you'll need to set the appropriate -I and -L switches in Makefile.foo. If you examine fft3d.c and fft3d.h you'll see it's possible to add other vendor FFT libraries via #ifdef statements in the appropriate places. If you successfully add a new FFT option, like -DFFT_IBM, please send the "developers"_http://lammps.sandia.gov an email; we'd like to add it to LAMMPS. (6) If you don't plan to use PPPM, you don't need an FFT library. Use a -DFFT_NONE switch in the CCFLAGS setting of Makefile.foo, or exclude the KSPACE package (see below). (7) There are a few other -D compiler switches you can set as part of CCFLAGS. The read_data and dump commands will read/write gzipped files if you compile with -DGZIP. It requires that your Unix support the "popen" command. Using one of the -DPACK_ARRAY, -DPACK_POINTER, and -DPACK_MEMCPY options can make for faster parallel FFTs (in the PPPM solver) on some platforms. The -DPACK_ARRAY setting is the default. (8) The DEPFLAGS setting is how the C++ compiler creates a dependency file for each source file. This speeds re-compilation when source (*.cpp) or header (*.h) files are edited. Some compilers do not support dependency file creation, or may use a different switch than -D. GNU g++ works with -D. If your compiler can't create dependency files (a long list of errors involving *.d files), then you'll need to create a Makefile.foo patterned after Makefile.tflop, which uses different rules that do not involve dependency files. That's it. Once you have a correct Makefile.foo and you have pre-built the MPI and FFT libraries it will use, all you need to do from the src directory is type one of these 2 commands: make foo gmake foo :pre You should get the executable lmp_foo when the build is complete. [{How to make LAMMPS with and without packages:}] The source code for LAMMPS is structured as a large set of core files that are always used plus additional packages, which are groups of files that enable a specific set of features. For example, force fields for molecular systems or granular systems are in packages. You can see the list of packages by typing "make package". The current list of packages is as follows: class2 : class 2 force fields dpd : dissipative particle dynamics (DPD) force field granular : force fields and boundary conditions for granular systems kspace : long-range Ewald and particle-mesh (PPPM) solvers +manybody : metal, 3-body, bond-order potentials molecule : force fields for molecular systems poems : coupled rigid body motion xtc : dump atom snapshots in XTC format :tb(s=:) Any or all of these packages can be included or excluded when LAMMPS -is built. The default is to include only the kspace and molecule -packages. You may wish to exclude certain packages if you will never -run certain kinds of simulations. This will produce a smaller -executable which in some cases will also run a bit faster. +is built. The default is to include only the kspace, manybody, and +molecule packages. You may wish to exclude certain packages if you +will never run certain kinds of simulations. This will produce a +smaller executable which in some cases will also run a bit faster. Packages are included or excluded by typing "make yes-name" or "make no-name", where "name" is the name of the package. You can also type "make yes-all" or "make no-all" to include/exclude all optional packages. These commands work by simply moving files back and forth between the main src directory and sub-directories with the package name, so that the files are not seen when LAMMPS is built. After you have included or excluded a package, you must re-make LAMMPS. Additional make options exist to help manage LAMMPS files that exist in both the src directory and in package sub-directories. Typing "make package-update" will overwrite src files with files from the package directories if the package has been included. Typing "make package-overwrite" will overwrite files in the package directories with src files. Typing "make package-check" will list differences between src and package versions of the same files. To use the poems package you must build LAMMPS with the POEMS library, which computes the constrained rigid-body motion of articulated (jointed) multibody systems. POEMS was written and is distributed by Prof Kurt Anderson's group at Rensselaer Polytechnic Institute (RPI). It is included in the LAMMPS distribution. To build LAMMPS with POEMS, you must use a low-level LAMMPS Makefile that includes the POEMS directory in its paths. See Makefile.g++.poems as an example. You must also build POEMS itself as a library before building LAMMPS, so that LAMMPS can link against it. The POEMS library is built by typing "make" from within the poems directory in the LAMMPS distribution. By default this uses Makefile which uses the gcc compiler. If you need to use another compiler (so that the POEMS library and LAMMPS are consistent), use another poems/Makefile.* or create your own and invoke it as "make -f Makefile.*". [{Building LAMMPS as a library:}] LAMMPS can be built as a library, which can then be called from another application or a scripting language. See "this section"_Section_howto.html#4_10 for more info on coupling LAMMPS to other codes. Building LAMMPS as a library is done by typing make makelib make -f Makefile.lib foo :pre where foo is the machine name. The first "make" command will create a current Makefile.lib with all the file names in your src dir. The 2nd "make" command will use it to build LAMMPS as a library. This requires that Makefile.foo have a library target (lib) and system-specific settings for ARCHIVE and ARFLAGS. See Makefile.linux for an example. The build will create the file liblmp_foo.a which another application can link to. The callable functions in the library are listed in library.h, but you can add as many functions as you wish to library.h and library.cpp, which can access LAMMPS data and return it to the caller or set LAMMPS data values as specified by the caller. These 3 functions are included in the library: void lammps_open(int, char **, MPI_Comm); void lammps_close(); int lammps_command(char *); :pre The lammps_open() function is used to initialize LAMMPS, passing in a list of strings as if they were "command-line arguments"_#2_4 when LAMMPS is run from the command line and a MPI communicator for LAMMPS to run under. The lammps_close() function is used to shut down LAMMPS and free all its memory. The lammps_command() function is used to pass a string to LAMMPS as if it were an input command read from an input script. See the library.h file for more information about the arguments and return values for these 3 functions. [{Additional build tips:}] (1) Building LAMMPS for multiple platforms. You can make LAMMPS for multiple platforms from the same src directory. Each target creates its own object sub-dir called Obj_name where it stores the system-specific *.o files. (2) Cleaning up. Typing "make clean" will delete all *.o object files created when LAMMPS is built. (3) On some 64-bit machines, compiling with -O3 appears to break the Coulombic tabling option used by the "pair_style"_pair_style.html {lj/cut/coul/long} and {lj/charmm/coul/long} styles. By default, tabling is used by these styles since it can offer a 2x speed-up. It can be disabled via the "pair_modify"_pair_modify.html command. Alternatively, the associated files (e.g. pair_lj_cut_coul_long.cpp) can be compiled with -O2, or with the compiler flag {-fno-strict-aliasing}. Either of those build changes seems to fix the problem. (4) Building for a Macintosh. OS X is BSD Unix, so it already works. See the Makefile.mac file. (5) Building for MicroSoft Windows. I've never done this, but LAMMPS is just standard C++ with MPI and FFT calls. You should be able to use cygwin to build LAMMPS with a Unix make. Or you should be able to pull all the source files into Visual C++ (ugh) or some similar development environment and build it. In the src/MAKE/Windows directory are some notes from users on how they built LAMMPS under Windows, so you can look at their instructions for tips. Good luck - I can't help you on this one. :line 2.3 Running LAMMPS :h4,link(2_3) By default, LAMMPS runs by reading commands from stdin; e.g. lmp_linux < in.file. This means you first create an input script (e.g. in.file) containing the desired commands. "This section"_Section_commands.html describes how input scripts are structured and what commands they contain. You can test LAMMPS on any of the sample inputs provided in the examples directory. Input scripts are named in.* and sample outputs are named log.*.name.P where name is a machine and P is the number of processors it was run on. Here is how you might run one of the Lennard-Jones tests on a Linux box, using mpirun to launch a parallel job: cd src make linux cp lmp_linux ../examples/lj cd ../examples/lj mpirun -np 4 lmp_linux < in.lj.nve :pre The screen output from LAMMPS is described in the next section. As it runs, LAMMPS also writes a log.lammps file with the same information. Note that this sequence of commands copied the LAMMPS executable (lmp_linux) to the directory with the input files. If you don't do this, LAMMPS may look for input files or create output files in the directory where the executable is, rather than where you run it from. If LAMMPS encounters errors in the input script or while running a simulation it will print an ERROR message and stop or a WARNING message and continue. See "this section"_Section_errors.html for a discussion of the various kinds of errors LAMMPS can or can't detect, a list of all ERROR and WARNING messages, and what to do about them. LAMMPS can run a problem on any number of processors, including a single processor. In theory 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 molecular dynamics phase space trajectories. LAMMPS can run as large a problem as will fit in the physical memory of one or more processors. If you run out of memory, you must run on more processors or setup a smaller problem. :line 2.4 Command-line options :h4,link(2_4) At run time, LAMMPS recognizes several optional command-line switches which may be used in any order. For example, lmp_ibm might be launched as follows: mpirun -np 16 lmp_ibm -var f tmp.out -log my.log -screen none < in.alloy :pre These are the command-line options: -echo style :pre Set the style of command echoing. The style can be {none} or {screen} or {log} or {both}. Depending on the style, each command read from the input script will be echoed to the screen and/or logfile. This can be useful to figure out which line of your script is causing an input error. The default value is {log}. The echo style can also be set by using the "echo"_echo.html command in the input script itself. -partition 8x2 4 5 ... :pre Invoke LAMMPS in multi-partition mode. When LAMMPS is run on P processors and this switch is not used, LAMMPS runs in one partition, i.e. all P processors run a single simulation. If this switch is used, the P processors are split into separate partitions and each partition runs its own simulation. The arguments to the switch specify the number of processors in each partition. Arguments of the form MxN mean M partitions, each with N processors. Arguments of the form N mean a single partition with N processors. The sum of processors in all partitions must equal P. Thus the command "-partition 8x2 4 5" has 10 partitions and runs on a total of 25 processors. The input script specifies what simulation is run on which partition; see the "variable"_variable.html and "next"_next.html commands. Simulations running on different partitions can also communicate with each other; see the "temper"_temper.html command. -in file :pre Specify a file to use as an input script. This is an optional switch when running LAMMPS in one-partition mode. If it is not specified, LAMMPS reads its input script from stdin - e.g. lmp_linux < in.run. This is a required switch when running LAMMPS in multi-partition mode, since multiple processors cannot all read from stdin. -log file :pre Specify a log file for LAMMPS to write status information to. In one-partition mode, if the switch is not used, LAMMPS writes to the file log.lammps. If this switch is used, LAMMPS writes to the specified file. In multi-partition mode, if the switch is not used, a log.lammps file is created with hi-level status information. Each partition also writes to a log.lammps.N file where N is the partition ID. If the switch is specified in multi-partition mode, the hi-level logfile is named "file" and each partition also logs information to a file.N. For both one-partition and multi-partition mode, if the specified file is "none", then no log files are created. Using a "log"_log.html command in the input script will override this setting. -screen file :pre Specify a file for LAMMPS to write it's screen information to. In one-partition mode, if the switch is not used, LAMMPS writes to the screen. If this switch is used, LAMMPS writes to the specified file instead and you will see no screen output. In multi-partition mode, if the switch is not used, hi-level status information is written to the screen. Each partition also writes to a screen.N file where N is the partition ID. If the switch is specified in multi-partition mode, the hi-level screen dump is named "file" and each partition also writes screen information to a file.N. For both one-partition and multi-partition mode, if the specified file is "none", then no screen output is performed. -var name value :pre Specify a variable that will be defined for substitution purposes when the input script is read. "Name" is the variable name which can be a single character (referenced as $x in the input script) or a full string (referenced as $\{abc\}). The value can be any string. Using this command-line option is equivalent to putting the line "variable name index value" at the beginning of the input script. See the "variable"_variable.html command for more info on defining variables and "this section"_Section_commands.html#3_2 for more info on using variables in scripts. :line 2.5 LAMMPS screen output :h4,link(2_5) As LAMMPS reads an input script, it prints information to both the screen and a log file about significant actions it takes to setup a simulation. When the simulation is ready to begin, LAMMPS performs various initializations and prints the amount of memory (in MBytes per processor) that the simulation requires. It also prints details of the initial thermodynamic state of the system. During the run itself, thermodynamic information is printed periodically, every few timesteps. When the run concludes, LAMMPS prints the final thermodynamic state and a total run time for the simulation. It then appends statistics about the CPU time and storage requirements for the simulation. An example set of statistics is shown here: Loop time of 49.002 on 2 procs for 2004 atoms :pre Pair time (%) = 35.0495 (71.5267) Bond time (%) = 0.092046 (0.187841) Kspce time (%) = 6.42073 (13.103) Neigh time (%) = 2.73485 (5.5811) Comm time (%) = 1.50291 (3.06703) Outpt time (%) = 0.013799 (0.0281601) Other time (%) = 2.13669 (4.36041) :pre Nlocal: 1002 ave, 1015 max, 989 min Histogram: 1 0 0 0 0 0 0 0 0 1 Nghost: 8720 ave, 8724 max, 8716 min Histogram: 1 0 0 0 0 0 0 0 0 1 Neighs: 354141 ave, 361422 max, 346860 min Histogram: 1 0 0 0 0 0 0 0 0 1 :pre Total # of neighbors = 708282 Ave neighs/atom = 353.434 Ave special neighs/atom = 2.34032 Number of reneighborings = 42 Dangerous reneighborings = 2 :pre The first section gives the breakdown of the CPU run time (in seconds) into major categories. The second section lists the number of owned atoms (Nlocal), ghost atoms (Nghost), and pair-wise neighbors stored per processor. The max and min values give the spread of these values across processors with a 10-bin histogram showing the distribution. The total number of histogram counts is equal to the number of processors. The last section gives aggregate statistics for pair-wise neighbors and special neighbors that LAMMPS keeps track of (see the "special_bonds"_special_bonds.html command). The number of times neighbor lists were rebuilt during the run is given as well as the number of potentially "dangerous" rebuilds. If atom movement triggered neighbor list rebuilding (see the "neigh_modify"_neigh_modify.html command), then dangerous reneighborings are those that were triggered on the first timestep atom movement was checked for. If this count is non-zero you may wish to reduce the delay factor to insure no force interactions are missed by atoms moving beyond the neighbor skin distance before a rebuild takes place. If an energy minimization was performed via the "minimize"_minimize.html command, additional information is printed, e.g. Minimization stats: E initial, next-to-last, final = -0.895962 -2.94193 -2.94342 Gradient 2-norm init/final= 1920.78 20.9992 Gradient inf-norm init/final= 304.283 9.61216 Iterations = 36 Force evaluations = 177 :pre The first line lists the initial and final energy, as well as the energy on the next-to-last iteration. The next 2 lines give a measure of the gradient of the energy (force on all atoms). The 2-norm is the "length" of this force vector; the inf-norm is the largest component. The last 2 lines are statistics on how many iterations and force-evaluations the minimizer required. Multiple force evalulations are typically done at each iteration to perform a 1d line minimization in the search direction. If a "kspace_style"_kspace_style.html long-range Coulombics solve was performed during the run (PPPM, Ewald), then additional information is printed, e.g. FFT time (% of Kspce) = 0.200313 (8.34477) FFT Gflps 3d 1d-only = 2.31074 9.19989 :pre The first line gives the time spent doing 3d FFTs (4 per timestep) and the fraction it represents of the total KSpace time (listed above). Each 3d FFT requires computation (3 sets of 1d FFTs) and communication (transposes). The total flops performed is 5Nlog_2(N), where N is the number of points in the 3d grid. The FFTs are timed with and without the communication and a Gflop rate is computed. The 3d rate is with communication; the 1d rate is without (just the 1d FFTs). Thus you can estimate what fraction of your FFT time was spent in communication, roughly 75% in the example above. :line 2.6 Tips for users of previous LAMMPS versions :h4,link(2_6) LAMMPS 2003 is a complete C++ rewrite of LAMMPS 2001, which was written in F90. Features of earlier versions of LAMMPS are listed in "this section"_Section_history.html. The F90 and F77 versions (2001 and 99) are also freely distributed as open-source codes; check the "LAMMPS WWW Site"_lws for distribution information if you prefer those versions. The 99 and 2001 versions are no longer under active development; they do not have all the features of LAMMPS 2003. If you are a previous user of LAMMPS 2001, these are the most significant changes you will notice in LAMMPS 2003: (1) The names and arguments of many input script commands have changed. All commands are now a single word (e.g. read_data instead of read data). (2) All the functionality of LAMMPS 2001 is included in LAMMPS 2003, but you may need to specify the relevant commands in different ways. (3) The format of the data file can be streamlined for some problems. See the "read_data"_read_data.html command for details. The data file section "Nonbond Coeff" has been renamed to "Pair Coeff" in LAMMPS 2003. (4) Binary restart files written by LAMMPS 2001 cannot be read by LAMMPS 2003 with a "read_restart"_read_restart.html command. This is because they were output by F90 which writes in a different binary format than C or C++ writes or reads. Use the {restart2data} tool provided with LAMMPS 2001 to convert the 2001 restart file to a text data file. Then edit the data file as necessary before using the LAMMPS 2003 "read_data"_read_data.html command to read it in. (5) There are numerous small numerical changes in LAMMPS 2003 that mean you will not get identical answers when comparing to a 2001 run. However, your initial thermodynamic energy and MD trajectory should be close if you have setup the problem for both codes the same. diff --git a/doc/angle_style.html b/doc/angle_style.html index 3e2edf80b..a6b7311ec 100644 --- a/doc/angle_style.html +++ b/doc/angle_style.html @@ -1,82 +1,83 @@Syntax:
angle_style style
Examples:
angle_style harmonic angle_style charmm angle_style hybrid harmonic cosine
Description:
Set the formula(s) LAMMPS uses to compute angle interactions between triplets of atoms, which remain in force for the duration of the simulation. The list of angle triplets is read in by a read_data or read_restart command from a data or restart file.
Hybrid models where angles are computed using different angle potentials can be setup using the hybrid angle style.
The coefficients associated with a angle style can be specified in a data or restart file or via the angle_coeff command.
In the formulas listed for each angle style, theta is the angle between the 3 atoms in the angle.
Note that when both an angle and pair style is defined, the special_bond command often needs to be used to turn off (or weight) the pairwise interactions that would otherwise exist between the 3 bonded atoms.
Here is an alphabetic list of angle styles defined in LAMMPS. Click on the style to display the formula it computes and coefficients specified by the associated angle_coeff command:
Restrictions:
Angle styles can only be set for atom_styles that allow angles to be defined.
-Angle styles are part of the "molecular" package. They are only
-enabled if LAMMPS was built with that package. See the Making
+ Angle styles are part of the "molecular" package or other packages as
+noted in their documentation. They are only enabled if LAMMPS was
+built with that package. See the Making
LAMMPS section for more info.
Related commands:
Default:
Syntax:
Examples:
Description:
The charmm angle style uses the potential
with an additional Urey_Bradley term based on the distance r between
the 1st and 3rd atoms in the angle. K, theta0, Kub, and Rub are
coefficients defined for each angle type.
See (MacKerell) for a description of the CHARMM force
+field.
+ The following coefficients must be defined for each angle type via the
angle_coeff command as in the example above, or in
the data file or restart files read by the read_data
or read_restart commands:
Theta0 is specified in degrees, but LAMMPS converts it to radians
internally; hence the units of K are in energy/radian^2.
Restrictions:
- Angle styles can only be set for atom styles that allow angles to be
-defined.
- This angle style is part of the "molecular" package. It is only
-enabled if LAMMPS was built with that package. See the Making
-LAMMPS section for more info.
+ Restrictions: none
Related commands:
Default: none
angle_style none
diff --git a/doc/angle_style.txt b/doc/angle_style.txt
index beca2044b..ddedf0a0f 100644
--- a/doc/angle_style.txt
+++ b/doc/angle_style.txt
@@ -1,78 +1,79 @@
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)
:line
angle_style command :h3
[Syntax:]
angle_style style :pre
style = {none} or {hybrid} or {charmm} or {class2} or {cosine} or \
{cosine/squared} or {harmonic} :ul
[Examples:]
angle_style harmonic
angle_style charmm
angle_style hybrid harmonic cosine :pre
[Description:]
Set the formula(s) LAMMPS uses to compute angle interactions between
triplets of atoms, which remain in force for the duration of the
simulation. The list of angle triplets is read in by a
"read_data"_read_data.html or "read_restart"_read_restart.html command
from a data or restart file.
Hybrid models where angles are computed using different angle
potentials can be setup using the {hybrid} angle style.
The coefficients associated with a angle style can be specified in a
data or restart file or via the "angle_coeff"_angle_coeff.html command.
In the formulas listed for each angle style, {theta} is the angle
between the 3 atoms in the angle.
Note that when both an angle and pair style is defined, the
"special_bond"_special_bond.html command often needs to be used to
turn off (or weight) the pairwise interactions that would otherwise
exist between the 3 bonded atoms.
:line
Here is an alphabetic list of angle styles defined in LAMMPS. Click on
the style to display the formula it computes and coefficients
specified by the associated "angle_coeff"_angle_coeff.html command:
"angle_style none"_angle_style_none.html - turn off angle interactions
"angle_style hybrid"_angle_style_hybrid.html - define multiple styles of angle interactions :ul
"angle_style charmm"_angle_style_charmm.html - CHARMM angle
"angle_style class2"_angle_style_class2.html - COMPASS (class 2) angle
"angle_style cosine"_angle_style_cosine.html - cosine angle potential
"angle_style cosine/squared"_angle_style_cosine_squared.html - cosine squared angle potential
"angle_style harmonic"_angle_style_harmonic.html - harmonic angle :ul
:line
[Restrictions:]
Angle styles can only be set for atom_styles that allow angles to be
defined.
-Angle styles are part of the "molecular" package. They are only
-enabled if LAMMPS was built with that package. See the "Making
+Angle styles are part of the "molecular" package or other packages as
+noted in their documentation. They are only enabled if LAMMPS was
+built with that package. See the "Making
LAMMPS"_Section_start.html#2_2 section for more info.
[Related commands:]
"angle_coeff"_angle_coeff.html
[Default:]
angle_style none :pre
diff --git a/doc/angle_style_charmm.html b/doc/angle_style_charmm.html
index 94b63ae3b..e5b3cc270 100644
--- a/doc/angle_style_charmm.html
+++ b/doc/angle_style_charmm.html
@@ -1,61 +1,64 @@
angle_style charmm command
angle_style charmm
angle_style charmm
angle_coeff 1 300.0 107.0 50.0 3.0
+
+
+
+
(MacKerell) MacKerell, Bashford, Bellott, Dunbrack, Evanseck, Field, +Fischer, Gao, Guo, Ha, et al, J Phys Chem, 102, 3586 (1998). +
diff --git a/doc/angle_style_charmm.txt b/doc/angle_style_charmm.txt index ef769720e..5e6dffb79 100644 --- a/doc/angle_style_charmm.txt +++ b/doc/angle_style_charmm.txt @@ -1,56 +1,58 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line angle_style charmm command :h3 [Syntax:] angle_style charmm :pre [Examples:] angle_style charmm angle_coeff 1 300.0 107.0 50.0 3.0 :pre [Description:] The {charmm} angle style uses the potential :c,image(Eqs/angle_charmm.jpg) with an additional Urey_Bradley term based on the distance {r} between the 1st and 3rd atoms in the angle. K, theta0, Kub, and Rub are coefficients defined for each angle type. +See "(MacKerell)"_#MacKerell for a description of the CHARMM force +field. + The following coefficients must be defined for each angle type via the "angle_coeff"_angle_coeff.html command as in the example above, or in the data file or restart files read by the "read_data"_read_data.html or "read_restart"_read_restart.html commands: K (energy/radian^2) theta0 (degrees) K_ub (energy/distance^2) r_ub (distance) :ul Theta0 is specified in degrees, but LAMMPS converts it to radians internally; hence the units of K are in energy/radian^2. -[Restrictions:] - -Angle styles can only be set for atom styles that allow angles to be -defined. - -This angle style is part of the "molecular" package. It is only -enabled if LAMMPS was built with that package. See the "Making -LAMMPS"_Section_start.html#2_2 section for more info. +[Restrictions:] none [Related commands:] "angle_coeff"_angle_coeff.html [Default:] none + +:line + +:link(MacKerell) +[(MacKerell)] MacKerell, Bashford, Bellott, Dunbrack, Evanseck, Field, +Fischer, Gao, Guo, Ha, et al, J Phys Chem, 102, 3586 (1998). diff --git a/doc/angle_style_class2.html b/doc/angle_style_class2.html index 0649b37d8..369de1f38 100644 --- a/doc/angle_style_class2.html +++ b/doc/angle_style_class2.html @@ -1,80 +1,85 @@Syntax:
angle_style class2
Examples:
angle_style class2 angle_coeff * 75.0
Description:
The class2 angle style uses the potential
where Ea is the angle term, Ebb is a bond-bond term, and Eba is a bond-angle term. Theta0 is the equilibrium angle and r1 and r2 are the equilibrium bond lengths.
+See (Sun) for a description of the COMPASS class2 force field. +
For this style, only coefficients for the Ea formula can be specified in the input script. These are the 4 coefficients:
Theta0 is specified in degrees, but LAMMPS converts it to radians internally; hence the units of K are in energy/radian^2.
Coefficients for the Ebb and Eba formulas must be specified in the data file.
For the Ebb formula, the coefficients are listed under a "BondBond Coeffs" heading and each line lists 3 coefficients:
For the Eba formula, the coefficients are listed under a "BondAngle Coeffs" heading and each line lists 4 coefficients:
The theta0 value in the Eba formula is not specified, since it is the same value from the Ea formula.
Restrictions:
-Angle styles can only be set for atom styles that allow angles to be -defined. -
This angle style is part of the "class2" package. It is only enabled if LAMMPS was built with that package. See the Making LAMMPS section for more info.
Related commands:
Default: none
+(Sun) Sun, J Phys Chem B 102, 7338-7364 (1998). +
diff --git a/doc/angle_style_class2.txt b/doc/angle_style_class2.txt index adf5854ac..b49abf0a2 100644 --- a/doc/angle_style_class2.txt +++ b/doc/angle_style_class2.txt @@ -1,75 +1,79 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line angle_style class2 command :h3 [Syntax:] angle_style class2 :pre [Examples:] angle_style class2 angle_coeff * 75.0 :pre [Description:] The {class2} angle style uses the potential :c,image(Eqs/angle_class2.jpg) where Ea is the angle term, Ebb is a bond-bond term, and Eba is a bond-angle term. Theta0 is the equilibrium angle and r1 and r2 are the equilibrium bond lengths. +See "(Sun)"_#Sun for a description of the COMPASS class2 force field. + For this style, only coefficients for the Ea formula can be specified in the input script. These are the 4 coefficients: theta0 (degrees) K2 (energy/radian^2) K3 (energy/radian^2) K4 (energy/radian^2) :ul Theta0 is specified in degrees, but LAMMPS converts it to radians internally; hence the units of K are in energy/radian^2. Coefficients for the Ebb and Eba formulas must be specified in the data file. For the Ebb formula, the coefficients are listed under a "BondBond Coeffs" heading and each line lists 3 coefficients: M (energy/distance^2) r1 (distance) r2 (distance) :ul For the Eba formula, the coefficients are listed under a "BondAngle Coeffs" heading and each line lists 4 coefficients: N1 (energy/distance^2) N2 (energy/distance^2) r1 (distance) r2 (distance) :ul The theta0 value in the Eba formula is not specified, since it is the same value from the Ea formula. [Restrictions:] -Angle styles can only be set for atom styles that allow angles to be -defined. - This angle style is part of the "class2" package. It is only enabled if LAMMPS was built with that package. See the "Making LAMMPS"_Section_start.html#2_2 section for more info. [Related commands:] "angle_coeff"_angle_coeff.html [Default:] none + +:line + +:link(Sun) +[(Sun)] Sun, J Phys Chem B 102, 7338-7364 (1998). diff --git a/doc/angle_style_cosine.html b/doc/angle_style_cosine.html index 3f295764d..b0cd186ae 100644 --- a/doc/angle_style_cosine.html +++ b/doc/angle_style_cosine.html @@ -1,53 +1,46 @@Syntax:
angle_style cosine
Examples:
angle_style cosine angle_coeff * 75.0
Description:
The cosine angle style uses the potential
where K is defined for each angle type.
The following coefficients must be defined for each angle type via the angle_coeff command as in the example above, or in the data file or restart files read by the read_data or read_restart commands:
Restrictions: -
-Angle styles can only be set for atom styles that allow angles to be -defined. -
-This angle style is part of the "molecular" package. It is only -enabled if LAMMPS was built with that package. See the Making -LAMMPS section for more info. +
Restrictions: none
Related commands:
Default: none
diff --git a/doc/angle_style_cosine.txt b/doc/angle_style_cosine.txt index b276e7ee1..ba161cd9f 100644 --- a/doc/angle_style_cosine.txt +++ b/doc/angle_style_cosine.txt @@ -1,48 +1,41 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line angle_style cosine command :h3 [Syntax:] angle_style cosine :pre [Examples:] angle_style cosine angle_coeff * 75.0 :pre [Description:] The {cosine} angle style uses the potential :c,image(Eqs/angle_cosine.jpg) where K is defined for each angle type. The following coefficients must be defined for each angle type via the "angle_coeff"_angle_coeff.html command as in the example above, or in the data file or restart files read by the "read_data"_read_data.html or "read_restart"_read_restart.html commands: K (energy) :ul -[Restrictions:] - -Angle styles can only be set for atom styles that allow angles to be -defined. - -This angle style is part of the "molecular" package. It is only -enabled if LAMMPS was built with that package. See the "Making -LAMMPS"_Section_start.html#2_2 section for more info. +[Restrictions:] none [Related commands:] "angle_coeff"_angle_coeff.html [Default:] none diff --git a/doc/angle_style_cosine_squared.html b/doc/angle_style_cosine_squared.html index 77c5a0f44..53596a792 100644 --- a/doc/angle_style_cosine_squared.html +++ b/doc/angle_style_cosine_squared.html @@ -1,58 +1,51 @@Syntax:
angle_style cosine/squared
Examples:
angle_style cosine/squared angle_coeff 2*4 75.0 100.0
Description:
The cosine/squared angle style uses the potential
where theta0 is the equilibrium value of the angle, and K is a prefactor. Note that the usual 1/2 factor is included in K.
The following coefficients must be defined for each angle type via the angle_coeff command as in the example above, or in the data file or restart files read by the read_data or read_restart commands:
Theta0 is specified in degrees, but LAMMPS converts it to radians internally.
-Restrictions: -
-Angle styles can only be set for atom styles that allow angles to be -defined. -
-This angle style is part of the "molecular" package. It is only -enabled if LAMMPS was built with that package. See the Making -LAMMPS section for more info. +
Restrictions: none
Related commands:
Default: none
diff --git a/doc/angle_style_cosine_squared.txt b/doc/angle_style_cosine_squared.txt index 011b2f41a..79e7d946b 100644 --- a/doc/angle_style_cosine_squared.txt +++ b/doc/angle_style_cosine_squared.txt @@ -1,53 +1,46 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line angle_style cosine/squared command :h3 [Syntax:] angle_style cosine/squared :pre [Examples:] angle_style cosine/squared angle_coeff 2*4 75.0 100.0 :pre [Description:] The {cosine/squared} angle style uses the potential :c,image(Eqs/angle_cosine_squared.jpg) where theta0 is the equilibrium value of the angle, and K is a prefactor. Note that the usual 1/2 factor is included in K. The following coefficients must be defined for each angle type via the "angle_coeff"_angle_coeff.html command as in the example above, or in the data file or restart files read by the "read_data"_read_data.html or "read_restart"_read_restart.html commands: K (energy) theta0 (degrees) :ul Theta0 is specified in degrees, but LAMMPS converts it to radians internally. -[Restrictions:] - -Angle styles can only be set for atom styles that allow angles to be -defined. - -This angle style is part of the "molecular" package. It is only -enabled if LAMMPS was built with that package. See the "Making -LAMMPS"_Section_start.html#2_2 section for more info. +[Restrictions:] none [Related commands:] "angle_coeff"_angle_coeff.html [Default:] none diff --git a/doc/angle_style_harmonic.html b/doc/angle_style_harmonic.html index ebfcfd89f..1f633cc0b 100644 --- a/doc/angle_style_harmonic.html +++ b/doc/angle_style_harmonic.html @@ -1,58 +1,51 @@Syntax:
angle_style harmonic
Examples:
angle_style harmonic angle_coeff 1 300.0 107.0
Description:
The harmonic angle style uses the potential
where theta0 is the equilibrium value of the angle, and K is a prefactor. Note that the usual 1/2 factor is included in K.
The following coefficients must be defined for each angle type via the angle_coeff command as in the example above, or in the data file or restart files read by the read_data or read_restart commands:
Theta0 is specified in degrees, but LAMMPS converts it to radians internally; hence the units of K are in energy/radian^2.
-Restrictions: -
-Angle styles can only be set for atom styles that allow angles to be -defined. -
-This angle style is part of the "molecular" package. It is only -enabled if LAMMPS was built with that package. See the Making -LAMMPS section for more info. +
Restrictions: none
Related commands:
Default: none
diff --git a/doc/angle_style_harmonic.txt b/doc/angle_style_harmonic.txt index a0fa85b6f..6ab256c57 100644 --- a/doc/angle_style_harmonic.txt +++ b/doc/angle_style_harmonic.txt @@ -1,53 +1,46 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line angle_style harmonic command :h3 [Syntax:] angle_style harmonic :pre [Examples:] angle_style harmonic angle_coeff 1 300.0 107.0 :pre [Description:] The {harmonic} angle style uses the potential :c,image(Eqs/angle_harmonic.jpg) where theta0 is the equilibrium value of the angle, and K is a prefactor. Note that the usual 1/2 factor is included in K. The following coefficients must be defined for each angle type via the "angle_coeff"_angle_coeff.html command as in the example above, or in the data file or restart files read by the "read_data"_read_data.html or "read_restart"_read_restart.html commands: K (energy/radian^2) theta0 (degrees) :ul Theta0 is specified in degrees, but LAMMPS converts it to radians internally; hence the units of K are in energy/radian^2. -[Restrictions:] - -Angle styles can only be set for atom styles that allow angles to be -defined. - -This angle style is part of the "molecular" package. It is only -enabled if LAMMPS was built with that package. See the "Making -LAMMPS"_Section_start.html#2_2 section for more info. +[Restrictions:] none [Related commands:] "angle_coeff"_angle_coeff.html [Default:] none diff --git a/doc/angle_style_hybrid.html b/doc/angle_style_hybrid.html index 7133b2a8d..dd8ef1ae6 100644 --- a/doc/angle_style_hybrid.html +++ b/doc/angle_style_hybrid.html @@ -1,58 +1,55 @@Syntax:
angle_style hybrid style1 style2 ...
Examples:
angle_style hybrid harmonic cosine angle_coeff 1 harmonic 80.0 1.2 angle_coeff 2* cosine 50.0
Description:
The hybrid style enables the use of multiple angle styles in one simulation. An angle style is assigned to each angle type. For example, angles in a polymer flow (of angle type 1) could be computed with a harmonic potential and angles in the wall boundary (of angle type 2) could be computed with a cosine potential. The assignment of angle type to style is made via the angle_coeff command or in the data file.
In the angle_coeff command, the first coefficient sets the angle style and the remaining coefficients are those appropriate to that style. In the example above, the 2 angle_coeff commands would set angles of angle type 1 to be computed with a harmonic potential with coefficients 80.0, 1.2 for K, r0. All other angle types (2-N) would be computed with a cosine potential with coefficient 50.0 for K.
-Restrictions: +
An angle style of none can be specified as an argument to +angle_style hybrid and the corresponding angle_coeff commands, if you +desire to turn off certain angle types.
-Angle styles can only be set for atom styles that allow angles to be -defined. -
-This angle style is part of the "molecular" package. It is only -enabled if LAMMPS was built with that package. See the Making -LAMMPS section for more info. +
Restrictions: none
Related commands:
Default: none
diff --git a/doc/angle_style_hybrid.txt b/doc/angle_style_hybrid.txt index 07e87ffa8..044a4b518 100644 --- a/doc/angle_style_hybrid.txt +++ b/doc/angle_style_hybrid.txt @@ -1,53 +1,50 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line angle_style hybrid command :h3 [Syntax:] angle_style hybrid style1 style2 ... :pre style1,style2 = list of one or more angle styles :ul [Examples:] angle_style hybrid harmonic cosine angle_coeff 1 harmonic 80.0 1.2 angle_coeff 2* cosine 50.0 :pre [Description:] The {hybrid} style enables the use of multiple angle styles in one simulation. An angle style is assigned to each angle type. For example, angles in a polymer flow (of angle type 1) could be computed with a {harmonic} potential and angles in the wall boundary (of angle type 2) could be computed with a {cosine} potential. The assignment of angle type to style is made via the "angle_coeff"_angle_coeff.html command or in the data file. In the angle_coeff command, the first coefficient sets the angle style and the remaining coefficients are those appropriate to that style. In the example above, the 2 angle_coeff commands would set angles of angle type 1 to be computed with a {harmonic} potential with coefficients 80.0, 1.2 for K, r0. All other angle types (2-N) would be computed with a {cosine} potential with coefficient 50.0 for K. -[Restrictions:] +An angle style of {none} can be specified as an argument to +angle_style hybrid and the corresponding angle_coeff commands, if you +desire to turn off certain angle types. -Angle styles can only be set for atom styles that allow angles to be -defined. - -This angle style is part of the "molecular" package. It is only -enabled if LAMMPS was built with that package. See the "Making -LAMMPS"_Section_start.html#2_2 section for more info. +[Restrictions:] none [Related commands:] "angle_coeff"_angle_coeff.html [Default:] none diff --git a/doc/angle_style_none.html b/doc/angle_style_none.html index 559ad56b6..a589bcc7c 100644 --- a/doc/angle_style_none.html +++ b/doc/angle_style_none.html @@ -1,37 +1,34 @@Syntax:
angle_style none
Examples:
angle_style none
Description:
Using an angle style of none means angle forces are not computed, even if triplets of angle atoms were listed in the data file read by the read_data command.
-Restrictions: -
-Angle styles can only be set for atom styles that allow angles to be -defined. +
Restrictions: none
Related commands: none
Default: none
diff --git a/doc/angle_style_none.txt b/doc/angle_style_none.txt index 56a18bb39..7dea5c41f 100644 --- a/doc/angle_style_none.txt +++ b/doc/angle_style_none.txt @@ -1,32 +1,29 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line angle_style none command :h3 [Syntax:] angle_style none :pre [Examples:] angle_style none :pre [Description:] Using an angle style of none means angle forces are not computed, even if triplets of angle atoms were listed in the data file read by the "read_data"_read_data.html command. -[Restrictions:] - -Angle styles can only be set for atom styles that allow angles to be -defined. +[Restrictions:] none [Related commands:] none [Default:] none diff --git a/doc/bond_style.html b/doc/bond_style.html index c2a1214fc..9450b9c44 100644 --- a/doc/bond_style.html +++ b/doc/bond_style.html @@ -1,93 +1,94 @@Syntax:
bond_style style args
args = none for any style except hybrid hybrid args = list of one or more styles
Examples:
bond_style harmonic bond_style fene bond_style hybrid harmonic fene
Description:
Set the formula(s) LAMMPS uses to compute bond interactions between pairs of atoms. In LAMMPS, a bond differs from a pairwise interaction, which are set via the pair_style command. Bonds are defined between specified pairs of atoms and remain in force for the duration of the simulation (unless the bond breaks which is possible in some bond potentials). The list of bonded atoms is read in by a read_data or read_restart command from a data or restart file. By contrast, pair potentials are defined between pairs of atoms that are within a cutoff distance and the set of active interactions typically changes over time.
Hybrid models where bonds are computed using different bond potentials can be setup using the hybrid bond style.
The coefficients associated with a bond style can be specified in a data or restart file or via the bond_coeff command.
In the formulas listed for each bond style, r is the distance between the 2 atoms in the bond.
Note that when both a bond and pair style is defined, the special_bond command often needs to be used to turn off (or weight) the pairwise interaction that would otherwise exist between 2 bonded atoms.
Here is an alphabetic list of bond styles defined in LAMMPS. Click on the style to display the formula it computes and coefficients specified by the associated bond_coeff command:
Restrictions:
Bond styles can only be set for atom styles that allow bonds to be defined.
-Bond styles are part of the "molecular" package. They are only
-enabled if LAMMPS was built with that package. See the Making
+ Bond styles are part of the "molecular" package or other packages as
+noted in their documentation. They are only enabled if LAMMPS was
+built with that package. See the Making
LAMMPS section for more info.
Related commands:
Default:
bond_style none
Syntax:
Examples:
Description:
The class2 bond style uses the potential
where r0 is the equilibrium bond distance.
See (Sun) for a description of the COMPASS class2 force field.
+ The following coefficients must be defined for each bond type via the
bond_coeff command as in the example above, or in
the data file or restart files read by the read_data
or read_restart commands:
Restrictions:
Bond styles can only be set for atom styles that allow bonds to be
-defined.
- This bond style is part of the "class2" package. It is only enabled
if LAMMPS was built with that package. See the Making
LAMMPS section for more info.
Related commands:
Default: none
bond_style class2 command
bond_style class2
bond_style class2
bond_coeff 1 1.0 100.0 80.0 80.0
+
+
+
+
(Sun) Sun, J Phys Chem B 102, 7338-7364 (1998). +
diff --git a/doc/bond_style_class2.txt b/doc/bond_style_class2.txt index 823730990..9f1befe12 100644 --- a/doc/bond_style_class2.txt +++ b/doc/bond_style_class2.txt @@ -1,51 +1,55 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line bond_style class2 command :h3 [Syntax:] bond_style class2 :pre [Examples:] bond_style class2 bond_coeff 1 1.0 100.0 80.0 80.0 :pre [Description:] The {class2} bond style uses the potential :c,image(Eqs/bond_class2.jpg) where r0 is the equilibrium bond distance. +See "(Sun)"_#Sun for a description of the COMPASS class2 force field. + The following coefficients must be defined for each bond type via the "bond_coeff"_bond_coeff.html command as in the example above, or in the data file or restart files read by the "read_data"_read_data.html or "read_restart"_read_restart.html commands: R0 (distance) K2 (energy/distance^2) K3 (energy/distance^2) K4 (energy/distance^2) :ul [Restrictions:] -Bond styles can only be set for atom styles that allow bonds to be -defined. - This bond style is part of the "class2" package. It is only enabled if LAMMPS was built with that package. See the "Making LAMMPS"_Section_start.html#2_2 section for more info. [Related commands:] "bond_coeff"_bond_coeff.html, "delete_bonds"_delete_bonds.html [Default:] none + +:line + +:link(Sun) +[(Sun)] Sun, J Phys Chem B 102, 7338-7364 (1998). diff --git a/doc/bond_style_fene.html b/doc/bond_style_fene.html index 3df41496a..bb7d5ec62 100644 --- a/doc/bond_style_fene.html +++ b/doc/bond_style_fene.html @@ -1,66 +1,59 @@Syntax:
bond_style fene
Examples:
bond_style fene bond_coeff 1 30.0 1.5 1.0 1.0
Description:
The fene bond style uses the potential
to define a finite extensible nonlinear elastic (FENE) potential (Kremer), used for bead-spring polymer models. The first term is attractive, the 2nd Lennard-Jones term is repulsive. The first term extends to R0, the maximum extent of the bond. The 2nd term is cutoff at 2^(1/6) sigma, the minimum of the LJ potential.
The following coefficients must be defined for each bond type via the bond_coeff command as in the example above, or in the data file or restart files read by the read_data or read_restart commands:
Restrictions: -
-Bond styles can only be set for atom styles that allow bonds to be -defined. -
-This bond style is part of the "molecular" package. It is only -enabled if LAMMPS was built with that package. See the Making -LAMMPS section for more info. +
Restrictions: none
Related commands:
Default: none
(Kremer) Kremer, Grest, J Chem Phys, 92, 5057 (1990).
diff --git a/doc/bond_style_fene.txt b/doc/bond_style_fene.txt index 7c288c84b..0e938d3ff 100644 --- a/doc/bond_style_fene.txt +++ b/doc/bond_style_fene.txt @@ -1,60 +1,53 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line bond_style fene command :h3 [Syntax:] bond_style fene :pre [Examples:] bond_style fene bond_coeff 1 30.0 1.5 1.0 1.0 :pre [Description:] The {fene} bond style uses the potential :c,image(Eqs/bond_fene.jpg) to define a finite extensible nonlinear elastic (FENE) potential "(Kremer)"_#Kremer, used for bead-spring polymer models. The first term is attractive, the 2nd Lennard-Jones term is repulsive. The first term extends to R0, the maximum extent of the bond. The 2nd term is cutoff at 2^(1/6) sigma, the minimum of the LJ potential. The following coefficients must be defined for each bond type via the "bond_coeff"_bond_coeff.html command as in the example above, or in the data file or restart files read by the "read_data"_read_data.html or "read_restart"_read_restart.html commands: K (energy/distance^2) R0 (distance) epsilon (energy) sigma (distance) :ul -[Restrictions:] - -Bond styles can only be set for atom styles that allow bonds to be -defined. - -This bond style is part of the "molecular" package. It is only -enabled if LAMMPS was built with that package. See the "Making -LAMMPS"_Section_start.html#2_2 section for more info. +[Restrictions:] none [Related commands:] "bond_coeff"_bond_coeff.html, "delete_bonds"_delete_bonds.html [Default:] none :line :link(Kremer) [(Kremer)] Kremer, Grest, J Chem Phys, 92, 5057 (1990). diff --git a/doc/bond_style_fene_expand.html b/doc/bond_style_fene_expand.html index 3cb6694e3..6df397aa4 100644 --- a/doc/bond_style_fene_expand.html +++ b/doc/bond_style_fene_expand.html @@ -1,71 +1,64 @@Syntax:
bond_style fene/expand
Examples:
bond_style fene/expand bond_coeff 1 30.0 1.5 1.0 1.0 0.5
Description:
The fene/expand bond style uses the potential
to define a finite extensible nonlinear elastic (FENE) potential (Kremer), used for bead-spring polymer models. The first term is attractive, the 2nd Lennard-Jones term is repulsive.
The fene/expand bond style is similar to fene except that an extra shift factor of delta (positive or negative) is added to r to effectively change the bead size of the bonded atoms. The first term now extends to R0 + delta and the 2nd term is cutoff at 2^(1/6) sigma + delta.
The following coefficients must be defined for each bond type via the bond_coeff command as in the example above, or in the data file or restart files read by the read_data or read_restart commands:
Restrictions: -
-Bond styles can only be set for atom styles that allow bonds to be -defined. -
-This bond style is part of the "molecular" package. It is only -enabled if LAMMPS was built with that package. See the Making -LAMMPS section for more info. +
Restrictions: none
Related commands:
Default: none
(Kremer) Kremer, Grest, J Chem Phys, 92, 5057 (1990).
diff --git a/doc/bond_style_fene_expand.txt b/doc/bond_style_fene_expand.txt index 65983c9ec..aa165a027 100644 --- a/doc/bond_style_fene_expand.txt +++ b/doc/bond_style_fene_expand.txt @@ -1,65 +1,58 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line bond_style fene/expand command :h3 [Syntax:] bond_style fene/expand :pre [Examples:] bond_style fene/expand bond_coeff 1 30.0 1.5 1.0 1.0 0.5 :pre [Description:] The {fene/expand} bond style uses the potential :c,image(Eqs/bond_fene_expand.jpg) to define a finite extensible nonlinear elastic (FENE) potential "(Kremer)"_#Kremer, used for bead-spring polymer models. The first term is attractive, the 2nd Lennard-Jones term is repulsive. The {fene/expand} bond style is similar to {fene} except that an extra shift factor of delta (positive or negative) is added to {r} to effectively change the bead size of the bonded atoms. The first term now extends to R0 + delta and the 2nd term is cutoff at 2^(1/6) sigma + delta. The following coefficients must be defined for each bond type via the "bond_coeff"_bond_coeff.html command as in the example above, or in the data file or restart files read by the "read_data"_read_data.html or "read_restart"_read_restart.html commands: K (energy/distance^2) R0 (distance) epsilon (energy) sigma (distance) delta (distance) :ul -[Restrictions:] - -Bond styles can only be set for atom styles that allow bonds to be -defined. - -This bond style is part of the "molecular" package. It is only -enabled if LAMMPS was built with that package. See the "Making -LAMMPS"_Section_start.html#2_2 section for more info. +[Restrictions:] none [Related commands:] "bond_coeff"_bond_coeff.html, "delete_bonds"_delete_bonds.html [Default:] none :line :link(Kremer) [(Kremer)] Kremer, Grest, J Chem Phys, 92, 5057 (1990). diff --git a/doc/bond_style_harmonic.html b/doc/bond_style_harmonic.html index 25f251609..7c11d0d1c 100644 --- a/doc/bond_style_harmonic.html +++ b/doc/bond_style_harmonic.html @@ -1,55 +1,48 @@Syntax:
bond_style harmonic
Examples:
bond_style harmonic bond_coeff 5 80.0 1.2
Description:
The harmonic bond style uses the potential
where r0 is the equilibrium bond distance. Note that the usual 1/2 factor is included in K.
The following coefficients must be defined for each bond type via the bond_coeff command as in the example above, or in the data file or restart files read by the read_data or read_restart commands:
Restrictions: -
-Bond styles can only be set for atom styles that allow bonds to be -defined. -
-This bond style is part of the "molecular" package. It is only -enabled if LAMMPS was built with that package. See the Making -LAMMPS section for more info. +
Restrictions: none
Related commands:
Default: none
diff --git a/doc/bond_style_harmonic.txt b/doc/bond_style_harmonic.txt index b84e9c172..3fea41d64 100644 --- a/doc/bond_style_harmonic.txt +++ b/doc/bond_style_harmonic.txt @@ -1,50 +1,43 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line bond_style harmonic command :h3 [Syntax:] bond_style harmonic :pre [Examples:] bond_style harmonic bond_coeff 5 80.0 1.2 :pre [Description:] The {harmonic} bond style uses the potential :c,image(Eqs/bond_harmonic.jpg) where r0 is the equilibrium bond distance. Note that the usual 1/2 factor is included in K. The following coefficients must be defined for each bond type via the "bond_coeff"_bond_coeff.html command as in the example above, or in the data file or restart files read by the "read_data"_read_data.html or "read_restart"_read_restart.html commands: K (energy/distance^2) r0 (distance) :ul -[Restrictions:] - -Bond styles can only be set for atom styles that allow bonds to be -defined. - -This bond style is part of the "molecular" package. It is only -enabled if LAMMPS was built with that package. See the "Making -LAMMPS"_Section_start.html#2_2 section for more info. +[Restrictions:] none [Related commands:] "bond_coeff"_bond_coeff.html, "delete_bonds"_delete_bonds.html [Default:] none diff --git a/doc/bond_style_hybrid.html b/doc/bond_style_hybrid.html index a64b2f983..4600020a4 100644 --- a/doc/bond_style_hybrid.html +++ b/doc/bond_style_hybrid.html @@ -1,59 +1,56 @@Syntax:
bond_style hybrid style1 style2 ...
Examples:
bond_style hybrid harmonic fene bond_coeff 1 harmonic 80.0 1.2 bond_coeff 2* fene 30.0 1.5 1.0 1.0
Description:
The hybrid style enables the use of multiple bond styles in one simulation. A bond style is assigned to each bond type. For example, bonds in a polymer flow (of bond type 1) could be computed with a fene potential and bonds in the wall boundary (of bond type 2) could be computed with a harmonic potential. The assignment of bond type to style is made via the bond_coeff command or in the data file.
In the bond_coeff command, the first coefficient sets the bond style and the remaining coefficients are those appropriate to that style. In the example above, the 2 bond_coeff commands would set bonds of bond type 1 to be computed with a harmonic potential with coefficients 80.0, 1.2 for K, r0. All other bond types (2-N) would be computed with a fene potential with coefficients 30.0, 1.5, 1.0, 1.0 for K, R0, epsilon, sigma.
-Restrictions: +
A bond style of none can be specified as an argument to bond_style +hybrid and the corresponding bond_coeff commands, if you desire to +turn off certain bond types.
-Bond styles can only be set for atom styles that allow bonds to be -defined. -
-This bond style is part of the "molecular" package. It is only -enabled if LAMMPS was built with that package. See the Making -LAMMPS section for more info. +
Restrictions: none
Related commands:
Default: none
diff --git a/doc/bond_style_hybrid.txt b/doc/bond_style_hybrid.txt index 8d53e0e45..37cd829dd 100644 --- a/doc/bond_style_hybrid.txt +++ b/doc/bond_style_hybrid.txt @@ -1,54 +1,51 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line bond_style hybrid command :h3 [Syntax:] bond_style hybrid style1 style2 ... :pre style1,style2 = list of one or more bond styles :ul [Examples:] bond_style hybrid harmonic fene bond_coeff 1 harmonic 80.0 1.2 bond_coeff 2* fene 30.0 1.5 1.0 1.0 :pre [Description:] The {hybrid} style enables the use of multiple bond styles in one simulation. A bond style is assigned to each bond type. For example, bonds in a polymer flow (of bond type 1) could be computed with a {fene} potential and bonds in the wall boundary (of bond type 2) could be computed with a {harmonic} potential. The assignment of bond type to style is made via the "bond_coeff"_bond_coeff.html command or in the data file. In the bond_coeff command, the first coefficient sets the bond style and the remaining coefficients are those appropriate to that style. In the example above, the 2 bond_coeff commands would set bonds of bond type 1 to be computed with a {harmonic} potential with coefficients 80.0, 1.2 for K, r0. All other bond types (2-N) would be computed with a {fene} potential with coefficients 30.0, 1.5, 1.0, 1.0 for K, R0, epsilon, sigma. -[Restrictions:] +A bond style of {none} can be specified as an argument to bond_style +hybrid and the corresponding bond_coeff commands, if you desire to +turn off certain bond types. -Bond styles can only be set for atom styles that allow bonds to be -defined. - -This bond style is part of the "molecular" package. It is only -enabled if LAMMPS was built with that package. See the "Making -LAMMPS"_Section_start.html#2_2 section for more info. +[Restrictions:] none [Related commands:] "bond_coeff"_bond_coeff.html, "delete_bonds"_delete_bonds.html [Default:] none diff --git a/doc/bond_style_morse.html b/doc/bond_style_morse.html index 8670a6b10..dd2f30110 100644 --- a/doc/bond_style_morse.html +++ b/doc/bond_style_morse.html @@ -1,56 +1,49 @@Syntax:
bond_style morse
Examples:
bond_style morse bond_coeff 5 1.0 2.0 1.2
Description:
The morse bond style uses the potential
where r0 is the equilibrium bond distance, alpha is a stiffness parameter, and D determines the depth of the potential well.
The following coefficients must be defined for each bond type via the bond_coeff command as in the example above, or in the data file or restart files read by the read_data or read_restart commands:
Restrictions: -
-Bond styles can only be set for atom styles that allow bonds to be -defined. -
-This bond style is part of the "molecular" package. It is only -enabled if LAMMPS was built with that package. See the Making -LAMMPS section for more info. +
Restrictions: none
Related commands:
Default: none
diff --git a/doc/bond_style_morse.txt b/doc/bond_style_morse.txt index 50428ba2a..17ac84155 100644 --- a/doc/bond_style_morse.txt +++ b/doc/bond_style_morse.txt @@ -1,51 +1,44 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line bond_style morse command :h3 [Syntax:] bond_style morse :pre [Examples:] bond_style morse bond_coeff 5 1.0 2.0 1.2 :pre [Description:] The {morse} bond style uses the potential :c,image(Eqs/bond_morse.jpg) where r0 is the equilibrium bond distance, alpha is a stiffness parameter, and D determines the depth of the potential well. The following coefficients must be defined for each bond type via the "bond_coeff"_bond_coeff.html command as in the example above, or in the data file or restart files read by the "read_data"_read_data.html or "read_restart"_read_restart.html commands: D (energy) alpha (inverse distance) r0 (distance) :ul -[Restrictions:] - -Bond styles can only be set for atom styles that allow bonds to be -defined. - -This bond style is part of the "molecular" package. It is only -enabled if LAMMPS was built with that package. See the "Making -LAMMPS"_Section_start.html#2_2 section for more info. +[Restrictions:] none [Related commands:] "bond_coeff"_bond_coeff.html, "delete_bonds"_delete_bonds.html [Default:] none diff --git a/doc/bond_style_none.html b/doc/bond_style_none.html index 29650d977..ed59eca4c 100644 --- a/doc/bond_style_none.html +++ b/doc/bond_style_none.html @@ -1,37 +1,34 @@Syntax:
bond_style none
Examples:
bond_style none
Description:
Using a bond style of none means bond forces are not computed, even if pairs of bonded atoms were listed in the data file read by the read_data command.
-Restrictions: -
-Bond styles can only be set for atom styles that allow bonds to be -defined. +
Restrictions: none
Related commands: none
Default: none
diff --git a/doc/bond_style_none.txt b/doc/bond_style_none.txt index 939c346e0..943be673b 100644 --- a/doc/bond_style_none.txt +++ b/doc/bond_style_none.txt @@ -1,32 +1,29 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line bond_style none command :h3 [Syntax:] bond_style none :pre [Examples:] bond_style none :pre [Description:] Using a bond style of none means bond forces are not computed, even if pairs of bonded atoms were listed in the data file read by the "read_data"_read_data.html command. -[Restrictions:] - -Bond styles can only be set for atom styles that allow bonds to be -defined. +[Restrictions:] none [Related commands:] none [Default:] none diff --git a/doc/bond_style_nonlinear.html b/doc/bond_style_nonlinear.html index 50dbe00f0..dc68e2413 100644 --- a/doc/bond_style_nonlinear.html +++ b/doc/bond_style_nonlinear.html @@ -1,62 +1,55 @@Syntax:
bond_style nonlinear
Examples:
bond_style nonlinear bond_coeff 2 100.0 1.1 1.4
Description:
The nonlinear bond style uses the potential
to define an anharmonic spring (Rector) of equilibrium length r0 and maximum extension lamda.
The following coefficients must be defined for each bond type via the bond_coeff command as in the example above, or in the data file or restart files read by the read_data or read_restart commands:
Restrictions: -
-Bond styles can only be set for atom styles that allow bonds to be -defined. -
-This bond style is part of the "molecular" package. It is only -enabled if LAMMPS was built with that package. See the Making -LAMMPS section for more info. +
Restrictions: none
Related commands:
Default: none
(Rector) Rector, Van Swol, Henderson, Molecular Physics, 82, 1009 (1994).
diff --git a/doc/bond_style_nonlinear.txt b/doc/bond_style_nonlinear.txt index 79e51393b..7a3be2214 100644 --- a/doc/bond_style_nonlinear.txt +++ b/doc/bond_style_nonlinear.txt @@ -1,56 +1,49 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line bond_style nonlinear command :h3 [Syntax:] bond_style nonlinear :pre [Examples:] bond_style nonlinear bond_coeff 2 100.0 1.1 1.4 :pre [Description:] The {nonlinear} bond style uses the potential :c,image(Eqs/bond_nonlinear.jpg) to define an anharmonic spring "(Rector)"_#Rector of equilibrium length r0 and maximum extension lamda. The following coefficients must be defined for each bond type via the "bond_coeff"_bond_coeff.html command as in the example above, or in the data file or restart files read by the "read_data"_read_data.html or "read_restart"_read_restart.html commands: epsilon (energy) r0 (distance) lamda (distance) :ul -[Restrictions:] - -Bond styles can only be set for atom styles that allow bonds to be -defined. - -This bond style is part of the "molecular" package. It is only -enabled if LAMMPS was built with that package. See the "Making -LAMMPS"_Section_start.html#2_2 section for more info. +[Restrictions:] none [Related commands:] "bond_coeff"_bond_coeff.html, "delete_bonds"_delete_bonds.html [Default:] none :line :link(Rector) [(Rector)] Rector, Van Swol, Henderson, Molecular Physics, 82, 1009 (1994). diff --git a/doc/bond_style_quartic.html b/doc/bond_style_quartic.html index 25ff98526..51ce7e1ac 100644 --- a/doc/bond_style_quartic.html +++ b/doc/bond_style_quartic.html @@ -1,95 +1,88 @@Syntax:
bond_style quartic
Examples:
bond_style quartic bond_coeff 2 1200 -0.55 0.25 1.3 34.6878
Description:
The quartic bond style uses the potential
to define a bond that can be broken as the simulation proceeds (e.g. due to a polymer being stretched). The sigma and epsilon used in the LJ portion of the formula are both set equal to 1.0 by LAMMPS.
The following coefficients must be defined for each bond type via the bond_coeff command as in the example above, or in the data file or restart files read by the read_data or read_restart commands:
This potential was constructed to mimic the FENE bond potential for coarse-grained polymer chains. When monomers with sigma = epsilon = 1.0 are used, the following choice of parameters gives a quartic potential that looks nearly like the FENE potential: K = 1200, B1 = -0.55, B2 = 0.25, Rc = 1.3, and U0 = 34.6878. Different parameters can be specified using the bond_coeff command, but you will need to choose them carefully so they form a suitable bond potential.
Rc is the cutoff length at which the bond potential goes smoothly to a local maximium. If a bond length ever becomes > Rc, LAMMPS "breaks" the bond, which means two things. First, the bond potential is turned off by setting its type to 0, and is no longer computed. Second, a pairwise interaction between the two atoms is turned on, since they are no longer bonded.
LAMMPS does the second task via a computational sleight-of-hand. It subtracts the pairwise interaction as part of the bond computation. When the bond breaks, the subtraction stops. For this to work, the pairwise interaction must always be computed by the pair_style command, whether the bond is broken or not. This means that special_bonds must be set to 1,1,1, as indicated as a restriction below.
Note that when bonds are dumped to a file via dump bond, bonds with type 0 are not included. The delete_bonds command can also be used to query the status of broken bonds or permanently delete them, e.g.:
delete_bonds all stats delete_bonds all bond 0 remove
Restrictions:
-Bond styles can only be set for atom styles that allow bonds to be -defined. -
The quartic style requires that special_bonds parameters be set to 1,1,1. Three- and four-body interactions (angle, dihedral, etc) cannot be used with quartic bonds.
-This bond style is part of the "molecular" package. It is only enabled -if LAMMPS was built with that package. See the Making -LAMMPS section for more info. -
Related commands:
Default: none
diff --git a/doc/bond_style_quartic.txt b/doc/bond_style_quartic.txt index 15ac94b52..20baf5d15 100644 --- a/doc/bond_style_quartic.txt +++ b/doc/bond_style_quartic.txt @@ -1,90 +1,83 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line bond_style quartic command :h3 [Syntax:] bond_style quartic :pre [Examples:] bond_style quartic bond_coeff 2 1200 -0.55 0.25 1.3 34.6878 :pre [Description:] The {quartic} bond style uses the potential :c,image(Eqs/bond_quartic.jpg) to define a bond that can be broken as the simulation proceeds (e.g. due to a polymer being stretched). The sigma and epsilon used in the LJ portion of the formula are both set equal to 1.0 by LAMMPS. The following coefficients must be defined for each bond type via the "bond_coeff"_bond_coeff.html command as in the example above, or in the data file or restart files read by the "read_data"_read_data.html or "read_restart"_read_restart.html commands: K (energy/distance^2) B1 (distance) B2 (distance) Rc (distance) U0 (energy) :ul This potential was constructed to mimic the FENE bond potential for coarse-grained polymer chains. When monomers with sigma = epsilon = 1.0 are used, the following choice of parameters gives a quartic potential that looks nearly like the FENE potential: K = 1200, B1 = -0.55, B2 = 0.25, Rc = 1.3, and U0 = 34.6878. Different parameters can be specified using the "bond_coeff"_bond_coeff.html command, but you will need to choose them carefully so they form a suitable bond potential. Rc is the cutoff length at which the bond potential goes smoothly to a local maximium. If a bond length ever becomes > Rc, LAMMPS "breaks" the bond, which means two things. First, the bond potential is turned off by setting its type to 0, and is no longer computed. Second, a pairwise interaction between the two atoms is turned on, since they are no longer bonded. LAMMPS does the second task via a computational sleight-of-hand. It subtracts the pairwise interaction as part of the bond computation. When the bond breaks, the subtraction stops. For this to work, the pairwise interaction must always be computed by the "pair_style"_pair_style.html command, whether the bond is broken or not. This means that "special_bonds"_special_bonds.html must be set to 1,1,1, as indicated as a restriction below. Note that when bonds are dumped to a file via "dump bond"_dump.html, bonds with type 0 are not included. The "delete_bonds"_delete_bonds.html command can also be used to query the status of broken bonds or permanently delete them, e.g.: delete_bonds all stats delete_bonds all bond 0 remove :pre [Restrictions:] -Bond styles can only be set for atom styles that allow bonds to be -defined. - The {quartic} style requires that "special_bonds"_special_bonds.html parameters be set to 1,1,1. Three- and four-body interactions (angle, dihedral, etc) cannot be used with {quartic} bonds. -This bond style is part of the "molecular" package. It is only enabled -if LAMMPS was built with that package. See the "Making -LAMMPS"_Section_start.html#2_2 section for more info. - [Related commands:] "bond_coeff"_bond_coeff.html, "delete_bonds"_delete_bonds.html [Default:] none diff --git a/doc/dihedral_style.html b/doc/dihedral_style.html index 0cf7b1d3d..139abc23c 100644 --- a/doc/dihedral_style.html +++ b/doc/dihedral_style.html @@ -1,98 +1,99 @@Syntax:
dihedral_style style
Examples:
dihedral_style harmonic dihedral_style multi/harmonic dihedral_style hybrid harmonic charmm
Description:
Set the formula(s) LAMMPS uses to compute dihedral interactions between quadruplets of atoms, which remain in force for the duration of the simulation. The list of dihedral quadruplets is read in by a read_data or read_restart command from a data or restart file.
Hybrid models where dihedrals are computed using different dihedral potentials can be setup using the hybrid dihedral style.
The coefficients associated with a dihedral style can be specified in a data or restart file or via the dihedral_coeff command.
In the formulas listed for each dihedral style, phi is the torsional angle defined by the quadruplet of atoms.
Note that when both an dihedral and pair style is defined, the special_bond command often needs to be used to turn off (or weight) the pairwise interactions that would otherwise exist between the 4 bonded atoms.
Here are some important points to take note of when defining the LAMMPS dihedral coefficients in the formulas that follow so that they are compatible with other force fields:
Here is an alphabetic list of dihedral styles defined in LAMMPS. Click on the style to display the formula it computes and coefficients specified by the associated dihedral_coeff command:
Restrictions:
Dihedral styles can only be set for atom styles that allow dihedrals to be defined.
-Dihedral styles are part of the "molecular" package. They are only
-enabled if LAMMPS was built with that package. See the Making
+ Dihedral styles are part of the "molecular" package or other packages
+as noted in their documentation. They are only enabled if LAMMPS was
+built with that package. See the Making
LAMMPS section for more info.
Related commands:
Default:
dihedral_style none
Syntax:
Examples:
Description:
The charmm dihedral style uses the potential
See (MacKerell) for a description of the CHARMM force
+field.
+ The following coefficients must be defined for each dihedral type via the
dihedral_coeff command as in the example above, or in
the data file or restart files read by the read_data
or read_restart commands:
The weighting factor is applied to pairwise interaction between the
1st and 4th atoms in the dihedral. Note that this weighting factor is
unrelated to the weighting factor specified by the special
bonds command which applies to all 1-4
interactions in the system. For CHARMM force fields, the latter
should typically be set to 0.0, else the 1-4 interactions in a
dihedral will be computed twice (once by the pair potential, and once
by the dihedral/charmm potential).
Restrictions:
- Dihedral styles can only be set for atom styles that allow dihedrals to be
-defined.
- This dihedral style is part of the "molecular" package. It is only
-enabled if LAMMPS was built with that package. See the Making
-LAMMPS section for more info.
+ Restrictions: none
Related commands:
Default: none
dihedral_style charmm command
dihedral_style charmm
dihedral_style charmm
dihedral_coeff 1 120.0 1 60 0.5
+
+
+
+
(MacKerell) MacKerell, Bashford, Bellott, Dunbrack, Evanseck, Field, +Fischer, Gao, Guo, Ha, et al, J Phys Chem, 102, 3586 (1998). +
diff --git a/doc/dihedral_style_charmm.txt b/doc/dihedral_style_charmm.txt index 90a5e8bf7..788bd79ce 100644 --- a/doc/dihedral_style_charmm.txt +++ b/doc/dihedral_style_charmm.txt @@ -1,58 +1,60 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line dihedral_style charmm command :h3 [Syntax:] dihedral_style charmm :pre [Examples:] dihedral_style charmm dihedral_coeff 1 120.0 1 60 0.5 :pre [Description:] The {charmm} dihedral style uses the potential :c,image(Eqs/dihedral_charmm.jpg) +See "(MacKerell)"_#MacKerell for a description of the CHARMM force +field. + The following coefficients must be defined for each dihedral type via the "dihedral_coeff"_dihedral_coeff.html command as in the example above, or in the data file or restart files read by the "read_data"_read_data.html or "read_restart"_read_restart.html commands: K (energy) n (integer >= 0) d (integer value of degrees) weighting factor (0.0 to 1.0) :ul The weighting factor is applied to pairwise interaction between the 1st and 4th atoms in the dihedral. Note that this weighting factor is unrelated to the weighting factor specified by the "special bonds"_doc/special_bonds.html command which applies to all 1-4 interactions in the system. For CHARMM force fields, the latter should typically be set to 0.0, else the 1-4 interactions in a dihedral will be computed twice (once by the pair potential, and once by the dihedral/charmm potential). -[Restrictions:] - -Dihedral styles can only be set for atom styles that allow dihedrals to be -defined. - -This dihedral style is part of the "molecular" package. It is only -enabled if LAMMPS was built with that package. See the "Making -LAMMPS"_Section_start.html#2_2 section for more info. +[Restrictions:] none [Related commands:] "dihedral_coeff"_dihedral_coeff.html [Default:] none + +:line + +:link(MacKerell) +[(MacKerell)] MacKerell, Bashford, Bellott, Dunbrack, Evanseck, Field, +Fischer, Gao, Guo, Ha, et al, J Phys Chem, 102, 3586 (1998). diff --git a/doc/dihedral_style_class2.html b/doc/dihedral_style_class2.html index b6e90971c..64825020c 100644 --- a/doc/dihedral_style_class2.html +++ b/doc/dihedral_style_class2.html @@ -1,117 +1,122 @@Syntax:
dihedral_style class2
Examples:
dihedral_style class2 dihedral_coeff 1 100 75 100 70 80 60
Description:
The class2 dihedral style uses the potential
where Ed is the dihedral term, Embt is a middle-bond-torsion term, Eebt is an end-bond-torsion term, Eat is an angle-torsion term, Eaat is an angle-angle-torsion term, and Ebb13 is a bond-bond-13 term.
Theta1 and theta2 are equilibrium angles and r1 r2 r3 are equilibrium bond lengths.
+See (Sun) for a description of the COMPASS class2 force field. +
For this style, only coefficients for the Ed formula can be specified in the input script. These are the 6 coefficients:
Coefficients for all the other formulas must be specified in the data file.
For the Embt formula, the coefficients are listed under a "MiddleBondTorsion Coeffs" heading and each line lists 4 coefficients:
For the Eebt formula, the coefficients are listed under a "EndBondTorsion Coeffs" heading and each line lists 8 coefficients:
For the Eat formula, the coefficients are listed under a "AngleTorsion Coeffs" heading and each line lists 8 coefficients:
Theta1 and theta2 are specified in degrees, but LAMMPS converts them to radians internally; hence the units of D and E are in energy/radian.
For the Eaat formula, the coefficients are listed under a "AngleAngleTorsion Coeffs" heading and each line lists 3 coefficients:
Theta1 and theta2 are specified in degrees, but LAMMPS converts them to radians internally; hence the units of M are in energy/radian^2.
For the Ebb13 formula, the coefficients are listed under a "BondBond13 Coeffs" heading and each line lists 3 coefficients:
Restrictions:
-Dihedral styles can only be set for atom styles that allow dihedrals to be -defined. -
This dihedral style is part of the "class2" package. It is only enabled if LAMMPS was built with that package. See the Making LAMMPS section for more info.
Related commands:
Default: none
+(Sun) Sun, J Phys Chem B 102, 7338-7364 (1998). +
diff --git a/doc/dihedral_style_class2.txt b/doc/dihedral_style_class2.txt index e22071934..a638f976e 100644 --- a/doc/dihedral_style_class2.txt +++ b/doc/dihedral_style_class2.txt @@ -1,112 +1,116 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line dihedral_style class2 command :h3 [Syntax:] dihedral_style class2 :pre [Examples:] dihedral_style class2 dihedral_coeff 1 100 75 100 70 80 60 :pre [Description:] The {class2} dihedral style uses the potential :c,image(Eqs/dihedral_class2.jpg) where Ed is the dihedral term, Embt is a middle-bond-torsion term, Eebt is an end-bond-torsion term, Eat is an angle-torsion term, Eaat is an angle-angle-torsion term, and Ebb13 is a bond-bond-13 term. Theta1 and theta2 are equilibrium angles and r1 r2 r3 are equilibrium bond lengths. +See "(Sun)"_#Sun for a description of the COMPASS class2 force field. + For this style, only coefficients for the Ed formula can be specified in the input script. These are the 6 coefficients: K1 (energy) phi1 (degrees) K2 (energy) phi2 (degrees) K3 (energy) phi3 (degrees) :ul Coefficients for all the other formulas must be specified in the data file. For the Embt formula, the coefficients are listed under a "MiddleBondTorsion Coeffs" heading and each line lists 4 coefficients: A1 (energy/distance) A2 (energy/distance) A3 (energy/distance) r2 (distance) :ul For the Eebt formula, the coefficients are listed under a "EndBondTorsion Coeffs" heading and each line lists 8 coefficients: B1 (energy/distance) B2 (energy/distance) B3 (energy/distance) C1 (energy/distance) C2 (energy/distance) C3 (energy/distance) r1 (distance) r3 (distance) :ul For the Eat formula, the coefficients are listed under a "AngleTorsion Coeffs" heading and each line lists 8 coefficients: D1 (energy/radian) D2 (energy/radian) D3 (energy/radian) E1 (energy/radian) E2 (energy/radian) E3 (energy/radian) theta1 (degrees) theta2 (degrees) :ul Theta1 and theta2 are specified in degrees, but LAMMPS converts them to radians internally; hence the units of D and E are in energy/radian. For the Eaat formula, the coefficients are listed under a "AngleAngleTorsion Coeffs" heading and each line lists 3 coefficients: M (energy/radian^2) theta1 (degrees) theta2 (degrees) :ul Theta1 and theta2 are specified in degrees, but LAMMPS converts them to radians internally; hence the units of M are in energy/radian^2. For the Ebb13 formula, the coefficients are listed under a "BondBond13 Coeffs" heading and each line lists 3 coefficients: N (energy/distance^2) r1 (distance) r3 (distance) :ul [Restrictions:] -Dihedral styles can only be set for atom styles that allow dihedrals to be -defined. - This dihedral style is part of the "class2" package. It is only enabled if LAMMPS was built with that package. See the "Making LAMMPS"_Section_start.html#2_2 section for more info. [Related commands:] "dihedral_coeff"_dihedral_coeff.html [Default:] none + +:line + +:link(Sun) +[(Sun)] Sun, J Phys Chem B 102, 7338-7364 (1998). diff --git a/doc/dihedral_style_harmonic.html b/doc/dihedral_style_harmonic.html index c0be74e65..a1e80cdcb 100644 --- a/doc/dihedral_style_harmonic.html +++ b/doc/dihedral_style_harmonic.html @@ -1,53 +1,46 @@Syntax:
dihedral_style harmonic
Examples:
dihedral_style harmonic dihedral_coeff 1 80.0 1 2
Description:
The harmonic dihedral style uses the potential
The following coefficients must be defined for each dihedral type via the dihedral_coeff command as in the example above, or in the data file or restart files read by the read_data or read_restart commands:
Restrictions: -
-Dihedral styles can only be set for atom styles that allow dihedrals to be -defined. -
-This dihedral style is part of the "molecular" package. It is only -enabled if LAMMPS was built with that package. See the Making -LAMMPS section for more info. +
Restrictions: none
Related commands:
Default: none
diff --git a/doc/dihedral_style_harmonic.txt b/doc/dihedral_style_harmonic.txt index d576e0e93..ecae8a111 100644 --- a/doc/dihedral_style_harmonic.txt +++ b/doc/dihedral_style_harmonic.txt @@ -1,48 +1,41 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line dihedral_style harmonic command :h3 [Syntax:] dihedral_style harmonic :pre [Examples:] dihedral_style harmonic dihedral_coeff 1 80.0 1 2 :pre [Description:] The {harmonic} dihedral style uses the potential :c,image(Eqs/dihedral_harmonic.jpg) The following coefficients must be defined for each dihedral type via the "dihedral_coeff"_dihedral_coeff.html command as in the example above, or in the data file or restart files read by the "read_data"_read_data.html or "read_restart"_read_restart.html commands: K (energy) d (+1 or -1) n (integer >= 0) :ul -[Restrictions:] - -Dihedral styles can only be set for atom styles that allow dihedrals to be -defined. - -This dihedral style is part of the "molecular" package. It is only -enabled if LAMMPS was built with that package. See the "Making -LAMMPS"_Section_start.html#2_2 section for more info. +[Restrictions:] none [Related commands:] "dihedral_coeff"_dihedral_coeff.html [Default:] none diff --git a/doc/dihedral_style_helix.html b/doc/dihedral_style_helix.html index 9005246b5..ace3fd3c2 100644 --- a/doc/dihedral_style_helix.html +++ b/doc/dihedral_style_helix.html @@ -1,67 +1,60 @@Syntax:
dihedral_style helix
Examples:
dihedral_style helix dihedral_coeff 1 80.0 100.0 40.0
Description:
The helix dihedral style uses the potential
This coarse-grain dihedral potential is described in (Guo). For dihedral angles in the helical region, the energy function is represented by a standard potential consisting of three minima, one corresponding to the trans (t) state and the other to gauche states (g+ and g-). The paper describes how the A,B,C parameters are chosen so as to balance secondary (largely driven by local interactions) and tertiary structure (driven by long-range interactions).
The following coefficients must be defined for each dihedral type via the dihedral_coeff command as in the example above, or in the data file or restart files read by the read_data or read_restart commands:
Restrictions: -
-Dihedral styles can only be set for atom styles that allow dihedrals to be -defined. -
-This dihedral style is part of the "molecular" package. It is only -enabled if LAMMPS was built with that package. See the Making -LAMMPS section for more info. +
Restrictions: none
Related commands:
Default: none
(Guo) Guo and Thirumalai, Journal of Molecular Biology, 263, 323-43 (1996).
diff --git a/doc/dihedral_style_helix.txt b/doc/dihedral_style_helix.txt index 91271cfcb..7827c65c0 100644 --- a/doc/dihedral_style_helix.txt +++ b/doc/dihedral_style_helix.txt @@ -1,61 +1,54 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line dihedral_style helix command :h3 [Syntax:] dihedral_style helix :pre [Examples:] dihedral_style helix dihedral_coeff 1 80.0 100.0 40.0 :pre [Description:] The {helix} dihedral style uses the potential :c,image(Eqs/dihedral_helix.jpg) This coarse-grain dihedral potential is described in "(Guo)"_#Guo. For dihedral angles in the helical region, the energy function is represented by a standard potential consisting of three minima, one corresponding to the trans (t) state and the other to gauche states (g+ and g-). The paper describes how the A,B,C parameters are chosen so as to balance secondary (largely driven by local interactions) and tertiary structure (driven by long-range interactions). The following coefficients must be defined for each dihedral type via the "dihedral_coeff"_dihedral_coeff.html command as in the example above, or in the data file or restart files read by the "read_data"_read_data.html or "read_restart"_read_restart.html commands: A (energy) B (energy) C (energy) :ul -[Restrictions:] - -Dihedral styles can only be set for atom styles that allow dihedrals to be -defined. - -This dihedral style is part of the "molecular" package. It is only -enabled if LAMMPS was built with that package. See the "Making -LAMMPS"_Section_start.html#2_2 section for more info. +[Restrictions:] none [Related commands:] "dihedral_coeff"_dihedral_coeff.html [Default:] none :line :link(Guo) [(Guo)] Guo and Thirumalai, Journal of Molecular Biology, 263, 323-43 (1996). diff --git a/doc/dihedral_style_hybrid.html b/doc/dihedral_style_hybrid.html index d3fab5b61..09fff4cc0 100644 --- a/doc/dihedral_style_hybrid.html +++ b/doc/dihedral_style_hybrid.html @@ -1,59 +1,56 @@Syntax:
dihedral_style hybrid style1 style2 ...
Examples:
dihedral_style hybrid harmonic helix dihedral_coeff 1 harmonic 6.0 1 3 dihedral_coeff 2 helix 10 10 10
Description:
The hybrid style enables the use of multiple dihedral styles in one simulation. An dihedral style is assigned to each dihedral type. For example, dihedrals in a polymer flow (of dihedral type 1) could be computed with a harmonic potential and dihedrals in the wall boundary (of dihedral type 2) could be computed with a helix potential. The assignment of dihedral type to style is made via the dihedral_coeff command or in the data file.
In the dihedral_coeff command, the first coefficient sets the dihedral style and the remaining coefficients are those appropriate to that style. In the example above, the 2 dihedral_coeff commands would set dihedrals of dihedral type 1 to be computed with a harmonic potential with coefficients 80.0, 1.2 for K, d, n. Dihedral type 2 would be computed with a helix potential with coefficients 10.0, 10.0, 10.0 for A, B, C.
-Restrictions: +
A dihedral style of none can be specified as an argument to +dihedral_style hybrid and the corresponding dihedral_coeff commands, +if you desire to turn off certain dihedral types.
-Dihedral styles can only be set for atom styles that allow dihedrals to be -defined. -
-This dihedral style is part of the "molecular" package. It is only -enabled if LAMMPS was built with that package. See the Making -LAMMPS section for more info. +
Restrictions: none
Related commands:
Default: none
diff --git a/doc/dihedral_style_hybrid.txt b/doc/dihedral_style_hybrid.txt index 4260b749f..c5969e11f 100644 --- a/doc/dihedral_style_hybrid.txt +++ b/doc/dihedral_style_hybrid.txt @@ -1,54 +1,51 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line dihedral_style hybrid command :h3 [Syntax:] dihedral_style hybrid style1 style2 ... :pre style1,style2 = list of one or more dihedral styles :ul [Examples:] dihedral_style hybrid harmonic helix dihedral_coeff 1 harmonic 6.0 1 3 dihedral_coeff 2 helix 10 10 10 :pre [Description:] The {hybrid} style enables the use of multiple dihedral styles in one simulation. An dihedral style is assigned to each dihedral type. For example, dihedrals in a polymer flow (of dihedral type 1) could be computed with a {harmonic} potential and dihedrals in the wall boundary (of dihedral type 2) could be computed with a {helix} potential. The assignment of dihedral type to style is made via the "dihedral_coeff"_dihedral_coeff.html command or in the data file. In the dihedral_coeff command, the first coefficient sets the dihedral style and the remaining coefficients are those appropriate to that style. In the example above, the 2 dihedral_coeff commands would set dihedrals of dihedral type 1 to be computed with a {harmonic} potential with coefficients 80.0, 1.2 for K, d, n. Dihedral type 2 would be computed with a {helix} potential with coefficients 10.0, 10.0, 10.0 for A, B, C. -[Restrictions:] +A dihedral style of {none} can be specified as an argument to +dihedral_style hybrid and the corresponding dihedral_coeff commands, +if you desire to turn off certain dihedral types. -Dihedral styles can only be set for atom styles that allow dihedrals to be -defined. - -This dihedral style is part of the "molecular" package. It is only -enabled if LAMMPS was built with that package. See the "Making -LAMMPS"_Section_start.html#2_2 section for more info. +[Restrictions:] none [Related commands:] "dihedral_coeff"_dihedral_coeff.html [Default:] none diff --git a/doc/dihedral_style_multi_harmonic.html b/doc/dihedral_style_multi_harmonic.html index 5cdd2b600..bbeb4c7ff 100644 --- a/doc/dihedral_style_multi_harmonic.html +++ b/doc/dihedral_style_multi_harmonic.html @@ -1,55 +1,48 @@Syntax:
dihedral_style multi/harmonic
Examples:
dihedral_style multi/harmonic dihedral_coeff 1 20 20 20 20 20
Description:
The multi/harmonic dihedral style uses the potential
The following coefficients must be defined for each dihedral type via the dihedral_coeff command as in the example above, or in the data file or restart files read by the read_data or read_restart commands:
Restrictions: -
-Dihedral styles can only be set for atom styles that allow dihedrals to be -defined. -
-This dihedral style is part of the "molecular" package. It is only -enabled if LAMMPS was built with that package. See the Making -LAMMPS section for more info. +
Restrictions: none
Related commands:
Default: none
diff --git a/doc/dihedral_style_multi_harmonic.txt b/doc/dihedral_style_multi_harmonic.txt index 7cb4819ed..53fffc0bf 100644 --- a/doc/dihedral_style_multi_harmonic.txt +++ b/doc/dihedral_style_multi_harmonic.txt @@ -1,50 +1,43 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line dihedral_style multi/harmonic command :h3 [Syntax:] dihedral_style multi/harmonic :pre [Examples:] dihedral_style multi/harmonic dihedral_coeff 1 20 20 20 20 20 :pre [Description:] The {multi/harmonic} dihedral style uses the potential :c,image(Eqs/dihedral_multi_harmonic.jpg) The following coefficients must be defined for each dihedral type via the "dihedral_coeff"_dihedral_coeff.html command as in the example above, or in the data file or restart files read by the "read_data"_read_data.html or "read_restart"_read_restart.html commands: A1 (energy) A2 (energy) A3 (energy) A4 (energy) A5 (energy) :ul -[Restrictions:] - -Dihedral styles can only be set for atom styles that allow dihedrals to be -defined. - -This dihedral style is part of the "molecular" package. It is only -enabled if LAMMPS was built with that package. See the "Making -LAMMPS"_Section_start.html#2_2 section for more info. +[Restrictions:] none [Related commands:] "dihedral_coeff"_dihedral_coeff.html [Default:] none diff --git a/doc/dihedral_style_none.html b/doc/dihedral_style_none.html index fc0a01419..439ab7703 100644 --- a/doc/dihedral_style_none.html +++ b/doc/dihedral_style_none.html @@ -1,37 +1,34 @@Syntax:
dihedral_style none
Examples:
dihedral_style none
Description:
Using an dihedral style of none means dihedral forces are not computed, even if quadruplets of dihedral atoms were listed in the data file read by the read_data command.
-Restrictions: -
-Dihedral styles can only be set for atom styles that allow dihedrals -to be defined. +
Restrictions: none
Related commands: none
Default: none
diff --git a/doc/dihedral_style_none.txt b/doc/dihedral_style_none.txt index bf002923e..1f6650928 100644 --- a/doc/dihedral_style_none.txt +++ b/doc/dihedral_style_none.txt @@ -1,32 +1,29 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line dihedral_style none command :h3 [Syntax:] dihedral_style none :pre [Examples:] dihedral_style none :pre [Description:] Using an dihedral style of none means dihedral forces are not computed, even if quadruplets of dihedral atoms were listed in the data file read by the "read_data"_read_data.html command. -[Restrictions:] - -Dihedral styles can only be set for atom styles that allow dihedrals -to be defined. +[Restrictions:] none [Related commands:] none [Default:] none diff --git a/doc/dihedral_style_opls.html b/doc/dihedral_style_opls.html index 6bfb3fed7..bf7ec1fbc 100644 --- a/doc/dihedral_style_opls.html +++ b/doc/dihedral_style_opls.html @@ -1,65 +1,58 @@Syntax:
dihedral_style opls
Examples:
dihedral_style opls dihedral_coeff 1 90.0 90.0 90.0 70.0
Description:
The opls dihedral style uses the potential
Note that the usual 1/2 factor is not included in the K values.
This dihedral potential is used in the OPLS force field and is described in (Watkins).
The following coefficients must be defined for each dihedral type via the dihedral_coeff command as in the example above, or in the data file or restart files read by the read_data or read_restart commands:
Restrictions: -
-Dihedral styles can only be set for atom styles that allow dihedrals to be -defined. -
-This dihedral style is part of the "molecular" package. It is only -enabled if LAMMPS was built with that package. See the Making -LAMMPS section for more info. +
Restrictions: none
Related commands:
Default: none
(Watkins) Watkins and Jorgensen, J Phys Chem A, 105, 4118-4125 (2001).
diff --git a/doc/dihedral_style_opls.txt b/doc/dihedral_style_opls.txt index b0b5b9dea..639e3a3f3 100644 --- a/doc/dihedral_style_opls.txt +++ b/doc/dihedral_style_opls.txt @@ -1,59 +1,52 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line dihedral_style opls command :h3 [Syntax:] dihedral_style opls :pre [Examples:] dihedral_style opls dihedral_coeff 1 90.0 90.0 90.0 70.0 :pre [Description:] The {opls} dihedral style uses the potential :c,image(Eqs/dihedral_opls.jpg) Note that the usual 1/2 factor is not included in the K values. This dihedral potential is used in the OPLS force field and is described in "(Watkins)"_#Watkins. The following coefficients must be defined for each dihedral type via the "dihedral_coeff"_dihedral_coeff.html command as in the example above, or in the data file or restart files read by the "read_data"_read_data.html or "read_restart"_read_restart.html commands: K1 (energy) K2 (energy) K3 (energy) K4 (energy) :ul -[Restrictions:] - -Dihedral styles can only be set for atom styles that allow dihedrals to be -defined. - -This dihedral style is part of the "molecular" package. It is only -enabled if LAMMPS was built with that package. See the "Making -LAMMPS"_Section_start.html#2_2 section for more info. +[Restrictions:] none [Related commands:] "dihedral_coeff"_dihedral_coeff.html [Default:] none :line :link(Watkins) [(Watkins)] Watkins and Jorgensen, J Phys Chem A, 105, 4118-4125 (2001). diff --git a/doc/improper_style.html b/doc/improper_style.html index 892a90245..f5ef04378 100644 --- a/doc/improper_style.html +++ b/doc/improper_style.html @@ -1,77 +1,78 @@Syntax:
improper_style style
Examples:
improper_style harmonic improper_style cvff improper_style hybrid cvff harmonic
Description:
Set the formula(s) LAMMPS uses to compute improper interactions between quadruplets of atoms, which remain in force for the duration of the simulation. The list of improper quadruplets is read in by a read_data or read_restart command from a data or restart file.
Hybrid models where impropers are computed using different improper potentials can be setup using the hybrid improper style.
The coefficients associated with a improper style can be specified in a data or restart file or via the improper_coeff command.
Note that when both an improper and pair style is defined, the special_bond command often needs to be used to turn off (or weight) the pairwise interactions that would otherwise exist between the 4 bonded atoms.
Here is an alphabetic list of improper styles defined in LAMMPS. Click on the style to display the formula it computes and coefficients specified by the associated improper_coeff command:
Restrictions:
Improper styles can only be set for atom_style choices that allow impropers to be defined.
-Improper styles are part of the "molecular" package. They are only
-enabled if LAMMPS was built with that package. See the Making
+ Improper styles are part of the "molecular" package or other packages
+as noted in their documentation. They are only enabled if LAMMPS was
+built with that package. See the Making
LAMMPS section for more info.
Related commands:
Default:
Syntax:
Examples:
Description:
The class2 improper style uses the potential
where Ei is the improper term and Eaa is an angle-angle term. The chi
used in Ei is an average over 3 possible chi orientations. The
subscripts on the various theta's refer to different combinations of
atoms i,j,k,l used to form the angle; theta1, theta2, theta3 are the
equilibrium positions of those angles.
See (Sun) for a description of the COMPASS class2 force field.
+ The following coefficients must be defined for each improper type via the
improper_coeff command as in the example above, or in
the data file or restart files read by the read_data
or read_restart commands:
For this style, only coefficients for the Ei formula can be specified
in the input script. These are the 2 coefficients:
X0 is specified in degrees, but LAMMPS converts it to radians
internally; hence the units of K are in energy/radian^2.
Coefficients for the Eaa formula must be specified in the data file.
For the Eaa formula, the coefficients are listed under a
"AngleAngle Coeffs" heading and each line lists 6 coefficients:
The theta values are specified in degrees, but LAMMPS converts them to
radians internally; hence the units of M are in energy/radian^2.
Restrictions:
Improper styles can only be set for atom styles that allow impropers to be
-defined.
- This improper style is part of the "class2" package. It is only
enabled if LAMMPS was built with that package. See the Making
LAMMPS section for more info.
Related commands:
Default: none
improper_style none
diff --git a/doc/improper_style.txt b/doc/improper_style.txt
index 746cf40c8..bbeb13611 100644
--- a/doc/improper_style.txt
+++ b/doc/improper_style.txt
@@ -1,72 +1,73 @@
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)
:line
improper_style command :h3
[Syntax:]
improper_style style :pre
style = {none} or {hybrid} or {class2} or {cvff} or {harmonic} :ul
[Examples:]
improper_style harmonic
improper_style cvff
improper_style hybrid cvff harmonic :pre
[Description:]
Set the formula(s) LAMMPS uses to compute improper interactions
between quadruplets of atoms, which remain in force for the duration
of the simulation. The list of improper quadruplets is read in by a
"read_data"_read_data.html or "read_restart"_read_restart.html command
from a data or restart file.
Hybrid models where impropers are computed using different improper
potentials can be setup using the {hybrid} improper style.
The coefficients associated with a improper style can be specified in a
data or restart file or via the "improper_coeff"_improper_coeff.html command.
Note that when both an improper and pair style is defined, the
"special_bond"_special_bond.html command often needs to be used to
turn off (or weight) the pairwise interactions that would otherwise
exist between the 4 bonded atoms.
:line
Here is an alphabetic list of improper styles defined in LAMMPS. Click on
the style to display the formula it computes and coefficients
specified by the associated "improper_coeff"_improper_coeff.html command:
"improper_style none"_improper_style_none.html - turn off improper interactions
"improper_style hybrid"_improper_style_hybrid.html - define multiple styles of improper interactions :ul
"improper_style class2"_improper_style_class2.html - COMPASS (class 2) improper
"improper_style cvff"_improper_style_cvff.html - CVFF improper
"improper_style harmonic"_improper_style_harmonic.html - harmonic improper :ul
:line
[Restrictions:]
Improper styles can only be set for atom_style choices that allow
impropers to be defined.
-Improper styles are part of the "molecular" package. They are only
-enabled if LAMMPS was built with that package. See the "Making
+Improper styles are part of the "molecular" package or other packages
+as noted in their documentation. They are only enabled if LAMMPS was
+built with that package. See the "Making
LAMMPS"_Section_start.html#2_2 section for more info.
[Related commands:]
"improper_coeff"_improper_coeff.html
[Default:]
improper_style none :pre
diff --git a/doc/improper_style_class2.html b/doc/improper_style_class2.html
index 3d4afed28..c8b54dd8b 100644
--- a/doc/improper_style_class2.html
+++ b/doc/improper_style_class2.html
@@ -1,78 +1,83 @@
improper_style class2 command
improper_style class2
improper_style class2
improper_coeff 1 100.0 0
+
+
+
+
(Sun) Sun, J Phys Chem B 102, 7338-7364 (1998). +
diff --git a/doc/improper_style_class2.txt b/doc/improper_style_class2.txt index fc8207a64..f5390e56a 100644 --- a/doc/improper_style_class2.txt +++ b/doc/improper_style_class2.txt @@ -1,73 +1,77 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line improper_style class2 command :h3 [Syntax:] improper_style class2 :pre [Examples:] improper_style class2 improper_coeff 1 100.0 0 :pre [Description:] The {class2} improper style uses the potential :c,image(Eqs/improper_class2.jpg) where Ei is the improper term and Eaa is an angle-angle term. The chi used in Ei is an average over 3 possible chi orientations. The subscripts on the various theta's refer to different combinations of atoms i,j,k,l used to form the angle; theta1, theta2, theta3 are the equilibrium positions of those angles. +See "(Sun)"_#Sun for a description of the COMPASS class2 force field. + The following coefficients must be defined for each improper type via the "improper_coeff"_improper_coeff.html command as in the example above, or in the data file or restart files read by the "read_data"_read_data.html or "read_restart"_read_restart.html commands: For this style, only coefficients for the Ei formula can be specified in the input script. These are the 2 coefficients: K (energy/radian^2) X0 (degrees) :ul X0 is specified in degrees, but LAMMPS converts it to radians internally; hence the units of K are in energy/radian^2. Coefficients for the Eaa formula must be specified in the data file. For the Eaa formula, the coefficients are listed under a "AngleAngle Coeffs" heading and each line lists 6 coefficients: M1 (energy/distance) M2 (energy/distance) M3 (energy/distance) theta1 (degrees) theta2 (degrees) theta3 (degrees) :ul The theta values are specified in degrees, but LAMMPS converts them to radians internally; hence the units of M are in energy/radian^2. [Restrictions:] -Improper styles can only be set for atom styles that allow impropers to be -defined. - This improper style is part of the "class2" package. It is only enabled if LAMMPS was built with that package. See the "Making LAMMPS"_Section_start.html#2_2 section for more info. [Related commands:] "improper_coeff"_improper_coeff.html [Default:] none + +:line + +:link(Sun) +[(Sun)] Sun, J Phys Chem B 102, 7338-7364 (1998). diff --git a/doc/improper_style_cvff.html b/doc/improper_style_cvff.html index 9dc176217..08f25a974 100644 --- a/doc/improper_style_cvff.html +++ b/doc/improper_style_cvff.html @@ -1,55 +1,48 @@Syntax:
improper_style cvff
Examples:
improper_style cvff improper_coeff 1 80.0 -1 4
Description:
The cvff improper style uses the potential
where phi is the Wilson out-of-plane angle.
The following coefficients must be defined for each improper type via the improper_coeff command as in the example above, or in the data file or restart files read by the read_data or read_restart commands:
Restrictions: -
-Improper styles can only be set for atom styles that allow impropers to be -defined. -
-This improper style is part of the "molecular" package. It is only -enabled if LAMMPS was built with that package. See the Making -LAMMPS section for more info. +
Restrictions: none
Related commands:
Default: none
diff --git a/doc/improper_style_cvff.txt b/doc/improper_style_cvff.txt index 98b08502b..d47660d79 100644 --- a/doc/improper_style_cvff.txt +++ b/doc/improper_style_cvff.txt @@ -1,50 +1,43 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line improper_style cvff command :h3 [Syntax:] improper_style cvff :pre [Examples:] improper_style cvff improper_coeff 1 80.0 -1 4 :pre [Description:] The {cvff} improper style uses the potential :c,image(Eqs/improper_cvff.jpg) where phi is the Wilson out-of-plane angle. The following coefficients must be defined for each improper type via the "improper_coeff"_improper_coeff.html command as in the example above, or in the data file or restart files read by the "read_data"_read_data.html or "read_restart"_read_restart.html commands: K (energy) d (+1 or -1) n (0,1,2,3,4,6) :ul -[Restrictions:] - -Improper styles can only be set for atom styles that allow impropers to be -defined. - -This improper style is part of the "molecular" package. It is only -enabled if LAMMPS was built with that package. See the "Making -LAMMPS"_Section_start.html#2_2 section for more info. +[Restrictions:] none [Related commands:] "improper_coeff"_improper_coeff.html [Default:] none diff --git a/doc/improper_style_harmonic.html b/doc/improper_style_harmonic.html index 683a31601..52bb2c403 100644 --- a/doc/improper_style_harmonic.html +++ b/doc/improper_style_harmonic.html @@ -1,58 +1,51 @@Syntax:
improper_style harmonic
Examples:
improper_style harmonic improper_coeff 1 100.0 0
Description:
The harmonic improper style uses the potential
where X is the improper angle, X0 is its equilibrium value, and K is a prefactor. Note that the usual 1/2 factor is included in K.
The following coefficients must be defined for each improper type via the improper_coeff command as in the example above, or in the data file or restart files read by the read_data or read_restart commands:
X0 is specified in degrees, but LAMMPS converts it to radians internally; hence the units of K are in energy/radian^2.
-Restrictions: -
-Improper styles can only be set for atom styles that allow impropers to be -defined. -
-This improper style is part of the "molecular" package. It is only -enabled if LAMMPS was built with that package. See the Making -LAMMPS section for more info. +
Restrictions: none
Related commands:
Default: none
diff --git a/doc/improper_style_harmonic.txt b/doc/improper_style_harmonic.txt index c32fff67d..a5567428e 100644 --- a/doc/improper_style_harmonic.txt +++ b/doc/improper_style_harmonic.txt @@ -1,53 +1,46 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line improper_style harmonic command :h3 [Syntax:] improper_style harmonic :pre [Examples:] improper_style harmonic improper_coeff 1 100.0 0 :pre [Description:] The {harmonic} improper style uses the potential :c,image(Eqs/improper_harmonic.jpg) where X is the improper angle, X0 is its equilibrium value, and K is a prefactor. Note that the usual 1/2 factor is included in K. The following coefficients must be defined for each improper type via the "improper_coeff"_improper_coeff.html command as in the example above, or in the data file or restart files read by the "read_data"_read_data.html or "read_restart"_read_restart.html commands: K (energy/radian^2) X0 (degrees) :ul X0 is specified in degrees, but LAMMPS converts it to radians internally; hence the units of K are in energy/radian^2. -[Restrictions:] - -Improper styles can only be set for atom styles that allow impropers to be -defined. - -This improper style is part of the "molecular" package. It is only -enabled if LAMMPS was built with that package. See the "Making -LAMMPS"_Section_start.html#2_2 section for more info. +[Restrictions:] none [Related commands:] "improper_coeff"_improper_coeff.html [Default:] none diff --git a/doc/improper_style_hybrid.html b/doc/improper_style_hybrid.html index 51987990b..8b43845a8 100644 --- a/doc/improper_style_hybrid.html +++ b/doc/improper_style_hybrid.html @@ -1,59 +1,56 @@Syntax:
improper_style hybrid style1 style2 ...
Examples:
improper_style hybrid harmonic helix improper_coeff 1 harmonic 120.0 30 improper_coeff 2 cvff 20.0 -1 2
Description:
The hybrid style enables the use of multiple improper styles in one simulation. An improper style is assigned to each improper type. For example, impropers in a polymer flow (of improper type 1) could be computed with a harmonic potential and impropers in the wall boundary (of improper type 2) could be computed with a cvff potential. The assignment of improper type to style is made via the improper_coeff command or in the data file.
In the improper_coeff command, the first coefficient sets the improper style and the remaining coefficients are those appropriate to that style. In the example above, the 2 improper_coeff commands would set impropers of improper type 1 to be computed with a harmonic potential with coefficients 120.0, 30 for K, X0. Improper type 2 would be computed with a cvff potential with coefficients 20.0, -1, 2 for K, d, n.
-Restrictions: +
An improper style of none can be specified as an argument to +improper_style hybrid and the corresponding improper_coeff commands, +if you desire to turn off certain improper types.
-Improper styles can only be set for atom styles that allow impropers to be -defined. -
-This improper style is part of the "molecular" package. It is only -enabled if LAMMPS was built with that package. See the Making -LAMMPS section for more info. +
Restrictions: none
Related commands:
Default: none
diff --git a/doc/improper_style_hybrid.txt b/doc/improper_style_hybrid.txt index 8d8414742..db84e51e0 100644 --- a/doc/improper_style_hybrid.txt +++ b/doc/improper_style_hybrid.txt @@ -1,54 +1,51 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line improper_style hybrid command :h3 [Syntax:] improper_style hybrid style1 style2 ... :pre style1,style2 = list of one or more improper styles :ul [Examples:] improper_style hybrid harmonic helix improper_coeff 1 harmonic 120.0 30 improper_coeff 2 cvff 20.0 -1 2 :pre [Description:] The {hybrid} style enables the use of multiple improper styles in one simulation. An improper style is assigned to each improper type. For example, impropers in a polymer flow (of improper type 1) could be computed with a {harmonic} potential and impropers in the wall boundary (of improper type 2) could be computed with a {cvff} potential. The assignment of improper type to style is made via the "improper_coeff"_improper_coeff.html command or in the data file. In the improper_coeff command, the first coefficient sets the improper style and the remaining coefficients are those appropriate to that style. In the example above, the 2 improper_coeff commands would set impropers of improper type 1 to be computed with a {harmonic} potential with coefficients 120.0, 30 for K, X0. Improper type 2 would be computed with a {cvff} potential with coefficients 20.0, -1, 2 for K, d, n. -[Restrictions:] +An improper style of {none} can be specified as an argument to +improper_style hybrid and the corresponding improper_coeff commands, +if you desire to turn off certain improper types. -Improper styles can only be set for atom styles that allow impropers to be -defined. - -This improper style is part of the "molecular" package. It is only -enabled if LAMMPS was built with that package. See the "Making -LAMMPS"_Section_start.html#2_2 section for more info. +[Restrictions:] none [Related commands:] "improper_coeff"_improper_coeff.html [Default:] none diff --git a/doc/improper_style_none.html b/doc/improper_style_none.html index f1afc52f6..bfd664f38 100644 --- a/doc/improper_style_none.html +++ b/doc/improper_style_none.html @@ -1,37 +1,34 @@Syntax:
improper_style none
Examples:
improper_style none
Description:
Using an improper style of none means improper forces are not computed, even if quadruplets of improper atoms were listed in the data file read by the read_data command.
-Restrictions: -
-Improper styles can only be set for atom styles that allow impropers -to be defined. +
Restrictions: none
Related commands: none
Default: none
diff --git a/doc/improper_style_none.txt b/doc/improper_style_none.txt index 5b8ced32a..803cc23b0 100644 --- a/doc/improper_style_none.txt +++ b/doc/improper_style_none.txt @@ -1,32 +1,29 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line improper_style none command :h3 [Syntax:] improper_style none :pre [Examples:] improper_style none :pre [Description:] Using an improper style of none means improper forces are not computed, even if quadruplets of improper atoms were listed in the data file read by the "read_data"_read_data.html command. -[Restrictions:] - -Improper styles can only be set for atom styles that allow impropers -to be defined. +[Restrictions:] none [Related commands:] none [Default:] none diff --git a/doc/next.html b/doc/next.html index 3dd5f42b0..d7f15d691 100644 --- a/doc/next.html +++ b/doc/next.html @@ -1,99 +1,101 @@Syntax:
next variables-
Examples:
next x -next a t x +next a t x myTemp
Description:
This command is used with variables defined by the variable command. It assigns the next value to the -variable from the variable's list, so that when $X is subsequently -substituted for in an input script command, the new value is used. X -is a single lower-case character from "a" to "z". +variable from the variable's list, so that when a variable is +subsequently substituted for in an input script command, the new value +is used. If a variable name is a single lower-case character from "a" +to "z", it can be used in an input script command as $a or $z. If it +is multiple letters, it can be used as $myTemp.
All variables in a single next command must be the same style: index, loop, or universe. Equal- or world-style variables cannot be incremented by a next command.
When any of the variables in the next command has no more values, a flag is set that causes the input script to skip the next jump command encountered. This enables a loop containing a next command to exit.
When the next command is used with index- or loop-style variables, the next value is assigned to the variable for all processors. When the next command is used with universe-style variables, the next value is assigned to whichever processor partition executes the command first. All processors in the partition are assigned the same value. Running LAMMPS on multiple partitions of processors via the "-partition" command-line switch is described in this section of the manual. Universe-style variables are incremented using the files "tmp.lammps.variable" and "tmp.lammps.variable.lock" which you will see in your directory during such a LAMMPS run.
Here is an example of running a series of simulations using the next command with an index-style variable. If this input script is named in.polymer, 8 simulations would be run using data files from directories run1 thru run8.
variable d index run1 run2 run3 run4 run5 run6 run7 run8 shell cd $d read_data data.polymer run 10000 shell cd .. clear next d jump in.polymer
If the variable "d" were of style universe, and the same in.polymer input script were run on 3 partitions of processors, then the first 3 simulations would begin, one on each set of processors. Whichever partition finished first, it would assign variable "d" the 4th value and run another simulation, and so forth until all 8 simulations were finished.
Jump and next commands can also be nested to enable multi-level loops. For example, this script will run 15 simulations in a double loop.
variable i loop 3 variable j loop 5 clear ... read_data data.polymer.$i$j print Running simulation $i.$j run 10000 next j jump in.script next i jump in.script
Restrictions: none
Related commands:
jump, include, shell, variable,
Default: none
diff --git a/doc/next.txt b/doc/next.txt index f12801f9d..0aa085217 100644 --- a/doc/next.txt +++ b/doc/next.txt @@ -1,94 +1,96 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line next command :h3 [Syntax:] next variables :pre -variables = one or more lower-case single-character variable names :ul +variables = one or more variable names :ul [Examples:] next x -next a t x :pre +next a t x myTemp :pre [Description:] This command is used with variables defined by the "variable"_variable.html command. It assigns the next value to the -variable from the variable's list, so that when $X is subsequently -substituted for in an input script command, the new value is used. X -is a single lower-case character from "a" to "z". +variable from the variable's list, so that when a variable is +subsequently substituted for in an input script command, the new value +is used. If a variable name is a single lower-case character from "a" +to "z", it can be used in an input script command as $a or $z. If it +is multiple letters, it can be used as ${myTemp}. All variables in a single next command must be the same style: {index}, {loop}, or {universe}. {Equal}- or {world}-style variables cannot be incremented by a next command. When any of the variables in the next command has no more values, a flag is set that causes the input script to skip the next "jump"_jump.html command encountered. This enables a loop containing a next command to exit. When the next command is used with {index}- or {loop}-style variables, the next value is assigned to the variable for all processors. When the next command is used with {universe}-style variables, the next value is assigned to whichever processor partition executes the command first. All processors in the partition are assigned the same value. Running LAMMPS on multiple partitions of processors via the "-partition" command-line switch is described in "this section"_Section_start.html#2_4 of the manual. {Universe}-style variables are incremented using the files "tmp.lammps.variable" and "tmp.lammps.variable.lock" which you will see in your directory during such a LAMMPS run. Here is an example of running a series of simulations using the next command with an {index}-style variable. If this input script is named in.polymer, 8 simulations would be run using data files from directories run1 thru run8. variable d index run1 run2 run3 run4 run5 run6 run7 run8 shell cd $d read_data data.polymer run 10000 shell cd .. clear next d jump in.polymer :pre If the variable "d" were of style {universe}, and the same in.polymer input script were run on 3 partitions of processors, then the first 3 simulations would begin, one on each set of processors. Whichever partition finished first, it would assign variable "d" the 4th value and run another simulation, and so forth until all 8 simulations were finished. Jump and next commands can also be nested to enable multi-level loops. For example, this script will run 15 simulations in a double loop. variable i loop 3 variable j loop 5 clear ... read_data data.polymer.$i$j print Running simulation $i.$j run 10000 next j jump in.script next i jump in.script [Restrictions:] none [Related commands:] "jump"_jump.html, "include"_include.html, "shell"_shell.html, "variable"_variable.html, [Default:] none diff --git a/doc/pair_modify.html b/doc/pair_modify.html index fe40e0e79..08770f185 100644 --- a/doc/pair_modify.html +++ b/doc/pair_modify.html @@ -1,180 +1,183 @@Syntax:
pair_modify keyword value ...
shift value = yes or no mix value = geometric or arithmetic or sixthpower table value = N 2^N = # of values in table tabinner value = cutoff cutoff = inner cutoff at which to begin table (distance units) tail value = yes or no
Examples:
pair_modify shift yes mix geometric pair_modify tail yes pair_modify table 12
Description:
Modify the parameters of the currently defined pair style. Not all parameters are relevant to all pair styles.
The shift keyword determines whether the Lennard-Jones potential is shifted at its cutoff to 0.0. If so, this adds an energy term to each pairwise interaction which will be printed in the thermodynamic output, but does not affect atom dynamics (forces). Pair styles that are already 0.0 at their cutoff such as lj/charmm/coul/charmm are not affected by this setting.
The mix keyword affects how Lennard-Jones coefficients for epsilon and sigma are generated for interactions between atoms of type I and J, when I != J. (I = J coefficients are set explicitly in the data file or input script.) The pair_coeff command can be used in the input script to specify epilon/sigma for a specific I,J pairing, which overrides the setting of the mix keyword. In each case, the LJ cutoff is mixed the same way as sigma.
These are the formulas used by the 3 mix options:
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)
Style soft only uses a pre-factor coefficient, which is always mixed geometrically, regardless of the mix setting. The charmm styles are always mixed arithmetically, regardless of the mix setting. The class2 styles are always mixed as a sixthpower, regardless of the mix setting, except that the cutoff is mixed according to the mix setting. Style lj/expand always mixes its delta coefficient using the rule
delta_ij = (delta_i + delta_j) / 2
The table keyword applies to pair styles with a long-range Coulombic term (lj/cut/coul/long and lj/charmm/coul/long). If N is non-zero, a table of length 2^N is pre-computed for forces and energies, which can shrink their computational cost by up to a factor of 2. The table is indexed via a bit-mapping technique (Wolff) and a linear interpolation is performed between adjacent table values. In our experiments with different table styles (lookup, linear, spline), this method typically gave the best performance in terms of speed and accuracy.
The choice of table length is a tradeoff in accuracy versus speed. A larger N yields more accurate force computations, but requires more memory which can slow down the computation due to cache misses. A reasonable value of N is between 8 and 16. The default value of 12 (table of length 4096) gives approximately the same accuracy as the no-table (N = 0) option. For N = 0, forces and energies are computed directly, using a polynomial fit for the needed erfc() function evaluation, which is what earlier versions of LAMMPS did. Values greater than 16 typically slow down the simulation and will not improve accuracy; values from 1 to 8 give unreliable results.
The tabinner keyword sets an inner cutoff above which the pairwise computation is done by table lookup (if tables are invoked). The smaller this value is set, the less accurate the table becomes (for a given number of table values), which can require use of larger tables. The default cutoff value is sqrt(2.0) distance units which means nearly all pairwise interactions are computed via table lookup for simulations with "real" units, but some close pairs may be computed directly (non-table) for simulations with "lj" units.
When the tail keyword is set to yes, long-range VanderWaals tail "corrections" are added to the energy and pressure. These are included in the calculation and printing of thermodynamic quantities (see the thermo_style command). Their effect will also be included in constant NPT or NPH simulations where the pressure influences the simulation box dimensions (see the fix npt and fix nph commands).
The tail keyword is only supported by pair_style pairwise potentials which include Lennard-Jones interactions which are cutoff at a non-zero energy. This does not include the LJ CHARMM potentials or lj/smooth since they go to zero at the cutoff. The formulas used for the long-range corrections come from equation 5 of (Sun).
Several assumptions are inherent in using tail corrections, including the following:
Restrictions: none
+Not all pair styles support mixing. See the doc page for individual +pair styles for details. +
You cannot use shift yes with tail yes, since those are conflicting options.
You cannot use tail yes with 2d simulations.
Related commands:
pair_style, pair_coeff, thermo_style
Default:
The option defaults are shift = no, mix = arithmetic (for lj/charmm pair styles), mix = geometric (for other pair styles), table = 12, and tabinner = sqrt(2.0), tail = no.
(Wolff) Wolff and Rudd, Comp Phys Comm, 120, 200-32 (1999).
(Sun) Sun, J Phys Chem B, 102, 7338-7364 (1998).
diff --git a/doc/pair_modify.txt b/doc/pair_modify.txt index 0b49c76a5..f08dbaef6 100644 --- a/doc/pair_modify.txt +++ b/doc/pair_modify.txt @@ -1,170 +1,173 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line pair_modify command :h3 [Syntax:] pair_modify keyword value ... :pre one or more keyword/value pairs may be listed :ulb,l keyword = {shift} or {mix} or {table} or {tabinner} or {tail} :l {shift} value = {yes} or {no} {mix} value = {geometric} or {arithmetic} or {sixthpower} {table} value = N 2^N = # of values in table {tabinner} value = cutoff cutoff = inner cutoff at which to begin table (distance units) {tail} value = {yes} or {no} :pre :ule [Examples:] pair_modify shift yes mix geometric pair_modify tail yes pair_modify table 12 :pre [Description:] Modify the parameters of the currently defined pair style. Not all parameters are relevant to all pair styles. The {shift} keyword determines whether the Lennard-Jones potential is shifted at its cutoff to 0.0. If so, this adds an energy term to each pairwise interaction which will be printed in the thermodynamic output, but does not affect atom dynamics (forces). Pair styles that are already 0.0 at their cutoff such as {lj/charmm/coul/charmm} are not affected by this setting. The {mix} keyword affects how Lennard-Jones coefficients for epsilon and sigma are generated for interactions between atoms of type I and J, when I != J. (I = J coefficients are set explicitly in the data file or input script.) The "pair_coeff"_pair_coeff.html command can be used in the input script to specify epilon/sigma for a specific I,J pairing, which overrides the setting of the {mix} keyword. In each case, the LJ cutoff is mixed the same way as sigma. These are the formulas used by the 3 {mix} options: {geometric} epsilon_ij = sqrt(epsilon_i * epsilon_j) sigma_ij = sqrt(sigma_i * sigma_j) :pre {arithmetic} epsilon_ij = sqrt(epsilon_i * epsilon_j) sigma_ij = (sigma_i + sigma_j) / 2 :pre {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) :pre Style {soft} only uses a pre-factor coefficient, which is always mixed geometrically, regardless of the {mix} setting. The {charmm} styles are always mixed arithmetically, regardless of the {mix} setting. The {class2} styles are always mixed as a sixthpower, regardless of the {mix} setting, except that the cutoff is mixed according to the mix setting. Style {lj/expand} always mixes its delta coefficient using the rule delta_ij = (delta_i + delta_j) / 2 :pre The {table} keyword applies to pair styles with a long-range Coulombic term (lj/cut/coul/long and lj/charmm/coul/long). If N is non-zero, a table of length 2^N is pre-computed for forces and energies, which can shrink their computational cost by up to a factor of 2. The table is indexed via a bit-mapping technique "(Wolff)"_#Wolff and a linear interpolation is performed between adjacent table values. In our experiments with different table styles (lookup, linear, spline), this method typically gave the best performance in terms of speed and accuracy. The choice of table length is a tradeoff in accuracy versus speed. A larger N yields more accurate force computations, but requires more memory which can slow down the computation due to cache misses. A reasonable value of N is between 8 and 16. The default value of 12 (table of length 4096) gives approximately the same accuracy as the no-table (N = 0) option. For N = 0, forces and energies are computed directly, using a polynomial fit for the needed erfc() function evaluation, which is what earlier versions of LAMMPS did. Values greater than 16 typically slow down the simulation and will not improve accuracy; values from 1 to 8 give unreliable results. The {tabinner} keyword sets an inner cutoff above which the pairwise computation is done by table lookup (if tables are invoked). The smaller this value is set, the less accurate the table becomes (for a given number of table values), which can require use of larger tables. The default cutoff value is sqrt(2.0) distance units which means nearly all pairwise interactions are computed via table lookup for simulations with "real" units, but some close pairs may be computed directly (non-table) for simulations with "lj" units. When the {tail} keyword is set to {yes}, long-range VanderWaals tail "corrections" are added to the energy and pressure. These are included in the calculation and printing of thermodynamic quantities (see the "thermo_style"_thermo_style.html command). Their effect will also be included in constant NPT or NPH simulations where the pressure influences the simulation box dimensions (see the "fix npt"_fix_npt.html and "fix nph"_fix_nph.html commands). The {tail} keyword is only supported by "pair_style"_pair_style.html pairwise potentials which include Lennard-Jones interactions which are cutoff at a non-zero energy. This does not include the LJ CHARMM potentials or {lj/smooth} since they go to zero at the cutoff. The formulas used for the long-range corrections come from equation 5 of "(Sun)"_#Sun. Several assumptions are inherent in using tail corrections, including the following: The simulated system is a 3d bulk homogeneous liquid. This option should not be used for systems that are non-liquid, 2d, have a slab geometry (only 2d periodic), or inhomogeneous. :ulb,l G(r), the radial distribution function (rdf), is unity beyond the cutoff, so a fairly large cutoff should be used (i.e. 2.5 sigma for an LJ fluid), and it is probably a good idea to verify this assumption by checking the rdf. The rdf is not exactly unity beyond the cutoff for each pair of interaction types, so the tail correction is necessarily an approximation. :l Thermophysical properties obtained from calculations with this option enabled will not be thermodynamically consistent with the truncated force-field that was used. In other words, atoms do not feel any LJ pair interactions beyond the cutoff, but the energy and pressure reported by the simulation include an estimated contribution from those interactions. :l,ule [Restrictions:] none +Not all pair styles support mixing. See the doc page for individual +pair styles for details. + You cannot use {shift} yes with {tail} yes, since those are conflicting options. You cannot use {tail} yes with 2d simulations. [Related commands:] "pair_style"_pair_style.html, "pair_coeff"_pair_coeff.html, "thermo_style"_thermo_style.html [Default:] The option defaults are shift = no, mix = arithmetic (for lj/charmm pair styles), mix = geometric (for other pair styles), table = 12, and tabinner = sqrt(2.0), tail = no. :line :link(Wolff) [(Wolff)] Wolff and Rudd, Comp Phys Comm, 120, 200-32 (1999). :link(Sun) [(Sun)] Sun, J Phys Chem B, 102, 7338-7364 (1998). diff --git a/doc/pair_style_buck.html b/doc/pair_style_buck.html index be42d24e2..c6ad4e203 100644 --- a/doc/pair_style_buck.html +++ b/doc/pair_style_buck.html @@ -1,104 +1,108 @@Syntax:
pair_style style args
buck args = cutoff cutoff = global cutoff for Buckingham interactions (distance units) buck/coul/cut args = cutoff (cutoff2) cutoff = global cutoff for Buckingham (and Coulombic if only 1 arg) (distance units) cutoff2 = global cutoff for Coulombic (optional) (distance units) buck/coul/long args = cutoff (cutoff2) cutoff = global cutoff for Buckingham (and Coulombic if only 1 arg) (distance units) cutoff2 = global cutoff for Coulombic (optional) (distance units)
Examples:
pair_style buck 2.5 pair_coeff * * 100.0 1.5 200.0 pair_coeff * * 100.0 1.5 200.0 3.0
pair_style buck/coul/cut 10.0 pair_style buck/coul/cut 10.0 8.0 pair_coeff * * 100.0 1.5 200.0 pair_coeff 1 1 100.0 1.5 200.0 9.0 pair_coeff 1 1 100.0 1.5 200.0 9.0 8.0
pair_style buck/coul/long 10.0 pair_style buck/coul/long 10.0 8.0 pair_coeff * * 100.0 1.5 200.0 pair_coeff 1 1 100.0 1.5 200.0 9.0
Description:
The buck style computes a Buckingham potential (exp/6 instead of Lennard-Jones 12/6) given by
Rc is the cutoff.
The buck/coul/cut and buck/coul/long styles add a Coulombic term as described for the lj/cut pair styles.
The following coefficients must be defined for each pair of atoms types via the pair_coeff command as in the examples above, or in the data file or restart files read by the read_data or read_restart commands:
The latter 2 coefficients are optional. If not specified, the global LJ and Coulombic cutoffs are used. If only one cutoff is specified, it is used as the cutoff for both LJ and Coulombic interactions for this type pair. If both coefficients are specified, they are used as the LJ and Coulombic cutoffs for this type pair. You cannot specify 2 cutoffs for style buck, since it has no Coulombic terms.
For buck/coul/long only the LJ cutoff can be specified since a Coulombic cutoff cannot be specified for an individual I,J type pair. All type pairs use the same global Coulombic cutoff specified in the pair_style command.
Restrictions:
+The buck potentials do not support the +pair_modify mix option. Coefficients for all i,j +pairs must be specified explicitly. +
The buck/coul/long style is part of the "kspace" package. It is only enabled if LAMMPS was built with that package. See the Making LAMMPS section for more info.
On some 64-bit machines, compiling with -O3 appears to break the Coulombic tabling option used by the buck/coul/long style. See the "Additional build tips" section of the Making LAMMPS documentation pages for workarounds on this issue.
Related commands:
Default: none
diff --git a/doc/pair_style_buck.txt b/doc/pair_style_buck.txt index b177397b1..33ff85369 100644 --- a/doc/pair_style_buck.txt +++ b/doc/pair_style_buck.txt @@ -1,96 +1,100 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line pair_style buck command :h3 pair_style buck/coul/cut command :h3 pair_style buck/coul/long command :h3 [Syntax:] pair_style style args :pre style = {buck} or {buck/coul/cut} or {buck/coul/long} args = list of arguments for a particular style :ul {buck} args = cutoff cutoff = global cutoff for Buckingham interactions (distance units) {buck/coul/cut} args = cutoff (cutoff2) cutoff = global cutoff for Buckingham (and Coulombic if only 1 arg) (distance units) cutoff2 = global cutoff for Coulombic (optional) (distance units) {buck/coul/long} args = cutoff (cutoff2) cutoff = global cutoff for Buckingham (and Coulombic if only 1 arg) (distance units) cutoff2 = global cutoff for Coulombic (optional) (distance units) :pre [Examples:] pair_style buck 2.5 pair_coeff * * 100.0 1.5 200.0 pair_coeff * * 100.0 1.5 200.0 3.0 :pre pair_style buck/coul/cut 10.0 pair_style buck/coul/cut 10.0 8.0 pair_coeff * * 100.0 1.5 200.0 pair_coeff 1 1 100.0 1.5 200.0 9.0 pair_coeff 1 1 100.0 1.5 200.0 9.0 8.0 :pre pair_style buck/coul/long 10.0 pair_style buck/coul/long 10.0 8.0 pair_coeff * * 100.0 1.5 200.0 pair_coeff 1 1 100.0 1.5 200.0 9.0 :pre [Description:] The {buck} style computes a Buckingham potential (exp/6 instead of Lennard-Jones 12/6) given by :c,image(Eqs/pair_buck.jpg) Rc is the cutoff. The {buck/coul/cut} and {buck/coul/long} styles add a Coulombic term as described for the "lj/cut"_pair_style_lj.html pair styles. The following coefficients must be defined for each pair of atoms types via the "pair_coeff"_pair_coeff.html command as in the examples above, or in the data file or restart files read by the "read_data"_read_data.html or "read_restart"_read_restart.html commands: A (energy units) rho (distance units) C (energy-distance^6 units) cutoff (distance units) cutoff2 (distance units) :ul The latter 2 coefficients are optional. If not specified, the global LJ and Coulombic cutoffs are used. If only one cutoff is specified, it is used as the cutoff for both LJ and Coulombic interactions for this type pair. If both coefficients are specified, they are used as the LJ and Coulombic cutoffs for this type pair. You cannot specify 2 cutoffs for style {buck}, since it has no Coulombic terms. For {buck/coul/long} only the LJ cutoff can be specified since a Coulombic cutoff cannot be specified for an individual I,J type pair. All type pairs use the same global Coulombic cutoff specified in the pair_style command. [Restrictions:] +The {buck} potentials do not support the +"pair_modify"_pair_modify.hmtl {mix} option. Coefficients for all i,j +pairs must be specified explicitly. + The {buck/coul/long} style is part of the "kspace" package. It is only enabled if LAMMPS was built with that package. See the "Making LAMMPS"_Section_start.html#2_2 section for more info. On some 64-bit machines, compiling with -O3 appears to break the Coulombic tabling option used by the {buck/coul/long} style. See the "Additional build tips" section of the Making LAMMPS documentation pages for workarounds on this issue. [Related commands:] "pair_coeff"_pair_coeff.html [Default:] none diff --git a/doc/pair_style_charmm.html b/doc/pair_style_charmm.html index 9770710ff..347d429f7 100644 --- a/doc/pair_style_charmm.html +++ b/doc/pair_style_charmm.html @@ -1,125 +1,134 @@Syntax:
pair_style style args
lj/charmm/coul/charmm args = inner outer (inner2) (outer2) inner, outer = global switching cutoffs for Lennard Jones (and Coulombic if only 2 args) inner2, outer2 = global switching cutoffs for Coulombic (optional) lj/charmm/coul/charmm/implicit args = inner outer (inner2) (outer2) inner, outer = global switching cutoffs for LJ (and Coulombic if only 2 args) inner2, outer2 = global switching cutoffs for Coulombic (optional) lj/charmm/coul/long args = inner outer (cutoff) inner, outer = global switching cutoffs for LJ (and Coulombic if only 2 args) cutoff = global cutoff for Coulombic (optional, outer is Coulombic cutoff if only 2 args)
Examples:
pair_style lj/charmm/coul/charmm 8.0 10.0 pair_style lj/charmm/coul/charmm 8.0 10.0 7.0 9.0 pair_coeff * * 100.0 2.0 pair_coeff 1 1 100.0 2.0 150.0 3.5
pair_style lj/charmm/coul/charmm/implicit 8.0 10.0 pair_style lj/charmm/coul/charmm/implicit 8.0 10.0 7.0 9.0 pair_coeff * * 100.0 2.0 pair_coeff 1 1 100.0 2.0 150.0 3.5
pair_style lj/charmm/coul/long 8.0 10.0 pair_style lj/charmm/coul/long 8.0 10.0 9.0 pair_coeff * * 100.0 2.0 pair_coeff 1 1 100.0 2.0 150.0 3.5
Description:
The lj/charmm styles compute LJ and Coulombic interactions with an additional switching function S(r) that ramps the energy and force smoothly to zero between an inner and outer cuoff. It is a widely -used option in the CHARMM MD code. +used potential in the CHARMM MD code. +See (MacKerell) for a description of the CHARMM force +field.
Both the LJ and Coulombic terms require an inner and outer cutoff. They can be the same for both formulas or different depending on whether 2 or 4 arguments are used in the pair_style command. In each case, the inner cutoff distance must be less than the outer cutoff. It it typical to make the difference between the 2 cutoffs about 1.0 Angstrom.
Style lj/charmm/coul/charmm/implicit computes the same formulas as style lj/charmm/coul/charmm except that an additional 1/r term is included in the Coulombic formula. The Coulombic energy thus varies as 1/r^2. This is effectively a distance-dependent dielectric term which is a simple model for an implicit solvent with additional screening. It is designed for use in a simulation of an unsolvated biomolecule (no explicit water molecules).
Style lj/charmm/coul/long computes the same formulas as style lj/charmm/coul/charmm except that an additional damping factor is applied to the Coulombic term, as in the discussion for pair style lj/cut/coul/long. Only one Coulombic cutoff is specified for lj/charmm/coul/long; if only 2 arguments are used in the pair_style command, then the outer LJ cutoff is used as the single Coulombic cutoff.
The following coefficients must be defined for each pair of atoms types via the pair_coeff command as in the examples above, or in the data file or restart files read by the read_data or read_restart commands:
Note that sigma is defined in the LJ formula as the zero-crossing distance for the potential, not as the energy minimum at 2^(1/6) sigma.
The latter 2 coefficients are optional. If they are specified, they are used in the LJ formula between 2 atoms of these types which are also first and fourth atoms in any dihedral. No cutoffs are specified because this CHARMM force field does not allow varying cutoffs for individual atom pairs; all pairs use the global cutoff(s) specified in the pair_style command.
Restrictions:
The lj/charmm/coul/charmm and lj/charmm/coul/charmm/implicit styles are part of the "molecule" package. The lj/charmm/coul/long style is part of the "kspace" package. They are only enabled if LAMMPS was built with those package(s). See the Making LAMMPS section for more info.
On some 64-bit machines, compiling with -O3 appears to break the Coulombic tabling option used by the lj/charmm/coul/long style. See the "Additional build tips" section of the Making LAMMPS documentation pages for workarounds on this issue.
Related commands:
Default: none
+(MacKerell) MacKerell, Bashford, Bellott, Dunbrack, Evanseck, Field, +Fischer, Gao, Guo, Ha, et al, J Phys Chem, 102, 3586 (1998). +
diff --git a/doc/pair_style_charmm.txt b/doc/pair_style_charmm.txt index 3dc310a1d..26ce8d1ed 100644 --- a/doc/pair_style_charmm.txt +++ b/doc/pair_style_charmm.txt @@ -1,117 +1,125 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line pair_style lj/charmm/coul/charmm command :h3 pair_style lj/charmm/coul/charmm/implicit command :h3 pair_style lj/charmm/coul/long command :h3 [Syntax:] pair_style style args :pre style = {lj/charmm/coul/charmm} or {lj/charmm/coul/charmm/implicit} or {lj/charmm/coul/long} args = list of arguments for a particular style :ul {lj/charmm/coul/charmm} args = inner outer (inner2) (outer2) inner, outer = global switching cutoffs for Lennard Jones (and Coulombic if only 2 args) inner2, outer2 = global switching cutoffs for Coulombic (optional) {lj/charmm/coul/charmm/implicit} args = inner outer (inner2) (outer2) inner, outer = global switching cutoffs for LJ (and Coulombic if only 2 args) inner2, outer2 = global switching cutoffs for Coulombic (optional) {lj/charmm/coul/long} args = inner outer (cutoff) inner, outer = global switching cutoffs for LJ (and Coulombic if only 2 args) cutoff = global cutoff for Coulombic (optional, outer is Coulombic cutoff if only 2 args) :pre [Examples:] pair_style lj/charmm/coul/charmm 8.0 10.0 pair_style lj/charmm/coul/charmm 8.0 10.0 7.0 9.0 pair_coeff * * 100.0 2.0 pair_coeff 1 1 100.0 2.0 150.0 3.5 :pre pair_style lj/charmm/coul/charmm/implicit 8.0 10.0 pair_style lj/charmm/coul/charmm/implicit 8.0 10.0 7.0 9.0 pair_coeff * * 100.0 2.0 pair_coeff 1 1 100.0 2.0 150.0 3.5 :pre pair_style lj/charmm/coul/long 8.0 10.0 pair_style lj/charmm/coul/long 8.0 10.0 9.0 pair_coeff * * 100.0 2.0 pair_coeff 1 1 100.0 2.0 150.0 3.5 :pre [Description:] The {lj/charmm} styles compute LJ and Coulombic interactions with an additional switching function S(r) that ramps the energy and force smoothly to zero between an inner and outer cuoff. It is a widely -used option in the CHARMM MD code. +used potential in the "CHARMM"_http://www.scripps.edu/brooks MD code. +See "(MacKerell)"_#MacKerell for a description of the CHARMM force +field. :c,image(Eqs/pair_charmm.jpg) Both the LJ and Coulombic terms require an inner and outer cutoff. They can be the same for both formulas or different depending on whether 2 or 4 arguments are used in the pair_style command. In each case, the inner cutoff distance must be less than the outer cutoff. It it typical to make the difference between the 2 cutoffs about 1.0 Angstrom. Style {lj/charmm/coul/charmm/implicit} computes the same formulas as style {lj/charmm/coul/charmm} except that an additional 1/r term is included in the Coulombic formula. The Coulombic energy thus varies as 1/r^2. This is effectively a distance-dependent dielectric term which is a simple model for an implicit solvent with additional screening. It is designed for use in a simulation of an unsolvated biomolecule (no explicit water molecules). Style {lj/charmm/coul/long} computes the same formulas as style {lj/charmm/coul/charmm} except that an additional damping factor is applied to the Coulombic term, as in the discussion for pair style {lj/cut/coul/long}. Only one Coulombic cutoff is specified for {lj/charmm/coul/long}; if only 2 arguments are used in the pair_style command, then the outer LJ cutoff is used as the single Coulombic cutoff. The following coefficients must be defined for each pair of atoms types via the "pair_coeff"_pair_coeff.html command as in the examples above, or in the data file or restart files read by the "read_data"_read_data.html or "read_restart"_read_restart.html commands: epsilon (energy units) sigma (distance units) epsilon_14 (energy units) sigma_14 (distance units) :ul Note that sigma is defined in the LJ formula as the zero-crossing distance for the potential, not as the energy minimum at 2^(1/6) sigma. The latter 2 coefficients are optional. If they are specified, they are used in the LJ formula between 2 atoms of these types which are also first and fourth atoms in any dihedral. No cutoffs are specified because this CHARMM force field does not allow varying cutoffs for individual atom pairs; all pairs use the global cutoff(s) specified in the pair_style command. [Restrictions:] The {lj/charmm/coul/charmm} and {lj/charmm/coul/charmm/implicit} styles are part of the "molecule" package. The {lj/charmm/coul/long} style is part of the "kspace" package. They are only enabled if LAMMPS was built with those package(s). See the "Making LAMMPS"_Section_start.html#2_2 section for more info. On some 64-bit machines, compiling with -O3 appears to break the Coulombic tabling option used by the {lj/charmm/coul/long} style. See the "Additional build tips" section of the Making LAMMPS documentation pages for workarounds on this issue. [Related commands:] "pair_coeff"_pair_coeff.html [Default:] none + +:line + +:link(MacKerell) +[(MacKerell)] MacKerell, Bashford, Bellott, Dunbrack, Evanseck, Field, +Fischer, Gao, Guo, Ha, et al, J Phys Chem, 102, 3586 (1998). diff --git a/doc/pair_style_class2.html b/doc/pair_style_class2.html index 9a6c02d77..5cbf5eb1b 100644 --- a/doc/pair_style_class2.html +++ b/doc/pair_style_class2.html @@ -1,104 +1,112 @@Syntax:
pair_style style args
lj/class2 args = cutoff cutoff = global cutoff for class 2 interactions (distance units) lj/class2/coul/cut args = cutoff (cutoff2) cutoff = global cutoff for class 2 (and Coulombic if only 1 arg) (distance units) cutoff2 = global cutoff for Coulombic (optional) (distance units) lj/class2/coul/long args = cutoff (cutoff2) cutoff = global cutoff for class 2 (and Coulombic if only 1 arg) (distance units) cutoff2 = global cutoff for Coulombic (optional) (distance units)
Examples:
pair_style lj/class2 10.0 pair_coeff * * 100.0 2.5 pair_coeff 1 2* 100.0 2.5 9.0
pair_style lj/class2/coul/cut 10.0 pair_style lj/class2/coul/cut 10.0 8.0 pair_coeff * * 100.0 3.0 pair_coeff 1 1 100.0 3.5 9.0 pair_coeff 1 1 100.0 3.5 9.0 9.0
pair_style lj/class2/coul/long 10.0 pair_style lj/class2/coul/long 10.0 8.0 pair_coeff * * 100.0 3.0 pair_coeff 1 1 100.0 3.5 9.0
Description:
The lj/class2 styles compute a 6/9 Lennard-Jones potential given by
Rc is the cutoff.
The lj/class2/coul/cut and lj/class2/coul/long styles add a Coulombic term as described for the lj/cut pair styles.
+See (Sun) for a description of the COMPASS class2 force field. +
The following coefficients must be defined for each pair of atoms types via the pair_coeff command as in the examples above, or in the data file or restart files read by the read_data or read_restart commands:
The latter 2 coefficients are optional. If not specified, the global class 2 and Coulombic cutoffs are used. If only one cutoff is specified, it is used as the cutoff for both class 2 and Coulombic interactions for this type pair. If both coefficients are specified, they are used as the class 2 and Coulombic cutoffs for this type pair. You cannot specify 2 cutoffs for style lj/class2, since it has no Coulombic terms.
For lj/class2/coul/long only the class 2 cutoff can be specified since a Coulombic cutoff cannot be specified for an individual I,J type pair. All type pairs use the same global Coulombic cutoff specified in the pair_style command.
Restrictions:
These styles are part of the "class2" package. They are only enabled if LAMMPS was built with that package. See the Making LAMMPS section for more info.
On some 64-bit machines, compiling with -O3 appears to break the Coulombic tabling option used by the lj/class2/coul/long style. See the "Additional build tips" section of the Making LAMMPS documentation pages for workarounds on this issue.
Related commands:
Default: none
+(Sun) Sun, J Phys Chem B 102, 7338-7364 (1998). +
diff --git a/doc/pair_style_class2.txt b/doc/pair_style_class2.txt index 0df99c7a7..aac3710f5 100644 --- a/doc/pair_style_class2.txt +++ b/doc/pair_style_class2.txt @@ -1,96 +1,103 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line pair_style lj/class2 command :h3 pair_style lj/class2/coul/cut command :h3 pair_style lj/class2/coul/long command :h3 [Syntax:] pair_style style args :pre style = {lj/class2} or {lj/class2/coul/cut} or {lj/class2/coul/long} args = list of arguments for a particular style :ul {lj/class2} args = cutoff cutoff = global cutoff for class 2 interactions (distance units) {lj/class2/coul/cut} args = cutoff (cutoff2) cutoff = global cutoff for class 2 (and Coulombic if only 1 arg) (distance units) cutoff2 = global cutoff for Coulombic (optional) (distance units) {lj/class2/coul/long} args = cutoff (cutoff2) cutoff = global cutoff for class 2 (and Coulombic if only 1 arg) (distance units) cutoff2 = global cutoff for Coulombic (optional) (distance units) :pre [Examples:] pair_style lj/class2 10.0 pair_coeff * * 100.0 2.5 pair_coeff 1 2* 100.0 2.5 9.0 :pre pair_style lj/class2/coul/cut 10.0 pair_style lj/class2/coul/cut 10.0 8.0 pair_coeff * * 100.0 3.0 pair_coeff 1 1 100.0 3.5 9.0 pair_coeff 1 1 100.0 3.5 9.0 9.0 :pre pair_style lj/class2/coul/long 10.0 pair_style lj/class2/coul/long 10.0 8.0 pair_coeff * * 100.0 3.0 pair_coeff 1 1 100.0 3.5 9.0 :pre [Description:] The {lj/class2} styles compute a 6/9 Lennard-Jones potential given by :c,image(Eqs/pair_class2.jpg) Rc is the cutoff. The {lj/class2/coul/cut} and {lj/class2/coul/long} styles add a Coulombic term as described for the "lj/cut"_pair_style_lj.html pair styles. +See "(Sun)"_#Sun for a description of the COMPASS class2 force field. + The following coefficients must be defined for each pair of atoms types via the "pair_coeff"_pair_coeff.html command as in the examples above, or in the data file or restart files read by the "read_data"_read_data.html or "read_restart"_read_restart.html commands: epsilon (energy units) sigma (distance units) cutoff1 (distance units) cutoff2 (distance units) :ul The latter 2 coefficients are optional. If not specified, the global class 2 and Coulombic cutoffs are used. If only one cutoff is specified, it is used as the cutoff for both class 2 and Coulombic interactions for this type pair. If both coefficients are specified, they are used as the class 2 and Coulombic cutoffs for this type pair. You cannot specify 2 cutoffs for style {lj/class2}, since it has no Coulombic terms. For {lj/class2/coul/long} only the class 2 cutoff can be specified since a Coulombic cutoff cannot be specified for an individual I,J type pair. All type pairs use the same global Coulombic cutoff specified in the pair_style command. [Restrictions:] These styles are part of the "class2" package. They are only enabled if LAMMPS was built with that package. See the "Making LAMMPS"_Section_start.html#2_2 section for more info. On some 64-bit machines, compiling with -O3 appears to break the Coulombic tabling option used by the {lj/class2/coul/long} style. See the "Additional build tips" section of the Making LAMMPS documentation pages for workarounds on this issue. [Related commands:] "pair_coeff"_pair_coeff.html [Default:] none + +:line + +:link(Sun) +[(Sun)] Sun, J Phys Chem B 102, 7338-7364 (1998). diff --git a/doc/pair_style_dpd.html b/doc/pair_style_dpd.html index 71146a501..3814a8cad 100644 --- a/doc/pair_style_dpd.html +++ b/doc/pair_style_dpd.html @@ -1,71 +1,75 @@Syntax:
pair_style dpd T cutoff seed
Examples:
pair_style dpd 1.0 2.5 34387 pair_coeff * * 3.0 1.0 pair_coeff 1 1 3.0 1.0 1.0
Description:
Style dpd computes a force field for dissipative particle dynamics (DPD) following the exposition in (Groot). The force on atom I due to atom J is given as a sum of 3 terms
where FC is a conservative force, FD is a dissipative force, and FR is a random force. Rij is a unit vector in the direction Ri - Rj, Vij is the vector difference in velocities of the two atoms = Vi - Vj, alpha is a Gaussian random number with zero mean and unit variance, dt is the timestep size, and w(r) is a weighting factor that varies between 0 and 1. Rc is the cutoff. Sigma is set equal to sqrt(2 T gamma), where T is a parameter in the pair_style command.
The following coefficients must be defined for each pair of atoms types via the pair_coeff command as in the examples above, or in the data file or restart files read by the read_data or read_restart commands:
The last coefficient is optional. If not specified, the global DPD cutoff is used. Note that sigma is set equal to sqrt(2 T gamma), where T is the temperature set by the pair_style command so it does not need to be specified.
Restrictions: none
This style is part of the "dpd" package. It is only enabled if LAMMPS was built with those package. See the Making LAMMPS section for more info.
+The dpd potential does not support the +pair_modify mix option. Coefficients for all i,j +pairs must be specified explicitly. +
Related commands:
Default: none
diff --git a/doc/pair_style_dpd.txt b/doc/pair_style_dpd.txt index 18f583649..5cbb8cb98 100644 --- a/doc/pair_style_dpd.txt +++ b/doc/pair_style_dpd.txt @@ -1,66 +1,70 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line pair_style dpd command :h3 [Syntax:] pair_style dpd T cutoff seed :pre T = temperature (temperature units) cutoff = global cutoff for DPD interactions (distance units) seed = random # seed (integer > 0 and < 900000000) :ul [Examples:] pair_style dpd 1.0 2.5 34387 pair_coeff * * 3.0 1.0 pair_coeff 1 1 3.0 1.0 1.0 :pre [Description:] Style {dpd} computes a force field for dissipative particle dynamics (DPD) following the exposition in "(Groot)"_#Groot. The force on atom I due to atom J is given as a sum of 3 terms :c,image(Eqs/pair_dpd.jpg) where FC is a conservative force, FD is a dissipative force, and FR is a random force. Rij is a unit vector in the direction Ri - Rj, Vij is the vector difference in velocities of the two atoms = Vi - Vj, alpha is a Gaussian random number with zero mean and unit variance, dt is the timestep size, and w(r) is a weighting factor that varies between 0 and 1. Rc is the cutoff. Sigma is set equal to sqrt(2 T gamma), where T is a parameter in the pair_style command. The following coefficients must be defined for each pair of atoms types via the "pair_coeff"_pair_coeff.html command as in the examples above, or in the data file or restart files read by the "read_data"_read_data.html or "read_restart"_read_restart.html commands: A (force units) gamma (force/velocity units) cutoff (distance units) :ul The last coefficient is optional. If not specified, the global DPD cutoff is used. Note that sigma is set equal to sqrt(2 T gamma), where T is the temperature set by the "pair_style"_pair_style.html command so it does not need to be specified. [Restrictions:] none This style is part of the "dpd" package. It is only enabled if LAMMPS was built with those package. See the "Making LAMMPS"_Section_start.html#2_2 section for more info. +The {dpd} potential does not support the +"pair_modify"_pair_modify.hmtl {mix} option. Coefficients for all i,j +pairs must be specified explicitly. + [Related commands:] "pair_coeff"_pair_coeff.html [Default:] none diff --git a/doc/pair_style_eam.html b/doc/pair_style_eam.html index 1014e1e15..4513a49ad 100644 --- a/doc/pair_style_eam.html +++ b/doc/pair_style_eam.html @@ -1,289 +1,295 @@Syntax:
pair_style style
Examples:
pair_style eam pair_coeff * * cuu3 pair_coeff 1*3 1*3 niu3
pair_style eam/alloy pair_coeff * * nialhjea 1 2 1 1
pair_style eam/fs pair_coeff * * nial.fs 1 2 1 1
Description:
Style eam computes pairwise interactions for metals and metal alloys using embedded-atom method (EAM) potentials (Daw). The total energy Ei of an atom I is given by
where F is the embedding energy which is a function of the atomic electron density rho, phi is a pair potential interaction, and alpha and beta are the element types of atoms I and J. The multi-body nature of the EAM potential is a result of the embedding energy term. Both summations in the formula are over all neighbors J of atom I within the cutoff distance.
The cutoff distance and the tabulated values of the functionals F, rho, and phi are listed in one or more files which are specified by the pair_coeff command. These are ASCII text files in a DYNAMO-style format which is described in the documentation for the pair_coeff command. DYNAMO is a serial MD code Several DYNAMO potential files for different metals are included in the "potentials" directory of the LAMMPS distribution.
IMPORTANT NOTE: The eam style reads single-element EAM potentials in -the DYNAMO funcfl format. Single element or alloy systems can be -modeled with funcfl files and style eam; for the alloy case LAMMPS -mixes the single-element potentials to produce alloy potentials the -same way that DYNAMO does. Alternatively, DYNAMO setfl files can be -used by LAMMPS to model alloy systems by invoking the eam/alloy -style as described below. Setfl files require no mixing as they -specify alloy interactions explicitly. +the DYNAMO funcfl format. Either single element or alloy systems +can be modeled with funcfl files and style eam. For the alloy +case LAMMPS mixes the single-element potentials to produce alloy +potentials the same way that DYNAMO does. Alternatively, DYNAMO +setfl files can be used by LAMMPS to model alloy systems by invoking +the eam/alloy style as described below. Setfl files require no +mixing since they specify alloy interactions explicitly.
For style eam, potential values are read from a file that is in the DYNAMO single-element funcfl format. If the DYNAMO file was created by a Fortran program, it cannot have "D" values in it for exponents. C only recognizes "e" or "E" for scientific notation.
Note that unlike for other potentials, you do not set cutoffs for EAM potentials in the pair_style or pair_coeff command; they are specified in the EAM potential files.
For style eam you must assign a potential file to each I,I pair of atom types by using a single pair_coeff argument:
Thus the following command
pair_coeff *2 1*2 cuu3
will read the cuu3 potential file and use the tabulated Cu values for F, phi, rho that it contains for type pairs 1,1 and 2,2 (type pairs 1,2 and 2,1 are ignored). In effect, this makes atom types 1 and 2 in LAMMPS be Cu atoms. Different single-element files can be assigned to different atom types to model an alloy system. The mixing to create alloy potentials for type pairs with I != J is done automatically the same way that the serial DYANMO code originally did it; you do not need to specify coefficients for these type pairs.
There are several funcl files in the potentials directory of the -LAMMPS distribution. A DYNAMO single-element funcfl file is -formatted as follows: +LAMMPS distribution, with the suffix ".eam". A DYNAMO single-element +funcfl file is formatted as follows:
On line 2, all values but the mass are ignored by LAMMPS. The mass is in atomic mass units which is converted by LAMMPS to the appropriate internal mass units. On line 3, Nrho and Nr are the number of tabulated values in the subsequent arrays, drho and dr are the spacing in density and distance space for the values in those arrays, and the specified cutoff becomes the pairwise cutoff used by LAMMPS for the potential. The units of dr are Angstroms; I'm not sure of the units for drho - some measure of electron density.
Following the 3 header lines are 3 arrays of tabulated values:
The values for each array can be listed as multiple values per line, so long as each array starts on a new line. The individual values are (for example) phi(r) for r = 0,dr,2*dr, ... (Nr-1)*dr.
Style eam/alloy computes pairwise interactions using the same formula as style eam. However the associated pair_coeff command reads a DYNAMO setfl file instead of a funcfl file. Setfl files can be used to model a single-element or alloy system. In the alloy case, as explained above, setfl files contain explicit tabulated values for alloy interactions. Thus they allow more generality than funcfl files for modeling alloys.
For style eam/alloy, potential values are read from a file that is in the DYNAMO multi-element setfl format. If the DYNAMO file was created by a Fortran program, it cannot have "D" values in it for exponents. C only recognizes "e" or "E" for scientific notation.
Only one pair_coeff command can be used (one file). DYNAMO setfl files contain information for M elements. These are mapped to LAMMPS atom types by specifying N additional arguments after the filename, where N is the number of LAMMPS atom types:
As an example, the nialhjea setfl file has tabulated EAM values for 3 elements and their alloy interactions: Ni, Al, and H. If your LAMMPS simulation has 4 atoms types and you want the 1st 3 to be Ni, and the 4th to be Al, you would use the following pair_coeff command:
pair_coeff * * nialhjea 1 1 1 2
The 1st 2 arguments must be * * so as to span all LAMMPS atom types. The first three "1" values map LAMMPS atom types 1,2,3 to the 1st -element (Ni) in the setfl file. The final "2" value maps LAMMPS atom -type 4 to the 2nd element = Al. If a mapping value is "0", the -mapping is not performed. This is useful when EAM potentials are part -of the hybrid pair style, to represent non-EAM atom types. -
-There is one setfl file (nialhjea) in the potentials directory of -the LAMMPS distribution. A DYNAMO multi-element setfl file is +element (Ni) in the setfl file. The final "2" value maps LAMMPS +atom type 4 to the 2nd element = Al. If a mapping value is "0", the +mapping is not performed. This can be used when an eam/alloy +potential is used as part of the hybrid pair style. The 0 values +are used as placeholders for atom types that will be used with other +potentials. +
+Setfl files in the potentials directory of the LAMMPS distribution +have a ".eam.alloy" suffix. A DYNAMO multi-element setfl file is formatted as follows:
The meaning of the values in line 5 is the same as for the funcfl file described above. Note that the cutoff is a global value, valid for all pairwise interactions for all element pairings.
Following the 5 header lines are Nelements sections, one for each element, each with the following format:
As with the funcfl files, only the mass is used by LAMMPS from the 1st line. The F and rho arrays are unique to a single element and are formatted the same as in a funcfl file.
Following the Nelements sections, values for the pair potential phi arrays are listed for all i,j element pairs in the same format as other arrays. Since these interactions are symmetric (i,j = j,i) only phi arrays with i >= j are listed, in the following order: i,j = (1,1), (2,1), (2,2), (3,1), (3,2), (3,3), (4,1), ..., (Nelements, Nelements). The tabulated values for each phi function are listed in setfl files as r*phi, rather than as phi (in funcfl files).
Style eam/fs computes pairwise interactions for metals and metal alloys using a generalized form of EAM potentials due to Finnis and Sinclair (Finnis). The total energy Ei of an atom I is given by
This has the same form as the EAM formula above, except that rho is now a functional specific to the atomic types of both atoms I and J, so that different elements can contribute differently to the total electron density at an atomic site depending on the identity of the element at that atomic site.
The associated pair_coeff command for style eam/fs reads a DYNAMO setfl file that has been extended to include additional rho_alpha_beta arrays of tabulated values. The details are given in the pair_coeff documentation.
A discussion of how FS EAM differs from conventional EAM alloy potentials is given in (Ackland1). An example of such a potential is the same author's Fe-P FS potential (Ackland2). Note that while FS potentials always specify the embedding energy with a square root dependence on the total density, the implementation in LAMMPS does not require that; the user can tabulate any functional form he desires in the FS potential files.
For style eam/fs, the form of the pair_coeff command is exactly the same as for style eam/alloy, e.g.
pair_coeff * * filename 1 1 1 2
where there are N additional arguments after the filename, where N is the number of LAMMPS atom types. The N values determine the mapping -of LAMMPS atom types to EAM elements in the file, as described in -style eam/alloy. -
-The difference is that files read by eam/fs are in a more general -format than the DYNAMO setfl format read by eam/alloy, so that the -i,j density functionals for all pairs of elements are included as -needed by the Finnis/Sinclair formulation of the EAM. -
-There is one FS file (nialhjea_FS) in the potentials directory of -the LAMMPS distribution. It is formatted as follows: +of LAMMPS atom types to EAM elements in the file, as described above +for style eam/alloy. As with eam/alloy, if a mapping value is +"0", the mapping is not performed. This can be used when an eam/fs +potential is used as part of the hybrid pair style. The 0 values +are used as placeholders for atom types that will be used with other +potentials. +
+FS EAM files include more information than the DYNAMO setfl format +files read by eam/alloy, so that the i,j density functionals for all +pairs of elements are included as needed by the Finnis/Sinclair +formulation of the EAM. +
+FS EAM files in the potentials directory of the LAMMPS distribution +have a ".eam.fs" suffix. Ther are formatted as follows:
The 5-line header section is identical to an EAM setfl file.
Following the header are Nelements sections, one for each element I, each with the following format:
Following the Nelements sections, values for the pair potential phi arrays are listed in the same manner (r*phi) as in EAM setfl files. Note that the rho arrays in Finnis/Sinclair can be asymmetric (i,j != j,i) so there are Nelements^2 of them listed in the file. But the phi arrays are still symmetric, so only phi arrays for i >= j are listed.
Restrictions: none
Related commands:
Default: none
(Ackland1) Ackland, Condensed Matter (2005).
(Ackland2) Ackland, Mendelev, Srolovitz, Han and Barashev, Journal of Physics: Condensed Matter, 16, S2629 (2004).
(Daw) Daw, Baskes, Phys Rev Lett, 50, 1285 (1983). Daw, Baskes, Phys Rev B, 29, 6443 (1984).
(Finnis) Finnis, Sinclair, Philosophical Magazine A, 50, 45 (1984).
diff --git a/doc/pair_style_eam.txt b/doc/pair_style_eam.txt index 21e2bb129..c18acedff 100644 --- a/doc/pair_style_eam.txt +++ b/doc/pair_style_eam.txt @@ -1,278 +1,284 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line pair_style eam command :h3 pair_style eam/alloy command :h3 pair_style eam/fs command :h3 [Syntax:] pair_style style :pre style = {eam} or {eam/alloy} or {eam/fs} :ul [Examples:] pair_style eam pair_coeff * * cuu3 pair_coeff 1*3 1*3 niu3 :pre pair_style eam/alloy pair_coeff * * nialhjea 1 2 1 1 :pre pair_style eam/fs pair_coeff * * nial.fs 1 2 1 1 :pre [Description:] Style {eam} computes pairwise interactions for metals and metal alloys using embedded-atom method (EAM) potentials "(Daw)"_#Daw. The total energy Ei of an atom I is given by :c,image(Eqs/pair_eam.jpg) where F is the embedding energy which is a function of the atomic electron density rho, phi is a pair potential interaction, and alpha and beta are the element types of atoms I and J. The multi-body nature of the EAM potential is a result of the embedding energy term. Both summations in the formula are over all neighbors J of atom I within the cutoff distance. The cutoff distance and the tabulated values of the functionals F, rho, and phi are listed in one or more files which are specified by the "pair_coeff"_pair_coeff.html command. These are ASCII text files in a DYNAMO-style format which is described in the documentation for the "pair_coeff"_pair_coeff.html command. DYNAMO is a serial MD code Several DYNAMO potential files for different metals are included in the "potentials" directory of the LAMMPS distribution. IMPORTANT NOTE: The {eam} style reads single-element EAM potentials in -the DYNAMO {funcfl} format. Single element or alloy systems can be -modeled with {funcfl} files and style {eam}; for the alloy case LAMMPS -mixes the single-element potentials to produce alloy potentials the -same way that DYNAMO does. Alternatively, DYNAMO {setfl} files can be -used by LAMMPS to model alloy systems by invoking the {eam/alloy} -style as described below. {Setfl} files require no mixing as they -specify alloy interactions explicitly. +the DYNAMO {funcfl} format. Either single element or alloy systems +can be modeled with {funcfl} files and style {eam}. For the alloy +case LAMMPS mixes the single-element potentials to produce alloy +potentials the same way that DYNAMO does. Alternatively, DYNAMO +{setfl} files can be used by LAMMPS to model alloy systems by invoking +the {eam/alloy} style as described below. {Setfl} files require no +mixing since they specify alloy interactions explicitly. For style {eam}, potential values are read from a file that is in the DYNAMO single-element {funcfl} format. If the DYNAMO file was created by a Fortran program, it cannot have "D" values in it for exponents. C only recognizes "e" or "E" for scientific notation. Note that unlike for other potentials, you do not set cutoffs for EAM potentials in the pair_style or pair_coeff command; they are specified in the EAM potential files. For style {eam} you must assign a potential file to each I,I pair of atom types by using a single pair_coeff argument: filename :ul Thus the following command pair_coeff *2 1*2 cuu3 :pre will read the cuu3 potential file and use the tabulated Cu values for F, phi, rho that it contains for type pairs 1,1 and 2,2 (type pairs 1,2 and 2,1 are ignored). In effect, this makes atom types 1 and 2 in LAMMPS be Cu atoms. Different single-element files can be assigned to different atom types to model an alloy system. The mixing to create alloy potentials for type pairs with I != J is done automatically the same way that the serial DYANMO code originally did it; you do not need to specify coefficients for these type pairs. There are several {funcl} files in the {potentials} directory of the -LAMMPS distribution. A DYNAMO single-element {funcfl} file is -formatted as follows: +LAMMPS distribution, with the suffix ".eam". A DYNAMO single-element +{funcfl} file is formatted as follows: line 1: comment (ignored) line 2: atomic number, mass, lattice constant, lattice type (e.g. FCC) line 3: Nrho, drho, Nr, dr, cutoff :ul On line 2, all values but the mass are ignored by LAMMPS. The mass is in atomic mass units which is converted by LAMMPS to the appropriate internal mass "units"_units.html. On line 3, Nrho and Nr are the number of tabulated values in the subsequent arrays, drho and dr are the spacing in density and distance space for the values in those arrays, and the specified cutoff becomes the pairwise cutoff used by LAMMPS for the potential. The units of dr are Angstroms; I'm not sure of the units for drho - some measure of electron density. Following the 3 header lines are 3 arrays of tabulated values: embedding function F (Nrho values) pair potential function phi (Nr values) density function rho (Nr values) :ul The values for each array can be listed as multiple values per line, so long as each array starts on a new line. The individual values are (for example) phi(r) for r = 0,dr,2*dr, ... (Nr-1)*dr. :line Style {eam/alloy} computes pairwise interactions using the same formula as style {eam}. However the associated "pair_coeff"_pair_coeff.html command reads a DYNAMO {setfl} file instead of a {funcfl} file. {Setfl} files can be used to model a single-element or alloy system. In the alloy case, as explained above, {setfl} files contain explicit tabulated values for alloy interactions. Thus they allow more generality than {funcfl} files for modeling alloys. For style {eam/alloy}, potential values are read from a file that is in the DYNAMO multi-element {setfl} format. If the DYNAMO file was created by a Fortran program, it cannot have "D" values in it for exponents. C only recognizes "e" or "E" for scientific notation. Only one pair_coeff command can be used (one file). DYNAMO {setfl} files contain information for M elements. These are mapped to LAMMPS atom types by specifying N additional arguments after the filename, where N is the number of LAMMPS atom types: filename N values from 0 to M = mapping of {setfl} elements to atom types :ul As an example, the nialhjea {setfl} file has tabulated EAM values for 3 elements and their alloy interactions: Ni, Al, and H. If your LAMMPS simulation has 4 atoms types and you want the 1st 3 to be Ni, and the 4th to be Al, you would use the following pair_coeff command: pair_coeff * * nialhjea 1 1 1 2 :pre The 1st 2 arguments must be * * so as to span all LAMMPS atom types. The first three "1" values map LAMMPS atom types 1,2,3 to the 1st -element (Ni) in the {setfl} file. The final "2" value maps LAMMPS atom -type 4 to the 2nd element = Al. If a mapping value is "0", the -mapping is not performed. This is useful when EAM potentials are part -of the {hybrid} pair style, to represent non-EAM atom types. - -There is one {setfl} file (nialhjea) in the {potentials} directory of -the LAMMPS distribution. A DYNAMO multi-element {setfl} file is +element (Ni) in the {setfl} file. The final "2" value maps LAMMPS +atom type 4 to the 2nd element = Al. If a mapping value is "0", the +mapping is not performed. This can be used when an {eam/alloy} +potential is used as part of the {hybrid} pair style. The 0 values +are used as placeholders for atom types that will be used with other +potentials. + +{Setfl} files in the {potentials} directory of the LAMMPS distribution +have a ".eam.alloy" suffix. A DYNAMO multi-element {setfl} file is formatted as follows: lines 1,2,3 = comments (ignored) line 4: Nelements = # of elements in the file line 5: Nrho, drho, Nr, dr, cutoff :ul The meaning of the values in line 5 is the same as for the {funcfl} file described above. Note that the cutoff is a global value, valid for all pairwise interactions for all element pairings. Following the 5 header lines are Nelements sections, one for each element, each with the following format: line 1 = atomic number, mass, lattice constant, lattice type (e.g. FCC) embedding function F (Nrho values) density function rho (Nr values) :ul As with the {funcfl} files, only the mass is used by LAMMPS from the 1st line. The F and rho arrays are unique to a single element and are formatted the same as in a {funcfl} file. Following the Nelements sections, values for the pair potential phi arrays are listed for all i,j element pairs in the same format as other arrays. Since these interactions are symmetric (i,j = j,i) only phi arrays with i >= j are listed, in the following order: i,j = (1,1), (2,1), (2,2), (3,1), (3,2), (3,3), (4,1), ..., (Nelements, Nelements). The tabulated values for each phi function are listed in {setfl} files as r*phi, rather than as phi (in {funcfl} files). :line Style {eam/fs} computes pairwise interactions for metals and metal alloys using a generalized form of EAM potentials due to Finnis and Sinclair "(Finnis)"_#Finnis. The total energy Ei of an atom I is given by :c,image(Eqs/pair_eam_fs.jpg) This has the same form as the EAM formula above, except that rho is now a functional specific to the atomic types of both atoms I and J, so that different elements can contribute differently to the total electron density at an atomic site depending on the identity of the element at that atomic site. The associated "pair_coeff"_pair_coeff.html command for style {eam/fs} reads a DYNAMO {setfl} file that has been extended to include additional rho_alpha_beta arrays of tabulated values. The details are given in the "pair_coeff"_pair_coeff.html documentation. A discussion of how FS EAM differs from conventional EAM alloy potentials is given in "(Ackland1)"_#Ackland1. An example of such a potential is the same author's Fe-P FS potential "(Ackland2)"_#Ackland2. Note that while FS potentials always specify the embedding energy with a square root dependence on the total density, the implementation in LAMMPS does not require that; the user can tabulate any functional form he desires in the FS potential files. For style {eam/fs}, the form of the pair_coeff command is exactly the same as for style {eam/alloy}, e.g. pair_coeff * * filename 1 1 1 2 :pre where there are N additional arguments after the filename, where N is the number of LAMMPS atom types. The N values determine the mapping -of LAMMPS atom types to EAM elements in the file, as described in -style {eam/alloy}. - -The difference is that files read by {eam/fs} are in a more general -format than the DYNAMO {setfl} format read by {eam/alloy}, so that the -i,j density functionals for all pairs of elements are included as -needed by the Finnis/Sinclair formulation of the EAM. - -There is one FS file (nialhjea_FS) in the {potentials} directory of -the LAMMPS distribution. It is formatted as follows: +of LAMMPS atom types to EAM elements in the file, as described above +for style {eam/alloy}. As with {eam/alloy}, if a mapping value is +"0", the mapping is not performed. This can be used when an {eam/fs} +potential is used as part of the {hybrid} pair style. The 0 values +are used as placeholders for atom types that will be used with other +potentials. + +FS EAM files include more information than the DYNAMO {setfl} format +files read by {eam/alloy}, so that the i,j density functionals for all +pairs of elements are included as needed by the Finnis/Sinclair +formulation of the EAM. + +FS EAM files in the {potentials} directory of the LAMMPS distribution +have a ".eam.fs" suffix. Ther are formatted as follows: lines 1,2,3 = comments (ignored) line 4: Nelements = # of elements in the file line 5: Nrho, drho, Nr, dr, cutoff :ul The 5-line header section is identical to an EAM {setfl} file. Following the header are Nelements sections, one for each element I, each with the following format: line 1 = atomic number, mass, lattice constant, lattice type (e.g. FCC) embedding function F (Nrho values) density function rho for element I at element 1 (Nr values) density function rho for element I at element 2 ... density function rho for element I at element Nelement :ul Following the Nelements sections, values for the pair potential phi arrays are listed in the same manner (r*phi) as in EAM {setfl} files. Note that the rho arrays in Finnis/Sinclair can be asymmetric (i,j != j,i) so there are Nelements^2 of them listed in the file. But the phi arrays are still symmetric, so only phi arrays for i >= j are listed. :line [Restrictions:] none [Related commands:] "pair_coeff"_pair_coeff.html [Default:] none :line :link(Ackland1) [(Ackland1)] Ackland, Condensed Matter (2005). :link(Ackland2) [(Ackland2)] Ackland, Mendelev, Srolovitz, Han and Barashev, Journal of Physics: Condensed Matter, 16, S2629 (2004). :link(Daw) [(Daw)] Daw, Baskes, Phys Rev Lett, 50, 1285 (1983). Daw, Baskes, Phys Rev B, 29, 6443 (1984). :link(Finnis) [(Finnis)] Finnis, Sinclair, Philosophical Magazine A, 50, 45 (1984). diff --git a/doc/pair_style_hybrid.html b/doc/pair_style_hybrid.html index 3869d9fb9..dce3d8c78 100644 --- a/doc/pair_style_hybrid.html +++ b/doc/pair_style_hybrid.html @@ -1,77 +1,99 @@Syntax:
pair_style hybrid style1 style2 ...
Examples:
pair_style hybrid lj/charmm/coul/long 10.0 eam pair_coeff 1*2 1*2 eam niu3 pair_coeff 3 3 lj/cut/coul/cut 1.0 1.0 pair_coeff 1*2 3 lj/cut 0.5 1.2
Description:
The hybrid style enables the use of multiple pair styles in one simulation. A pair style can be assigned to each pair of atom types via the pair_coeff command.
For example, a metal on a LJ surface could be computed where the metal atoms interact with each other via a eam potential, the surface atoms interact with each other via a lj/cut potential, and the metal/surface interaction is also via a lj/cut potential.
All pair styles that will be used must be listed in the pair_style hybrid command (in any order). The name of each sub-style is followed by its arguments, as illustrated in the example above.
In the pair_coeff command, the first coefficient sets the pair style and the remaining coefficients are those appropriate to that style. For example, consider a simulation with 3 atom types: types 1 and 2 are Ni atoms, type 3 are LJ atoms with charges. The following -commands would set up the hybrid simulation: +commands would set up a hybrid simulation:
-atom_style hybrid eam charge -pair_style hybrid eam lj/cut/coul/cut 10.0 lj/cut 8.0 -pair_coeff 1*2 1*2 eam niu3 +pair_style hybrid eam/alloy lj/cut/coul/cut 10.0 lj/cut 8.0 +pair_coeff * * eam/alloy nialhjea 1 1 0 pair_coeff 3 3 lj/cut/coul/cut 1.0 1.0 -pair_coeff 1*2 3 lj/cut 0.5 1.2 +pair_coeff 1*2 3 lj/cut 0.8 1.1-The atom_style hybrid command is needed because -atoms in the simulation will have both EAM and charge attributes. +
Note that as with any pair_style, coeffs must be defined for all I,J +interactions. If the sub-style allows for mixing (see the +pair_modify command), then I,J interactions between +atom types which both are assigned to that sub-style do not need to be +specified. I.e. if atom types 1 and 2 are both computed with lj/cut +and coeffs for 1,1 and 2,2 interactions are specified, then coeffs for +1,2 interactions will be generated automatically via mixing. +
+If the pair_coeff command for a sub-style requires the use of * * as +atom type arguments (e.g. the eam/alloy example above), then it will +also include trailing arguments which map atom types to elements in +the potential. These mapping arguments should be specified as 0 if +the sub-style is not being applied to certain atom types. +
+Note that you may also need to use an atom_style +hybrid command in your input script, if atoms in the simulation will +have attributes from several atom styles, due to using multiple pair +potentials.
Restrictions: none
When using a long-range Coulomic solver (via the kspace_style command) with pair_style hybrid, one or more sub-styles will be of the "long" variety. E.g. lj/cut/coul/long or buck/coul/long. It is OK to have more than one sub-style with a "long" component, but you must insure that the short-range Coulombic cutoff used by each of these pair styles is consistent. Else the long-range Coulombic solve will be inconsistent.
+A pair style of none can be specified as an argument to pair_style +hybrid and the corresponding pair_coeff commands, if you desire to +turn off pairwise interactions between certain pairs of atom types. +
The hybrid style cannot include any of the granular styles in its -list of styles to use. Only one coul/long style can be used in the -list of hybrid styles. +list of styles to use. +
+If you use multiple coul/long pair styles along with a kspace +style, then you should make sure the pairwise +Coulombic cutoff is the same for all the pair styles.
Related commands:
Default: none
diff --git a/doc/pair_style_hybrid.txt b/doc/pair_style_hybrid.txt index 7195adb8c..5ef391e43 100644 --- a/doc/pair_style_hybrid.txt +++ b/doc/pair_style_hybrid.txt @@ -1,72 +1,94 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line pair_style hybrid command :h3 [Syntax:] pair_style hybrid style1 style2 ... :pre style1,style2 = list of one or more pair styles :ul [Examples:] pair_style hybrid lj/charmm/coul/long 10.0 eam pair_coeff 1*2 1*2 eam niu3 pair_coeff 3 3 lj/cut/coul/cut 1.0 1.0 pair_coeff 1*2 3 lj/cut 0.5 1.2 :pre [Description:] The {hybrid} style enables the use of multiple pair styles in one simulation. A pair style can be assigned to each pair of atom types via the "pair_coeff"_pair_coeff.html command. For example, a metal on a LJ surface could be computed where the metal atoms interact with each other via a {eam} potential, the surface atoms interact with each other via a {lj/cut} potential, and the metal/surface interaction is also via a {lj/cut} potential. All pair styles that will be used must be listed in the pair_style hybrid command (in any order). The name of each sub-style is followed by its arguments, as illustrated in the example above. In the pair_coeff command, the first coefficient sets the pair style and the remaining coefficients are those appropriate to that style. For example, consider a simulation with 3 atom types: types 1 and 2 are Ni atoms, type 3 are LJ atoms with charges. The following -commands would set up the hybrid simulation: +commands would set up a hybrid simulation: -atom_style hybrid eam charge -pair_style hybrid eam lj/cut/coul/cut 10.0 lj/cut 8.0 -pair_coeff 1*2 1*2 eam niu3 +pair_style hybrid eam/alloy lj/cut/coul/cut 10.0 lj/cut 8.0 +pair_coeff * * eam/alloy nialhjea 1 1 0 pair_coeff 3 3 lj/cut/coul/cut 1.0 1.0 -pair_coeff 1*2 3 lj/cut 0.5 1.2 :pre - -The "atom_style"_atom_style.html hybrid command is needed because -atoms in the simulation will have both EAM and charge attributes. +pair_coeff 1*2 3 lj/cut 0.8 1.1 :pre + +Note that as with any pair_style, coeffs must be defined for all I,J +interactions. If the sub-style allows for mixing (see the +"pair_modify"_pair_modify.html command), then I,J interactions between +atom types which both are assigned to that sub-style do not need to be +specified. I.e. if atom types 1 and 2 are both computed with {lj/cut} +and coeffs for 1,1 and 2,2 interactions are specified, then coeffs for +1,2 interactions will be generated automatically via mixing. + +If the pair_coeff command for a sub-style requires the use of * * as +atom type arguments (e.g. the {eam/alloy} example above), then it will +also include trailing arguments which map atom types to elements in +the potential. These mapping arguments should be specified as 0 if +the sub-style is not being applied to certain atom types. + +Note that you may also need to use an "atom_style"_atom_style.html +hybrid command in your input script, if atoms in the simulation will +have attributes from several atom styles, due to using multiple pair +potentials. [Restrictions:] none When using a long-range Coulomic solver (via the "kspace_style"_kspace_style command) with pair_style hybrid, one or more sub-styles will be of the "long" variety. E.g. {lj/cut/coul/long} or {buck/coul/long}. It is OK to have more than one sub-style with a "long" component, but you must insure that the short-range Coulombic cutoff used by each of these pair styles is consistent. Else the long-range Coulombic solve will be inconsistent. +A pair style of {none} can be specified as an argument to pair_style +hybrid and the corresponding pair_coeff commands, if you desire to +turn off pairwise interactions between certain pairs of atom types. + The hybrid style cannot include any of the {granular} styles in its -list of styles to use. Only one {coul/long} style can be used in the -list of hybrid styles. +list of styles to use. + +If you use multiple {coul/long} pair styles along with a "kspace +style"_kspace_style.html, then you should make sure the pairwise +Coulombic cutoff is the same for all the pair styles. [Related commands:] "pair_coeff"_pair_coeff.html [Default:] none diff --git a/doc/pair_style_morse.html b/doc/pair_style_morse.html index fab569c01..c91435e9c 100644 --- a/doc/pair_style_morse.html +++ b/doc/pair_style_morse.html @@ -1,56 +1,60 @@LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Commands
pair_style morse command
Syntax:
pair_style morse cutoff
Examples:
pair_style morse 2.5 pair_coeff * * 100.0 2.0 1.5 pair_coeff 1 1 100.0 2.0 1.5 3.0
Description:
Style morse computes pairwise interactions with the formula
Rc is the cutoff.
The following coefficients must be defined for each pair of atoms types via the pair_coeff command as in the examples above, or in the data file or restart files read by the read_data or read_restart commands:
The last coefficient is optional. If not specified, the global morse cutoff is used.
-Restrictions: none +
Restrictions: +
+The morse potential does not support the +pair_modify mix option. Coefficients for all i,j +pairs must be specified explicitly.
Related commands:
Default: none
diff --git a/doc/pair_style_morse.txt b/doc/pair_style_morse.txt index 18e1404c6..433e0a950 100644 --- a/doc/pair_style_morse.txt +++ b/doc/pair_style_morse.txt @@ -1,51 +1,55 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line pair_style morse command :h3 [Syntax:] pair_style morse cutoff :pre cutoff = global cutoff for Morse interactions (distance units) :ul [Examples:] pair_style morse 2.5 pair_coeff * * 100.0 2.0 1.5 pair_coeff 1 1 100.0 2.0 1.5 3.0 :pre [Description:] Style {morse} computes pairwise interactions with the formula :c,image(Eqs/pair_morse.jpg) Rc is the cutoff. The following coefficients must be defined for each pair of atoms types via the "pair_coeff"_pair_coeff.html command as in the examples above, or in the data file or restart files read by the "read_data"_read_data.html or "read_restart"_read_restart.html commands: D0 (energy units) alpha (1/distance units) r0 (distance units) cutoff (distance units) :ul The last coefficient is optional. If not specified, the global morse cutoff is used. -[Restrictions:] none +[Restrictions:] + +The {morse} potential does not support the +"pair_modify"_pair_modify.hmtl {mix} option. Coefficients for all i,j +pairs must be specified explicitly. [Related commands:] "pair_coeff"_pair_coeff.html [Default:] none diff --git a/doc/pair_style_table.html b/doc/pair_style_table.html index cbbd8cfc9..34c78e993 100644 --- a/doc/pair_style_table.html +++ b/doc/pair_style_table.html @@ -1,157 +1,161 @@Syntax:
pair_style table style N
Examples:
pair_style table linear 1000 pair_style table bitmap 12 pair_coeff * 3 morse.table ENTRY1 pair_coeff * 3 morse.table ENTRY1 7.0
Description:
Style table creates interpolation tables of length N from pair potential and force values listed in a file(s) as a function of distance. The files are read by the pair_coeff command.
The interpolation tables are created by fitting cubic splines to the file values and interpolating energy and force values at each of N distances. During a simulation, these tables are used to interpolate energy and force values as needed. The interpolation is done in one of 4 styles: lookup, linear, spline, or bitmap.
For the lookup style, the distance between 2 atoms is used to find the nearest table entry, which is the energy or force.
For the linear style, the distance is used to find 2 surrounding table values from which an energy or force is computed by linear interpolation.
For the spline style, a cubic spline coefficients are computed and stored each of the N values in the table. The pair distance is used to find the appropriate set of coefficients which are used to evaluate a cubic polynomial which computes the energy or force.
For the bitmap style, the N means to create interpolation tables that are 2^N in length. The pair distance is used to index into the table via a fast bit-mapping technique (Wolff) and a linear interpolation is performed between adjacent table values.
The following coefficients must be defined for each pair of atoms types via the pair_coeff command as in the examples above, or in the data file or restart files read by the read_data or read_restart commands:
The filename specifies a file containing tabulated energy and force values. The keyword specifies a section of the file. The cutoff is an optional coefficient. If not specified, the outer cutoff in the table itself (see below) will be used to build an interpolation table that extend to the largest tablulated distance. If specified, only file values up to the cutoff are used to create the interpolation table.
The format of a tabulated file is as follows (without the parenthesized comments):
# Morse potential for Fe (one or more comment or blank lines)
MORSE_FE (keyword is first text on line) N 500 R 1.0 10.0 (N, R, RSQ, BITMAP, FPRIME parameters) (blank) 1 1.0 25.5 102.34 (index, r, energy, force) 2 1.02 23.4 98.5 ... 500 10.0 0.001 0.003
A section begins with a non-blank line whose 1st character is not a "#"; blank lines or lines starting with "#" can be used as comments between sections. The first line begins with a keyword which identifies the section. The line can contain additional text, but the initial text must match the argument specified in the pair_coeff command. The next line lists (in any order) one or more parameters for the table. Each parameter is a keyword followed by one or more numeric values.
The parameter "N" is required; its value is the number of table entries that follow. All other parameters are optional. If "R" or "RSQ" or "BITMAP" does not appear, then the distances in each line of the table are used as-is to perform spline interpolation. In this case, the table values can be spaced in r uniformly or however you wish to position table values in regions of large gradients.
If used, the parameters "R" or "RSQ" are followed by 2 values rlo and rhi. If specified, the distance associated with each energy and force value is computed from these 2 values (at high accuracy), rather than using the (low-accuracy) value listed in each line of the table. For "R", distances uniformly spaced between rlo and rhi are computed; for "RSQ", squared distances uniformly spaced between rlo*rlo and rhi*rhi are computed.
If used, the parameter "BITMAP" is also followed by 2 values rlo and rhi. These values, along with the "N" value determine the ordering of the N lines that follow and what distance is associated with each. This ordering is complex, so it is not documented here, since this file is typically produced by the pair_write command with its bitmap option. When the table is in BITMAP format, the "N" parameter in the file must be equal to 2^M where M is the value specified in the pair_style command. Also, a cutoff parameter cannot be used as an optional 3rd argument in the pair_coeff command; the entire table extent as specified in the file must be used.
If used, the parameter "FPRIME" is followed by 2 values fplo and fphi which are the derivative of the force at the innermost and outermost distances listed in the table. These values are needed by the spline construction routines. If not specified by the "FPRIME" parameter, they are estimated (less accurately) by the first 2 and last 2 force values in the table. This parameter is not used by BITMAP tables.
Following a blank line, the next N lines list the tabulated values. On each line, the 1st value is the index from 1 to N, the 2nd value is r (in distance units), the 3rd value is the energy (in energy units), and the 4th is the force (in force units). The r values must increase from one line to the next (unless the BITMAP parameter is specified).
Note that one file can contain many sections, each with a tabulated potential. LAMMPS reads the file section by section until it finds one that matches the specified keyword.
-Restrictions: none +
Restrictions: +
+The table potential does not support the +pair_modify mix option. Coefficients for all i,j +pairs must be specified explicitly.
Related commands:
Default: none
(Wolff) Wolff and Rudd, Comp Phys Comm, 120, 200-32 (1999).
diff --git a/doc/pair_style_table.txt b/doc/pair_style_table.txt index d012f3a70..d362690a4 100644 --- a/doc/pair_style_table.txt +++ b/doc/pair_style_table.txt @@ -1,151 +1,155 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line pair_style table command :h3 [Syntax:] pair_style table style N :pre style = {lookup} or {linear} or {spline} or {bitmap} = method of interpolation N = use N values in {lookup}, {linear}, {spline} tables N = use 2^N values in {bitmap} tables :ul [Examples:] pair_style table linear 1000 pair_style table bitmap 12 pair_coeff * 3 morse.table ENTRY1 pair_coeff * 3 morse.table ENTRY1 7.0 :pre [Description:] Style {table} creates interpolation tables of length {N} from pair potential and force values listed in a file(s) as a function of distance. The files are read by the "pair_coeff"_pair_coeff.html command. The interpolation tables are created by fitting cubic splines to the file values and interpolating energy and force values at each of {N} distances. During a simulation, these tables are used to interpolate energy and force values as needed. The interpolation is done in one of 4 styles: {lookup}, {linear}, {spline}, or {bitmap}. For the {lookup} style, the distance between 2 atoms is used to find the nearest table entry, which is the energy or force. For the {linear} style, the distance is used to find 2 surrounding table values from which an energy or force is computed by linear interpolation. For the {spline} style, a cubic spline coefficients are computed and stored each of the {N} values in the table. The pair distance is used to find the appropriate set of coefficients which are used to evaluate a cubic polynomial which computes the energy or force. For the {bitmap} style, the N means to create interpolation tables that are 2^N in length. The pair distance is used to index into the table via a fast bit-mapping technique "(Wolff)"_#Wolff and a linear interpolation is performed between adjacent table values. The following coefficients must be defined for each pair of atoms types via the "pair_coeff"_pair_coeff.html command as in the examples above, or in the data file or restart files read by the "read_data"_read_data.html or "read_restart"_read_restart.html commands: filename keyword cutoff (distance units) :ul The filename specifies a file containing tabulated energy and force values. The keyword specifies a section of the file. The cutoff is an optional coefficient. If not specified, the outer cutoff in the table itself (see below) will be used to build an interpolation table that extend to the largest tablulated distance. If specified, only file values up to the cutoff are used to create the interpolation table. The format of a tabulated file is as follows (without the parenthesized comments): # Morse potential for Fe (one or more comment or blank lines) :pre MORSE_FE (keyword is first text on line) N 500 R 1.0 10.0 (N, R, RSQ, BITMAP, FPRIME parameters) (blank) 1 1.0 25.5 102.34 (index, r, energy, force) 2 1.02 23.4 98.5 ... 500 10.0 0.001 0.003 :pre A section begins with a non-blank line whose 1st character is not a "#"; blank lines or lines starting with "#" can be used as comments between sections. The first line begins with a keyword which identifies the section. The line can contain additional text, but the initial text must match the argument specified in the pair_coeff command. The next line lists (in any order) one or more parameters for the table. Each parameter is a keyword followed by one or more numeric values. The parameter "N" is required; its value is the number of table entries that follow. All other parameters are optional. If "R" or "RSQ" or "BITMAP" does not appear, then the distances in each line of the table are used as-is to perform spline interpolation. In this case, the table values can be spaced in {r} uniformly or however you wish to position table values in regions of large gradients. If used, the parameters "R" or "RSQ" are followed by 2 values {rlo} and {rhi}. If specified, the distance associated with each energy and force value is computed from these 2 values (at high accuracy), rather than using the (low-accuracy) value listed in each line of the table. For "R", distances uniformly spaced between {rlo} and {rhi} are computed; for "RSQ", squared distances uniformly spaced between {rlo*rlo} and {rhi*rhi} are computed. If used, the parameter "BITMAP" is also followed by 2 values {rlo} and {rhi}. These values, along with the "N" value determine the ordering of the N lines that follow and what distance is associated with each. This ordering is complex, so it is not documented here, since this file is typically produced by the "pair_write"_pair_write.html command with its {bitmap} option. When the table is in BITMAP format, the "N" parameter in the file must be equal to 2^M where M is the value specified in the pair_style command. Also, a cutoff parameter cannot be used as an optional 3rd argument in the pair_coeff command; the entire table extent as specified in the file must be used. If used, the parameter "FPRIME" is followed by 2 values {fplo} and {fphi} which are the derivative of the force at the innermost and outermost distances listed in the table. These values are needed by the spline construction routines. If not specified by the "FPRIME" parameter, they are estimated (less accurately) by the first 2 and last 2 force values in the table. This parameter is not used by BITMAP tables. Following a blank line, the next N lines list the tabulated values. On each line, the 1st value is the index from 1 to N, the 2nd value is r (in distance units), the 3rd value is the energy (in energy units), and the 4th is the force (in force units). The r values must increase from one line to the next (unless the BITMAP parameter is specified). Note that one file can contain many sections, each with a tabulated potential. LAMMPS reads the file section by section until it finds one that matches the specified keyword. -[Restrictions:] none +[Restrictions:] + +The {table} potential does not support the +"pair_modify"_pair_modify.hmtl {mix} option. Coefficients for all i,j +pairs must be specified explicitly. [Related commands:] "pair_coeff"_pair_coeff.html [Default:] none :line :link(Wolff) [(Wolff)] Wolff and Rudd, Comp Phys Comm, 120, 200-32 (1999). diff --git a/doc/read_data.html b/doc/read_data.html index 7e01eb79b..0842022ac 100644 --- a/doc/read_data.html +++ b/doc/read_data.html @@ -1,591 +1,591 @@Syntax:
read_data file
Examples:
read_data data.lj read_data ../run7/data.polymer.gz
Description:
Read in a data file containing information LAMMPS needs to run a simulation. The file can be ASCII text or a gzipped text file (detected by a .gz suffix). This is one of 3 ways to specify initial atom coordinates; see the read_restart and create_atoms commands for alternative methods.
The structure of the data file is important, though many settings and sections are optional or can come in any order. See the examples directory for sample data files for different problems.
A data file has a header and a body. The header appears first. The first line of the header is always skipped; it typically contains a description of the file. Then lines are read one at a time. Lines can have a trailing comment starting with '#' that is ignored. If the line is blank (only whitespace after comment is deleted), it is skipped. If the line contains a header keyword, the corresponding value(s) is read from the line. If it doesn't contain a header keyword, the line begins the body of the file.
The body of the file contains zero or more sections. The first line of a section has only a keyword. The next line is skipped. The remaining lines of the section contain values. The number of lines depends on the section keyword as described below. Zero or more blank lines can be used between sections. Sections can appear in any order, with a few exceptions as noted below.
The formatting of individual lines in the data file (indentation, spacing between words and numbers) is not important except that header and section keywords (e.g. atoms, xlo xhi, Masses, Bond Coeffs) must be capitalized as shown and can't have extra white space between their words - e.g. two spaces or a tab between "Bond" and "Coeffs" is not valid.
These are the recognized header keywords. Header lines can come in any order. The value(s) is read from the beginning of the line. Thus the keyword atoms should be in a line like "1000 atoms" and the keyword ylo yhi should be in a line like "-10.0 10.0 ylo yhi". All these settings have a default value of 0, except the lo/hi box size defaults are -0.5 and 0.5. A line need only appear if the value is different than the default.
For 2d simulations, the zlo zhi values should be set to bound the z coords for atoms that appear in the file; the default of -0.5 0.5 is valid if all z coords are 0.0.
The initial simulation box size is determined by the lo/hi settings. In any dimension, the system may be periodic or non-periodic; see the boundary command.
If the system is non-periodic (in a dimension), then all atoms in the data file should have coordinates (in that dimension) between the lo and hi values. Furthermore, if running in parallel, the lo/hi values should be just a bit smaller/larger than the min/max extent of atoms. For example, if your atoms extend from 0 to 50, you should not specify the box bounds as -10000 and 10000. Since LAMMPS uses the specified box size to layout the 3d grid of processors, this will be sub-optimal and may cause a parallel simulation to lose atoms when LAMMPS shrink-wraps the box to the atoms.
If the system is periodic (in a dimension), then atom coordinates can be outside the bounds; they will be remapped (in a periodic sense) back inside the box.
These are the section keywords for the body of the file.
Each section is now listed in alphabetic order. The format of each section is described including the number of lines it must contain and rules (if any) for where it can appear in the data file.
Any individual line in the various sections can have a trailing comment starting with "#" for annotation purposes. E.g. in the Atoms section:
10 1 17 -1.0 10.0 5.0 6.0 # salt ion
Angle Coeffs section:
ID = angle type (1-N) coeffs = list of coeffs
6 70 108.5 0 0
The number and meaning of the coefficients are specific to the defined angle style. See the angle_style and angle_coeff commands for details. Coefficients can also be set via the angle_coeff command in the input script.
AngleAngle Coeffs section:
ID = improper type (1-N) coeffs = list of coeffs (see improper_coeff)
AngleAngleTorsion Coeffs section:
ID = dihedral type (1-N) coeffs = list of coeffs (see dihedral_coeff)
Angles section:
ID = number of angle (1-Nangles) type = angle type (1-Nangletype) atom1,atom2,atom3 = IDs of 1st,2nd,3rd atoms in angleexample:
2 2 17 29 430
The 3 atoms are ordered linearly within the angle. Thus the central atom (around which the angle is computed) is the atom2 in the list. E.g. H,O,H for a water molecule. The Angles section must appear after the Atoms section. All values in this section must be integers (1, not 1.0).
AngleTorsion Coeffs section:
ID = dihedral type (1-N) coeffs = list of coeffs (see dihedral_coeff)
Atoms section:
This is the list of all possible quantities that can appear on each line of this section:
Which of these quantities are actually listed depends on the atom style. This is the list of which styles require each quantity:
Any quantity that is used by the atom style appears in the order listed above. Thus if the atom style is atomic, an atom line should have 5 quantities: atom-ID, type-ID, x, y, z. If the atom style is -hybrid eam dipole molecular, then an atom line should have 10 -quantites: atom-ID, molecule-ID, type-ID, q, x, y, z, mux, muy, muz. +hybrid dipole molecular, then an atom line should have 10 quantites: +atom-ID, molecule-ID, type-ID, q, x, y, z, mux, muy, muz.
The units for these quantities depend on the unit style; see the units command for details.
For 2d simulations specify z as 0.0, or whatever value is within the zlo zhi setting in the data file header.
The atom-ID is used to identify the atom throughout the simulation and in dump files. Normally, it is a unique value from 1 to Natoms for each atom. Unique values larger than Natoms can be used, but they will cause extra memory to be allocated on each processor, if an atom map array is used (see the atom_modify command). If an atom map array is not used (e.g. an atomic system with no bonds), velocities are not assigned in the data file, and you don't -care if unique atom IDs appear in dump files, then IDs can be set to -non-unique values > 0. +care if unique atom IDs appear in dump files, then the atom-IDs can all +be set to 0.
The molecule ID is a 2nd identifier attached to an atom. Normally, it is a number from 1 to N, identifying which molecule the atom belongs to. It can be 0 if it is an unbonded atom or if you don't care about molecule assignments.
An Atoms section must appear in the data file if natoms > 0 in the header section. The atoms can be listed in any order.
Atom lines (all or none of them) can optionally list 3 final integer values: nx,ny,nz. For periodic dimensions, they specify which image of the box the atom is considered to be in. An image of 0 means the box as defined. A value of 2 means add 2 box lengths to get the true value. A value of -1 means subtract 1 box length to get the true value. LAMMPS updates these flags as atoms cross periodic boundaries during the simulation. The flags can be output via the dump and dump_modify commands. If nx,ny,nz values are not set in the data file, LAMMPS initializes them to 0.
Atom velocities are set to 0.0 when the Atoms section is read. They may later be set by a Velocities section or by a velocity command in the input script.
Bond Coeffs section:
ID = bond type (1-N) coeffs = list of coeffs
4 250 1.49
The number and meaning of the coefficients are specific to the defined bond style. See the bond_style and bond_coeff commands for details. Coefficients can also be set via the bond_coeff command in the input script.
BondAngle Coeffs section:
ID = angle type (1-N) coeffs = list of coeffs (see class 2 section of angle_coeff)
BondBond Coeffs section:
ID = angle type (1-N) coeffs = list of coeffs (see class 2 section of angle_coeff)
BondBond13 Coeffs section:
ID = dihedral type (1-N) coeffs = list of coeffs (see class 2 section of dihedral_coeff)
Bonds section:
ID = bond number (1-Nbonds) type = bond type (1-Nbondtype) atom1,atom2 = IDs of 1st,2nd atoms in bond
12 3 17 29
The Bonds section must appear after the Atoms section. All values in this section must be integers (1, not 1.0).
Dihedral Coeffs section:
ID = dihedral type (1-N) coeffs = list of coeffs
3 0.6 1 0 1
The number and meaning of the coefficients are specific to the defined dihedral style. See the dihedral_style and dihedral_coeff commands for details. Coefficients can also be set via the dihedral_coeff command in the input script.
Dihedrals section:
ID = number of dihedral (1-Ndihedrals) type = dihedral type (1-Ndihedraltype) atom1,atom2,atom3,atom4 = IDs of 1st,2nd,3rd,4th atoms in dihedral
12 4 17 29 30 21
The 4 atoms are ordered linearly within the dihedral. The Dihedrals section must appear after the Atoms section. All values in this section must be integers (1, not 1.0).
Dipoles section:
ID = atom type (1-N) dipole-moment = value of dipole moment
2 0.5
This defines the dipole moment of each atom type (which can be 0.0 for some types). This can also be set via the dipole command in the input script.
EndBondTorsion Coeffs section:
ID = dihedral type (1-N) coeffs = list of coeffs (see class 2 section of dihedral_coeff)
Improper Coeffs section:
ID = improper type (1-N) coeffs = list of coeffs
2 20 0.0548311
The number and meaning of the coefficients are specific to the defined improper style. See the improper_style and improper_coeff commands for details. Coefficients can also be set via the improper_coeff command in the input script.
Impropers section:
ID = number of improper (1-Nimpropers) type = improper type (1-Nimpropertype) atom1,atom2,atom3,atom4 = IDs of 1st,2nd,3rd,4th atoms in improper
12 3 17 29 13 100
The Impropers section must appear after the Atoms section. All values in this section must be integers (1, not 1.0).
Masses section:
ID = atom type (1-N) mass = mass value
3 1.01
This defines the mass of each atom type. This can also be set via the mass command in the input script. This section should not be used for atom styles that define a mass for individual atoms - e.g. atom style granular.
MiddleBondTorsion Coeffs section:
ID = dihedral type (1-N) coeffs = list of coeffs (see class 2 section of dihedral_coeff)
Pair Coeffs section:
ID = atom type (1-N) coeffs = list of coeffs
3 0.022 2.35197 0.022 2.35197
The number and meaning of the coefficients are specific to the defined pair style. See the pair_style and pair_coeff commands for details. Coefficients can also be set via the pair_coeff command in the input script.
Velocities section:
atom-ID = integer ID of atom to assign velocity to vx,vy,vz = components of velocity of the atom
45 -3.4 0.05 1.25
The velocity lines can appear in any order. This section can only be used after an Atoms section. The Atoms section must have assigned a unique atom ID to each atom so that velocities can be assigned in this way. Velocities can also be set by the velocity command in the input script.
Restrictions:
To read gzipped data files, you must compile LAMMPS with the -DGZIP option - see the Making LAMMPS section of the documentation.
Related commands:
Default: none
diff --git a/doc/read_data.txt b/doc/read_data.txt index eafb3da01..e76f886c4 100644 --- a/doc/read_data.txt +++ b/doc/read_data.txt @@ -1,503 +1,503 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line read_data command :h3 [Syntax:] read_data file :pre file = name of data file to read in :ul [Examples:] read_data data.lj read_data ../run7/data.polymer.gz :pre [Description:] Read in a data file containing information LAMMPS needs to run a simulation. The file can be ASCII text or a gzipped text file (detected by a .gz suffix). This is one of 3 ways to specify initial atom coordinates; see the "read_restart"_read_restart.html and "create_atoms"_create_atoms.html commands for alternative methods. The structure of the data file is important, though many settings and sections are optional or can come in any order. See the examples directory for sample data files for different problems. A data file has a header and a body. The header appears first. The first line of the header is always skipped; it typically contains a description of the file. Then lines are read one at a time. Lines can have a trailing comment starting with '#' that is ignored. If the line is blank (only whitespace after comment is deleted), it is skipped. If the line contains a header keyword, the corresponding value(s) is read from the line. If it doesn't contain a header keyword, the line begins the body of the file. The body of the file contains zero or more sections. The first line of a section has only a keyword. The next line is skipped. The remaining lines of the section contain values. The number of lines depends on the section keyword as described below. Zero or more blank lines can be used between sections. Sections can appear in any order, with a few exceptions as noted below. The formatting of individual lines in the data file (indentation, spacing between words and numbers) is not important except that header and section keywords (e.g. atoms, xlo xhi, Masses, Bond Coeffs) must be capitalized as shown and can't have extra white space between their words - e.g. two spaces or a tab between "Bond" and "Coeffs" is not valid. :line These are the recognized header keywords. Header lines can come in any order. The value(s) is read from the beginning of the line. Thus the keyword {atoms} should be in a line like "1000 atoms" and the keyword {ylo yhi} should be in a line like "-10.0 10.0 ylo yhi". All these settings have a default value of 0, except the lo/hi box size defaults are -0.5 and 0.5. A line need only appear if the value is different than the default. {atoms} = # of atoms in system {bonds} = # of bonds in system {angles} = # of angles in system {dihedrals} = # of dihedrals in system {impropers} = # of impropers in system {atom types} = # of atom types in system {bond types} = # of bond types in system {angle types} = # of angle types in system {dihedral types} = # of dihedral types in system {improper types} = # of improper types in system {xlo xhi} = simulation box boundaries in x dimension {ylo yhi} = simulation box boundaries in y dimension {zlo zhi} = simulation box boundaries in z dimension :ul For 2d simulations, the {zlo zhi} values should be set to bound the z coords for atoms that appear in the file; the default of -0.5 0.5 is valid if all z coords are 0.0. The initial simulation box size is determined by the lo/hi settings. In any dimension, the system may be periodic or non-periodic; see the "boundary"_boundary.html command. If the system is non-periodic (in a dimension), then all atoms in the data file should have coordinates (in that dimension) between the lo and hi values. Furthermore, if running in parallel, the lo/hi values should be just a bit smaller/larger than the min/max extent of atoms. For example, if your atoms extend from 0 to 50, you should not specify the box bounds as -10000 and 10000. Since LAMMPS uses the specified box size to layout the 3d grid of processors, this will be sub-optimal and may cause a parallel simulation to lose atoms when LAMMPS shrink-wraps the box to the atoms. If the system is periodic (in a dimension), then atom coordinates can be outside the bounds; they will be remapped (in a periodic sense) back inside the box. :line These are the section keywords for the body of the file. {Atoms, Velocities, Masses, Dipoles} = atom-property sections {Bonds, Angles, Dihedrals, Impropers} = molecular topolgy sections {Pair Coeffs, Bond Coeffs, Angle Coeffs, Dihedral Coeffs, \ Improper Coeffs} = force field sections {BondBond Coeffs, BondAngle Coeffs, MiddleBondTorsion Coeffs, \ EndBondTorsion Coeffs, AngleTorsion Coeffs, AngleAngleTorsion Coeffs, \ BondBond13 Coeffs, AngleAngle Coeffs} = class 2 force field sections :ul Each section is now listed in alphabetic order. The format of each section is described including the number of lines it must contain and rules (if any) for where it can appear in the data file. Any individual line in the various sections can have a trailing comment starting with "#" for annotation purposes. E.g. in the Atoms section: 10 1 17 -1.0 10.0 5.0 6.0 # salt ion :pre :line {Angle Coeffs} section: one line per angle type :ulb,l line syntax: ID coeffs :l ID = angle type (1-N) coeffs = list of coeffs :pre example: :l 6 70 108.5 0 0 :pre :ule The number and meaning of the coefficients are specific to the defined angle style. See the "angle_style"_angle_style.html and "angle_coeff"_angle_coeff.html commands for details. Coefficients can also be set via the "angle_coeff"_angle_coeff.html command in the input script. :line {AngleAngle Coeffs} section: one line per improper type :ulb,l line syntax: ID coeffs :l ID = improper type (1-N) coeffs = list of coeffs (see "improper_coeff"_improper_coeff.html) :pre :ule :line {AngleAngleTorsion Coeffs} section: one line per dihedral type :ulb,l line syntax: ID coeffs :l ID = dihedral type (1-N) coeffs = list of coeffs (see "dihedral_coeff"_dihedral_coeff.html) :pre :ule :line {Angles} section: one line per angle :ulb,l line syntax: ID type atom1 atom2 atom3 :l ID = number of angle (1-Nangles) type = angle type (1-Nangletype) atom1,atom2,atom3 = IDs of 1st,2nd,3rd atoms in angle :pre example: :b 2 2 17 29 430 :pre :ule The 3 atoms are ordered linearly within the angle. Thus the central atom (around which the angle is computed) is the atom2 in the list. E.g. H,O,H for a water molecule. The {Angles} section must appear after the {Atoms} section. All values in this section must be integers (1, not 1.0). :line {AngleTorsion Coeffs} section: one line per dihedral type :ulb,l line syntax: ID coeffs :l ID = dihedral type (1-N) coeffs = list of coeffs (see "dihedral_coeff"_dihedral_coeff.html) :pre :ule :line {Atoms} section: one line per atom line syntax: depends on atom style :ul This is the list of all possible quantities that can appear on each line of this section: atom-ID = integer ID of atom molecule-ID = integer ID of molecule the atom belongs to type-ID = integer type ID of atom (1-Ntype) q = charge on atom diameter = diameter of atom density = density of atom x,y,z = coordinates of atom mux,muy,muz = components of dipole orientation of atom nx,ny,nz = image indices for atom :ul Which of these quantities are actually listed depends on the "atom style"_atom_style.html. This is the list of which styles require each quantity: atom-ID = all styles molecule-ID = angle, bond, molecular, full styles type-ID = all styles q = charge, dipole, full styles diameter = granular style density = granular style x,y,z = all styles mux,muy,muz = dipole style nx,ny,nz = optional for all styles (see below) :ul Any quantity that is used by the atom style appears in the order listed above. Thus if the atom style is {atomic}, an atom line should have 5 quantities: atom-ID, type-ID, x, y, z. If the atom style is -{hybrid eam dipole molecular}, then an atom line should have 10 -quantites: atom-ID, molecule-ID, type-ID, q, x, y, z, mux, muy, muz. +{hybrid dipole molecular}, then an atom line should have 10 quantites: +atom-ID, molecule-ID, type-ID, q, x, y, z, mux, muy, muz. The units for these quantities depend on the unit style; see the "units"_units.html command for details. For 2d simulations specify z as 0.0, or whatever value is within the {zlo zhi} setting in the data file header. The atom-ID is used to identify the atom throughout the simulation and in dump files. Normally, it is a unique value from 1 to Natoms for each atom. Unique values larger than Natoms can be used, but they will cause extra memory to be allocated on each processor, if an atom map array is used (see the "atom_modify"_atom_modify.html command). If an atom map array is not used (e.g. an atomic system with no bonds), velocities are not assigned in the data file, and you don't -care if unique atom IDs appear in dump files, then IDs can be set to -non-unique values > 0. +care if unique atom IDs appear in dump files, then the atom-IDs can all +be set to 0. The molecule ID is a 2nd identifier attached to an atom. Normally, it is a number from 1 to N, identifying which molecule the atom belongs to. It can be 0 if it is an unbonded atom or if you don't care about molecule assignments. An {Atoms} section must appear in the data file if natoms > 0 in the header section. The atoms can be listed in any order. Atom lines (all or none of them) can optionally list 3 final integer values: nx,ny,nz. For periodic dimensions, they specify which image of the box the atom is considered to be in. An image of 0 means the box as defined. A value of 2 means add 2 box lengths to get the true value. A value of -1 means subtract 1 box length to get the true value. LAMMPS updates these flags as atoms cross periodic boundaries during the simulation. The flags can be output via the "dump"_dump.html and "dump_modify"_dump_modify.html commands. If nx,ny,nz values are not set in the data file, LAMMPS initializes them to 0. Atom velocities are set to 0.0 when the {Atoms} section is read. They may later be set by a {Velocities} section or by a "velocity"_velocity.html command in the input script. :line {Bond Coeffs} section: one line per bond type :ulb,l line syntax: ID coeffs :l ID = bond type (1-N) coeffs = list of coeffs :pre example: :l 4 250 1.49 :pre :ule The number and meaning of the coefficients are specific to the defined bond style. See the "bond_style"_bond_style.html and "bond_coeff"_bond_coeff.html commands for details. Coefficients can also be set via the "bond_coeff"_bond_coeff.html command in the input script. :line {BondAngle Coeffs} section: one line per angle type :ulb,l line syntax: ID coeffs :l ID = angle type (1-N) coeffs = list of coeffs (see class 2 section of "angle_coeff"_angle_coeff.html) :pre :ule :line {BondBond Coeffs} section: one line per angle type :ulb,l line syntax: ID coeffs :l ID = angle type (1-N) coeffs = list of coeffs (see class 2 section of "angle_coeff"_angle_coeff.html) :pre :ule :line {BondBond13 Coeffs} section: one line per dihedral type :ulb,l line syntax: ID coeffs :l ID = dihedral type (1-N) coeffs = list of coeffs (see class 2 section of "dihedral_coeff"_dihedral_coeff.html) :pre :ule :line {Bonds} section: one line per bond :ulb,l line syntax: ID type atom1 atom2 :l ID = bond number (1-Nbonds) type = bond type (1-Nbondtype) atom1,atom2 = IDs of 1st,2nd atoms in bond :pre example: :l 12 3 17 29 :pre :ule The {Bonds} section must appear after the {Atoms} section. All values in this section must be integers (1, not 1.0). :line {Dihedral Coeffs} section: one line per dihedral type :ulb,l line syntax: ID coeffs :l ID = dihedral type (1-N) coeffs = list of coeffs :pre example: :l 3 0.6 1 0 1 :pre :ule The number and meaning of the coefficients are specific to the defined dihedral style. See the "dihedral_style"_dihedral_style.html and "dihedral_coeff"_dihedral_coeff.html commands for details. Coefficients can also be set via the "dihedral_coeff"_dihedral_coeff.html command in the input script. :line {Dihedrals} section: one line per dihedral :ulb,l line syntax: ID type atom1 atom2 atom3 atom4 :l ID = number of dihedral (1-Ndihedrals) type = dihedral type (1-Ndihedraltype) atom1,atom2,atom3,atom4 = IDs of 1st,2nd,3rd,4th atoms in dihedral :pre example: :l 12 4 17 29 30 21 :pre :ule The 4 atoms are ordered linearly within the dihedral. The {Dihedrals} section must appear after the {Atoms} section. All values in this section must be integers (1, not 1.0). :line {Dipoles} section: one line per atom type :ulb,l line syntax: ID dipole-moment : ID = atom type (1-N) dipole-moment = value of dipole moment :pre example: :l 2 0.5 :pre :ule This defines the dipole moment of each atom type (which can be 0.0 for some types). This can also be set via the "dipole"_dipole.html command in the input script. :line {EndBondTorsion Coeffs} section: one line per dihedral type :ulb,l line syntax: ID coeffs :l ID = dihedral type (1-N) coeffs = list of coeffs (see class 2 section of "dihedral_coeff"_dihedral_coeff.html) :pre :ule :line {Improper Coeffs} section: one line per improper type :ulb,l line syntax: ID coeffs :l ID = improper type (1-N) coeffs = list of coeffs :pre example: :l 2 20 0.0548311 :pre :ule The number and meaning of the coefficients are specific to the defined improper style. See the "improper_style"_improper_style.html and "improper_coeff"_improper_coeff.html commands for details. Coefficients can also be set via the "improper_coeff"_improper_coeff.html command in the input script. :line {Impropers} section: one line per improper :ulb,l line syntax: ID type atom1 atom2 atom3 atom4 :l ID = number of improper (1-Nimpropers) type = improper type (1-Nimpropertype) atom1,atom2,atom3,atom4 = IDs of 1st,2nd,3rd,4th atoms in improper :pre example: :l 12 3 17 29 13 100 :pre :ule The {Impropers} section must appear after the {Atoms} section. All values in this section must be integers (1, not 1.0). :line {Masses} section: one line per atom type :ulb,l line syntax: ID mass :l ID = atom type (1-N) mass = mass value :pre example: :l 3 1.01 :pre :ule This defines the mass of each atom type. This can also be set via the "mass"_mass.html command in the input script. This section should not be used for atom styles that define a mass for individual atoms - e.g. atom style granular. :line {MiddleBondTorsion Coeffs} section: one line per dihedral type :ulb,l line syntax: ID coeffs :l ID = dihedral type (1-N) coeffs = list of coeffs (see class 2 section of "dihedral_coeff"_dihedral_coeff.html) :pre :ule :line {Pair Coeffs} section: one line per atom type :ulb,l line syntax: ID coeffs :l ID = atom type (1-N) coeffs = list of coeffs :pre example: :l 3 0.022 2.35197 0.022 2.35197 :pre :ule The number and meaning of the coefficients are specific to the defined pair style. See the "pair_style"_pair_style.html and "pair_coeff"_pair_coeff.html commands for details. Coefficients can also be set via the "pair_coeff"_pair_coeff.html command in the input script. :line {Velocities} section: one line per atom :ulb line syntax: atom-ID vx vy vz :l atom-ID = integer ID of atom to assign velocity to vx,vy,vz = components of velocity of the atom :pre example: :l 45 -3.4 0.05 1.25 :pre :ule The velocity lines can appear in any order. This section can only be used after an {Atoms} section. The {Atoms} section must have assigned a unique atom ID to each atom so that velocities can be assigned in this way. Velocities can also be set by the "velocity"_velocity.html command in the input script. :line [Restrictions:] To read gzipped data files, you must compile LAMMPS with the -DGZIP option - see the "Making LAMMPS"_Section_start.html#2_2 section of the documentation. [Related commands:] "read_restart"_read_restart.html, "create_atoms"_create_atoms.html [Default:] none diff --git a/doc/variable.html b/doc/variable.html index 8624396bb..b2e760e21 100644 --- a/doc/variable.html +++ b/doc/variable.html @@ -1,190 +1,190 @@Syntax:
variable name style args ...-
index args = one or more strings loop args = N = integer size of loop equal args = one string containing functions, vectors, keywords, numbers math functions = add(x,y), sub(x,y), mult(x,y), div(x,y), neg(x), pow(x,y), exp(x), ln(x), sqrt(x) group functions = mass(group), charge(group), xcm(group,dim), vcm(group,dim), bounds(group,xmin), gyration(group) vectors = x[5], y[12], z[17], vx[88], vy[19], vz[2], fx[1], fy[2005], fz[1] keywords = same keywords (mostly) as in thermo_style custom command world args = one string for each partition of processors universe args = one or more strings
Examples:
variable x index run1 run2 run3 run4 run5 run6 run7 run8 variable LoopVar loop 20 variable beta equal div(temp,3.0) variable b1 equal add(x[234],mult(0.5,lx)) variable b equal xcm(mol1,x) variable temp world 300.0 310.0 320.0 330.0 variable x universe 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Description:
This command assigns one or more values to a variable name so that the variable can be used in subsequent input script commands. The "name" of the variable is an arbitrary string. Each "value" is a string which could be text or numbers, as in the examples above. As explained in this section, occurrences of the variable name in an input script line are replaced by the variable's value. The variable name can be referenced in the input script as $x if the name "x" is a single character, or as ${LoopVar} if the name "LoopVar" is one or more characters.
As described below, for variable styles index, loop, and universe, the value assigned to a variable can be incremented via the next command. When there are no more values to assign, the variable is "exhausted" and a flag is set that causes the next jump command encountered in the input script to be skipped. This enables the construction of simple loops in the input script that are iterated over and exited from.
When a variable command is encountered for a variable that has already been specified, the command is skipped. This is the case for all variable styles except equal, so that equal-style variable names can be re-used and re-defined anytime. Skipping allows you to loop over the same input script many times without re-defining your variables. When a variable is exhausted via the next command, it is then available to be re-defined in a subsequent variable command.
For the index style, one or more strings are specified. Initially, the 1st string is assigned to the variable. Each time a next command is used with the variable name, the next string is assigned. All processors assign the same string to the variable. Index-style variables can also be set (with a single value) by using the command-line switch -var; see this section for details.
The loop style is identical to the index style except that the strings are the integers from 1 to N. Initially, the string "1" is assigned to the variable. Each time a next command is used with the variable name, the next string ("2", "3", etc) is assigned. All processors assign the same string to the variable.
For the equal style, a single string is specified which represents an equation that will be evaluated afresh each time the variable is used. Thus the variable can take on different values at different stages of the input script. For example, if the variable is used in a fix print command, it could print different values each timestep it was invoked. The next command cannot be used with equal-style variables, since there is only one value. Note that, as with any other input script command, it is feasible to use another variable in the equal variable's string, e.g. variable y equal mult($x,2). However, $x will be replaced immediately by it's current value when the command is first parsed, not each time that $y is substituted for.
The syntax of the equation assigned to equal variables is simple. It can contain "functions", "vectors", "keywords", or "numbers" in any combination.
For the group functions, ID is a group-ID, dim is 'x' or 'y' or 'z', and dir is one of 6 strings: "xmin", "xmax", "ymin", "ymax", "zmin", or "zmax". The group functions mass() and charge() are the total mass and charge of the group of atoms. Xcm() and vcm() return components of the position and velocity of the center of mass of the group. Bound() returns the min/max of a particular coordinate for all atoms in the group. Gyration() computes the radius-of-gyration of the group of atoms. See the fix gyration command for the formula.
Keywords have restrictions on when they can be assigned to variables. For example, keywords that compute thermodynamic quantites can only be invoked after the first simulation has begun. A warning is issued if thermodyanmic keywords are invoked on timesteps when thermodynamic information is not being printed to the screen, since the values assigned to the variable may be out-of-date.
The variable equal equation can also be nested in that function arguments can be functions, vectors, keywords, or numbers. For example, this is a valid equation:
variable x equal div(add(pe,ke),pow(vol,div(1,3)))
For the world style, one or more strings are specified. There must be one string for each processor partition or "world". See this section of the manual for information on running LAMMPS with multiple partitions via the "-partition" command-line switch. This variable command assigns one string to each world. All processors in the world are assigned the same string. The next command cannot be used with equal-style variables, since there is only one value per world. This style of variable is useful when you wish to run different simulations on different partitions, or when performing a parallel tempering simulation (see the temper command), to assign different temperatures to different partitions.
For the universe style, one or more strings are specified. There must be at least as many strings as there are processor partitions or "worlds". See this page for information on running LAMMPS with multiple partitions via the "-partition" command-line switch. This variable command initially assigns one string to each world. When a next command is encountered using this variable, the first processor partition to encounter it, is assigned the next available value. This continues until all the variable values are consumed. Thus, this command can be used to run 50 simulations on 8 processor partitions. The simulations will be run one after the other on whatever partition becomes available, until they are all finished. Universe-style variables are incremented using the files "tmp.lammps.variable" and "tmp.lammps.variable.lock" which you will see in your directory during such a LAMMPS run.
If a variable command is encountered when the variable has already been defined, the command is ignored. Thss allows an input script with a variable command to be processed multiple times; see the jump or include commands. It also means that the use of the command-line switch -var will override a corresponding variable setting in the input script.
Restrictions:
The use of atom vectors in equal style variables requires the atom style to use a global mapping in order to look up the vector indices. Only atom styles with molecular information create global maps.
Related commands:
next, jump, include, temper, fix print, print
Default: none
diff --git a/doc/variable.txt b/doc/variable.txt index 50c635533..6d84f01b7 100644 --- a/doc/variable.txt +++ b/doc/variable.txt @@ -1,189 +1,189 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line variable command :h3 [Syntax:] variable name style args ... :pre -name = single lower-case character, 'a' thru 'z' :ulb,l +name = name of variable to define :ulb,l style = {index} or {loop} or {equal} or {world} or {universe} :l {index} args = one or more strings {loop} args = N = integer size of loop {equal} args = one string containing functions, vectors, keywords, numbers math functions = add(x,y), sub(x,y), mult(x,y), div(x,y), neg(x), pow(x,y), exp(x), ln(x), sqrt(x) group functions = mass(group), charge(group), xcm(group,dim), vcm(group,dim), bounds(group,xmin), gyration(group) vectors = x\[5\], y\[12\], z\[17\], vx\[88\], vy\[19\], vz\[2\], fx\[1\], fy\[2005\], fz\[1\] keywords = same keywords (mostly) as in "thermo_style custom"_thermo_style.html command {world} args = one string for each partition of processors {universe} args = one or more strings :pre :ule [Examples:] variable x index run1 run2 run3 run4 run5 run6 run7 run8 variable LoopVar loop 20 variable beta equal div(temp,3.0) variable b1 equal add(x\[234\],mult(0.5,lx)) variable b equal xcm(mol1,x) variable temp world 300.0 310.0 320.0 330.0 variable x universe 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 :pre [Description:] This command assigns one or more values to a variable name so that the variable can be used in subsequent input script commands. The "name" of the variable is an arbitrary string. Each "value" is a string which could be text or numbers, as in the examples above. As explained in "this section"_Section_commands.html#3_2, occurrences of the variable name in an input script line are replaced by the variable's value. The variable name can be referenced in the input script as $x if the name "x" is a single character, or as $\{LoopVar\} if the name "LoopVar" is one or more characters. As described below, for variable styles {index}, {loop}, and {universe}, the value assigned to a variable can be incremented via the "next"_next.html command. When there are no more values to assign, the variable is "exhausted" and a flag is set that causes the next "jump"_jump.html command encountered in the input script to be skipped. This enables the construction of simple loops in the input script that are iterated over and exited from. When a variable command is encountered for a variable that has already been specified, the command is skipped. This is the case for all variable styles except {equal}, so that {equal}-style variable names can be re-used and re-defined anytime. Skipping allows you to loop over the same input script many times without re-defining your variables. When a variable is exhausted via the "next"_next.html command, it is then available to be re-defined in a subsequent variable command. For the {index} style, one or more strings are specified. Initially, the 1st string is assigned to the variable. Each time a "next"_next.html command is used with the variable name, the next string is assigned. All processors assign the same string to the variable. {Index}-style variables can also be set (with a single value) by using the command-line switch -var; see "this section"_Section_start.html#2_4 for details. The {loop} style is identical to the {index} style except that the strings are the integers from 1 to N. Initially, the string "1" is assigned to the variable. Each time a "next"_next.html command is used with the variable name, the next string ("2", "3", etc) is assigned. All processors assign the same string to the variable. For the {equal} style, a single string is specified which represents an equation that will be evaluated afresh each time the variable is used. Thus the variable can take on different values at different stages of the input script. For example, if the variable is used in a "fix print"_fix_print.html command, it could print different values each timestep it was invoked. The next command cannot be used with {equal}-style variables, since there is only one value. Note that, as with any other input script command, it is feasible to use another variable in the {equal} variable's string, e.g. variable y equal mult($x,2). However, $x will be replaced immediately by it's current value when the command is first parsed, not each time that $y is substituted for. The syntax of the equation assigned to {equal} variables is simple. It can contain "functions", "vectors", "keywords", or "numbers" in any combination. Function = a keyword followed by parenthesis with one or two arguments Supported arithmetic functions = add(x,y), sub(x,y), mult(x,y), div(x,y), \ neg(x), pow(x,y), exp(x), ln(x), sqrt(x) Supported group functions = mass(ID), charge(ID), xcm(ID,dim), vcm(ID,dim), \ bound(ID,dir), gyration(ID) Example function usage = div(1.0e20,3.0), neg(x\[34\]), pow(lx,3.0), \ xcm(mol,x), bound(lower,zmin) Vector = a keyword followed by square brackets containing an atom ID Supported vectors = x, y, z, vx, vy, vz, fx, fy, fz Example vector usage = x\[123\], fz\[1000\] Keyword = keywords supported by the \ "thermo_style custom"_thermo_style.html \ command except cpu and pressure tensor components (pxx, pyy, etc) Supported keywords = step, atoms, temp, press, pe, ke, eng, evdwl, \ ecoul, epair, ebond, eangle, edihed, eimp, emol, elong, vol, lx, ly, lz, \ gke, grot, t_ID Example keyword usage = atoms, pow(vol,0.333), mult(elong,0.5) Number = 0.2, 1.0e20, -15.4, etc :ul For the group functions, ID is a group-ID, dim is 'x' or 'y' or 'z', and dir is one of 6 strings: "xmin", "xmax", "ymin", "ymax", "zmin", or "zmax". The group functions mass() and charge() are the total mass and charge of the group of atoms. Xcm() and vcm() return components of the position and velocity of the center of mass of the group. Bound() returns the min/max of a particular coordinate for all atoms in the group. Gyration() computes the radius-of-gyration of the group of atoms. See the "fix gyration"_fix_gyration.html command for the formula. Keywords have restrictions on when they can be assigned to variables. For example, keywords that compute thermodynamic quantites can only be invoked after the first simulation has begun. A warning is issued if thermodyanmic keywords are invoked on timesteps when thermodynamic information is not being printed to the screen, since the values assigned to the variable may be out-of-date. The variable {equal} equation can also be nested in that function arguments can be functions, vectors, keywords, or numbers. For example, this is a valid equation: variable x equal div(add(pe,ke),pow(vol,div(1,3))) :pre For the {world} style, one or more strings are specified. There must be one string for each processor partition or "world". See "this section"_Section_start.html#2_4 of the manual for information on running LAMMPS with multiple partitions via the "-partition" command-line switch. This variable command assigns one string to each world. All processors in the world are assigned the same string. The next command cannot be used with {equal}-style variables, since there is only one value per world. This style of variable is useful when you wish to run different simulations on different partitions, or when performing a parallel tempering simulation (see the "temper"_temper.html command), to assign different temperatures to different partitions. For the {universe} style, one or more strings are specified. There must be at least as many strings as there are processor partitions or "worlds". See "this page"_Section_start.html#2_4 for information on running LAMMPS with multiple partitions via the "-partition" command-line switch. This variable command initially assigns one string to each world. When a "next"_next.html command is encountered using this variable, the first processor partition to encounter it, is assigned the next available value. This continues until all the variable values are consumed. Thus, this command can be used to run 50 simulations on 8 processor partitions. The simulations will be run one after the other on whatever partition becomes available, until they are all finished. {Universe}-style variables are incremented using the files "tmp.lammps.variable" and "tmp.lammps.variable.lock" which you will see in your directory during such a LAMMPS run. If a variable command is encountered when the variable has already been defined, the command is ignored. Thss allows an input script with a variable command to be processed multiple times; see the "jump"_jump.html or "include"_include.html commands. It also means that the use of the command-line switch -var will override a corresponding variable setting in the input script. [Restrictions:] The use of atom vectors in {equal} style variables requires the atom style to use a global mapping in order to look up the vector indices. Only atom styles with molecular information create global maps. [Related commands:] "next"_next.html, "jump"_jump.html, "include"_include.html, "temper"_temper.html, "fix print"_fix_print.html, "print"_print.html [Default:] none