diff -Naur lammps-26Jan17/doc/html/.buildinfo lammps-13Feb17/doc/html/.buildinfo --- lammps-26Jan17/doc/html/.buildinfo 2017-02-13 09:02:53.956023628 -0700 +++ lammps-13Feb17/doc/html/.buildinfo 2017-02-13 09:04:31.970928908 -0700 @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 3957eed06f006ab2ed639c72a08308a2 +config: 9efbb364b2a20f39f1f4388813bb9c53 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff -Naur lammps-26Jan17/doc/html/Manual.html lammps-13Feb17/doc/html/Manual.html --- lammps-26Jan17/doc/html/Manual.html 2017-02-13 09:02:38.565567573 -0700 +++ lammps-13Feb17/doc/html/Manual.html 2017-02-13 09:04:32.001929828 -0700 @@ -148,7 +148,7 @@

LAMMPS Documentation

-

17 Feb 2017 version

+

13 Feb 2017 version

Version info:

diff -Naur lammps-26Jan17/doc/html/Section_start.html lammps-13Feb17/doc/html/Section_start.html --- lammps-26Jan17/doc/html/Section_start.html 2017-02-13 09:02:40.425622691 -0700 +++ lammps-13Feb17/doc/html/Section_start.html 2017-02-13 09:04:31.983929293 -0700 @@ -587,7 +587,7 @@ uses (for performing 1d FFTs) when running the particle-particle particle-mesh (PPPM) option for long-range Coulombics via the kspace_style command.

-

LAMMPS supports various open-source or vendor-supplied FFT libraries +

LAMMPS supports common open-source or vendor-supplied FFT libraries for this purpose. If you leave these 3 variables blank, LAMMPS will use the open-source KISS FFT library, which is included in the LAMMPS distribution. This library is portable to all @@ -596,10 +596,9 @@ package in your build, you can also leave the 3 variables blank.

Otherwise, select which kinds of FFTs to use as part of the FFT_INC setting by a switch of the form -DFFT_XXX. Recommended values for XXX -are: MKL, SCSL, FFTW2, and FFTW3. Legacy options are: INTEL, SGI, -ACML, and T3E. For backward compatability, using -DFFT_FFTW will use -the FFTW2 library. Using -DFFT_NONE will use the KISS library -described above.

+are: MKL or FFTW3. FFTW2 and NONE are supported as legacy options. +Selecting -DFFT_FFTW will use the FFTW3 library and -DFFT_NONE will +use the KISS library described above.

You may also need to set the FFT_INC, FFT_PATH, and FFT_LIB variables, so the compiler and linker can find the needed FFT header and library files. Note that on some large parallel machines which use “modules” diff -Naur lammps-26Jan17/doc/html/objects.inv lammps-13Feb17/doc/html/objects.inv --- lammps-26Jan17/doc/html/objects.inv 2017-02-13 09:02:54.214031274 -0700 +++ lammps-13Feb17/doc/html/objects.inv 2017-02-13 09:04:32.023930482 -0700 @@ -1,6 +1,6 @@ # Sphinx inventory version 2 # Project: LAMMPS -# Version: 26 Jan 2017 +# Version: 13 Feb 2017 # The remainder of this file is compressed using zlib. xڝ]Qs۸~ݹ4ٷl&M6Iw>yhXSBJv_J);H@eQ4;L.ٜ`r<*(kV$E* Rl\/NYwnلW3 $f) - - - - - -

-LAMMPS

-

-LAMMPS = Large-scale Atomic/Molecular Massively Parallel Simulator

-

-This is the documentation for the LAMMPS 2001 version, written in F90, -which has been superceded by more current versions. See the LAMMPS WWW -Site for more information. -

-LAMMPS is a classical molecular dynamics code designed for simulating -molecular and atomic systems on parallel computers using -spatial-decomposition techniques. It runs on any parallel platform that -supports F90 and the MPI message-passing library or on single-processor -workstations.

-

-LAMMPS 2001 is copyrighted code that is distributed freely as -open-source software under the GNU Public License (GPL). See the -LICENSE file or www.gnu.org for more -details. Basically the GPL allows you as a user to use, modify, or -distribute LAMMPS however you wish, so long as any software you -distribute remains under the GPL. -

-Features of LAMMPS 2001 include:

- -

-For users of LAMMPS 99, this version is written in F90 to take -advantage of dynamic memory allocation. This means the user does not -have to fiddle with parameter settings and re-compile the code so -often for different problems. This enhancment means there are new -rules for the ordering of commands in a LAMMPS input script, as well -as a few new commands to guide the memory allocator. Users should read -the beginning sections of the input_commands file for an -explanation.

-

-More details about the code can be found here, in the HTML- or text-based -documentation. The LAMMPS Web page is at www.cs.sandia.gov/~sjplimp/lammps.html -, which includes benchmark timings and a list of papers written using -LAMMPS results. They illustrate the kinds of scientific problems that -can be modeled with LAMMPS. These two papers describe the parallel -algorithms used in the code. Please cite these if you incorporate -LAMMPS results in your work. And if you send me citations for your -papers, I'll be pleased to add them to the LAMMPS WWW page. -

-

-S. J. Plimpton, R. Pollock, M. Stevens, "Particle-Mesh Ewald and -rRESPA for Parallel Molecular Dynamics Simulations", in Proc of -the Eighth SIAM Conference on Parallel Processing for Scientific -Computing, Minneapolis, MN, March 1997.

-

-S. J. Plimpton, "Fast Parallel Algorithms for Short-Range Molecular Dynamics", J Comp Phys, 117, 1-19 (1995).

-

-LAMMPS was originally developed as part of a 5-way CRADA collaboration -between 3 industrial partners (Cray Research, Bristol-Myers Squibb, and -Dupont) and 2 DoE laboratories (Sandia National Laboratories and -Lawrence Livermore National Laboratories).

-

-The primary author of LAMMPS is Steve Plimpton, but others have written -or worked on significant portions of the code:

- -

-Other CRADA partners involved in the design and testing of LAMMPS are

- -

-If you have questions about LAMMPS, please contact me: -

-
-
- Steve Plimpton -
- sjplimp@sandia.gov -
- www.cs.sandia.gov/~sjplimp -
- Sandia National Labs -
- Albuquerque, NM 87185 -
-
-

-More Information about LAMMPS

- -
  • - Basics - -
  • - how to make, run, and test LAMMPS with the example problems -
  • -
  • - Input Commands - -
  • - a complete listing of input commands used by LAMMPS -
  • -
  • - Data Format - -
  • - the data file format used by LAMMPS -
  • -
  • - Force Fields - -
  • - the equations LAMMPS uses to compute force-fields -
  • -
  • - Units - -
  • - the input/output and internal units for LAMMPS variables -
  • -
  • - History - -
  • - a brief timeline of features added to LAMMPS -
  • -
  • - Deficiencies - -
  • - features LAMMPS does not (yet) have -
  • -
  • - - diff -Naur lammps-26Jan17/doc/src/2001/basics.html lammps-13Feb17/doc/src/2001/basics.html --- lammps-26Jan17/doc/src/2001/basics.html 2016-05-09 16:05:30.630573000 -0600 +++ lammps-13Feb17/doc/src/2001/basics.html 1969-12-31 17:00:00.000000000 -0700 @@ -1,224 +0,0 @@ - - - - - - -

    -Basics of Using LAMMPS

    -

    -Return to top-level of LAMMPS documentation.

    - -
    -

    -Distribution

    -

    -When you unzip/untar the LAMMPS distribution you should have several -directories:

    - -
    -

    -Making LAMMPS

    -

    -The src directory contains the F90 and C source files for LAMMPS as -well as several sample Makefiles for different machines. To make LAMMPS -for a specfic machine, you simply type

    -

    -make machine

    -

    -from within the src directoy. E.g. "make sgi" or "make t3e". This -should create an executable such as lmp_sgi or lmp_t3e. For optimal -performance you'll want to use a good F90 compiler to make LAMMPS; on -Linux boxes I've been told the Leahy F90 compiler is a good choice. -(If you don't have an F90 compiler, I can give you an older F77-based -version of LAMMPS 99, but you'll lose the dynamic memory and some -other new features in LAMMPS 2001.)

    -

    -In the src directory, there is one top-level Makefile and several -low-level machine-specific files named Makefile.xxx where xxx = the -machine name. If a low-level Makefile exists for your platform, you do -not need to edit the top-level Makefile. However you should check the -system-specific section of the low-level Makefile to insure the -various paths are correct for your environment. If a low-level -Makefile does not exist for your platform, you will need to add a -suitable target to the top-level Makefile. You will also need to -create a new low-level Makefile using one of the existing ones as a -template. If you wish to make LAMMPS for a single-processor -workstation that doesn't have an installed MPI library, you can -specify the "serial" target which uses a directory of MPI stubs to -link against - e.g. "make serial". You will need to make the -stub library (type "make" in STUBS directory) for your -workstation before doing this.

    -

    -Note that the two-level Makefile system allows you to make LAMMPS for -multiple platforms. Each target creates its own object directory for -separate storage of its *.o files.

    -

    -There are a few compiler switches of interest which can be specified -in the low-level Makefiles. If you use a F90FLAGS switch of -DSYNC -then synchronization calls will be made before the timing routines in -integrate.f. This may slow down the code slightly, but will make the -individual timings reported at the end of a run more accurate. The -F90FLAGS setting of -DSENDRECV will use MPI_Sendrecv calls for data -exchange between processors instead of MPI_Irecv, MPI_Send, -MPI_Wait. Sendrecv is often slower, but on some platforms can be -faster, so it is worth trying, particularly if your communication -timings seem slow.

    -

    -The CCFLAGS setting in the low-level Makefiles requires a FFT setting, -for example -DFFT_SGI or -DFFT_T3E. This is for inclusion of the -appropriate machine-specific native 1-d FFT libraries on various -platforms. Currently, the supported machines and switches (used in -fft_3d.c) are FFT_SGI, FFT_DEC, FFT_INTEL, FFT_T3E, and FFT_FFTW. The -latter is a publicly available portable FFT library, FFTW, which you can install on any -machine. If none of these options is suitable for your machine, please -contact me, and we'll discuss how to add the capability to call your -machine's native FFT library. You can also use FFT_NONE if you have no -need to use the PPPM option in LAMMPS.

    -

    -For Linux and T3E compilation, there is a also a CCFLAGS setting for KLUDGE -needed (see Makefile.linux and Makefile.t3e). This is to enable F90 to -call C with appropriate underscores added to C function names. -


    -

    -Running LAMMPS

    -

    -LAMMPS is run by redirecting a text file (script) of input commands into it.

    -

    -lmp_sgi < in.lj

    -

    -lmp_t3e < in.lj

    -

    -The script file contains commands that specify the parameters for the -simulation as well as to read other necessary files such as a data file -that describes the initial atom positions, molecular topology, and -force-field parameters. The input_commands - page describes all the possible commands that can be used. The data_format page describes the format of -the data file.

    -

    -LAMMPS can be run on any number of processors, including a single -processor. In principle you should get identical answers on any number -of processors and on any machine. In practice, numerical round-off can -cause slight differences and eventual divergence of dynamical -trajectories.

    -

    -When LAMMPS runs, it estimates the array sizes it should allocate based -on the problem you are simulating and the number of processors you -are running on. If you run out of physical memory, you will get a F90 -allocation error and the code should hang or crash. The only thing you -can do about this is run on more processors or run a smaller problem. If -you get an error message to the screen about "boosting" -something, it means LAMMPS under-estimated the size needed for one (or -more) data arrays. The "extra memory" command can be used in -the input script to augment these sizes at run time. A few arrays are -hard-wired to sizes that should be sufficient for most users. These are -specified with parameter settings in the global.f file. If you get a -message to "boost" one of these parameters you will have to -change it and re-compile LAMMPS.

    -

    -Some LAMMPS errors are detected at setup; others like neighbor list -overflow may not occur until the middle of a run. Except for F90 -allocation errors which may cause the code to hang (with an error -message) since only one processor may incur the error, LAMMPS should -always print a message to the screen and exit gracefully when it -encounters a fatal error. If the code ever crashes or hangs without -spitting out an error message first, it's probably a bug, so let me -know about it. Of course this applies to algorithmic or parallelism -issues, not to physics mistakes, like specifying too big a timestep or -putting 2 atoms on top of each other! One exception is that different -MPI implementations handle buffering of messages differently. If the -code hangs without an error message, it may be that you need to -specify an MPI setting or two (usually via an environment variable) to -enable buffering or boost the sizes of messages that can be -buffered.

    -
    -

    -Examples

    -

    -There are several directories of sample problems in the examples -directory. All of them use an input file (in.*) of commands and a data -file (data.*) of initial atomic coordinates and produce one or more -output files. Sample outputs on different machines and numbers of -processors are included to compare your answers to. See the README -file in the examples sub-directory for more information on what LAMMPS -features the examples illustrate.

    -

    -(1) lj = atomic simulations of Lennard-Jones systems. -

    -(2) class2 = phenyalanine molecule using the DISCOVER cff95 class 2 -force field. -

    -(3) lc = liquid crystal molecules with various Coulombic options and -periodicity settings. -

    -(4) flow = 2d flow of Lennard-Jones atoms in a channel using various -constraint options. -

    -(5) polymer = bead-spring polymer models with one or two chain types. -

    -
    -

    -Other Tools

    -

    -The converters directory has source code and scripts for tools that -perform input/output file conversions between MSI Discover, AMBER, and -LAMMPS formats. See the README files for the individual tools for -additional information. -

    -The tools directory has several serial programs that create and -massage LAMMPS data files. -

    -(1) setup_chain.f = create a data file of polymer bead-spring chains -

    -(2) setup_lj.f = create a data file of an atomic LJ mixture of species -

    -(3) setup_flow_2d.f = create a 2d data file of LJ particles with walls for - a flow simulation -

    -(4) replicate.c = replicate or scale an existing data file into a new one -

    -(5) peek_restart.f = print-out info from a binary LAMMPS restart file -

    -(6) restart2data.f = convert a binary LAMMPS restart file into a text data file -

    -See the comments at the top of each source file for information on how -to use the tool. -


    -

    -Extending LAMMPS

    -

    -User-written routines can be compiled and linked with LAMMPS, then -invoked with the "diagnostic" command as LAMMPS runs. These routines -can be used for on-the-fly diagnostics or a variety of other purposes. -The examples/lc directory shows an example of using the diagnostic -command with the in.lc.big.fixes input script. A sample diagnostic -routine is given there also: diagnostic_temp_molecules.f. - - diff -Naur lammps-26Jan17/doc/src/2001/data_format.html lammps-13Feb17/doc/src/2001/data_format.html --- lammps-26Jan17/doc/src/2001/data_format.html 2016-05-09 16:05:30.630573000 -0600 +++ lammps-13Feb17/doc/src/2001/data_format.html 1969-12-31 17:00:00.000000000 -0700 @@ -1,250 +0,0 @@ - - - - - - -

    -LAMMPS Data Format

    -

    -Return to top-level of LAMMPS documentation

    -

    -This file describes the format of the data file read into LAMMPS with -the "read data" command. The data file contains basic -information about the size of the problem to be run, the initial atomic -coordinates, molecular topology, and (optionally) force-field -coefficients. It will be easiest to understand this file if you read it -while looking at a sample data file from the examples.

    -

    -This page has 2 sections:

    - -
    -

    -Rules for formatting the Data File:

    -

    -Blank lines are important. After the header section, new entries are -separated by blank lines.

    -

    -Indentation and space between words/numbers on one line is not -important except that keywords (e.g. Masses, Bond Coeffs) must be -left-justified and capitalized as shown.

    -

    -The header section (thru box bounds) must appear first in the file, the -remaining entries (Masses, various Coeffs, Atoms, Bonds, etc) can come -in any order.

    -

    -These entries must be in the file: header section, Masses, Atoms.

    -

    -These entries must be in the file if there are a non-zero number of -them: Bonds, Angles, Dihedrals, Impropers. Force field coefficients -can be specified in the input script, so do not have to appear in the -data file. The one exception to this is class 2 force field -coefficients which can only be specified in the data file. -

    -The Nonbond Coeffs entry contains one line for each atom type. These -are the coefficients for an interaction between 2 atoms of the same -type. The cross-type coeffs are computed by the appropriate class I or -class II mixing rules, or can be specified explicitly using the -"nonbond coeff" command in the input command script. See the force_fields page for more information.

    -

    -In the Atoms entry, the atoms can be in any order so long as there are -N entries. The 1st number on the line is the atom-tag (number from 1 to -N) which is used to identify the atom throughout the simulation. The -molecule-tag is a second identifier which is attached to the atom; it -can be 0, or a counter for the molecule the atom is part of, or any -other number you wish. The q value is the charge of the atom in -electron units (e.g. +1 for a proton). The xyz values are the initial -position of the atom. For 2-d simulations specify z as 0.0.

    -

    -The final 3 nx,ny,nz values on a line of the Atoms entry are optional. -LAMMPS only reads them if the "true flag" command is -specified in the input command script. Otherwise they are initialized -to 0 by LAMMPS. Their meaning, for each dimension, is that -"n" box-lengths are added to xyz to get the atom's -"true" un-remapped position. This can be useful in pre- or -post-processing to enable the unwrapping of long-chained molecules -which wind thru the periodic box one or more times. The value of -"n" can be positive, negative, or zero. For 2-d simulations -specify nz as 0.

    -

    -Atom velocities are initialized to 0.0 if there is no Velocities entry. -In the Velocities entry, the atoms can be in any order so long as there -are N entries. The 1st number on the line is the atom-tag (number from -1 to N) which is used to identify the atom which the given velocity -will be assigned to.

    -

    -Entries for Velocities, Bonds, Angles, Dihedrals, Impropers must appear -in the file after an Atoms entry.

    -

    -For simulations with periodic boundary conditions, xyz coords are -remapped into the periodic box (from as far away as needed), so the -initial coordinates need not be inside the box. The nx,ny,nz values -(as read in or as set to zero by LAMMPS) are appropriately adjusted by -this remapping.

    -

    -The number of coefficients specified on each line of coefficient -entries (Nonbond Coeffs, Bond Coeffs, etc) depends on the -"style" of interaction. This must be specified in the input -command script before the "read data" command is issued, unless the -default is used. See the input_commands page for a description -of the various style options. The input_commands - and force_fields pages explain the -meaning and valid values for each of the coefficients.

    -
    -

    -Sample file with Annotations

    -

    -Here is a sample file with annotations in parenthesis and lengthy -sections replaced by dots (...). Note that the blank lines are -important in this example.

    -
    -
    -LAMMPS Description           (1st line of file)
    -
    -100 atoms         (this must be the 3rd line, 1st 2 lines are ignored)
    -95 bonds                (# of bonds to be simulated)
    -50 angles               (include these lines even if number = 0)
    -30 dihedrals
    -20 impropers
    -
    -5 atom types           (# of nonbond atom types)
    -10 bond types          (# of bond types = sets of bond coefficients)
    -18 angle types         
    -20 dihedral types      (do not include a bond,angle,dihedral,improper type
    -2 improper types             line if number of bonds,angles,etc is 0)
    -
    --0.5 0.5 xlo xhi       (for periodic systems this is box size,
    --0.5 0.5 ylo yhi        for non-periodic it is min/max extent of atoms)
    --0.5 0.5 zlo zhi       (do not include this line for 2-d simulations)
    -
    -Masses
    -
    -  1 mass
    -  ...
    -  N mass                           (N = # of atom types)
    -
    -Nonbond Coeffs
    -
    -  1 coeff1 coeff2 ...
    -  ...
    -  N coeff1 coeff2 ...              (N = # of atom types)
    -
    -Bond Coeffs
    -
    -  1 coeff1 coeff2 ...
    -  ...
    -  N coeff1 coeff2 ...              (N = # of bond types)
    -
    -Angle Coeffs
    -
    -  1 coeff1 coeff2 ...
    -  ...
    -  N coeff1 coeff2 ...              (N = # of angle types)
    -
    -Dihedral Coeffs
    -
    -  1 coeff1 coeff2 ...
    -  ...
    -  N coeff1 coeff2 ...              (N = # of dihedral types)
    -
    -Improper Coeffs
    -
    -  1 coeff1 coeff2 ...
    -  ...
    -  N coeff1 coeff2 ...              (N = # of improper types)
    -
    -BondBond Coeffs
    -
    -  1 coeff1 coeff2 ...
    -  ...
    -  N coeff1 coeff2 ...              (N = # of angle types)
    -
    -BondAngle Coeffs
    -
    -  1 coeff1 coeff2 ...
    -  ...
    -  N coeff1 coeff2 ...              (N = # of angle types)
    -
    -MiddleBondTorsion Coeffs
    -
    -  1 coeff1 coeff2 ...
    -  ...
    -  N coeff1 coeff2 ...              (N = # of dihedral types)
    -
    -EndBondTorsion Coeffs
    -
    -  1 coeff1 coeff2 ...
    -  ...
    -  N coeff1 coeff2 ...              (N = # of dihedral types)
    -
    -AngleTorsion Coeffs
    -
    -  1 coeff1 coeff2 ...
    -  ...
    -  N coeff1 coeff2 ...              (N = # of dihedral types)
    -
    -AngleAngleTorsion Coeffs
    -
    -  1 coeff1 coeff2 ...
    -  ...
    -  N coeff1 coeff2 ...              (N = # of dihedral types)
    -
    -BondBond13 Coeffs
    -
    -  1 coeff1 coeff2 ...
    -  ...
    -  N coeff1 coeff2 ...              (N = # of dihedral types)
    -
    -AngleAngle Coeffs
    -
    -  1 coeff1 coeff2 ...
    -  ...
    -  N coeff1 coeff2 ...              (N = # of improper types)
    -
    -Atoms
    -
    -  1 molecule-tag atom-type q x y z nx ny nz  (nx,ny,nz are optional -
    -  ...                                    see "true flag" input command)
    -  ...                
    -  N molecule-tag atom-type q x y z nx ny nz  (N = # of atoms)
    -
    -Velocities
    -
    -  1 vx vy vz
    -  ...
    -  ...                
    -  N vx vy vz                        (N = # of atoms)
    -
    -Bonds
    -
    -  1 bond-type atom-1 atom-2
    -  ...
    -  N bond-type atom-1 atom-2         (N = # of bonds)
    -
    -Angles
    -
    -  1 angle-type atom-1 atom-2 atom-3  (atom-2 is the center atom in angle)
    -  ...
    -  N angle-type atom-1 atom-2 atom-3  (N = # of angles)
    -
    -Dihedrals
    -
    -  1 dihedral-type atom-1 atom-2 atom-3 atom-4  (atoms 2-3 form central bond)
    -  ...
    -  N dihedral-type atom-1 atom-2 atom-3 atom-4  (N = # of dihedrals)
    -
    -Impropers
    -
    -  1 improper-type atom-1 atom-2 atom-3 atom-4  (atom-2 is central atom)
    -  ...
    -  N improper-type atom-1 atom-2 atom-3 atom-4  (N = # of impropers)
    -
    - - diff -Naur lammps-26Jan17/doc/src/2001/deficiencies.html lammps-13Feb17/doc/src/2001/deficiencies.html --- lammps-26Jan17/doc/src/2001/deficiencies.html 2016-05-09 16:05:30.630573000 -0600 +++ lammps-13Feb17/doc/src/2001/deficiencies.html 1969-12-31 17:00:00.000000000 -0700 @@ -1,42 +0,0 @@ - - - - - - -

    -LAMMPS Deficiencies

    -

    -Return to top-level of LAMMPS documentation.

    -

    -This is a brief list of features lacking in the current version of -LAMMPS. Some of these deficiencies are because of lack of -time/interest; others are just hard!

    - - - diff -Naur lammps-26Jan17/doc/src/2001/force_fields.html lammps-13Feb17/doc/src/2001/force_fields.html --- lammps-26Jan17/doc/src/2001/force_fields.html 2016-05-09 16:05:30.630573000 -0600 +++ lammps-13Feb17/doc/src/2001/force_fields.html 1969-12-31 17:00:00.000000000 -0700 @@ -1,681 +0,0 @@ - - - - - - -

    -LAMMPS Force Fields

    -

    -Return to top-level of LAMMPS documentation

    -

    -This file outlines the force-field formulas used in LAMMPS. Read this -file in conjunction with the data_format - and units files.

    -

    -The sections of this page are as follows:

    - -
    -

    -Nonbond Coulomb

    -

    -Whatever Coulomb style is specified in the input command file, the -short-range Coulombic interactions are computed by this formula, -modified by an appropriate smoother for the smooth, Ewald, PPPM, -charmm, and debye styles.

    -
    -  E = C q1 q2 / (epsilon * r)
    -
    -  r = distance (computed by LAMMPS)
    -  C = hardwired constant to convert to energy units
    -  q1,q2 = charge of each atom in electron units (proton = +1),
    -    specified in "Atoms" entry in data file
    -  epsilon = dielectric constant (vacuum = 1.0),
    -    set by user in input command file
    -
    -For the debye style, the smoother is exp(-kappa*r) where kappa is an -input parameter. -
    -

    -Nonbond Lennard-Jones

    -

    -The style of nonbond potential is specified in the input command file.

    -

    -(1) lj/cutoff

    -
    -
    -  E = 4 epsilon [ (sigma/r)^12 - (sigma/r)^6 ]
    -
    -  standard Lennard Jones potential
    -
    -  r = distance (computed by LAMMPS)
    -
    -  coeff1 = epsilon (energy)
    -  coeff2 = sigma (distance)
    -
    -  2 coeffs are listed in data file or set in input script
    -  1 cutoff is set in input script
    -
    -
    -

    -(2) lj/switch

    -
    -
    -  E = 4 epsilon [ (sigma/r)^12 - (sigma/r)^6 ]  for  r < r_inner
    -    = spline fit    for  r_inner < r < cutoff
    -    = 0             for r > cutoff
    -
    -  switching function (spline fit) is applied to standard LJ
    -    within a switching region (from r_inner to cutoff) so that
    -    energy and force go smoothly to zero
    -  spline coefficients are computed by LAMMPS
    -    so that at inner cutoff (r_inner) the potential, force, 
    -    and 1st-derivative of force are all continuous, 
    -    and at outer cutoff (cutoff) the potential and force
    -    both go to zero
    -
    -  r = distance (computed by LAMMPS)
    -
    -  coeff1 = epsilon (energy)
    -  coeff2 = sigma (distance)
    -  
    -  2 coeffs are listed in data file or set in input script
    -  2 cutoffs (r_inner and cutoff) are set in input script
    -
    -
    -

    -(3) lj/shift

    -
    -
    -  E = 4 epsilon [ (sigma/(r - delta))^12 - (sigma/(r - delta))^6 ]
    -
    -  same as lj/cutoff except that r is shifted by delta
    -
    -  r = distance (computed by LAMMPS)
    -
    -  coeff1 = epsilon (energy)
    -  coeff2 = sigma (distance)
    -  coeff3 = delta (distance)
    -
    -  3 coeffs are listed in data file or set in input script
    -  1 cutoff is set in input script
    -
    -
    -

    -(4) soft

    -
    -
    -  E = A * [ 1 + cos( pi * r / cutoff ) ]
    -
    -  useful for pushing apart overlapping atoms by ramping A over time
    -
    -  r = distance (computed by LAMMPS)
    -
    -  coeff1 = prefactor A at start of run (energy)
    -  coeff2 = prefactor A at end of run (energy)
    -
    -  2 coeffs are listed in data file or set in input script
    -  1 cutoff is set in input script
    -
    -
    -

    -(5) class2/cutoff

    -
    -
    -  E = epsilon [ 2 (sigma/r)^9 - 3 (sigma/r)^6 ]
    -
    -  used with class2 bonded force field
    -
    -  r = distance (computed by LAMMPS)
    -
    -  coeff1 = epsilon (energy)
    -  coeff2 = sigma (distance)
    -
    -  2 coeffs are listed in data file or set in input script
    -  1 cutoff is set in input script
    -
    -

    -6) lj/charmm

    -
    -
    -  E = 4 epsilon [ (sigma/r)^12 - (sigma/r)^6 ]  for  r < r_inner
    -    = switch * E    for  r_inner < r < cutoff
    -    = 0             for r > cutoff
    -
    -  where 
    -
    -  switch = [(cutoff^2 - r^2)^2 * (cutoff^2 + 2*r^2 - 3*r_inner)] /
    -           [(cutoff^2 - r_inner^2)^3]
    -
    -  switching function is applied to standard LJ
    -    within a switching region (from r_inner to cutoff) so that
    -    energy and force go smoothly to zero
    -  switching function causes that at inner cutoff (r_inner)
    -    the potential and force are continuous, 
    -    and at outer cutoff (cutoff) the potential and force
    -    both go to zero
    -
    -  r = distance (computed by LAMMPS)
    -
    -  coeff1 = epsilon (energy)
    -  coeff2 = sigma (distance)
    -  coeff3 = epsilon for 1-4 interactions (energy)
    -  coeff4 = sigma for 1-4 interactions (distance)
    -  
    -  4 coeffs are listed in data file or set in input script
    -  2 cutoffs (r_inner and cutoff) are set in input script
    -
    -
    -

    -Mixing Rules for Lennard-Jones

    -

    -The coefficients for each nonbond style are input in either the data -file by the "read data" command or in the input script using -the "nonbond coeff" command. In the former case, only one set -of coefficients is input for each atom type. The cross-type coeffs are -computed using one of three possible mixing rules:

    -
    -
    - geometric:  epsilon_ij = sqrt(epsilon_i * epsilon_j)
    -             sigma_ij = sqrt(sigma_i * sigma_j)
    -
    - arithmetic: epsilon_ij = sqrt(epsilon_i * epsilon_j)
    -             sigma_ij = (sigma_i + sigma_j) / 2
    -
    - sixthpower: epsilon_ij =
    -               (2 * sqrt(epsilon_i*epsilon_j) * sigma_i^3 * sigma_j^3) /
    -               (sigma_i^6 + sigma_j^6)
    -             sigma_ij=  ((sigma_i**6 + sigma_j**6) / 2) ^ (1/6)
    -
    -
    -

    -The default mixing rule for nonbond styles lj/cutoff, lj/switch, -lj/shift, and soft is "geometric". The default for nonbond -style class2/cutoff is "sixthpower".

    -

    -The default can be overridden using the "mixing style" -command. Two exceptions to this are for the nonbond style soft, for -which only an epsilon prefactor is input. This is always mixed -geometrically. Also, for nonbond style lj/shift, the delta -coefficient is always mixed using the rule

    - -
    -

    -Bonds

    -

    -The style of bond potential is specified in the input command file.

    -

    -(1) harmonic

    -
    -
    -  E = K (r - r0)^2
    -
    -  standard harmonic spring
    -
    -  r = distance (computed by LAMMPS)
    -
    -  coeff1 = K (energy/distance^2)  (the usual 1/2 is included in the K)
    -  coeff2 = r0 (distance)
    -
    -  2 coeffs are listed in data file or set in input script
    -
    -
    -

    -(2) FENE/standard

    -
    -
    -  E = -0.5 K R0^2 * ln[1 - (r/R0)^2] +
    -    4 epsilon [(sigma/r)^12 - (sigma/r)^6] + epsilon
    -
    -  finite extensible nonlinear elastic (FENE) potential for
    -    polymer bead-spring models
    -  see Kremer, Grest, J Chem Phys, 92, p 5057 (1990)
    -
    -  r = distance (computed by LAMMPS)
    -
    -  coeff1 = K (energy/distance^2)
    -  coeff2 = R0 (distance)
    -  coeff3 = epsilon (energy)
    -  coeff4 = sigma (distance)
    -
    -  1st term is attraction, 2nd term is repulsion (shifted LJ)
    -  1st term extends to R0
    -  2nd term only extends to the minimum of the LJ potential,
    -    a cutoff distance computed by LAMMPS (2^(1/6) * sigma)
    -
    -  4 coeffs are listed in data file or set in input script
    -
    -
    -

    -(3) FENE/shift

    -
    -
    -  E = -0.5 K R0^2 * ln[1 - ((r - delta)/R0)^2] +
    -    4 epsilon [(sigma/(r - delta))^12 - (sigma/(r - delta))^6] + epsilon
    -
    -  same as FENE/standard expect that r is shifted by delta
    -
    -  r = distance (computed by LAMMPS)
    -
    -  coeff1 = K (energy/distance^2)
    -  coeff2 = R0 (distance)
    -  coeff3 = epsilon (energy)
    -  coeff4 = sigma (distance)
    -  coeff5 = delta (distance)
    -
    -  1st term is attraction, 2nd term is repulsion (shifted LJ)
    -  1st term extends to R0
    -  2nd term only extends to the minimum of the LJ potential,
    -    a cutoff distance computed by LAMMPS (2^(1/6) * sigma + delta)
    -
    -  5 coeffs are listed in data file or set in input script
    -
    -
    -

    -(4) nonlinear

    -
    -
    -  E = epsilon (r - r0)^2 / [ lamda^2 - (r - r0)^2 ]
    -
    -  non-harmonic spring of equilibrium length r0
    -    with finite extension of lamda
    -  see Rector, Van Swol, Henderson, Molecular Physics, 82, p 1009 (1994)
    -
    -  r = distance (computed by LAMMPS)
    -
    -  coeff1 = epsilon (energy)
    -  coeff2 = r0 (distance)
    -  coeff3 = lamda (distance)
    -
    -  3 coeffs are listed in data file or set in input script
    -
    -
    -

    -(5) class2

    -
    -
    -  E = K2 (r - r0)^2  +  K3 (r - r0)^3  +  K4 (r - r0)^4
    -
    -  r = distance (computed by LAMMPS)
    -
    -  coeff1 = r0 (distance)
    -  coeff2 = K2 (energy/distance^2)
    -  coeff3 = K3 (energy/distance^3)
    -  coeff4 = K4 (energy/distance^4)
    -
    -  4 coeffs are listed in data file - cannot be set in input script
    -
    -
    -

    -Angles

    -

    -The style of angle potential is specified in the input command file.

    -

    -(1) harmonic

    -
    -
    -  E = K (theta - theta0)^2
    -
    -  theta = radians (computed by LAMMPS)
    -
    -  coeff1 = K (energy/radian^2) (the usual 1/2 is included in the K)
    -  coeff2 = theta0 (degrees) (converted to radians within LAMMPS)
    -
    -  2 coeffs are listed in data file or set in input script
    -
    -
    -

    -(2) class2

    -
    -
    -  E = K2 (theta - theta0)^2 +  K3 (theta - theta0)^3 + 
    -       K4 (theta - theta0)^4
    -
    -  theta = radians (computed by LAMMPS)
    -
    -  coeff1 = theta0 (degrees) (converted to radians within LAMMPS)
    -  coeff2 = K2 (energy/radian^2)
    -  coeff3 = K3 (energy/radian^3)
    -  coeff4 = K4 (energy/radian^4)
    -
    -  4 coeffs are listed in data file - cannot be set in input script
    -
    -
    -

    -(3) charmm

    -
    -  (harmonic + Urey-Bradley)
    -
    -  E = K (theta - theta0)^2 + K_UB (r_13 - r_UB)^2
    -
    -  theta = radians (computed by LAMMPS)
    -  r_13 = distance (computed by LAMMPS)
    -
    -  coeff1 = K (energy/radian^2) (the usual 1/2 is included in the K)
    -  coeff2 = theta0 (degrees) (converted to radians within LAMMPS)
    -  coeff3 = K_UB (energy/distance^2)
    -  coeff4 = r_UB (distance)
    -
    -  4 coeffs are listed in data file or set in input script
    -
    -
    -

    -(4) cosine

    -
    -  E = K (1 + cos(theta))
    -
    -  theta = radians (computed by LAMMPS)
    -
    -  coeff1 = K (energy)
    -
    -  1 coeff is listed in data file or set in input script
    -
    -
    -

    -Dihedrals

    -

    -The style of dihedral potential is specified in the input command -file. IMPORTANT NOTE for all these dihedral styles: in the LAMMPS -force field the trans position = 180 degrees, while in some force -fields trans = 0 degrees.

    - -

    -(1) harmonic

    -
    -
    -  E = K [1 + d * cos (n*phi) ]
    -
    -  phi = radians (computed by LAMMPS)
    -
    -  coeff1 = K (energy)
    -  coeff2 = d (+1 or -1)
    -  coeff3 = n (1,2,3,4,6)
    -
    -  Additional cautions when comparing to other force fields:
    -
    -  some force fields reverse the sign convention on d so that
    -    E = K [1 - d * cos(n*phi)]
    -  some force fields divide/multiply K by the number of multiple
    -    torsions that contain the j-k bond in an i-j-k-l torsion
    -  some force fields let n be positive or negative which 
    -    corresponds to d = 1,-1
    - 
    -  3 coeffs are listed in data file or set in input script
    -
    -

    -(2) class2

    -
    -
    -  E = SUM(n=1,3) { K_n [ 1 - cos( n*Phi - Phi0_n ) ] }
    -
    -  phi = radians (computed by LAMMPS)
    -
    -  coeff1 = K_1 (energy)
    -  coeff2 = Phi0_1 (degrees) (converted to radians within LAMMPS)
    -  coeff3 = K_2 (energy)
    -  coeff4 = Phi0_2 (degrees) (converted to radians within LAMMPS)
    -  coeff5 = K_3 (energy)
    -  coeff6 = Phi0_3 (degrees) (converted to radians within LAMMPS)
    -
    -  6 coeffs are listed in data file - cannot be set in input script
    -
    -

    -(3) multiharmonic

    -
    -
    -  E = SUM(n=1,5) { A_n * cos(Phi)^(n-1) }
    -
    -  phi = radians (computed by LAMMPS)
    -
    -  coeff1 = A_1
    -  coeff2 = A_2
    -  coeff3 = A_3
    -  coeff4 = A_4
    -  coeff5 = A_5
    -
    -  5 coeffs are listed in data file or set in input script
    -
    -

    -(4) charmm

    -
    -(harmonic + 1-4 interactions)
    -
    -  E = K [1 + cos (n*phi + d) ]
    -
    -  phi = radians (computed by LAMMPS)
    -
    -  coeff1 = K (energy)
    -  coeff2 = n (1,2,3,4,6)
    -  coeff3 = d (0 or 180 degrees) (converted to radians within LAMMPS)
    -  coeff4 = weighting factor to turn on/off 1-4 neighbor nonbond interactions 
    -
    -  coeff4 weight values are from 0.0 to 1.0 and are used to multiply the
    -  energy and force interaction (both Coulombic and LJ) between the 2 atoms
    -  weight of 0.0 means no interaction
    -  weight of 1.0 means full interaction
    -
    -  must be used with the special bonds charmm command 
    -  "special bonds 0 0 0") which shuts off the uniform special bonds and
    -  allows pair-specific special bonds for the 1-4 interactions to be
    -  defined in the data file
    -
    -  LAMMPS assumes that all 1-4 interaction distances, which are
    -  generally less than 6 Angstroms, are less than the smallest of the
    -  inner LJ and Coulombic cutoffs, which are generally at least 8
    -  Angstroms.
    - 
    -  4 coeffs are listed in data file or set in input script
    -
    -
    -

    -Impropers

    -

    -The style of improper potential is specified in the input command file.

    -

    -(1) harmonic

    -
    -
    -  E = K (chi - chi0)^2
    -
    -  chi = radians (computed by LAMMPS)
    -
    -  coeff1 = K (energy/radian^2) (the usual 1/2 is included in the K)
    -  coeff2 = chi0 (degrees) (converted to radians within LAMMPS)
    -
    -  2 coeffs are listed in data file or set in input script
    -
    -

    -(2) cvff

    -
    -
    -  E = K [1 + d * cos (n*chi) ]
    -
    -  chi = radians (computed by LAMMPS)
    -
    -  coeff1 = K (energy)
    -  coeff2 = d (+1 or -1)
    -  coeff3 = n (0,1,2,3,4,6)
    -
    -  3 coeffs are listed in data file or set in input script
    -
    -

    -(3) class2

    -
    -
    -  same formula, coeffs, and meaning as "harmonic" except that LAMMPS
    -    averages all 3 angle-contributions to chi
    -  in class 2 this is called a Wilson out-of-plane interaction
    -
    -  2 coeffs are listed in data file - cannot be set in input script
    -
    -
    -

    -Class 2 Force Field

    -

    -If class 2 force fields are selected in the input command file, -additional cross terms are computed as part of the force field. All -class 2 coefficients must be set in the data file; they cannot be set -in the input script.

    -

    -Bond-Bond (computed within class 2 angles)

    -
    -
    -  E = K (r - r0) * (r' - r0')
    -
    -  r,r' = distance (computed by LAMMPS)
    -
    -  coeff1 = K (energy/distance^2)
    -  coeff2 = r0 (distance)
    -  coeff3 = r0' (distance)
    -
    -  3 coeffs are input in data file
    -
    -

    -Bond-Angle (computed within class 2 angles for each of 2 bonds)

    -
    -
    -  E = K_n (r - r0_n) * (theta - theta0)
    -
    -  r = distance (computed by LAMMPS)
    -  theta = radians (computed by LAMMPS)
    -
    -  coeff1 = K_1 (energy/distance-radians)
    -  coeff2 = K_2 (energy/distance-radians)
    -  coeff3 = r0_1 (distance)
    -  coeff4 = r0_2 (distance)
    -
    -  Note: theta0 is known from angle coeffs so don't need it specified here
    -
    -  4 coeffs are listed in data file
    -
    -

    -Middle-Bond-Torsion (computed within class 2 dihedral)

    -
    -
    -  E = (r - r0) * [ F1*cos(phi) + F2*cos(2*phi) + F3*cos(3*phi) ]
    -
    -  r = distance (computed by LAMMPS)
    -  phi = radians (computed by LAMMPS)
    -
    -  coeff1 = F1 (energy/distance)
    -  coeff2 = F2 (energy/distance)
    -  coeff3 = F3 (energy/distance)
    -  coeff4 = r0 (distance)
    -
    -  4 coeffs are listed in data file
    -
    -

    -End-Bond-Torsion (computed within class 2 dihedral for each of 2 bonds)

    -
    -
    -  E = (r - r0_n) * [ F1_n*cos(phi) + F2_n*cos(2*phi) + F3_n*cos(3*phi) ]
    -
    -  r = distance (computed by LAMMPS)
    -  phi = radians (computed by LAMMPS)
    -
    -  coeff1 = F1_1 (energy/distance)
    -  coeff2 = F2_1 (energy/distance)
    -  coeff3 = F3_1 (energy/distance)
    -  coeff4 = F1_2 (energy/distance)
    -  coeff5 = F2_3 (energy/distance)
    -  coeff6 = F3_3 (energy/distance)
    -  coeff7 = r0_1 (distance)
    -  coeff8 = r0_2 (distance)
    -
    -  8 coeffs are listed in data file
    -
    -

    -Angle-Torsion (computed within class 2 dihedral for each of 2 angles)

    -
    -
    -  E = (theta - theta0) * [ F1_n*cos(phi) + F2_n*cos(2*phi) + F3_n*cos(3*phi) ]
    -
    -  theta = radians (computed by LAMMPS)
    -  phi = radians (computed by LAMMPS)
    -
    -  coeff1 = F1_1 (energy/radians)
    -  coeff2 = F2_1 (energy/radians)
    -  coeff3 = F3_1 (energy/radians)
    -  coeff4 = F1_2 (energy/radians)
    -  coeff5 = F2_3 (energy/radians)
    -  coeff6 = F3_3 (energy/radians)
    -  coeff7 = theta0_1 (degrees) (converted to radians within LAMMPS)
    -  coeff8 = theta0_2 (degrees) (converted to radians within LAMMPS)
    -
    -  8 coeffs are listed in data file
    -
    -

    -Angle-Angle-Torsion (computed within class 2 dihedral)

    -
    -
    -  E = K (theta - theta0) * (theta' - theta0') * (phi - phi0)
    -
    -  theta,theta' = radians (computed by LAMMPS)
    -  phi = radians (computed by LAMMPS)
    -
    -  coeff1 = K (energy/radians^3)
    -  coeff2 = theta0 (degrees) (converted to radians within LAMMPS)
    -  coeff3 = theta0' (degrees) (converted to radians within LAMMPS)
    -
    -  Note: phi0 is known from dihedral coeffs so don't need it specified here
    -
    -  3 coeffs are listed in data file
    -
    -
    -

    -Bond-Bond-13-Torsion (computed within class 2 dihedral)

    -
    -
    -  E = K * (r1 - r10)*(r3 - r30)
    -
    -  r1,r3 = bond lengths of bonds 1 and 3 (computed by LAMMPS)
    -
    -  coeff1 = K (energy/distance^2)
    -  coeff2 = r10 (distance) = equilibrium bond length for bond 1
    -  coeff3 = r30 (distance) = equilibrium bond length for bond 3
    -
    -  K is only non-zero for aromatic rings 
    -
    -  3 coeffs are listed in data file
    -
    -
    -

    -Angle-Angle (computed within class 2 improper for each of 3 pairs of -angles)

    -
    -
    -  E = K_n (theta - theta0_n) * (theta' - theta0_n')
    -
    -  theta,theta' = radians (computed by LAMMPS)
    -
    -  coeff1 = K_1 (energy/radians^2)
    -  coeff2 = K_2 (energy/radians^2)
    -  coeff3 = K_3 (energy/radians^2)
    -  coeff4 = theta0_1 (degrees) (converted to radians within LAMMPS)
    -  coeff5 = theta0_2 (degrees) (converted to radians within LAMMPS)
    -  coeff6 = theta0_3 (degrees) (converted to radians within LAMMPS)
    -
    -  6 coeffs are listed in data file
    -
    - - diff -Naur lammps-26Jan17/doc/src/2001/history.html lammps-13Feb17/doc/src/2001/history.html --- lammps-26Jan17/doc/src/2001/history.html 2016-05-09 16:05:30.630573000 -0600 +++ lammps-13Feb17/doc/src/2001/history.html 1969-12-31 17:00:00.000000000 -0700 @@ -1,205 +0,0 @@ - - - - - - -

    -History of LAMMPS

    -

    -Return to top-level of LAMMPS documentation.

    -

    -This is a brief history of features added to each version of LAMMPS.

    -
    -

    -LAMMPS 2001 - November 2001

    - -
    -

    -LAMMPS 99 - June 99

    - -
    -

    -Version 5.0 - Oct 1997

    - -
    -

    -Version 4.0 - March 1997

    - -
    -

    -Version 3.0 - March 1996

    - -
    -

    -Version 2.0 - October 1995

    - -
    -

    -Version 1.1 - February 1995

    - -
    -

    -Version 1.0 - January 1995

    - - - diff -Naur lammps-26Jan17/doc/src/2001/input_commands.html lammps-13Feb17/doc/src/2001/input_commands.html --- lammps-26Jan17/doc/src/2001/input_commands.html 2016-05-09 16:05:30.630573000 -0600 +++ lammps-13Feb17/doc/src/2001/input_commands.html 1969-12-31 17:00:00.000000000 -0700 @@ -1,2138 +0,0 @@ - - - - - - -

    -LAMMPS Input Commands

    -

    -Return to top-level of LAMMPS documentation.

    -

    -This page contains a complete list of valid LAMMPS commands which are -read-in from an input script. It will be easiest to understand if you -read it while looking at sample input scripts in the examples -directory.

    -

    -The script of input commands is read by LAMMPS, one line at a time. -Each command causes LAMMPS to take some action. Usually it simply -causes some internal variable(s) to be set. Or it may cause a data file -to be read in or a simulation to be run. Note that most commands have -default settings, which means you only need use a particular command if -you do not want the default setting.

    -

    -Each LAMMPS input script contains exactly one "read data" (or -"read restart") command which defines the problem to be -simulated. All other commands can be split into three categories: (a) -commands that (if used) must appear before the "read data" -command because they define settings needed to correctly read-in the -problem and allocate memory for it, (b) commands that must appear after -the "read data" command because they act on the specified -problem, and (c) commands that can appear either before or after the -"read data" command. Commands in category (c) are used before -the "read data" command if a default setting needs to be -changed before the problem description is read-in. They can be used -after the "read data" command if the user wishes to change a -setting before the next "run" or "minimize" command -is used. Other than these restrictions, commands can generally appear -in any order in the input script, although some commands require others -to have been previously specified.

    -

    -Each LAMMPS input script also contains one or more "run" or -"minimize" commands. These trigger an actual dynamics or -minimization computation to be done. Following a run, new commands from -categories (b) and (c) can be used to change various settings, and -additional "run" commands can then be used to continue the -previous simulation. LAMMPS continues to read successive lines from the -input script until the end-of-file is reached, which causes LAMMPS to -terminate.

    -

    -This page gives examples of each command, some of which can be -specified in multiple styles. Typically the commands take one or more -parameters. The keyword for each command should begin in the leftmost -column and all characters in the command and its parameters should be -in lower-case (except the word NULL or characters in filenames). -Parameters can be separated by arbitrary numbers of spaces and/or tabs, -so long as the command fits on one line. The remainder of the line -after the last parameter is ignored.

    -

    -The next section outlines the structure of a LAMMPS input script. The -final section gives a detailed description of the commands in -alphabetic order, each with its associated parameters and default -settings.

    - -
    -

    -Structure of a LAMMPS input script

    -

    -Any line starting with a # is a comment. -Comments can appear anywhere in the input script.

    -

    -(1) Initialization settings (must appear -before "read data" or "read restart")

    -

    -(2) Optional Settings (can appear before -and/or after "read data" or "read restart")

    -

    -(3) Read in a Problem via a "read data" or "read restart" command

    -

    -(4) Optional Settings (same as (2))

    -

    -(5) Problem Settings (must appear after "read data" or -"read restart")

    - -

    -(6) Perform a Simulation via a "run" or "minimize" command

    -

    -Repeat (4), (5), and (6) as desired ...

    -
    -

    -Initialization Settings

    -

    -(if used, must appear before "read data" or "read -restart" command)

    -
    -units                  real
    -
    -extra memory           2.0 1.5 2.0 2.5
    -dimension              3
    -processor grid         10 10 10
    -periodicity            0 0 0
    -slab volume            3.0
    -newton flag            3
    -true flag              0
    -maximum cutoff         10.0
    -mixing style           geometric
    -restart version        5
    -
    -
    -

    -Optional Settings

    -

    -(if used, can appear before and/or after "read data" or -"read restart" command)

    -
    -neighbor               2.0 1 1 10 1
    -
    -nonbond style          none
    -nonbond style          lj/cutoff 10.0 0
    -nonbond style          lj/smooth 8.0 10.0
    -nonbond style          lj/shift 10.0 0
    -nonbond style          soft 2.5
    -nonbond style          class2/cutoff 10.0 0
    -nonbond style          lj/charmm 15.0 15.1
    -
    -coulomb style          none
    -coulomb style          cutoff 10.0
    -coulomb style          smooth 8.0 10.0
    -coulomb style          ewald 10.0 1.0E-4
    -coulomb style          pppm 10.0 1.0E-4
    -coulomb style          charmm/switch 15.0 15.1
    -coulomb style          debye 10.0 0.5
    -
    -bond style             none
    -bond style             harmonic
    -bond style             fene/standard
    -bond style             fene/shift
    -bond style             nonlinear
    -bond style             class2
    -
    -angle style            none
    -angle style            harmonic
    -angle style            class2
    -angle style            charmm
    -angle style            cosine
    -
    -dihedral style         none
    -dihedral style         harmonic
    -dihedral style         mutliharmonic
    -dihedral style         class2
    -dihedral style         charmm
    -
    -improper style         none
    -improper style         harmonic
    -improper style         cvff
    -improper style         class2
    -
    -
    -

    -Read in a Problem

    -
    -read data              data.lj
    -read restart           restart.100000
    -
    -
    -

    -Velocity Creation

    -

    -(if used, must appear after "read data" or "read -restart" command)

    -
    -create group           types 1 3
    -create group           molecules 200 300
    -create group           region 0.0 1.0 0.0 1.0 INF 1.0
    -create group           remainder
    -
    -rotation zero          1
    -
    -create temp            uniform 300.0 12345678
    -create temp            gaussian 300.0 12345678
    -create temp            velocity 0.0 0.0 0.0
    -
    -
    -

    -Force Field Parameters

    -

    -(if used, must appear after "read data" or "read -restart" command)

    -
    -nonbond coeff          1 2 1.0 3.45 10.0         (nonbond style lj/cutoff)
    -nonbond coeff          1 2 1.0 3.45 8.0 10.0     (nonbond style lj/smooth)
    -nonbond coeff          1 2 1.0 3.45 2.0 10.0     (nonbond style lj/shift)
    -nonbond coeff          1 2 1.0 30.0 2.5          (nonbond style soft)
    -nonbond coeff          1 2 1.0 3.45 10.0         (nonbond style class2/cutoff)
    -nonbond coeff          1 2 1.0 3.45 1.0 3.45     (nonbond style lj/charmm)
    -
    -special bonds          amber
    -special bonds          0.0 0.0 0.5
    -
    -pppm mesh              32 32 64
    -pppm order             5
    -dielectric             1.0
    -
    -bond coeff             1 100.0 3.45              (bond style harmonic)
    -bond coeff             1 30.0 1.5 1.0 1.0        (bond style fene/standard )
    -bond coeff             1 30.0 1.5 1.0 1.0 0.2    (bond style fene/shift)
    -bond coeff             1 28.0 0.748308 0.166667  (bond style nonlinear)
    -angle coeff            1 30.0 108.0              (angle style harmonic)
    -angle coeff            1 30.0 108.0 30.0 2.5     (angle style charmm)
    -angle coeff            1 30.0                    (angle style cosine)
    -dihedral coeff         1 10.0 1 3                (dihedral style harmonic)
    -dihedral coeff         1 2.0 2.0 2.0 2.0 2.0     (dihedral style multiharmonic)
    -dihedral coeff         1 2.0 5 180.0 0.5         (dihedral style charmm)
    -improper coeff         1 20.0 0.0                (improper style harmonic)
    -improper coeff         1 20.0 10.0               (improper style cvff)
    -
    -
    -

    -Constraints

    -

    -(if used, must appear after "read data" or "read -restart" command)

    -
    -fix style              none
    -fix style              1 setforce 0.0 NULL 0.0
    -fix style              1 addforce 1.0 0.0 0.0
    -fix style              1 aveforce 1.0 0.0 0.0
    -fix style              1 rescale 300.0 300.0 100 20.0 0.5
    -fix style              1 hoover/drag 50.0 50.0 0.001
    -fix style              1 langevin 50.0 50.0 0.01 12345 1 1 1
    -fix style              1 springforce 10.0 NULL NULL 1.0
    -fix style              1 dragforce 10.0 -5.0 NULL 2.0 1.0
    -fix style              1 shake 3 0.001 100
    -
    -assign fix             1 atom 200
    -assign fix             1 molecule 50
    -assign fix             1 type 2
    -assign fix             1 region 0.0 1.0 INF INF 0.0 1.0
    -assign fix             1 bondtype 4
    -assign fix             1 angletype 18 10
    -assign fix             1 remainder
    -
    -
    -

    -Ensemble Control

    -

    -(if used, must appear after "read data" or "read -restart" command)

    -
    -temp control           none
    -temp control           rescale 300.0 300.0 100 20.0 0.5
    -temp control           replace 300.0 300.0 50 12345678
    -temp control           langevin 50.0 50.0 0.01 123456
    -temp control           nose/hoover 300.0 300.0 0.01
    -
    -press control          none
    -press control          nose/hoover xyz 0.0 0.0 0.001
    -press control          nose/hoover xz 0.0 10.0 5.0 5.0 0.0 10.0 0.001
    -press control          nose/hoover yz NULL NULL 5.0 5.0 0.0 10.0 0.001
    -press control          nose/hoover aniso 0.0 0.0 0.0 0.0 1.0 10.0 0.001
    -press control          nose/hoover aniso 0.0 0.0 0.0 0.0 NULL NULL 0.001
    -
    -volume control         none
    -volume control         linear x 0.0 10.0
    -volume control         linear y -1.0 15.0
    -volume control         linear z -10.0 10.0
    -
    -
    -

    -Output Control

    -

    -(if used, must appear after "read data" or "read -restart" command)

    -
    -thermo flag            50
    -thermo style           0
    -
    -dump atoms             100 filename
    -dump velocities        100 filename
    -dump forces            100 filename
    -
    -restart                1000 1 filename
    -restart                1000 2 file1 file2
    -diagnostic             diffusion 100 filename 3 1.0 -1.0 2.5
    -
    -
    -

    -Integrator Settings

    -

    -(if used, must appear after "read data" or "read -restart" command)

    -
    -timestep               1.0
    -respa                  2 2 4
    -reset timestep         0
    -
    -
    -

    -Minimizer Settings

    -

    -(if used, must appear after "read data" or "read -restart" command)

    -
    -min style              hftn
    -min flag               10
    -
    -
    -

    -Perform a Simulation

    -
    -run                    10000
    -minimize               0.0001 9999 50000
    -
    -
    -
    -

    -Alphabetic Listing of Commands:

    -
    -

    -angle coeff

    - -
    -coeffs:   harmonic
    -               (1) K (energy units)
    -               (2) theta (degrees)
    -          class2
    -               currently not enabled for "angle coeff" command
    -               must be specified in data file (see "read data" command)
    -          charmm
    -               (1) K (energy units)
    -               (2) theta (degrees)
    -               (3) K_UB (energy/distance^2)
    -               (4) r_UB (distance)
    -          cosine
    -               (1) K (energy units)
    -
    -define (or override) angle coefficients for an individual angle type
    -use appropriate number of coeffs for a particular style
    -see force_fields.html for meaning of coefficients for each style
    -these coefficients can also be set in data file 
    -  by a "Angle Coeffs" entry, the most recently defined 
    -  coefficients are used
    -cannot use this command before a "read data" or "read restart" is performed,
    -  because memory is not yet allocated for the necessary arrays
    -
    -
    -

    -angle style

    - -
    -define style of angle interactions to use for all 3-body terms
    -must be used before the "read data" command (if not using the
    -  default) to tell the program how to read the "Angle Coeffs" entry
    -  in the data file
    -can be used after the "read data" command to change the style to none
    -coefficients for all angle types must be defined in the data (or restart)
    -  file by a "Angle Coeffs" entry or by "angle coeff"
    -  commands before a run is performed
    -
    -Default = harmonic
    -
    -
    -

    -assign fix

    - -
    -styles:
    -
    - -
    -coeffs:  atom
    -               (1) global atom #
    -         molecule
    -               (1) molecule #
    -         type
    -               (1) atom type
    -         region
    -               (1) lower x bound of region
    -               (2) upper x bound of region
    -               (3) lower y bound of region
    -               (4) upper y bound of region
    -               (5) lower z bound of region
    -               (6) upper z bound of region
    -         bondtype
    -               (1) bond type
    -         angletype
    -               (1) angle type
    -               (2) bond type used within that angle
    -         remainder
    -               no other parameters required
    -
    -assign a group of atoms or a bond type to a particular constraint
    -use appropriate number of coeffs for a particular style
    -the constraint itself must first be defined by a 
    -  "fix style" command
    -multiple groups of atoms or bond types can be assigned to the same constraint
    -the bondtype option can only be assigned to a "fix style" of "shake",
    -  multiple bondtypes can be SHAKEn, so long as the size of clusters of
    -  atoms does not exceed the limit described in the "fix style" command
    -the angletype option can only be assigned to a "fix style" of "shake",
    -  only a single angletype can be SHAKEn, it is designed to be used
    -  in conjunction with "fix style bondtype" to make clusters of size 3
    -  entirely rigid (e.g. water)
    -the angletype option enables an additional check when SHAKE constraints
    -  are computed: if a cluster is of size 3 and both bonds in
    -  the cluster are of a bondtype specified by the 2nd paramter of
    -  angletype, then the cluster is SHAKEn with an additional angle
    -  constraint that makes it rigid, using the equilibrium angle appropriate
    -  to the specified angletype
    -IMPORTANT NOTE: the angletype option has one additional affect, namely
    -  that no angle forces for any angle of type angletype are computed
    -  (since it is assumed those angles will be frozen by being SHAKEn), thus
    -  it will likely cause unintended behavior if the bonds in some atom pairs
    -  within angles of type angletype do not have the appropriate bondtype,
    -  since they will not be SHAKEn but neither will the angle force by computed
    -for style region, a coeff of INF means + or - infinity (all the way 
    -  to the boundary)
    -an atom can be assigned to multiple constraints, the contraints will be
    -  applied in the reverse order they are assigned to that atom
    -  (e.g. each timestep, the last fix assigned to an atom will be applied 
    -  to it first, then the next-to-last applied second, etc)
    -
    -
    -
    -

    -bond coeff

    - -
    -coeffs:   harmonic
    -               (1) K (energy units)
    -               (2) r0 (distance units)
    -          fene/standard
    -               (1) k for FENE portion (energy/distance^2 units)
    -               (2) r0 for FENE portion (distance units)
    -               (3) epsilon for LJ portion (energy units)
    -               (4) sigma for LJ portion (distance units)
    -          fene/shift
    -               (1) k for FENE (energy/distance^2 units)
    -               (2) r0 for FENE after shift is performed (distance units)
    -               (3) epsilon for LJ (energy units)
    -               (4) sigma for LJ after shift is performed (distance units)
    -               (5) delta shift distance (distance units)
    -          nonlinear
    -               (1) epsilon (energy units)
    -               (2) r0 (distance units)
    -               (3) lamda (distance units)
    -          class2
    -               currently not enabled for "bond coeff" command
    -               must be specified in data file (see "read data" command)
    -
    -define (or override) bond coefficients for an individual bond type
    -use appropriate number of coeffs for a particular style
    -see force_fields.html for meaning of coefficients for each style
    -these coefficients can also be set in data file 
    -  by a "Bond Coeffs" entry, the most recently defined 
    -  coefficients are used
    -cannot use this command before a "read data" or "read restart" is performed,
    -  because memory is not yet allocated for the necessary arrays
    -
    -
    -

    -bond style

    - -
    -define style of bond interactions to use between all bonded atoms
    -must be used before the "read data" command (if not using the
    -  default) to tell the program how to read the "Bond
    -  Coeffs" entry in the data file (if one exists)
    -can be used after the "read data" command to change the style,
    -  in this case "bond coeff" commands must also be used to set new
    -  coefficients for each bond type (unless the new style is "none")
    -coefficients for all bond types must be defined in the data (or restart)
    -  file by a "Bond Coeffs" entry or by "bond coeff"
    -  commands before a run is performed
    -
    -Default = harmonic
    -
    -
    -

    -comments

    -
    -blank lines are ignored
    -lines starting with a # are echoed into the log file
    -for commands, everything on a line after the last parameter is ignored
    -
    -
    -

    -coulomb style

    - -
    -styles:
    -
    - -
    -coeffs:  none
    -               no other parameters required
    -         cutoff
    -               (1) cutoff distance (distance units)
    -         smooth
    -               (1) inner cutoff (distance units)
    -               (2) outer cutoff (distance units)
    -         ewald
    -               (1) cutoff distance for near-field portion (distance units)
    -               (2) accuracy criterion
    -         pppm
    -               (1) cutoff distance for near-field portion (distance units)
    -               (2) accuracy criterion
    -         charmm/switch
    -               (1) inner cutoff (distance units)
    -               (2) outer cutoff (distance units)
    -         debye
    -               (1) cutoff distance (distance units)
    -               (2) kappa (inverse distance units)
    -
    -use appropriate number of coeffs for a particular style
    -normally this command should be used before "read data" or "read restart"
    -  (if simulating a charged system) to tell LAMMPS how big a force cutoff
    -  is being used, the "maximum cutoff" command can also serve this
    -  purpose
    -restart files do not store "coulomb style" choice or cutoff, so
    -  this should be specified in the input script when running from a restart
    -  file
    -this command can also be used after "read data" or "read restart" to
    -  change the style of Coulomb interactions or the cutoff
    -if simulated system has no charges, should set "coulomb style none" to
    -  prevent LAMMPS from doing useless nonbond work, LAMMPS will set
    -  this for you and issue a warning
    -cutoff distance can be smaller or larger than simulation box dimensions
    -accuracy criterion means "one part in value" - e.g. 1.0E-4
    -Ewald and PPPM accuracy criterion are used in conjunction with cutoff
    -  to partition work between short-range and long-range routines
    -accuracy criterion effectively determines how many k-space vectors are used
    -  to approximate the energy and forces
    -for PPPM, accuracy criterion determines mesh spacing (see "particle mesh"
    -  command)
    -3-d periodic boundary conditions are normally used in conjunction with
    -  Ewald and PPPM, see "slab volume" command for 2-d Ewald/PPPM
    -cannot use any Coulomb styles other than none with nonbond style = lj/shift or
    -  nonbond style = soft
    -Coulomb style = smooth should be used with nonbond style = lj/smooth,
    -  and both should use same inner and outer cutoffs
    -nonbond style = lj/charmm should be used with coulomb style = charmm/switch
    -for smooth and charmm/switch styles, outer cutoff must be > inner cutoff
    -for smooth and charmm/switch styles, atom pairs less than the inner cutoff
    -  distance use usual Coulomb, pairs between inner and outer are smoothed,
    -  and the potential goes to 0.0 at the outer cutoff
    -for smooth style, force is continuously differentiable everywhere
    -for debye style, an exp(-kappa*r) screening is added to the Coulombic
    -  interaction
    -
    -Default = cutoff 10.0   for real units
    -          cutoff 2.5    for lj units
    -
    -
    -

    -create group

    - -
    -styles:
    -
    - -
    -coeffs:  types
    -               (1) lowest atom type
    -               (2) highest atom type
    -         molecules
    -               (1) lowest molecule ID
    -               (2) highest molecule ID
    -         region
    -               (1) lower x bound of region
    -               (2) upper x bound of region
    -               (3) lower y bound of region
    -               (4) upper y bound of region
    -               (5) lower z bound of region
    -               (6) upper z bound of region
    -         remainder
    -               no other parameters required
    -       
    -used with "create temp" commmand to initialize velocities of atoms
    -by default, the "create temp" command initializes the velocities of all atoms,
    -  this command limits the initialization to a group of atoms
    -this command is only in force for the next "create temp" command, any
    -  subsequent "create temp" command is applied to all atoms (unless the
    -  "create group" command is used again)
    -for style types, only atoms with a type such that lo-type <= type <= hi-type
    -  will be initialized by "create temp"
    -for style types, lo-type can equal hi-type if just want to specify one type
    -for style molecules, only atoms belonging to molecules with an ID # such 
    -  that lo-ID <= type <= hi-ID will be initialized by "create temp"
    -for style molecules, lo-ID can equal hi-ID if just want to specify one molecule
    -for style region, only atoms within the specified spatial region
    -  will be initialized by "create temp"
    -for style region, a coeff of INF means + or - infinity (all the way 
    -  to the boundary)
    -for style remainder, only previously uninitialized atoms
    -  will be initialized by "create temp"
    -
    -
    -

    -create temp

    - -
    -styles: 
    -
    - -
    -coeffs:  uniform
    -               (1) target T (temperature units)
    -               (2) random # seed (0 < seed <= 8 digits)
    -         gaussian
    -               (1) target T (temperature units)
    -               (2) random # seed (0 < seed <= 8 digits)
    -         velocity
    -               (1) x velocity component (velocity units)
    -               (2) y velocity component (velocity units)
    -               (3) z velocity component (velocity units)
    -
    -initialize velocities of atoms to a specified temperature
    -use appropriate number of coeffs for a particular style
    -cannot be done before a data or restart file is read
    -by default, velocities are created for all atoms - this can be overridden
    -  by first using a "create group" command
    -for uniform and Gaussian styles velocities are created in 
    -  processor-independent fashion - is slower but gives the same initial 
    -  state independent of # of processors
    -for uniform and Gaussian styles the momentum of the initialized atoms is
    -  also zeroed, but only if all atoms are being initialized 
    -for uniform and Gaussian styles, RN are generated with Park/Miller RNG
    -for velocity style in 2-d simulations, still specify z velocity component,
    -  even though it is ignored
    -
    -
    -

    -diagnostic

    - -
    -call a user-defined diagnostic routine every this many timesteps
    -this command can be used multiple times to call different routines
    -  at different frequencies, that use different parameters, and that
    -  send output to different files
    -value of 0 for 2nd parameter means never call this particular routine
    -this command causes any previous file associated with this user routine
    -  to be closed
    -new filename can exist, will be overwritten
    -if the file name specified is "none", then no file is opened
    -each routine that is added to diagnostic.f and enabled with a
    -  "diagnostic" command will be called at the beginning and end of
    -  each "run" and every so many timesteps during the run
    -see *** comments in diagnostic.f for changes that must be made in 
    -  that file to enable user diagnostics, LAMMPS must then be re-compiled
    -  and re-linked
    -see the diagnostic.f file for further information on how to create
    -  routines that operate on internal LAMMPS data, do their own file output,
    -  perform different operations (e.g. setup and clean-up) depending
    -  on when they are called, etc
    -the optional 5th-9th parameters are stored as internal LAMMPS variables
    -  which can be accessed by the diagnostic routine
    -
    -
    -

    -dielectric

    -
    -set dielectric constant to this value
    -
    -Default = 1.0
    -
    -
    -

    -dihedral coeff

    - -
    -coeffs:   harmonic
    -               (1) K (energy units)
    -               (2) d (+1 or -1)
    -               (3) n (1,2,3,4,6)
    -          multiharmonic
    -               (1) A_1 (energy units)
    -               (2) A_2 (energy units)
    -               (3) A_3 (energy units)
    -               (4) A_4 (energy units)
    -               (5) A_5 (energy units)
    -          class2
    -               currently not enabled for "dihedral coeff" command
    -               must be specified in data file (see "read data" command)
    -          charmm
    -               (1) K (energy units)
    -               (2) n (1,2,3,4,6)
    -               (3) d (0 or 180 degrees) (converted to radians within LAMMPS)
    -               (4) weighting factor to turn on/off 1-4 neighbor nonbond interactions
    -
    -define (or override) dihedral coefficients for an individual dihedral type
    -use appropriate number of coeffs for a particular style
    -see force_fields.html for meaning of coefficients for each style
    -these coefficients can also be set in data file 
    -  by a "Dihedral Coeffs" entry, the most recently defined 
    -  coefficients are used
    -cannot use this command before a "read data" or "read restart" is performed,
    -  because memory is not yet allocated for the necessary arrays
    -
    -
    -

    -dihedral style

    - -
    -define style of dihedral interactions to use for all 4-body terms
    -must be used before the "read data" command (if not using the
    -  default) to tell the program how to read the "Dihedral
    -  Coeffs" entry in the data file
    -can be used after the "read data" command to change the style to none
    -coefficients for all dihedral types must be defined in the data (or restart)
    -  file by a "Dihedral Coeffs" entry or by "dihedral coeff"
    -  commands before a run is performed
    -
    -Default = harmonic
    -
    -
    -

    -dimension

    - -
    -for a 2-d run, assumes all z-coords are set to 0.0 in "read data" or
    -  "read restart" files and program creates no z velocities
    -this command sets the processor grid to default values for 2-d or 3-d
    -  so must be used before "processor grid" command
    -must be set before data or restart file is read
    -
    -Default = 3
    -
    -
    -

    -dump atoms

    - -
    -dump all atom positions to a file every this many timesteps
    -  (every this many iteration when the minimizer is invoked)
    -when rRESPA is enabled, this is steps of outermost loop (longest timesteps)
    -positions are also dumped at the start and end of each run
    -when dumped during minimization, all dumps will have the same timestamp
    -  since the timestep does not change during minimization
    -value of 0 means never dump
    -any previous file is closed
    -new filename can exist, will be overwritten
    -atom positions in dump file are in "box" units (0.0 to 1.0) in each dimension
    -IMPORTANT NOTE: due to the way periodic boundary conditions are enforced 
    -  (only when neighbor lists are rebuilt), atom coords appearing in the dump
    -  file can be slightly outside the specified box
    -
    -Default = 0
    -
    -
    -

    -dump forces

    - -
    -dump all atom forces to a file every this many timesteps
    -  (every this many iteration when the minimizer is invoked)
    -when rRESPA is enabled, this is steps of outermost loop (longest timesteps)
    -forces are also dumped at the start and end of each run
    -when dumped during minimization, all dumps will have the same timestamp
    -  since the timestep does not change during minimization
    -any previous file is closed
    -new filename can exist, will be overwritten
    -value of 0 means never dump
    -
    -Default = 0
    -
    -
    -

    -dump velocities

    - -
    -dump all atom velocities to a file every this many timesteps
    -when rRESPA is enabled, this is steps of outermost loop (longest timesteps)
    -velocities are also dumped at the start and end of every run
    -any previous file is closed
    -new filename can exist, will be overwritten
    -value of 0 means never dump
    -
    -Default = 0
    -
    -
    -

    -extra memory

    - -
    -
    -factors that affect how much extra memory is allocated when a problem is setup
    -factor of 1.0 means no padding (use exactly what LAMMPS estimates is
    -  needed), factor of 2.0 means 2x longer arrays, etc
    -typically don't need to change default settings unless LAMMPS tells you
    -  to "boost" some factor at run-time
    -final section of log file lists optimal settings for these parameters,
    -  i.e. the job could have been run with those "extra memory" settings
    -  and would have used minimal memory
    -must be set before data or restart file is read
    -
    -Default = 1.5 for all 4 parameters
    -
    -
    -

    -fix style

    - -
    -styles:
    -
    - -
    -coeffs:  none
    -               no other parameters required (use "none" as 1st parameter)
    -         setforce
    -                (1) x component of set force (in force units)
    -                (2) y component of set force (in force units)
    -                (3) z component of set force (in force units)
    -         addforce
    -                (1) x component of added force (in force units)
    -                (2) y component of added force (in force units)
    -                (3) z component of added force (in force units)
    -         aveforce
    -                (1) x comp of added average force per atom (in force units)
    -                (2) y comp of added average force per atom (in force units)
    -                (3) z comp of added average force per atom (in force units)
    -         rescale
    -                (1) desired T at beginning of run
    -                (2) desired T at end of run
    -                (3) check for rescaling every this many timesteps
    -                (4) T window outside of which velocities will be rescaled
    -                (5) fractional amount (0.0 to 1.0) of rescaling to perform
    -         hoover/drag
    -                (1) desired T at beginning of run
    -                (2) desired T at end of run
    -                (3) damping constant for drag (roughly inverse time units)
    -         langevin
    -                (1) desired T at beginning of run
    -                (2) desired T at end of run
    -                (3) Langevin damping parameter (inverse time units)
    -                (4) random seed to use for white noise (0 < seed <= 8 digits)
    -                (5) 0/1 = off/on x dimension
    -                (6) 0/1 = off/on y dimension
    -                (7) 0/1 = off/on z dimension
    -         springforce
    -                (1) x position of spring origin
    -                (2) y position
    -                (3) z position
    -                (4) force constant k (so that k*distance = force units)
    -         dragforce
    -                (1) x position to drag atom towards
    -                (2) y position
    -                (3) z position
    -                (4) force magnitude f (in force units)
    -                (5) delta outside of which to apply force (in distance units)
    -         shake
    -                (1) max # of SHAKE iterations within each atom cluster
    -                (2) SHAKE tolerance (accuracy of one part in tolerance)
    -                (3) print bond statistics every this many steps (0 = never)
    -
    -define a constraint
    -cannot skip a constraint number, all must be used before a run is performed
    -use appropriate number of coeffs for a particular style
    -which atoms or bonds the constraint will affect is set by the
    -  "assign fix" command
    -all of the constraints (except for rescale) are applied every timestep
    -all specified temperatures are in temperature units
    -for style setforce, a coeff of NULL means do not alter that force component
    -for style aveforce, average force on the group of fixed atoms is computed,
    -  then new average force is added in and actual force on each atom is set
    -  to new total value -> has effect of applying same force to entire group
    -  of atoms
    -thermostatting constraints (rescale, hoover/drag, langevin) cannot be used in
    -  conjuction with global "temp control", since they conflict and will
    -  cause atom velocities to be reset twice
    -thermostatting constraints (rescale, hoover/drag, langevin) cannot be used
    -  when performing a minimization
    -if multiple Langevin constraints are specified the Marsaglia RNG will
    -  only use the last RNG seed specified for initialization
    -meaning of rescale and Langevin thermostatting coefficients is same as in 
    -  "temp control" command
    -for rescale style, it can be used as a coarse temperature rescaler,
    -  for example "rescale 200.0 300.0 100 10.0 1.0" will ramp the temperature
    -  up during the simulation, resetting it to the target temperatue as needed
    -for rescale style, it can be used to create an instantaneous
    -  drag force that slowly rescales the temperature without oscillation,
    -  for example "rescale 300.0 300.0 1 0.0 0.0001" will force (or keep) 
    -  the temperature to be 300.0, the time frame over which this occurs
    -  will become longer as the last parameter is made smaller
    -for hoover/drag style, the drag force accumulates over time so some
    -  oscillation in temperature can occur, for example
    -  "rescale 300.0 300.0 1 0.0 0.0001" will force (or keep)
    -  the temperature to be 300.0, the time frame over which the oscillations
    -  occur will become longer as the last parameter is made smaller
    -style springforce is designed to be applied to an entire group of atoms
    -  en masse (e.g. an umbrella force on an entire molecule)
    -for springforce style, the center of mass r0 of the group of atoms is computed,
    -  then a restoring force = -k*(r-r0)*mass/masstotal is applied to each 
    -  atom in the group where mass = mass of the atom and masstotal = mass of
    -  all the atoms in the group - thus "k" should represent the total
    -  force on the group of atoms (not per atom)
    -for springforce style, a xyz position of NULL means do not include that
    -  dimension in the distance or force computation
    -for dragforce style, apply a drag force of magnitude f to each atom in the
    -  group in the direction (r-r0) where r0 = (x,y,z) - do not apply the force if
    -  the atom is within a distance delta of r0
    -for dragforce style, a xyz position of NULL means do not include that
    -  dimension in the distance or force computation
    -for shake style, certain bonds in the system are constrained every timestep
    -  to be at their equilibrium length, this is done by applying a SHAKE-like
    -  constraint to the forces on the atoms so that their position at the next
    -  timestep will preserve the atom separations
    -for shake style, only atoms in small clusters can be constrained -
    -  e.g. water molecules, CH3 groups, but not the C backbone of a
    -  long polymer chain - a cluster is defined as a central atom
    -  connected to others in the cluster by constrained bonds connected
    -  together by constrained bonds - the max size of such a cluster is
    -  4 atoms to enable easier parallelization
    -for shake style, the max iteration count need not be large (e.g. 3) since
    -  iterations are only done within a cluster and converge quickly
    -see the "minimize" command for what constraints are allowed for use
    -  with the minimizer
    -see the "respa" command for how constraints are applied when rRESPA
    -  timestepping is enabled
    -
    -Default = none
    -
    -
    -

    -improper coeff

    - -
    -coeffs:   harmonic
    -               (1) K (energy units)
    -               (2) chi (degrees)
    -          cvff
    -               (1) K (energy units)
    -               (2) d (+1 or -1)
    -               (3) n (0,1,2,3,4,6)
    -          class2
    -               currently not enabled for "improper coeff" command
    -               must be specified in data file (see "read data" command)
    -
    -define (or override) improper coefficients for an individual improper type
    -use appropriate number of coeffs for a particular style
    -see force_fields.html for meaning of coefficients for each style
    -these coefficients can also be set in data file 
    -  by a "Improper Coeffs" entry, the most recently defined 
    -  coefficients are used
    -cannot use this command before a "read data" or "read restart" is performed,
    -  because memory is not yet allocated for the necessary arrays
    -
    -
    -

    -improper style

    - -
    -define style of improper interactions to use for all trigonal centers
    -in class2 case, dictates that angle-angle terms be included for all
    -  trigonal and tetrahedral centers
    -angle for harmonic is improper torsion, angle for class2 is Wilson out-of-plane
    -must be used before the "read data" command (if not using the
    -  default) to tell the program how to read the "Improper
    -  Coeffs" entry in the data file
    -can be used after the "read data" command to change the style to none
    -coefficients for all improper types must be defined in the data (or restart)
    -  file by a "Improper Coeffs" entry or by "improper coeff"
    -  commands before a run is performed
    -
    -Default = harmonic
    -
    -
    -

    -maximum cutoff

    -
    -specifies the longest force cutoff that will be used in any runs
    -this value is used by LAMMPS to accurately allocate memory
    -  for neighbor arrays
    -if the value is inaccurate (e.g. the command is not used), it is not an
    -  error, but LAMMPS may allocate insufficient memory for neighbor lists
    -this command is not typically needed if the "nonbond style" and "coulomb style"
    -  commands are used before the "read data" or "read restart" command, since
    -  they specify the appropriate cutoffs
    -an exception to this is if a short cutoff is used initially,
    -  but a longer cutoff will be used for a subsequent run (in the same
    -  input script), in this case the "maximum cutoff" command should be
    -  used to insure enough memory is allocated for the later run
    -note that a restart file contains nonbond cutoffs (so it is not necessary
    -  to use a "nonbond style" command before "read restart"), but LAMMPS
    -  still needs to know what the maximum cutoff will be before the
    -  restart file is read
    -must be set before data or restart file is read
    -
    -Default = cutoffs for nonbond and Coulomb styles
    -
    -
    -

    -min flag

    -
    -write out minimization info every this many iterations
    -value of 0 means never write
    -
    -Default = 1
    -
    -
    -

    -min style

    - -
    -choose minimization algorithm to use when "minimize" command is performed
    -currently, the hftn style is the only option available
    -
    -Default = hftn
    -
    -
    -

    -minimize

    - -
    -perform an energy minimization of the atomic coordinates of the system
    -uses algorithm selected with "min style" command
    -minimize commands can be interspersed with "run" commands
    -  to alternate between dynamics and relaxation of the system
    -minimization stops if any of 3 criteria are met:
    -  (1) largest force component < stopping tolerance
    -  (2) # of iterations > max iterations
    -  (3) # of force and energy evaluations > max evaluations
    -output from the minimizer is specified by the "dump atoms", "dump forces",
    -  and "restart" commands
    -when using constraints with the minimizer, fixes are
    -  applied when atoms move except for the following
    -fixes associated with temperature control are not allowed
    -  (rescale, hoover/drag, langevin)
    -the minimizer does not invoke the "fix style shake" contraints on
    -  bond lengths
    -the minimizer does not invoke pressure control or volume control settings
    -for good convergence, should specify use of smooth nonbond force fields 
    -  that have continuous second derivatives, e.g. set "coulomb style" to
    -  "smooth" or "pppm", set "nonbond style" to "lj/smooth" or 
    -  use a long cutoff
    -
    -
    -

    -mixing style

    - -
    -styles:
    -
    - -
    -determine the kind of mixing rule that is applied to generate nonbond
    -  coefficients for interactions between type i and type j atoms
    -mixing rules are applied only when nonbond coeffs are input in a "read data" file
    -for nonbond style "soft", only epsilons (prefactor A) are input - they are
    -  always mixed geometrically, regardless of mixing style setting
    -for nonbond style "lj/charmm", mixing style is always arithmetic,
    -  regardless of mixing style setting
    -must be set before data file is read
    -
    -Default = geometric for all nonbond styles except
    -          arithmetic for nonbond style lj/charmm
    -          sixthpower for nonbond style class2/cutoff
    -
    -
    -

    -neighbor

    - -
    -factors that affect how and when neighbor lists are constructed
    -the binning style is almost always faster than the N^2 style
    -skin must be large enough that all atoms needed for bond
    -  interactions are also acquired by interprocessor communication
    -last parameter incurs extra checking and communication to test against
    -  skin thickness, but may mean neighbor list is created less often
    -when rRESPA is run, the 3rd and 4th parameters refer to the
    -  nonbond (short-range) timestepping
    -normally this command should be used before the data or restart file is read,
    -  since the skin distance is used to estimate memory needed for
    -  neighbor lists
    -this command can also be used after the "read data" or "read restart" command
    -  to change the style of neighbor list construction, but if the
    -  skin distance is changed it can cause LAMMPS to run out of neighbor
    -  list memory, the "maximum cutoff" command can be used to avoid this
    -  problem
    -
    -Default = 2.0 1 1 10 1   for real units
    -          0.3 1 1 10 1   for lj units
    -
    -
    -

    -newton flag

    -
    -turn off or on Newton's 3rd law for bond and non-bond force computation
    -
    - -
    -no Newton's 3rd law means more force computation and less communication
    -yes Newton's 3rd law means less force computation and more communication
    -which choice is faster is problem dependent on N, # of processors, 
    -  and cutoff length(s)
    -expect for round-off errors, setting this flag should not affect answers, 
    -  only run time
    -must be set before data or restart file is read
    -
    -Default = 3
    -
    -
    -

    -nonbond coeff

    - -
    -coeffs: lj/cutoff
    -               (1) epsilon (energy units)
    -               (2) sigma (distance units)
    -               (3) cutoff (distance units)
    -        lj/smooth
    -               (1) epsilon (energy units)
    -               (2) sigma (distance units)
    -               (3) inner cutoff (distance units)
    -               (4) outer cutoff (distance units)
    -        lj/shift
    -               (1) epsilon (energy units)
    -               (2) sigma (distance units)
    -               (3) delta shift distance (distance units)
    -               (4) cutoff (distance units)
    -        soft
    -               (1) prefactor A at start of run (energy units)
    -               (2) prefactor A at end of run (energy units)
    -               (3) cutoff (distance units)
    -        class2/cutoff
    -               (1) epsilon (energy units)
    -               (2) sigma (distance units)
    -               (3) cutoff (distance units)
    -        lj/charmm
    -               (1) epsilon (energy units)
    -               (2) sigma (distance units)
    -               (3) epsilon for 1-4 interactions (energy units)
    -               (4) sigma for 1-4 interactions (distance units)
    -
    -define (or override) nonbond coefficients for an individual atom type pair
    -use appropriate number of coeffs for a particular style
    -1st atom type must be <= 2nd atom type
    -all cutoffs are in global units, not local sigma units
    -  (e.g. in reduced units a setting of "lj/cutoff 1.0 1.2 2.5" means a 
    -  cutoff of 2.5, not 1.2*2.5)
    -turn off a particular type pair interaction by setting the
    -  cutoff to 0.0 (both cutoffs to zero for lj/smooth option)
    -for soft style, prefactor A is ramped from starting value to
    -  ending value during run
    -these coefficients (except the cutoffs) can also be set in data file 
    -  by a "Nonbond Coeffs" entry and associated mixing rules, the cutoffs can
    -  be set (globally) via the "nonbond style" command, the most
    -  recently defined coefficients/cutoffs are used
    -cannot use this command before a "read data" or "read restart" is performed,
    -  because memory is not yet allocated for the necessary arrays
    -
    -
    -

    -nonbond style

    - -
    -styles: 
    -
    - -
    -coeffs:  none
    -               no other parameters required
    -         lj/cutoff
    -               (1) cutoff (distance units)
    -               (2) offset flag (0 or 1)
    -         lj/smooth
    -               (1) inner cutoff (distance units)
    -               (2) outer cutoff (distance units)
    -         lj/shift
    -               (1) cutoff (distance units)
    -               (2) offset flag (0 or 1)
    -         soft
    -               (1) cutoff (distance units)
    -         class2/cutoff
    -               (1) cutoff (distance units)
    -               (2) offset flag (0 or 1)
    -         lj/charmm
    -               (1) inner cutoff (distance units)
    -               (2) outer cutoff (distance units)
    -
    -define style of pairwise nonbond interactions to use between all atom types
    -use appropriate number of coeffs for a particular style
    -this is separate from charge interactions (see "coulomb style" command)
    -normally this command should be used before "read data"
    -  to tell LAMMPS how big a force cutoff is being used, the 
    -  "maximum cutoff" command can also serve this purpose
    -when running from a restart file, the restart file contains the nonbond
    -  style and nonbond cutoffs (but not the offset flag), so it is often
    -  not necessary to use a "nonbond style" command before "read restart",
    -  however LAMMPS still needs to know what the maximum cutoff will be
    -  before the restart file is read, see "maximum cutoff" command
    -  for more details
    -this command can also be used after "read data" or "read restart" to
    -  change the style of nonbond interactions and/or the cutoff
    -cutoff distance can be smaller or larger than simulation box dimensions
    -nonbond style determines how many nonbond coefficients the program expects to
    -  find in a "Nonbond Coeffs" entry in the data file or when using the 
    -  "nonbond coeff" command, thus the style must be set (if not using default)
    -  before using the "read data" command (if the data file contains a 
    -  "Nonbond Coeffs" entry) or a "nonbond coeff" command
    -coefficients for all atom type pairs must be defined in data (or restart)
    -  file by a "Nonbond Coeffs" entry or by "nonbond coeffs" commands before
    -  a run is performed
    -this command sets the cutoff(s) for all type pair interactions, thus
    -  overriding any previous settings by a "nonbond coeff" command or
    -  that were read in from a data or restart file
    -for lj/cutoff, lj/shift, class2/cutoff styles, 
    -  offset flag only affects printout of thermodynamic energy
    -  (not forces or dynamics), determines whether offset energy 
    -  is added in to LJ potential to make value at cutoff = 0.0,
    -  flag = 0 -> do not add in offset energy,
    -  flag = 1 -> add in offset energy 
    -for lj/smooth and lj/charmm styles, outer cutoff must be > inner cutoff
    -for lj/smooth and lj/charmm styles, atom pairs less than the inner cutoff
    -  distance use straight LJ, pairs between inner and outer use a smoothed LJ,
    -   and the potential goes to 0.0 at the outer cutoff
    -for lj/smooth and lj/charmm styles, energy and forces are continuous at inner
    -   cutoff and go smoothly to zero at outer cutoff
    -for lj/shift and soft styles, must set "coulomb style" to "none"
    -for lj/charmm style, must set "coulomb style" to "charmm/switch", "pppm",
    -   or "ewald"
    -for lj/shift style, delta shift distances for each atom pair are set by
    -  "Nonbond Coeffs" entry in data file or by "nonbond coeffs" command
    -for soft style, values of the prefactor "A", which is ramped from one
    -  value to another during the run, are set by "Nonbond Coeffs" entry
    -  in data file or by "nonbond coeffs" command
    -
    -Default = lj/cutoff 10.0 0   for real units
    -          lj/cutoff 2.5 0    for lj units
    -
    -
    -

    -periodicity

    - -
    -turn on/off periodicity in any of three dimensions
    -used in inter-particle distance computation and when particles move
    -  to map (or not map) them back into periodic box
    -for a 2-d run (see "dimension" command), 3rd parameter must be 
    -  specified, but doesn't matter if it is 0 or 1
    -must be set before data or restart file is read
    -
    -Default = 0 0 0 (periodic in all dimensions)
    -
    -
    -

    -pppm mesh

    - -
    -specify the mesh size used by "coulomb style pppm"
    -mesh dimensions that are power-of-two are fastest for FFTs, but any sizes
    -  can be used that are supported by native machine libraries
    -this command is optional - if not used, a default
    -  mesh size will be chosen to satisfy accuracy criterion - if used, the
    -  specifed mesh size will override the default
    -
    -
    -

    -pppm order

    -
    -specify the order of the interpolation function that is used by "coulomb
    -  style pppm" to map particle charge to the particle mesh
    -order is roughly equivalent to how many mesh points a point charge
    -  overlaps onto in each dimension
    -
    -Default = 5
    -
    -
    -

    -press control

    - -
    -styles:
    -
    - -
    -coupling:
    -
    - -
    -coeffs:   none
    -               no other parameters required
    -          nose/hoover xyz
    -               (1) desired P at beginning of run
    -               (2) desired P at end of run
    -          nose/hoover xy or yz or xz or aniso
    -               (1) desired Px at beginning of run (or NULL, see below)
    -               (2) desired Px at end of run
    -               (3) desired Py at beginning of run
    -               (4) desired Py at end of run
    -               (5) desired Pz at beginning of run
    -               (6) desired Pz at end of run
    -               (7) frequency constant for volume adjust (inverse time units)
    -
    -enable constant pressure simulations
    -all specified pressures are in pressure units
    -any dimension being varied by pressure control must be periodic
    -for xyz coupling, all 3 dimensions expand/contract together uniformly
    -  using total scalar pressure as the driving force
    -for xy/yz/xz coupling, the 2 specified dimensions expand/contract together
    -  uniformly using pressure components averaged over those 2 dimensions
    -  as the driving force, the non-specified dimension will expand/contract
    -  independently using its pressure component as the driving force
    -for anisotropic, all 3 dimensions expand/contract independently using
    -  individual pressure components as the 3 driving forces
    -in all cases, the simulation box stays rectilinear (not Parinello-Rahman)
    -for dimensions coupled together, their specified P values should be the same
    -a non-coupled dimension (e.g. dimension z for xy option or any dimension
    -  for aniso option) can have 2 NULL values as specified pressures,
    -  which means apply no pressure control in that dimension (constant volume)
    -target pressure at intermediate points during a run is a ramped value
    -  between the beginning and ending pressure(s)
    -for nose/hoover style, frequency constant is like an inverse "piston" 
    -  mass which determines how rapidly the pressure fluctuates in response to a
    -  restoring force, large frequency -> small mass -> rapid fluctations
    -for nose/hoover style, units of frequency/damping constant are
    -  inverse time, so a value of 0.001 means relax in a timespan on the 
    -  order of 1000 fmsec (real units) or 1000 tau (LJ units)
    -IMPORTANT NOTE: the computation of P in LAMMPS does not include
    -  a long-range Van der Waals correction, this introduces a known
    -  error when performing constant P simulations since the correction
    -  factor changes as the box size varies
    -
    -Default = none
    -
    -
    -

    -processor grid

    - -
    -specify 3-d grid of processors to map to physical simulation domain
    -for 2-d problem, specify N by M by 1 grid
    -program will choose these values to best map processor grid to physical
    -  simulation box, only use this command if wish to override program choice
    -product of 3 parameters must equal total # of processors
    -must be set before data or restart file is read
    -
    -Default = none
    -
    -
    -

    -read data

    -
    -read the initial atom positions and bond info from the specified file
    -the format for the data file is specified in the file data_format
    -if a "Velocities" entry is not in data file, all atom velocities
    -  are set to 0.0
    -if a "Coeffs" entry is in data file, the appropriate "style" command
    -  command must be used first (unless default setting is used) to tell 
    -  LAMMPS how many coefficients to expect
    -a "Nonbond Coeffs" entry only contains one set of coefficients for each
    -  atom type, after being read-in mixing rules are applied to 
    -  compute the cross-type coefficients, see the "mixing style" command
    -  and data_format file for more information
    -
    -
    -

    -read restart

    -
    -read atom and force-field information from specified file
    -allows continuation of a previous run
    -file is binary to enable exact restarts
    -do not have to restart on same # of processors, but can only do exact
    -  restarts on same # of processors due to roundoff
    -when restart file is read, warnings are issued if certain parameters
    -  in the restart file do not match current settings (e.g. newton flag,
    -  dimension, periodicity, units) - this usually indicates an error
    -the restart file stores the "nonbond style" and many-body styles and
    -  coefficients and cutoffs, so these do not have to be re-specified in the
    -  input script, unless you want to change them
    -the restart file does not store "coulomb style" choice or cutoff, so
    -  this should be re-specified in the input script
    -the restart file stores the constraint assignments for each atom generated
    -  by using the "assign fix" command, it does NOT store the constraint
    -  parameters themselves, so they must be re-specified with "fix style"
    -  commands after the restart file is read - one exception to this is that
    -  SHAKE constraints (bondtype or angletype) are not stored with the
    -  atoms, so they must be re-specified when performing a restart with both
    -  the "fix style" and "assign fix" commands
    -
    -
    -

    -reset timestep

    -
    -explicitly reset the timestep to this value
    -the "read data" and "read restart" commands set the timestep to zero
    -  and the file value respectively, so this should be done after those commands
    -
    -
    -

    -respa

    - -
    -factors that affect sub-cycling of force calculations within rRESPA hierarchy
    -bonded intramolecular forces are calculated every innermost sub-timestep
    -bonded 3- and 4-body forces are computed every 1st parameter sub-timesteps
    -short-range nonbond pairwise forces (LJ, Coulombic) are computed every 
    -  (2nd parameter * 1st parameter) sub-timesteps
    -long-range (Ewald, PPPM) forces are computed every 
    -  (3rd parameter * 2nd parameter * 1st parameter) sub-timesteps
    -the timestepping for all 3 inner loops (bond, 3/4-body, nonbond) is performed
    -  as sub-cycling within the long-range timestepping loop
    -the fastest (innermost) timestep size is set by the "timestep" command
    -when running rRESPA, all input commands that specify numbers of timesteps
    -  (e.g. run, thermo flag, restart, etc) refer to the outermost loop
    -  of long-range timestepping
    -the only exception to this rule is the "neighbor" command, where the timestep
    -  parameters refer to the short-range (nonbond) timestepping
    -when using constraints (via the "fix style" and "assign fix" commands)
    -  with rRESPA, the setforce and aveforce constraints are applied at every
    -  level of the hierarchy (whenever forces are computed), the other
    -  constraints are applied only at the short-range (nonbond) level
    -when using "temp control langevin" with rRESPA, thermostatting is applied
    -  at the short-range (nonbond) level
    -rRESPA cannot be used with "fix style shake"
    -setting all 3 parameters to 1 turns off rRESPA
    -
    -Default = 1 1 1 (no rRESPA)
    -
    -
    -

    -restart

    - -
    -create a restart file every this many timesteps
    -value of 0 means never create one
    -if the style is 1, restart information will be written to files
    -  named filename.timestep and no 4th parameter is needed
    -if the style is 2, restart information will be written alternately to files
    -  given by the 3rd and 4th parameters, so only 2 restart files ever exist
    -when the minimizer is invoked this command means create a restart file
    -  at the end of the minimization with the filename filename.timestep.min
    -a restart file stores atom and force-field information in binary form
    -allows program to restart from where it left off (see "read restart" commmand)
    -
    -Default = 0
    -
    -
    -

    -restart version

    -
    -tell LAMMPS that a restart file from an older version of LAMMPS will be read-in
    -  via a "read restart" command
    -this command is necessary because older restart files have a different format
    -valid settings are 2001 (LAMMPS 2001), 2000 (LAMMPS 2000),
    -  6 (LAMMPS 99) or 5 (LAMMPS 5.0)
    -restart files from earlier versions of LAMMPS are not readable without
    -  some source code modifications
    -restart files are always written out in the current-version format
    -  regardless of this setting
    -this must be set before the "read restart" command is executed
    -
    -Default = current version of code = 2001
    -
    -
    -

    -rotation zero

    -
    -zero out angular momentum when creating velocities for a group of atoms
    -value of 0 means don't zero out, value of 1 means zero it
    -
    -Default = 0
    -
    -
    -

    -run

    -
    -run or continue dynamics for specified # of timesteps
    -when rRESPA is enabled, this is steps of outermost loop (longest timesteps)
    -must have performed "read data" or "read restart"
    -  command first
    -
    -
    -

    -slab volume

    -
    -invoke 2-d slab Ewald/PPPM and set extended slab volume via this ratio
    -2-d slab Ewald/PPPM can be used for a system that is periodic in x-y,
    -  but not in z
    -this ratio dampens inter-slab interactions in the z dimension 
    -  by providing empty volume between slabs and removing
    -  dipole inter-slab interactions
    -ratio value is the size of the extended dimension in z divided by
    -  the actual dimension in z
    -recommended ratio value is 3.0: larger is inefficient, smaller
    -  risks unwanted inter-slab interactions
    -when 2-d slab Ewald/PPPM is used, z-direction periodicity must be
    -  turned off - e.g. periodicity 0 0 1
    -when 2-d slab Ewald/PPPM is used, user must prevent particle migration
    -  beyond initial z-bounds, typically by providing walls
    -2-d slab Ewald/PPPM can only be used only with electrostatically
    -  neutral systems
    -2-d slab Ewald/PPPM can only be used (for the moment) with constant
    -  volume simulations (no pressure control) - the pressure computation
    -  (printed as thermodynamic data) does not include any slab correction
    -  factor or a volume correction for the extended z direction
    -must be set before data or restart file is read
    -
    -Default = none (normal 3-D Ewald/PPPM)
    -
    -
    -

    -special bonds

    - -
    -weighting factors to turn on/off nonbond interactions of atom pairs that
    -  are "close" in the molecular topology
    -1-2 neighbors are a pair of atoms connected by a bond
    -1-3 neighbors are a pair of atoms 2 hops away, etc.
    -weight values are from 0.0 to 1.0 and are used to multiply the
    -  energy and force interaction (both Coulombic and LJ) between the 2 atoms
    -weight of 0.0 means no interaction
    -weight of 1.0 means full interaction
    -can either specify a single keyword (charmm, amber) or can give
    -  3 numeric values
    -using the charmm keyword means use the CHARMM force field
    -  settings of 0.0 0.0 0.0, requiring that pair-specific 1-4 interactions
    -  be read in individually (see "dihedral style charmm" command)
    -using the amber keyword means use the AMBER force field
    -  settings of 0.0 0.0 N, where N = 0.5 for Van der Waals 1-4 interactions
    -  and 1.0/1.2 for Coulombic 1-4 interactions
    -
    -Default = CHARMM force field values of 0.0 0.0 0.0
    -
    -
    -

    -temp control

    - -
    -styles:  
    -
    - -
    -coeffs:  none
    -               no other parameters required
    -         rescale
    -               (1) desired T at beginning of run
    -               (2) desired T at end of run
    -               (3) check for rescaling every this many timesteps
    -               (4) T window outside of which velocities will be rescaled
    -               (5) fractional amount (0.0 to 1.0) of rescaling to perform
    -         replace
    -               (1) desired T at beginning of run
    -               (2) desired T at end of run
    -               (3) do Gaussian replacement every this many timesteps
    -               (4) random # seed to use for replacement (0 < seed <= 8 digits)
    -         langevin
    -               (1) desired T at beginning of run
    -               (2) desired T at end of run
    -               (3) Langevin damping parameter (inverse time units)
    -               (4) random seed to use for white noise (0 < seed <= 8 digits)
    -         nose/hoover
    -               (1) desired T at beginning of run
    -               (2) desired T at end of run
    -               (3) frequency constant for friction force (inverse time units)
    -
    -enable constant temperature simulations
    -use appropriate number of coeffs for a particular style
    -all specified temperatures are in temperature units
    -target temperature at intermediate points during run is a ramped value
    -  between the beginning and ending temperatures
    -for rescale style, temperature is controlled by explicitly rescaling
    -  velocities towards the target temperature
    -for rescale style, rescaling is only done if current temperature is
    -  beyond the target temperature plus or minus the window value
    -for rescale style, the amount of rescaling is contfolled by the fractional
    -  amount (0.0 to 1.0), e.g. a value of 0.5 means set the velocities
    -  to halfway between the current and target temperature
    -for rescale style, it can be used as a coarse temperature rescaler,
    -  for example "rescale 200.0 300.0 100 10.0 1.0" will ramp the temperature
    -  up during the simulation, resetting it to the target temperatue as needed
    -for rescale style, it can be used to create an instantaneous
    -  drag force that slowly rescales the temperature without oscillation,
    -  for example "rescale 300.0 300.0 1 0.0 0.0001" will force (or keep) 
    -  the temperature to be 300.0, the time frame over which this occurs
    -  will become longer as the last parameter is made smaller
    -for replace style, Gaussian RNs from the Marsaglia RNG are used
    -for langevin style, uniform RNs from the Marsaglia RNG are used
    -for replace and langevin styles, the seed is used to initialize the
    -  Marsaglia RNG, on successive runs the RNG will just continue on
    -for replace and langevin styles, generated RNs depend on # of processors
    -  so will not get same answers independent of # of processors
    -for replace and langevin styles, RNG states are not saved in restart file,
    -  so cannot do an exact restart
    -for langevin style, damping parameter means small value -> less damping
    -for nose/hoover style, frequency constant is like an inverse 
    -  "piston" mass which determines how rapidly the temperature 
    -  fluctuates in response to a restoring force, large frequency -> 
    -  small mass -> rapid fluctations
    -for nose/hoover style, cannot use a end-of-run T of 0.0, must be finite
    -for langevin and nose/hoover styles, units of frequency/damping constant are
    -  inverse time, so a value of 0.01 means relax in a timespan on the 
    -  order of 100 fmsec (real units) or 100 tau (LJ units)
    -
    -Default = none
    -
    -
    -

    -thermo flag

    -
    -print thermodynamic info to screen and log file every this many timesteps
    -value of 0 means never print
    -
    -Default = 0
    -
    -
    -

    -thermo style

    -
    -determines format of thermodynamic output to screen and log file
    -
    - -
    -Default = 0
    -
    -
    -

    -timestep

    -
    -timestep size for MD run (time units)
    -when rRESPA is enabled, the timestep size is for the innermost (bond) loop
    -
    -Default = 1.0
    -
    -
    -

    -true flag

    -
    -read atom positions (see "read data" command) and dump atom positions
    -  (see "dump atoms" command) in one of 2 formats
    -
    - -
    -for each dimension, box count of "n" means add that many box lengths
    -  to get "true" un-remapped position, "n" can be positive, negative, or zero
    -must be set before data or restart file is read
    -
    -Default = 0
    -
    -
    -

    -units

    - -
    -set units to one of two options for all subsequent input parameters
    -
    -option real = conventional units:
    -
    - -
    -option lj = LJ reduced units:
    -
    - -
    -for LJ units, LAMMPS sets global epsilon,sigma,mass all equal to 1.0
    -subsequent input numbers in data and command file must be in these units
    -output numbers to screen and log and dump files will be in these units
    -this command (if it appears) must be the first command (aside from
    -  comments) in the input script
    -must be set before data or restart file is read
    -
    -Default = real
    -
    -
    -

    -volume control

    - -
    -styles:
    -
    - -
    -enable volume changes (density changes) during a simulation
    -specified box boundaries are in distance units
    -each dimension is controlled separately
    -dimensions not specified by a "volume control" command can be left
    -  alone (constant volume or nonperiodic) or controlled by
    -  a "press control" command
    -any dimension being varied by volume control must be periodic
    -the lo/hi values are the desired global simulation box boundaries at
    -  the end of the simulation run
    -at each timestep, the box is expanded/contracted uniformly from its initial
    -  lo/hi values to the specified ending lo/hi values
    -initial lo/hi values are specified in the data or restart file or 
    -  inherited from the end of the previous run
    -at each timestep, all atom coordinates are also scaled to the new box
    -
    -Default = none
    -
    - - diff -Naur lammps-26Jan17/doc/src/2001/units.html lammps-13Feb17/doc/src/2001/units.html --- lammps-26Jan17/doc/src/2001/units.html 2016-05-09 16:05:30.630573000 -0600 +++ lammps-13Feb17/doc/src/2001/units.html 1969-12-31 17:00:00.000000000 -0700 @@ -1,119 +0,0 @@ - - - - - - -

    -LAMMPS Units

    -

    -Return to top-level LAMMPS documentation.

    -

    -This file describes the units associated with many of the key variables -and equations used inside the LAMMPS code. Units used for input command -parameters are described in the input_commands file. The input command -"units" selects between conventional and Lennard-Jones units. -See the force_fields file for more information on units for the force -field parameters that are input from data files or input scripts.

    -

    -Conventional units:

    - -

    -LJ reduced units:

    - -
    -

    -This listing of variables assumes conventional units; to convert to LJ -reduced units, simply substitute the appropriate term from the list -above. E.g. x is in sigmas in LJ units. Per-mole in any of the units -simply means for 6.023 x 10^23 atoms.

    -

    -

    -
    -Meaning        Variable        Units
    -
    -positions      x               Angstroms
    -velocities     v               Angstroms / click (see below)
    -forces         f               Kcal / (mole - Angstrom)                
    -masses         mass            gram / mole
    -charges        q               electron units (-1 for an electron)
    -                                 (1 e.u. = 1.602 x 10^-19 coul)
    -
    -time           ---             clicks (1 click = 48.88821 fmsec)
    -timestep       dt              clicks
    -input timestep dt_in           fmsec
    -time convert   dtfactor        48.88821 fmsec / click
    -
    -temperature     t_current       degrees K
    -                t_start
    -                t_stop
    -input damping   t_freq_in       inverse fmsec
    -internal temp   t_freq          inverse clicks
    -  damping
    -
    -dielec const    dielectric      1.0 (unitless)
    -Boltmann const  boltz           0.001987191 Kcal / (mole - degree K)
    -
    -virial          virial[xyz]     Kcal/mole = r dot F
    -pressure factor pfactor         68589.796 (convert internal to atmospheres)
    -internal        p_current       Kcal / (mole - Angs^3)
    -  pressure      p_start
    -                p_stop
    -input press     p_start_in      atmospheres
    -                p_stop_in
    -output press    log file        atmospheres
    -input damping   p_freq_in       inverse time
    -internal press  p_freq          inverse clicks
    -  damping
    -
    -pot eng         e_potential     Kcal/mole
    -kin eng         e_kinetic       Kcal/mole
    -eng convert     efactor         332.0636 (Kcal - Ang) / (q^2 - mole)
    -                                (convert Coulomb eng to Kcal/mole)
    -
    -LJ coeffs       lja,ljb         Kcal-Angs^(6,12)/mole
    -
    -bond            various         see force_fields file
    -  parameters    2,3,4-body
    -                terms
    -
    - - diff -Naur lammps-26Jan17/doc/src/99/README.html lammps-13Feb17/doc/src/99/README.html --- lammps-26Jan17/doc/src/99/README.html 2016-05-09 16:05:30.630573000 -0600 +++ lammps-13Feb17/doc/src/99/README.html 1969-12-31 17:00:00.000000000 -0700 @@ -1,161 +0,0 @@ - - - - - - -

    -LAMMPS

    -

    -LAMMPS = Large-scale Atomic/Molecular Massively Parallel Simulator

    -

    -This is the documentation for the LAMMPS 99 version, written in F77, -which has been superceded by more current versions. See the LAMMPS WWW -Site for more information. -

    -LAMMPS is a classical molecular dynamics code designed for simulating -molecular and atomic systems on parallel computers using -spatial-decomposition techniques. It runs on any parallel platform that -supports the MPI message-passing library or on single-processor -workstations.

    -

    -LAMMPS 99 is copyrighted code that is distributed freely as -open-source software under the GNU Public License (GPL). See the -LICENSE file or www.gnu.org for more -details. Basically the GPL allows you as a user to use, modify, or -distribute LAMMPS however you wish, so long as any software you -distribute remains under the GPL. -

    -Features of LAMMPS 99 include:

    - -

    -More details about the code can be found here, -in the HTML-based documentation. There is also a conference paper -describing the parallel algorithms used in the code:

    -

    -S. J. Plimpton, R. Pollock, M. Stevens, "Particle-Mesh Ewald and -rRESPA for Parallel Molecular Dynamics Simulations", in Proc of -the Eighth SIAM Conference on Parallel Processing for Scientific -Computing, Minneapolis, MN, March 1997.

    -

    -LAMMPS was originally developed as part of a 5-way CRADA collaboration -between 3 industrial partners (Cray Research, Bristol-Myers Squibb, and -Dupont) and 2 DoE laboratories (Sandia National Laboratories and -Lawrence Livermore National Laboratories).

    -

    -The primary author of LAMMPS is Steve Plimpton, but others have written -or worked on significant portions of the code:

    - -

    -Other CRADA partners involved in the design and testing of LAMMPS are

    - -

    -LAMMPS is copyrighted code that is distributed freely as open-source -software under the GNU Public License (GPL). See the LICENSE file or -www.gnu.org for more details. -Basically the GPL allows you as a user to use, modify, or distribute -LAMMPS however you wish, so long as any software you distribute -remains under the GPL. -

    -If you have questions about LAMMPS, please contact me: -

    -
    -
    - Steve Plimpton -
    - sjplimp@sandia.gov -
    - www.cs.sandia.gov/~sjplimp -
    - Sandia National Labs -
    - Albuquerque, NM 87185 -
    -
    -

    -More Information about LAMMPS

    - -
  • - Basics - -
  • - how to make, run, and test LAMMPS with the example problems -
  • -
  • - Input Commands - -
  • - a complete listing of input commands used by LAMMPS -
  • -
  • - Data Format - -
  • - the data file format used by LAMMPS -
  • -
  • - Force Fields - -
  • - the equations LAMMPS uses to compute force-fields -
  • -
  • - Units - -
  • - the input/output and internal units for LAMMPS variables -
  • -
  • - Crib - -
  • - a one-line description of the variables used in LAMMPS -
  • -
  • - History - -
  • - a brief timeline of features added to LAMMPS -
  • -
  • - - diff -Naur lammps-26Jan17/doc/src/99/basics.html lammps-13Feb17/doc/src/99/basics.html --- lammps-26Jan17/doc/src/99/basics.html 2016-05-09 16:05:30.630573000 -0600 +++ lammps-13Feb17/doc/src/99/basics.html 1969-12-31 17:00:00.000000000 -0700 @@ -1,207 +0,0 @@ - - - - - - -

    -Basics of Using LAMMPS

    -

    -Return to top-level of LAMMPS documentation.

    - -
    -

    -Distribution

    -

    -When you unzip/untar the LAMMPS distribution you should have 5 -directories:

    - -
    -

    -Making LAMMPS

    -

    -The src directory contains the F77 and C source files for LAMMPS as -well as several sample Makefiles for different machines. To make LAMMPS -for a specfic machine, you simply type

    -

    -make machine

    -

    -from within the src directoy. E.g. "make sgi" or "make -t3e". This should create an executable named lmp_sgi or lmp_t3e.

    -

    -In the src directory, there is one top-level Makefile and several -low-level machine-specific files named Makefile.xxx where xxx = the -machine name. If a low-level Makefile exists for your platform, you do -not need to edit the top-level Makefile. However you should check the -system-specific section of the low-level Makefile to make sure the -various paths are correct for your environment. If a low-level Makefile -does not exist for your platform, you will need to add a suitable -target to the top-level Makefile. You will also need to create a new -low-level Makefile using one of the existing ones as a template. If you -wish to make LAMMPS for a single-processor workstation that doesn't -have an installed MPI library, you can specify the serial target which -uses a directory of MPI stubs to link against - e.g. "make -serial". You will need to make the stub library (see STUBS -directory) on your workstation before doing this.

    -

    -Note that the two-level Makefile system allows you to make LAMMPS for -multiple platforms. Each target creates its own object directory for -separate storage of its *.o files.

    -

    -There are a couple compiler switches of interest which can be specified -in the low-level Makefiles. If you use a F77FLAGS switch of -DSYNC then -synchronization calls will be made before the timing routines in -integrate.f. This may slow down the code slightly, but will make the -reported timings at the end of a run more accurate. The CCFLAGS setting -in the low-level Makefiles requires a FFT setting, for example --DFFT_SGI or -DFFT_T3E. This is for inclusion of the appropriate -machine-specific native 1-d FFT libraries on various platforms. -Currently, the supported machines and switches (used in fft_3d.c) are -FFT_SGI, FFT_DEC, FFT_INTEL, FFT_T3E, and FFT_FFTW. The latter is a -publicly available portable FFT library, FFTW, -which you can install on any machine. If none of these options is -suitable for your machine, please contact me, and we'll discuss how to -add the capability to call your machine's native FFT library.

    -
    -

    -Running LAMMPS

    -

    -LAMMPS is run by redirecting a file of input commands into it.

    -

    -lmp_sgi < in.lj

    -

    -lmp_t3e < in.lj

    -

    -The input file contains commands that specify the parameters for the -simulation as well as read other necessary files such as a data file -that describes the initial atom positions, molecular topology, and -force-field parameters. The input_commands - page describes all the possible commands that can be used. The data_format page describes the format of -the data file.

    -

    -LAMMPS can be run on any number of processors, including a single -processor. In principle you should get identical answers on any number -of processors and on any machine. In practice, numerical round-off can -cause slight differences and eventual divergence of dynamical -trajectories.

    -

    -When LAMMPS runs, if you get an error message to the screen about -"boosting" something, it means one (or more) data arrays are -not allocated large enough. Some of these errors are detected at setup, -others like neighbor list overflow may not occur until the middle of a -run. When the latter happens the program will either gracefully stop -(if all processors incurred the same error) or hang (with an error -message). Unfortunately in the current version of LAMMPS which uses -static memory allocation, changing the array size(s) requires you to -edit the appropriate line(s) in the param.h file and recompile the code.

    -

    -I've tried to be careful about detecting memory-overflow errors in -LAMMPS. If the code ever crashes or hangs without spitting out an error -message first, it's probably a bug, so let me know about it. Of course -this applies to problems due to algorithmic or parallelism issues, not -to physics mistkaes, like specifying too big a timestep or putting 2 -atoms on top of each other! One exception is that different MPI -implementations handle buffering of messages differently. If the code -hangs without an error message, it may be that you need to specify an -MPI setting or two (usually via an environment variable) to enable -buffering or boost the sizes of messages that can be buffered.

    -
    -

    -Examples

    -

    -There are several sample problems in the examples directory. All of -them use an input file (in.*) of commands and a data file (data.*) of -initial atomic coordinates and produce one or more output files. The -*.xxx.P files are outputs on P processors on a particular machine which -you can compare your answers to.

    -

    -(1) lj

    -

    -Simple atomic simulations of Lennard-Jones atoms of 1 or 3 species with -various ensembles -- NVE, NVT, NPT.

    -

    -(2) charge

    -

    -A few timestep simulation of a box of charged atoms for testing the -Coulombic options -- cutoff, Ewald, particle-mesh Ewald (PPPM).

    -

    -(3) class2

    -

    -A simple test run of phenyalanine using DISCOVER cff95 class II force -fields.

    -

    -(4) min

    -

    -An energy minimization of a transcription protein.

    -

    -(5) lc

    -

    -Small (250 atom) and large (6750 atom) simulations of liquid crystal -molecules with various Coulombic options and periodicity settings. The -large-system date file was created by using the "replicate" -tool on the small-system data file.

    -

    -(6) flow

    -

    -2-d flow of Lennard-Jones atoms in a channel using various contraint -options.

    -

    -(7) polymer

    -

    -Simulations of bead-spring polymer models with one chain type and two -chain types (different size monomers). The two-chain system also has -freely diffusing monomers. This illustrates use of the setup_chain -program in the tools directory and also how to use soft potentials to -untangle the initial configurations.

    -
    -

    -Other Tools

    -

    -The msi2lmp directory has source code for a tool that converts MSI -Discover files to LAMMPS input data files. This tool requires you to -have the Discover force-field description files in order to convert -those parameters to LAMMPS parameters. See the README file in the -msi2lmp directory for additional information.

    -

    -The tools directory has a C file called replicate.c which is useful for -generating new LAMMPS data files from existing ones - e.g. scaling the -atom coordinates, replicating the system to make a larger one, etc. See -the comments at the top of replicate.c for instructions on how to use -it.

    -

    -The tools directory has a F77 program called setup_lj (compile and link -with print.c) which can be used to generate a 3-d box of Lennard Jones -atoms (one or more atom types) like those used in examples/lj.

    -

    -The tools directory also has a F77 program called setup_chain.f -(compile and link with print.c) which can be used to generate random -initial polymer configurations for bead-spring models like those used -in examples/polymer. It uses an input polymer definition file (see -examples/polymer for two sample def files) that specfies how many -chains of what length, a random number seed, etc.

    - - diff -Naur lammps-26Jan17/doc/src/99/crib.html lammps-13Feb17/doc/src/99/crib.html --- lammps-26Jan17/doc/src/99/crib.html 2016-05-09 16:05:30.630573000 -0600 +++ lammps-13Feb17/doc/src/99/crib.html 1969-12-31 17:00:00.000000000 -0700 @@ -1,629 +0,0 @@ - - - - - - -

    -Crib File

    -

    -Return to top-level of LAMMPS documentation.

    -

    -This file contains one-line descriptions of the key variables and -parameters used in LAMMPS. The variables are listed by their data type:

    - -

    -Note: this file is somewhat out-of-date for LAMMPS 99.

    -
    -

    -Parameters:

    - -
    -

    -Arrays (real):

    - -
    -

    -Arrays (integer):

    - -
    -

    -Variables (real):

    - -
    -

    -Variables (integer):

    - -
    -

    -Variables (character):

    - -

    -

    - - diff -Naur lammps-26Jan17/doc/src/99/data_format.html lammps-13Feb17/doc/src/99/data_format.html --- lammps-26Jan17/doc/src/99/data_format.html 2016-05-09 16:05:30.630573000 -0600 +++ lammps-13Feb17/doc/src/99/data_format.html 1969-12-31 17:00:00.000000000 -0700 @@ -1,239 +0,0 @@ - - - - - - -

    -LAMMPS Data Format

    -

    -Return to top-level of LAMMPS documentation

    -

    -This file describes the format of the data file read into LAMMPS with -the "read data" command. The data file contains basic -information about the size of the problem to be run, the initial atomic -coordinates, molecular topology, and (optionally) force-field -coefficients. It will be easiest to understand this file if you read it -while looking at a sample data file from the examples.

    -

    -This page has 2 sections:

    - -
    -

    -Rules for formatting the Data File:

    -

    -Blank lines are important. After the header section, new entries are -separated by blank lines.

    -

    -Indentation and space between words/numbers on one line is not -important except that entry keywords (e.g. Masses, Bond Coeffs) must be -left-justified and capitalized as shown.

    -

    -The header section (thru box bounds) must appear first in the file, the -remaining entries (Masses, various Coeffs, Atoms, Bonds, etc) can come -in any order.

    -

    -These entries must be in the file: header section, Masses, Atoms.

    -

    -These entries must be in the file if there are a non-zero number of -them: Bonds, Angles, Dihedrals, Impropers, Bond Coeffs, Angle Coeffs, -Dihedral Coeffs, Improper Coeffs. Cross-term coefficients for a -particular kind of interaction (e.g. BondAngle Coeffs for bonds) must -appear if class II force fields have been turned on in the input -command file via a "style" command.

    -

    -The Nonbond Coeffs entry contains one line for each atom type. These -are the coefficients for an interaction between 2 atoms of the same -type. The cross-type coeffs are computed by the appropriate class I or -class II mixing rules, or can be specified explicitly using the -"nonbond coeff" command in the input command script. See the force_fields page for more information.

    -

    -The Nonbond Coeffs and Bond Coeffs entries are optional since they can -be specified from the input command script. This is not true if bond -style is set to class II since those coeffs can only be specified in -this data file.

    -

    -In the Atoms entry, the atoms can be in any order so long as there are -N entries. The 1st number on the line is the atom-tag (number from 1 to -N) which is used to identify the atom throughout the simulation. The -molecule-tag is a second identifier which is attached to the atom; it -can be 0, or a counter for the molecule the atom is part of, or any -other number you wish. The q value is the charge of the atom in -electron units (e.g. +1 for a proton). The xyz values are the initial -position of the atom. For 2-d simulations specify z as 0.0.

    -

    -The final 3 nx,ny,nz values on a line of the Atoms entry are optional. -LAMMPS only reads them if the "true flag" command is -specified in the input command script. Otherwise they are initialized -to 0 by LAMMPS. Their meaning, for each dimension, is that -"n" box-lengths are added to xyz to get the atom's -"true" un-remapped position. This can be useful in pre- or -post-processing to enable the unwrapping of long-chained molecules -which wrap thru the periodic box one or more times. The value of -"n" can be positive, negative, or zero. For 2-d simulations -specify nz as 0.

    -

    -For simulations with periodic boundary conditions, xyz are remapped -into the periodic box (from as far away as needed), so the initial -coordinates need not be inside the box. The nx,ny,nz values (as read in -or as set to zero by LAMMPS) are appropriately adjusted by this -remapping.

    -

    -The number of coefficients specified on each line of coefficient -entries (Nonbond Coeffs, Bond Coeffs, etc) depends on the -"style" of interaction. This is specified in the input -command script, unless the default is used. See the input_commands page for a description -of the various style options. The input_commands - and force_fields pages explain the -meaning and valid ranges for each of the coefficients.

    -
    -

    -Sample file with Annotations

    -

    -Here is a sample file with annotations in parenthesis and lengthy -sections replaced by dots (...). Note that the blank lines are -important in this example.

    -
    -
    -LAMMPS Description           (1st line of file)
    -
    -100 atoms         (this must be the 3rd line, 1st 2 lines are ignored)
    -95 bonds                (# of bonds to be simulated)
    -50 angles               (include these lines even if number = 0)
    -30 dihedrals
    -20 impropers
    -
    -5 atom types           (# of nonbond atom types)
    -10 bond types          (# of bond types = sets of bond coefficients)
    -18 angle types         
    -20 dihedral types      (do not include a bond,angle,dihedral,improper type
    -2 improper types             line if number of bonds,angles,etc is 0)
    -
    --0.5 0.5 xlo xhi       (for periodic systems this is box size,
    --0.5 0.5 ylo yhi        for non-periodic it is min/max extent of atoms)
    --0.5 0.5 zlo zhi       (do not include this line for 2-d simulations)
    -
    -Masses
    -
    -  1 mass
    -  ...
    -  N mass                           (N = # of atom types)
    -
    -Nonbond Coeffs
    -
    -  1 coeff1 coeff2 ...
    -  ...
    -  N coeff1 coeff2 ...              (N = # of atom types)
    -
    -Bond Coeffs
    -
    -  1 coeff1 coeff2 ...
    -  ...
    -  N coeff1 coeff2 ...              (N = # of bond types)
    -
    -Angle Coeffs
    -
    -  1 coeff1 coeff2 ...
    -  ...
    -  N coeff1 coeff2 ...              (N = # of angle types)
    -
    -Dihedral Coeffs
    -
    -  1 coeff1 coeff2 ...
    -  ...
    -  N coeff1 coeff2 ...              (N = # of dihedral types)
    -
    -Improper Coeffs
    -
    -  1 coeff1 coeff2 ...
    -  ...
    -  N coeff1 coeff2 ...              (N = # of improper types)
    -
    -BondBond Coeffs
    -
    -  1 coeff1 coeff2 ...
    -  ...
    -  N coeff1 coeff2 ...              (N = # of angle types)
    -
    -BondAngle Coeffs
    -
    -  1 coeff1 coeff2 ...
    -  ...
    -  N coeff1 coeff2 ...              (N = # of angle types)
    -
    -MiddleBondTorsion Coeffs
    -
    -  1 coeff1 coeff2 ...
    -  ...
    -  N coeff1 coeff2 ...              (N = # of dihedral types)
    -
    -EndBondTorsion Coeffs
    -
    -  1 coeff1 coeff2 ...
    -  ...
    -  N coeff1 coeff2 ...              (N = # of dihedral types)
    -
    -AngleTorsion Coeffs
    -
    -  1 coeff1 coeff2 ...
    -  ...
    -  N coeff1 coeff2 ...              (N = # of dihedral types)
    -
    -AngleAngleTorsion Coeffs
    -
    -  1 coeff1 coeff2 ...
    -  ...
    -  N coeff1 coeff2 ...              (N = # of dihedral types)
    -
    -BondBond13 Coeffs
    -
    -  1 coeff1 coeff2 ...
    -  ...
    -  N coeff1 coeff2 ...              (N = # of dihedral types)
    -
    -AngleAngle Coeffs
    -
    -  1 coeff1 coeff2 ...
    -  ...
    -  N coeff1 coeff2 ...              (N = # of improper types)
    -
    -Atoms
    -
    -  1 molecule-tag atom-type q x y z nx ny nz  (nx,ny,nz are optional -
    -  ...                                    see "true flag" input command)
    -  ...                
    -  N molecule-tag atom-type q x y z nx ny nz  (N = # of atoms)
    -
    -Bonds
    -
    -  1 bond-type atom-1 atom-2
    -  ...
    -  N bond-type atom-1 atom-2             (N = # of bonds)
    -
    -Angles
    -
    -  1 angle-type atom-1 atom-2 atom-3  (atom-2 is the center atom in angle)
    -  ...
    -  N angle-type atom-1 atom-2 atom-3  (N = # of angles)
    -
    -Dihedrals
    -
    -  1 dihedral-type atom-1 atom-2 atom-3 atom-4  (atoms 2-3 form central bond)
    -  ...
    -  N dihedral-type atom-1 atom-2 atom-3 atom-4  (N = # of dihedrals)
    -
    -Impropers
    -
    -  1 improper-type atom-1 atom-2 atom-3 atom-4  (atom-1 is central atom)
    -  ...
    -  N improper-type atom-1 atom-2 atom-3 atom-4  (N = # of impropers)
    -
    - - diff -Naur lammps-26Jan17/doc/src/99/force_fields.html lammps-13Feb17/doc/src/99/force_fields.html --- lammps-26Jan17/doc/src/99/force_fields.html 2016-05-09 16:05:30.630573000 -0600 +++ lammps-13Feb17/doc/src/99/force_fields.html 1969-12-31 17:00:00.000000000 -0700 @@ -1,550 +0,0 @@ - - - - - - -

    -LAMMPS Force Fields

    -

    -Return to top-level of LAMMPS documentation

    -

    -This file outlines the force-field formulas used in LAMMPS. Read this -file in conjunction with the data_format - and units file.

    -

    -The sections of this page are as follows:

    - -
    -

    -Nonbond Coulomb

    -

    -Whatever Coulomb style is specified in the input command file, the -short-range Coulombic interactions are computed by this formula, -modified by an appropriate smoother for the smooth, Ewald, and PPPM -styles.

    -
    -  E = C q1 q2 / (epsilon * r)
    -
    -  r = distance (computed by LAMMPS)
    -  C = hardwired constant to convert to energy units
    -  q1,q2 = charge of each atom in electron units (proton = +1),
    -    specified in "Atoms" entry in data file
    -  epsilon = dielectric constant (vacuum = 1.0),
    -    set by user in input command file
    -
    -
    -

    -Nonbond Lennard-Jones

    -

    -The style of nonbond potential is specified in the input command file.

    -

    -(1) lj/cutoff

    -
    -
    -  E = 4 epsilon [ (sigma/r)^12 - (sigma/r)^6 ]
    -
    -  standard Lennard Jones potential
    -
    -  r = distance (computed by LAMMPS)
    -
    -  coeff1 = epsilon (energy)
    -  coeff2 = sigma (distance)
    -
    -  2 coeffs are listed in data file or set in input script
    -  1 cutoff is set in input script
    -
    -
    -

    -(2) lj/switch

    -
    -
    -  E = 4 epsilon [ (sigma/r)^12 - (sigma/r)^6 ]  for  r < r_inner
    -    = spline fit    for  r_inner < r < cutoff
    -    = 0             for r > cutoff
    -
    -  switching function (spline fit) is applied to standard LJ
    -    within a switching region (from r_inner to cutoff) so that
    -    energy and force go smoothly to zero
    -  spline coefficients are computed by LAMMPS
    -    so that at inner cutoff (r_inner) the potential, force, 
    -    and 1st-derivative of force are all continuous, 
    -    and at outer cutoff (cutoff) the potential and force
    -    both go to zero
    -
    -  r = distance (computed by LAMMPS)
    -
    -  coeff1 = epsilon (energy)
    -  coeff2 = sigma (distance)
    -  
    -  2 coeffs are listed in data file or set in input script
    -  2 cutoffs (r_inner and cutoff) are set in input script
    -
    -
    -

    -(3) lj/shift

    -
    -
    -  E = 4 epsilon [ (sigma/(r - delta))^12 - (sigma/(r - delta))^6 ]
    -
    -  same as lj/cutoff except that r is shifted by delta
    -
    -  r = distance (computed by LAMMPS)
    -
    -  coeff1 = epsilon (energy)
    -  coeff2 = sigma (distance)
    -  coeff3 = delta (distance)
    -
    -  3 coeffs are listed in data file or set in input script
    -  1 cutoff is set in input script
    -
    -
    -

    -(4) soft

    -
    -
    -  E = A * [ 1 + cos( pi * r / cutoff ) ]
    -
    -  useful for pushing apart overlapping atoms by ramping A over time
    -
    -  r = distance (computed by LAMMPS)
    -
    -  coeff1 = prefactor A at start of run (energy)
    -  coeff2 = prefactor A at end of run (energy)
    -
    -  2 coeffs are listed in data file or set in input script
    -  1 cutoff is set in input script
    -
    -
    -

    -(5) class2/cutoff

    -
    -
    -  E = epsilon [ 2 (sigma/r)^9 - 3 (sigma/r)^6 ]
    -
    -  used with class2 bonded force field
    -
    -  r = distance (computed by LAMMPS)
    -
    -  coeff1 = epsilon (energy)
    -  coeff2 = sigma (distance)
    -
    -  2 coeffs are listed in data file or set in input script
    -  1 cutoff is set in input script
    -
    -
    -

    -Mixing Rules for Lennard-Jones

    -

    -The coefficients for each nonbond style are input in either the data -file by the "read data" command or in the input script using -the "nonbond coeff" command. In the former case, only one set -of coefficients is input for each atom type. The cross-type coeffs are -computed using one of three possible mixing rules:

    -
    -
    - geometric:  epsilon_ij = sqrt(epsilon_i * epsilon_j)
    -             sigma_ij = sqrt(sigma_i * sigma_j)
    -
    - arithmetic: epsilon_ij = sqrt(epsilon_i * epsilon_j)
    -             sigma_ij = (sigma_i + sigma_j) / 2
    -
    - sixthpower: epsilon_ij =
    -               (2 * sqrt(epsilon_i*epsilon_j) * sigma_i^3 * sigma_j^3) /
    -               (sigma_i^6 + sigma_j^6)
    -             sigma_ij=  ((sigma_i**6 + sigma_j**6) / 2) ^ (1/6)
    -
    -
    -

    -The default mixing rule for nonbond styles lj/cutoff, lj/switch, -lj/shift, and soft is "geometric". The default for nonbond -style class2/cutoff is "sixthpower".

    -

    -The default can be overridden using the "mixing style" -command. The one exception to this is for the nonbond style soft, for -which only an epsilon prefactor is input. This is always mixed -geometrically.

    -

    -Also, for nonbond style lj/shift, the delta coefficient is always mixed -using the rule

    - -
    -

    -Bonds

    -

    -The style of bond potential is specified in the input command file.

    -

    -(1) harmonic

    -
    -
    -  E = K (r - r0)^2
    -
    -  standard harmonic spring
    -
    -  r = distance (computed by LAMMPS)
    -
    -  coeff1 = K (energy/distance^2)  (the usual 1/2 is included in the K)
    -  coeff2 = r0 (distance)
    -
    -  2 coeffs are listed in data file or set in input script
    -
    -
    -

    -(2) FENE/standard

    -
    -
    -  E = -0.5 K R0^2 * ln[1 - (r/R0)^2] +
    -    4 epsilon [(sigma/r)^12 - (sigma/r)^6] + epsilon
    -
    -  finite extensible nonlinear elastic (FENE) potential for
    -    polymer bead-spring models
    -  see Kremer, Grest, J Chem Phys, 92, p 5057 (1990)
    -
    -  r = distance (computed by LAMMPS)
    -
    -  coeff1 = K (energy/distance^2)
    -  coeff2 = R0 (distance)
    -  coeff3 = epsilon (energy)
    -  coeff4 = sigma (distance)
    -
    -  1st term is attraction, 2nd term is repulsion (shifted LJ)
    -  1st term extends to R0
    -  2nd term only extends to the minimum of the LJ potential,
    -    a cutoff distance computed by LAMMPS (2^(1/6) * sigma)
    -
    -  4 coeffs are listed in data file or set in input script
    -
    -
    -

    -(3) FENE/shift

    -
    -
    -  E = -0.5 K R0^2 * ln[1 - ((r - delta)/R0)^2] +
    -    4 epsilon [(sigma/(r - delta))^12 - (sigma/(r - delta))^6] + epsilon
    -
    -  same as FENE/standard expect that r is shifted by delta
    -
    -  r = distance (computed by LAMMPS)
    -
    -  coeff1 = K (energy/distance^2)
    -  coeff2 = R0 (distance)
    -  coeff3 = epsilon (energy)
    -  coeff4 = sigma (distance)
    -  coeff5 = delta (distance)
    -
    -  1st term is attraction, 2nd term is repulsion (shifted LJ)
    -  1st term extends to R0
    -  2nd term only extends to the minimum of the LJ potential,
    -    a cutoff distance computed by LAMMPS (2^(1/6) * sigma + delta)
    -
    -  5 coeffs are listed in data file or set in input script
    -
    -
    -

    -(4) nonlinear

    -
    -
    -  E = epsilon (r - r0)^2 / [ lamda^2 - (r - r0)^2 ]
    -
    -  non-harmonic spring of equilibrium length r0
    -    with finite extension of lamda
    -  see Rector, Van Swol, Henderson, Molecular Physics, 82, p 1009 (1994)
    -
    -  r = distance (computed by LAMMPS)
    -
    -  coeff1 = epsilon (energy)
    -  coeff2 = r0 (distance)
    -  coeff3 = lamda (distance)
    -
    -  3 coeffs are listed in data file or set in input script
    -
    -
    -

    -(5) class2

    -
    -
    -  E = K2 (r - r0)^2  +  K3 (r - r0)^3  +  K4 (r - r0)^4
    -
    -  r = distance (computed by LAMMPS)
    -
    -  coeff1 = r0 (distance)
    -  coeff2 = K2 (energy/distance^2)
    -  coeff3 = K3 (energy/distance^3)
    -  coeff4 = K4 (energy/distance^4)
    -
    -  4 coeffs are listed in data file - cannot be set in input script
    -
    -
    -

    -Angles

    -

    -The style of angle potential is specified in the input command file.

    -

    -(1) harmonic

    -
    -
    -  E = K (theta - theta0)^2
    -
    -  theta = radians (computed by LAMMPS)
    -
    -  coeff1 = K (energy/radian^2) (the usual 1/2 is included in the K)
    -  coeff2 = theta0 (degrees) (converted to radians within LAMMPS)
    -
    -  2 coeffs are listed in data file
    -
    -
    -

    -(2) class2

    -
    -
    -  E = K2 (theta - theta0)^2 +  K3 (theta - theta0)^3 + 
    -       K4 (theta - theta0)^4
    -
    -  theta = radians (computed by LAMMPS)
    -
    -  coeff1 = theta0 (degrees) (converted to radians within LAMMPS)
    -  coeff2 = K2 (energy/radian^2)
    -  coeff3 = K3 (energy/radian^3)
    -  coeff4 = K4 (energy/radian^4)
    -
    -  4 coeffs are listed in data file
    -
    -
    -

    -Dihedrals

    -

    -The style of dihedral potential is specified in the input command file.

    -

    -(1) harmonic

    -
    -
    -  E = K [1 + d * cos (n * phi) ]
    -
    -  phi = radians (computed by LAMMPS)
    -
    -  coeff1 = K (energy)
    -  coeff2 = d (always +1 or -1)
    -  coeff3 = n (1,2,3,4,6)
    -
    -  Cautions when comparing to other force fields:
    -
    -  some force fields reverse the sign convention on d so that
    -    E = K [1 - d * cos(n*phi)]
    -  some force fields divide/multiply K by the number of multiple
    -    torsions that contain the j-k bond in an i-j-k-l torsion
    -  some force fields let n be positive or negative which 
    -    corresponds to d = 1,-1
    -  in the LAMMPS force field, the trans position = 180 degrees, while
    -    in some force fields trans = 0 degrees
    - 
    -  3 coeffs are listed in data file
    -
    -

    -(2) class2

    -
    -
    -  E = SUM(n=1,3) { K_n [ 1 - cos( n*Phi - Phi0_n ) ] }
    -
    -  phi = radians (computed by LAMMPS)
    -
    -  coeff1 = K_1 (energy)
    -  coeff2 = Phi0_1 (degrees) (converted to radians within LAMMPS)
    -  coeff3 = K_2 (energy)
    -  coeff4 = Phi0_2 (degrees) (converted to radians within LAMMPS)
    -  coeff5 = K_3 (energy)
    -  coeff6 = Phi0_3 (degrees) (converted to radians within LAMMPS)
    -
    -  6 coeffs are listed in data file
    -
    -
    -

    -Impropers

    -

    -The style of improper potential is specified in the input command file.

    -

    -(1) harmonic

    -
    -
    -  E = K (chi - chi0)^2
    -
    -  chi = radians (computed by LAMMPS)
    -
    -  coeff1 = K (energy/radian^2) (the usual 1/2 is included in the K)
    -  coeff2 = chi0 (degrees) (converted to radians within LAMMPS)
    -
    -  in data file, listing of 4 atoms requires atom-1 as central atom
    -  some force fields (AMBER,Discover) have atom-2 as central atom - it is really
    -    an out-of-plane torsion, may need to treat as dihedral in LAMMPS
    -
    -  2 coeffs are listed in data file
    -
    -

    -(2) class2

    -
    -
    -  same formula, coeffs, and meaning as "harmonic" except that LAMMPS
    -    averages all 3 angle-contributions to chi
    -  in class II this is called a Wilson out-of-plane interaction
    -
    -  2 coeffs are listed in data file
    -
    -
    -

    -Class II Force Field

    -

    -If class II force fields are selected in the input command file, -additional cross terms are computed as part of the force field.

    -

    -Bond-Bond (computed within class II angles)

    -
    -
    -  E = K (r - r0) * (r' - r0')
    -
    -  r,r' = distance (computed by LAMMPS)
    -
    -  coeff1 = K (energy/distance^2)
    -  coeff2 = r0 (distance)
    -  coeff3 = r0' (distance)
    -
    -  3 coeffs are input in data file
    -
    -

    -Bond-Angle (computed within class II angles for each of 2 bonds)

    -
    -
    -  E = K_n (r - r0_n) * (theta - theta0)
    -
    -  r = distance (computed by LAMMPS)
    -  theta = radians (computed by LAMMPS)
    -
    -  coeff1 = K_1 (energy/distance-radians)
    -  coeff2 = K_2 (energy/distance-radians)
    -  coeff3 = r0_1 (distance)
    -  coeff4 = r0_2 (distance)
    -
    -  Note: theta0 is known from angle coeffs so don't need it specified here
    -
    -  4 coeffs are listed in data file
    -
    -

    -Middle-Bond-Torsion (computed within class II dihedral)

    -
    -
    -  E = (r - r0) * [ F1*cos(phi) + F2*cos(2*phi) + F3*cos(3*phi) ]
    -
    -  r = distance (computed by LAMMPS)
    -  phi = radians (computed by LAMMPS)
    -
    -  coeff1 = F1 (energy/distance)
    -  coeff2 = F2 (energy/distance)
    -  coeff3 = F3 (energy/distance)
    -  coeff4 = r0 (distance)
    -
    -  4 coeffs are listed in data file
    -
    -

    -End-Bond-Torsion (computed within class II dihedral for each of 2 -bonds)

    -
    -
    -  E = (r - r0_n) * [ F1_n*cos(phi) + F2_n*cos(2*phi) + F3_n*cos(3*phi) ]
    -
    -  r = distance (computed by LAMMPS)
    -  phi = radians (computed by LAMMPS)
    -
    -  coeff1 = F1_1 (energy/distance)
    -  coeff2 = F2_1 (energy/distance)
    -  coeff3 = F3_1 (energy/distance)
    -  coeff4 = F1_2 (energy/distance)
    -  coeff5 = F2_3 (energy/distance)
    -  coeff6 = F3_3 (energy/distance)
    -  coeff7 = r0_1 (distance)
    -  coeff8 = r0_2 (distance)
    -
    -  8 coeffs are listed in data file
    -
    -

    -Angle-Torsion (computed within class II dihedral for each of 2 angles)

    -
    -
    -  E = (theta - theta0) * [ F1_n*cos(phi) + F2_n*cos(2*phi) + F3_n*cos(3*phi) ]
    -
    -  theta = radians (computed by LAMMPS)
    -  phi = radians (computed by LAMMPS)
    -
    -  coeff1 = F1_1 (energy/radians)
    -  coeff2 = F2_1 (energy/radians)
    -  coeff3 = F3_1 (energy/radians)
    -  coeff4 = F1_2 (energy/radians)
    -  coeff5 = F2_3 (energy/radians)
    -  coeff6 = F3_3 (energy/radians)
    -  coeff7 = theta0_1 (degrees) (converted to radians within LAMMPS)
    -  coeff8 = theta0_2 (degrees) (converted to radians within LAMMPS)
    -
    -  8 coeffs are listed in data file
    -
    -

    -Angle-Angle-Torsion (computed within class II dihedral)

    -
    -
    -  E = K (theta - theta0) * (theta' - theta0') * (phi - phi0)
    -
    -  theta,theta' = radians (computed by LAMMPS)
    -  phi = radians (computed by LAMMPS)
    -
    -  coeff1 = K (energy/radians^3)
    -  coeff2 = theta0 (degrees) (converted to radians within LAMMPS)
    -  coeff3 = theta0' (degrees) (converted to radians within LAMMPS)
    -
    -  Note: phi0 is known from dihedral coeffs so don't need it specified here
    -
    -  3 coeffs are listed in data file
    -
    -
    -

    -Bond-Bond-13-Torsion (computed within class II dihedral)

    -
    -
    -  (undocumented)
    -
    -
    -

    -Angle-Angle (computed within class II improper for each of 3 pairs of -angles)

    -
    -
    -  E = K_n (theta - theta0_n) * (theta' - theta0_n')
    -
    -  theta,theta' = radians (computed by LAMMPS)
    -
    -  coeff1 = K_1 (energy/radians^2)
    -  coeff2 = K_2 (energy/radians^2)
    -  coeff3 = K_3 (energy/radians^2)
    -  coeff4 = theta0_1 (degrees) (converted to radians within LAMMPS)
    -  coeff5 = theta0_2 (degrees) (converted to radians within LAMMPS)
    -  coeff6 = theta0_3 (degrees) (converted to radians within LAMMPS)
    -
    -  6 coeffs are listed in data file
    -
    - - diff -Naur lammps-26Jan17/doc/src/99/history.html lammps-13Feb17/doc/src/99/history.html --- lammps-26Jan17/doc/src/99/history.html 2016-05-09 16:05:30.630573000 -0600 +++ lammps-13Feb17/doc/src/99/history.html 1969-12-31 17:00:00.000000000 -0700 @@ -1,127 +0,0 @@ - - - - - - -

    -History of LAMMPS

    -

    -Return to top-level of LAMMPS documentation.

    -

    -This is a brief history of features added to each version of LAMMPS.

    -
    -

    -LAMMPS 99 - June 99

    - -
    -

    -Version 5.0 - Oct 1997

    - -
    -

    -Version 4.0 - March 1997

    - -
    -

    -Version 3.0 - March 1996

    - -
    -

    -Version 2.0 - October 1995

    - -
    -

    -Version 1.1 - February 1995

    - -
    -

    -Version 1.0 - January 1995

    - - - diff -Naur lammps-26Jan17/doc/src/99/input_commands.html lammps-13Feb17/doc/src/99/input_commands.html --- lammps-26Jan17/doc/src/99/input_commands.html 2016-05-09 16:05:30.630573000 -0600 +++ lammps-13Feb17/doc/src/99/input_commands.html 1969-12-31 17:00:00.000000000 -0700 @@ -1,1570 +0,0 @@ - - - - - - -

    -LAMMPS Input Commands

    -

    -Return to top-level of LAMMPS documentation.

    -

    -This page contains a complete list of valid LAMMPS inputs. It will be -easiest to understand if you read it while looking at sample input -files such as those in the examples directory.

    -

    -The input file of commands is read by LAMMPS, one line at a time. Each -command causes LAMMPS to take some action. Usually it simply causes -some internal variable(s) to be set. Or it may cause a file to be read -in or a simulation to be run. In general, commands can be listed in any -order, although some commands require others to have been executed -previously.

    -

    -LAMMPS continues to read successive lines from the input command file -until the end-of-file is reached which causes LAMMPS to terminate. Thus -new simulations can be run or current simulations continued by simply -specifying additional commands in the input command file.

    -

    -The next section of this page gives an example of each command, some of -which can be specified in multiple styles. Typically the commands take -one or more parameters. The keyword for each command should begin in -the leftmost column and all characters in the command and its -parameters should be in lower-case. Parameters can be separated by -arbitrary numbers of spaces and/or tabs (so long as the command fits on -one line). The remainder of the line after the last parameter is -ignored.

    -

    -The final section of this page gives a more detailed description of -each command with its associated parameters. It also lists the default -parameters associated with each command. When performing a simulation, -you only need specify a particular command if you do not want to use -the default settings.

    - -
    -

    -Categories of Commands withExamples

    - -
    -

    -Basic Settings

    -
    -comments
    -
    -units                  real
    -dimension              3
    -periodicity            0 0 0
    -processor grid         10 10 10
    -newton flag            3
    -timestep               1.0
    -respa                  2 2 4
    -neighbor               2.0 0 1 10 1
    -special bonds          0.0 0.0 0.4
    -
    -
    -

    -Output Control

    -
    -thermo flag            50
    -thermo style           0
    -true flag              0
    -
    -dump atoms             100 filename
    -dump velocities        100 filename
    -dump forces            100 filename
    -
    -restart                1000 file1 file2
    -diagnostic             diffusion 100 filename 3 1.0 -1.0 2.5
    -
    -
    -

    -Ensemble Control

    -
    -temp control           none
    -temp control           rescale 300.0 300.0 100 20.0
    -temp control           replace 300.0 300.0 50 12345678
    -temp control           langevin 50.0 50.0 0.01 123456
    -temp control           nose/hoover 300.0 300.0 0.01
    -
    -press control          none
    -press control          nose/hoover 1.0 1.0 0.001
    -press_x control        nose/hoover 1.0 1.0 0.001
    -press_y control        nose/hoover 1.0 1.0 0.001
    -press_z control        nose/hoover 1.0 1.0 0.001
    -
    -
    -

    -Nonbond Force Field

    -
    -nonbond style          none
    -nonbond style          lj/cutoff 10.0 0
    -nonbond coeff          1 2 1.0 3.45 10.0
    -nonbond style          lj/smooth 8.0 10.0
    -nonbond coeff          1 2 1.0 3.45 8.0 10.0
    -nonbond style          lj/shift 10.0 0
    -nonbond coeff          1 2 1.0 3.45 2.0 10.0
    -nonbond style          soft 2.5
    -nonbond coeff          1 2 1.0 30.0 2.5
    -nonbond style          class2/cutoff 10.0 0
    -nonbond coeff          1 2 1.0 3.45 10.0
    -mixing style           geometric
    -
    -coulomb style          none
    -coulomb style          cutoff 10.0
    -coulomb style          smooth 8.0 10.0
    -coulomb style          ewald 10.0 1.0E-4
    -coulomb style          pppm 10.0 1.0E-4
    -pppm mesh              32 32 64
    -pppm order             5
    -dielectric             1.0
    -
    -
    -

    -Bonded Force Field

    -
    -bond style             none
    -bond style             harmonic
    -bond coeff             1 100.0 3.45
    -bond style             fene/standard
    -bond coeff             1 30.0 1.5 1.0 1.0
    -bond style             fene/shift
    -bond coeff             1 30.0 1.5 1.0 1.0 0.2
    -bond style             nonlinear
    -bond coeff             1 28.0 0.748308 0.166667
    -bond style             class2
    -
    -angle style            none
    -angle style            harmonic
    -angle style            class2
    -
    -dihedral style         none
    -dihedral style         harmonic
    -dihedral style         class2
    -
    -improper style         none
    -improper style         harmonic
    -improper style         class2
    -
    -
    -

    -Atom Creation

    -
    -read data              filename
    -read restart           filename
    -
    -
    -

    -Velocity Creation

    -
    -create group           types 1 3
    -create group           region 0.0 1.0 0.0 1.0 INF 1.0
    -create group           remainder
    -
    -create temp            uniform 300.0 12345678
    -create temp            gaussian 300.0 12345678
    -create temp            velocity 0.0 0.0 0.0
    -
    -
    -

    -Constraint Creation

    -
    -fix style              none
    -fix style              1 setforce 0.0 NULL 0.0
    -fix style              1 addforce 1.0 0.0 0.0
    -fix style              1 aveforce 1.0 0.0 0.0
    -fix style              1 rescale 300.0 300.0 100 20.0
    -fix style              1 langevin 50.0 50.0 0.01 12345 1 1 1
    -fix style              1 nose/hoover 50.0 50.0 0.01
    -fix style              1 springforce 10.0 NULL NULL 1.0
    -fix style              1 dragforce 10.0 -5.0 NULL 2.0 1.0
    -
    -assign fix             1 atom 200
    -assign fix             1 molecule 50
    -assign fix             1 type 2
    -assign fix             1 region 0.0 1.0 INF INF 0.0 1.0
    -assign fix             1 remainder
    -
    -
    -

    -Dynamics or Minimization

    -
    -reset timestep         0
    -
    -run                    1000
    -
    -min style              hftn
    -min file               filename
    -minimize               0.0001 9999 50000
    -
    -
    -

    -Alphabetic Listing of Commands:

    -
    -

    -angle style

    - -
    -define style of angle interactions to use for all 3-body terms
    -angle style determines how many angle coefficients the program expects to
    -  find in a "Angle Coeffs" entry in the data file, 
    -  thus the style must be set (if not using default)
    -  before using the "read data" command (if the data file contains a 
    -  "Angle Coeffs" entry)
    -coefficients for all angle types must be defined in data (or restart)
    -  file by "Angle Coeffs" entry before a run is performed
    -style of "none" erases all previously defined angle coefficients, must
    -  reset style to something else before defining new coefficients
    -
    -Default = harmonic
    -
    -
    -

    -assign fix

    - -
    -styles:
    -
    - -
    -coeffs:  atom
    -               (1) global atom #
    -         molecule
    -               (1) molecule #
    -         type
    -               (1) atom type
    -         region
    -               (1) lower x bound of region
    -               (2) upper x bound of region
    -               (3) lower y bound of region
    -               (4) upper y bound of region
    -               (5) lower z bound of region
    -               (6) upper z bound of region
    -         remainder
    -               no other parameters required
    -
    -assign a group of atoms to a particular constraint
    -use appropriate number of coeffs for a particular style
    -the constraint itself is defined by the "fix style" command
    -multiple groups of atoms can be assigned to the same constraint
    -an atom can be assigned to multiple constraints, the contraints will be
    -  applied in the reverse order they are assigned to that atom
    -  (e.g. each timestep, the last fix assigned to an atom will be applied 
    -  to it first, then the next-to-last applied second, etc)
    -for style region, a coeff of INF means + or - infinity (all the way 
    -  to the boundary)
    -
    -
    -

    -bond coeff

    - -
    -coeffs:   harmonic
    -               (1) K (energy units)
    -               (2) r0 (distance units)
    -          fene/standard
    -               (1) k for FENE portion (energy/distance^2 units)
    -               (2) r0 for FENE portion (distance units)
    -               (3) epsilon for LJ portion (energy units)
    -               (4) sigma for LJ portion (distance units)
    -          fene/shift
    -               (1) k for FENE (energy/distance^2 units)
    -               (2) r0 for FENE after shift is performed (distance units)
    -               (3) epsilon for LJ (energy units)
    -               (4) sigma for LJ after shift is performed (distance units)
    -               (5) delta shift distance (distance units)
    -          nonlinear
    -               (1) epsilon (energy units)
    -               (2) r0 (distance units)
    -               (3) lamda (distance units)
    -          class 2
    -               currently not enabled for "bond coeff" command
    -               must be specified in data file (see "read data" command)
    -
    -define (or override) bond coefficients for an individual bond type
    -use appropriate number of coeffs for a particular style
    -these coefficients can also be set in data file 
    -  by "Bond Coeffs" entry, the most recently defined coefficients are used
    -
    -Default = no settings
    -
    -
    -

    -bond style

    - -
    -define style of bond interactions to use between all bonded atoms
    -bond style determines how many bond coefficients the program expects to
    -  find in a "Bond Coeffs" entry in the  data file or when using the 
    -  "bond coeff" command, thus the style must be set (if not using default)
    -  before using the "read data" command (if the data file contains a 
    -  "Bond Coeffs" entry)
    -coefficients for all bond types must be defined in data (or restart)
    -  file by "Bond Coeffs" entry or by "bond coeffs" commands before a run
    -  is performed
    -style of "none" erases all previously defined bond coefficients, must
    -  reset style to something else before defining new coefficients
    -
    -Default = harmonic
    -
    -
    -

    -comments

    -
    -blank lines are ignored
    -everything on a line after the last parameter is ignored
    -lines starting with a # are echoed into the log file
    -
    -
    -

    -coulomb style

    - -
    -styles:
    -
    - -
    -coeffs:  none
    -               no other parameters required
    -         cutoff
    -               (1) cutoff distance (distance units)
    -         smooth
    -               (1) inner cutoff (distance units)
    -               (2) outer cutoff (distance units)
    -         ewald
    -               (1) cutoff distance for near-field portion (distance units)
    -               (2) accuracy criterion
    -         pppm
    -               (1) cutoff distance for near-field portion (distance units)
    -               (2) accuracy criterion
    -
    -use appropriate number of coeffs for a particular style
    -if simulated system has no charges, must set "coulomb style none" to
    -  prevent LAMMPS from doing useless nonbond work
    -accuracy criterion means "one part in value" - e.g. 1.0E-4
    -Ewald and PPPM accuracy criterion are used in conjunction with cutoff
    -  to partition work between short-range and long-range routines
    -accuracy criterion effectively determines how many k-space vectors are used
    -  to approximate the energy and forces
    -for PPPM, accuracy criterion determines mesh spacing (see "particle mesh"
    -  command)
    -for PPPM, must be running on power-of-2 number of processors for FFTs
    -must use periodic boundary conditions in conjuction with Ewald and PPPM
    -cannot use any styles other than none with nonbond style = lj/shift or
    -  nonbond style = soft
    -Coulomb style = smooth should be used with nonbond style = lj/switch,
    -  and both should use same inner and outer cutoffs
    -for smooth style, outer cutoff must be > inner cutoff
    -for smooth style, atom pairs less than the inner cutoff distance use 
    -  usual Coulomb, pairs between inner and outer are smoothed, and the 
    -  potential goes to 0.0 at the outer cutoff
    -for smooth style, force is continuously differentiable everywhere
    -
    -Default = cutoff 10.0
    -
    -
    -

    -create group

    - -
    -styles:
    -
    - -
    -coeffs:  types
    -               (1) lowest atom type
    -               (2) highest atom type
    -         region
    -               (1) lower x bound of region
    -               (2) upper x bound of region
    -               (3) lower y bound of region
    -               (4) upper y bound of region
    -               (5) lower z bound of region
    -               (6) upper z bound of region
    -         remainder
    -               no other parameters required
    -       
    -used with "create temp" commmand to initialize velocities of atoms
    -by default, the "create temp" command initializes the velocities of all atoms,
    -  this command limits the initialization to a group of atoms
    -this command is only in force for the next "create temp" command, any
    -  subsequent "create temp" command is applied to all atoms (unless the
    -  "create group" command is used again)
    -for style types, only atoms with a type such that lo-type <= type <= hi-type
    -  will be initialized by "create temp"
    -for style types, lo-type can equal hi-type if just want to specify one type
    -for style region, only atoms within the specified spatial region
    -  will be initialized by "create temp"
    -for style region, a coeff of INF means + or - infinity (all the way 
    -  to the boundary)
    -for style remainder, only previously uninitialized atoms
    -  will be initialized by "create temp"
    -
    -
    -

    -create temp

    - -
    -styles: 
    -
    - -
    -coeffs:  uniform
    -               (1) target T (temperature units)
    -               (2) random # seed (0 < seed <= 8 digits)
    -         gaussian
    -               (1) target T (temperature units)
    -               (2) random # seed (0 < seed <= 8 digits)
    -         velocity
    -               (1) x velocity component (velocity units)
    -               (2) y velocity component (velocity units)
    -               (3) z velocity component (velocity units)
    -
    -initialize velocities of atoms to a specified temperature
    -use appropriate number of coeffs for a particular style
    -cannot be done before a data or restart file is read
    -by default, velocities are created for all atoms - this can be overridden
    -  by "create group" command
    -for uniform and Gaussian styles velocities are created in 
    -  processor-independent fashion - is slower but gives the same initial 
    -  state independent of # of processors
    -for uniform and Gaussian styles the momentum of the initialized atoms is
    -  also zeroed, but only if all atoms are being initialized 
    -for uniform and Gaussian styles, RN are generated with Park/Miller RNG
    -for velocity style in 2-d simulations, still specify z velocity component,
    -  even though it is ignored
    -
    -
    -

    -diagnostic

    - -
    -call a user-defined diagnostic routine every this many timesteps
    -this command can be used multiple times to call different routines
    -  at different frequencies, that use different parameters, and that
    -  send output to different files
    -value of 0 for 2nd parameter means never call this particular routine
    -this command causes any previous file associated with this user routine
    -  to be closed
    -new filename can exist, will be overwritten
    -if the file name specified is "none", then no file is opened
    -each routine that is added to diagnostic.f and enabled with a
    -  "diagnostic" command will be called at the beginning and end of
    -  each "run" and every so many timesteps during the run
    -the diagnostic.f file has further information on how to create
    -  routines that operate on internal LAMMPS data, do their own file output,
    -  perform different operations (e.g. setup and clean-up) depending
    -  on when they are called, etc
    -the user routines must be compiled and linked into LAMMPS
    -the optional 5th-9th parameters are stored in program variables which
    -  can be accessed by the diagnostic routine
    -
    -Default = none
    -
    -
    -

    -dielectric

    -
    -set dielectric constant to this value
    -
    -Default = 1.0
    -
    -
    -

    -dihedral style

    - -
    -define style of dihedral interactions to use for all 4-body terms
    -dihedral style determines how many dihedral coefficients the program expects to
    -  find in a "Dihedral Coeffs" entry in the data file, 
    -  thus the style must be set (if not using default)
    -  before using the "read data" command (if the data file contains a 
    -  "Dihedral Coeffs" entry)
    -coefficients for all dihedral types must be defined in data (or restart)
    -  file by "Dihedral Coeffs" entry before a run is performed
    -style of "none" erases all previously defined dihedral coefficients, must
    -  reset style to something else before defining new coefficients
    -
    -Default = harmonic
    -
    -
    -

    -dimension

    - -
    -for a 2-d run, assumes all z-coords are set to 0.0 in "read data" or
    -  "read restart" files and program creates no z velocities
    -this command sets the processor grid to default values for 2-d or 3-d
    -  so must be used before "processor grid" command
    -must be set before data or restart file is read
    -
    -Default = 3
    -
    -
    -

    -dump atoms

    - -
    -dump all atom positions to a file every this many timesteps
    -positions are also dumped at the start and end of every run
    -value of 0 means never dump
    -any previous file is closed
    -new filename can exist, will be overwritten
    -atom positions in dump file are in "box" units (0.0 to 1.0) in each dimension
    -
    -Default = 0
    -
    -
    -

    -dump forces

    - -
    -dump all atom forces to a file every this many timesteps
    -forces are also dumped at the start and end of every run
    -any previous file is closed
    -new filename can exist, will be overwritten
    -value of 0 means never dump
    -
    -Default = 0
    -
    -
    -

    -dump velocities

    - -
    -dump all atom velocities to a file every this many timesteps
    -velocities are also dumped at the start and end of every run
    -any previous file is closed
    -new filename can exist, will be overwritten
    -value of 0 means never dump
    -
    -Default = 0
    -
    -
    -

    -fix style

    - -
    -styles:
    -
    - -
    -coeffs:  none
    -               no other parameters required (use "none" as 1st parameter)
    -         setforce
    -                (1) x component of set force (in force units)
    -                (2) y component of set force (in force units)
    -                (3) z component of set force (in force units)
    -         addforce
    -                (1) x component of added force (in force units)
    -                (2) y component of added force (in force units)
    -                (3) z component of added force (in force units)
    -         aveforce
    -                (1) x comp of added average force per atom (in force units)
    -                (2) y comp of added average force per atom (in force units)
    -                (3) z comp of added average force per atom (in force units)
    -         rescale
    -               (1) desired T at beginning of run
    -               (2) desired T at end of run
    -               (3) check for rescaling every this many timesteps
    -               (4) T window outside of which velocities will be rescaled
    -         langevin
    -               (1) desired T at beginning of run
    -               (2) desired T at end of run
    -               (3) Langevin damping parameter (inverse time units)
    -               (4) random seed to use for white noise (0 < seed <= 8 digits)
    -               (5) 0/1 = off/on x dimension
    -               (6) 0/1 = off/on y dimension
    -               (7) 0/1 = off/on z dimension
    -         nose/hoover
    -               (1) desired T at beginning of run
    -               (2) desired T at end of run
    -               (3) frequency constant for friction force (inverse time units)
    -         springforce
    -                (1) x position of spring origin
    -                (2) y position
    -                (3) z position
    -                (4) force constant k (so that k*distance = force units)
    -         dragforce
    -                (1) x position to drag atom towards
    -                (2) y position
    -                (3) z position
    -                (4) force magnitude f (in force units)
    -                (5) delta outside of which to apply force (in distance units)
    -
    -define a constraint
    -cannot skip a constraint number, all must be used before a run is performed
    -use appropriate number of coeffs for a particular style
    -which atoms the constraint will affect is set by the "assign fix" command
    -all of the constraints (except for rescale) are applied every timestep
    -all specified temperatures are in temperature units
    -for style setforce, a coeff of NULL means do not alter that force component
    -for style aveforce, average force on the group of fixed atoms is computed,
    -  then new average force is added in and actual force on each atom is set
    -  to new total value -> has effect of applying same force to entire group
    -  of atoms
    -thermostatting constraints (rescale, langevin, nose/hoover) cannot be used in
    -  conjuction with global "temp control", since they conflict and will
    -  cause atom velocities to be reset twice
    -if multiple Langevin constraints are specified the Marsaglia RNG will
    -  only use the last RNG seed specified for initialization
    -meaning of thermostatting coefficients is same as in "temp control" command
    -style springforce is designed to be applied to an entire group of atoms
    -  en masse (e.g. an umbrella force on an entire molecule)
    -for style springforce, the center of mass r0 of the group of atoms is computed,
    -  then a restoring force = -k*(r-r0)*mass/masstotal is applied to each 
    -  atom in the group where mass = mass of the atom and masstotal = mass of
    -  all the atoms in the group - thus "k" should represent the total
    -  force on the group of atoms (not per atom)
    -for style springforce, a xyz position of NULL means do not include that
    -  dimension in the distance or force computation
    -for style dragforce, apply a drag force of magnitude f to each atom in the
    -  group in the direction (r-r0) where r0 = (x,y,z) - do not apply the force if
    -  the atom is within a distance delta of r0
    -for style dragforce, a xyz position of NULL means do not include that
    -  dimension in the distance or force computation
    -
    -Default = none
    -
    -
    -

    -improper style

    - -
    -define style of improper interactions to use for all trigonal centers
    -in class2 case, dictates that angle-angle terms be included for all
    -  trigonal and tetrahedral centers
    -in above formulas, phi = improper torsion, chi = Wilson out-of-plane
    -improper style determines how many improper coefficients the program   
    -  expects to find in a "Improper Coeffs" entry in the data file, 
    -  thus the style must be set (if not using default)
    -  before using the "read data" command (if the data file contains a 
    -  "Improper Coeffs" entry)
    -coefficients for all improper types must be defined in data (or restart)
    -  file by "Improper Coeffs" entry before a run is performed
    -style of "none" erases all previously defined improper coefficients, must
    -  reset style to something else before defining new coefficients
    -
    -Default = harmonic
    -
    -
    -

    -min file

    -
    -name of file to write minimization iteration info to
    -filename can exist, will be overwritten when minimization occurs
    -if no file is specified, no minimization output will be written to a file
    -
    -Default = none
    -
    -
    -

    -min style

    - -
    -choose minimization algorithm to use when "minimize" command is performed
    -currently, only htfn style is available
    -
    -Default = htfn
    -
    -
    -

    -minimize

    - -
    -perform an energy minimization of the atomic coordinates of the system
    -uses algorithm selected with "min style" command
    -minimization stops if any of 3 criteria are met:
    -  (1) largest force component < stopping tolerance
    -  (2) # of iterations > max iterations
    -  (3) # of force and energy evaluations > max evaluations
    -for good convergence, should specify use of smooth nonbond force fields 
    -  that have continuous second derivatives, set "coulomb style" to "smooth",
    -  set nonbond style to "lj/smooth" or use a long cutoff
    -
    -
    -

    -mixing style

    - -
    -styles:
    -
    - -
    -determine the kind of mixing rule that is applied to generate nonbond
    -  coefficients for interactions between type i and type j atoms
    -mixing rules are used only when nonbond coeffs are input in a "read data" file
    -for nonbond style "soft", only epsilons (prefactor A) are input - they are
    -  always mixed geometrically, regardless of mixing style setting
    -
    -Default = geometric for all nonbond styles except class2/cutoff
    -         sixthpower for nonbond style class2/cutoff
    -
    -
    -

    -neighbor

    - -
    -factors that affect how and when neighbor lists are constructed
    -skin must be large enough that all atoms needed for bond
    -  interactions are also acquired by interprocessor communication
    -last parameter incurs extra checking and communication to test against
    -  skin thickness, but may mean neighbor list is created less often
    -when RESPA is run, the 3rd and 4th parameters refer to the
    -  nonbond (short-range) timestepping
    -defaults = 2.0 0 1 10 1
    -
    -
    -

    -newton flag

    -
    -turn off or on Newton's 3rd law for bond and non-bond force computation
    -
    - -
    -no Newton's 3rd law means more force computation and less communication
    -yes Newton's 3rd law means less force computation and more communication
    -which choice is faster is problem dependent on N, # of processors, 
    -  and cutoff length(s)
    -expect for round-off errors, setting this flag should not affect answers, 
    -  only run time
    -must be set before data or restart file is read
    -
    -Default = 3
    -
    -
    -

    -nonbond coeff

    - -
    -coeffs: lj/cutoff
    -               (1) epsilon (energy units)
    -               (2) sigma (distance units)
    -               (3) cutoff (distance units)
    -        lj/smooth
    -               (1) epsilon (energy units)
    -               (2) sigma (distance units)
    -               (3) inner cutoff (distance units)
    -               (4) outer cutoff (distance units)
    -        lj/shift
    -               (1) epsilon (energy units)
    -               (2) sigma (distance units)
    -               (3) delta shift distance (distance units)
    -               (4) cutoff (distance units)
    -        soft
    -               (1) prefactor A at start of run (energy units)
    -               (2) prefactor A at end of run (energy units)
    -               (3) cutoff (distance units)
    -        class2/cutoff
    -               (1) epsilon (energy units)
    -               (2) sigma (distance units)
    -               (3) cutoff (distance units)
    -
    -define (or override) nonbond coefficients for an individual atom type pair
    -use appropriate number of coeffs for a particular style
    -1st atom type must be <= 2nd atom type
    -all cutoffs are in global units, not local sigma units
    -  (e.g. in reduced units a setting of "lj/cutoff 1.0 1.2 2.5" means a 
    -  cutoff of 2.5, not 1.2*2.5)
    -turn off a particular type pair interaction by setting the
    -  cutoff to 0.0 (both cutoffs to zero for lj/smooth option)
    -for soft style, prefactor A is ramped from starting value to
    -  ending value during run
    -these coefficients (except the cutoffs) can also be set in data file 
    -  by "Nonbond Coeffs" entry and associated mixing rules, the cutoffs can
    -  be set (globally) via the "nonbond style" command, the most
    -  recently defined coefficients/cutoffs are used
    -
    -Default = no settings
    -
    -
    -

    -nonbond style

    - -
    -styles: 
    -
    - -
    -coeffs:  none
    -               no other parameters required
    -         lj/cutoff
    -               (1) cutoff (distance units)
    -               (2) offset flag (0 or 1)
    -         lj/smooth
    -               (1) inner cutoff (distance units)
    -               (2) outer cutoff (distance units)
    -         lj/shift
    -               (1) cutoff (distance units)
    -               (2) offset flag (0 or 1)
    -         soft
    -               (1) cutoff (distance units)
    -         class2/cutoff
    -               (1) cutoff (distance units)
    -               (2) offset flag (0 or 1)
    -
    -define style of pairwise nonbond interactions to use between all atom types
    -use appropriate number of coeffs for a particular style
    -this is separate from charge interactions (see "coulomb style" command)
    -nonbond style determines how many nonbond coefficients the program expects to
    -  find in a "Nonbond Coeffs" entry in the data file or when using the 
    -  "nonbond coeff" command, thus the style must be set (if not using default)
    -  before using the "read data" command (if the data file contains a 
    -  "Nonbond Coeffs" entry)
    -coefficients for all atom type pairs must be defined in data (or restart)
    -  file by "Nonbond Coeffs" entry or by "nonbond coeffs" commands before a run
    -  is performed
    -style of "none" erases all previously defined nonbond coefficients, must
    -  reset style to something else before defining new coefficients
    -for all styles (except none), this command sets the cutoff(s) for all type
    -  pair interactions, thus overriding any previous settings by a "nonbond
    -  coeff" command or that were read in from a restart file
    -for lj/cutoff, lj/shift, class2/cutoff styles, 
    -  offset flag only affects printout of thermodynamic energy
    -  (not forces or dynamics), determines whether offset energy 
    -  is added in to LJ potential to make value at cutoff = 0.0,
    -  flag = 0 -> do not add in offset energy,
    -  flag = 1 -> add in offset energy 
    -for lj/smooth style, outer cutoff must be > inner cutoff
    -for lj/smooth style, atom pairs less than the inner cutoff distance use 
    -  straight LJ, pairs between inner and outer use a smoothed LJ, and the 
    -  potential goes to 0.0 at the outer cutoff
    -for lj/smooth style, energy and forces are continuous at inner cutoff and go
    -  smoothly to zero at outer cutoff
    -for lj/shift and soft styles, must set "coulomb style" to "none"
    -for lj/shift style, delta shift distances for each atom pair are set by
    -  "Nonbond Coeffs" entry in data file or by "nonbond coeffs" command
    -for soft style, values of the prefactor "A", which is ramped from one
    -  value to another during the run, are set by "Nonbond Coeffs" entry
    -  in data file or by "nonbond coeffs" command
    -
    -Default = lj/cutoff 10.0 0
    -
    -
    -

    -periodicity

    - -
    -turn on/off periodicity in any of three dimensions
    -used in inter-particle distance computation and when particles move
    -  to map (or not map) them back into periodic box
    -for a 2-d run (see "dimension" command), 3rd parameter must be 
    -  specified, but doesn't matter if it is 0 or 1
    -must be set before data or restart file is read
    -
    -Default = 0 0 0 (periodic in all dimensions)
    -
    -
    -

    -pppm mesh

    - -
    -specify the mesh size used by coulomb style pppm
    -mesh dimensions that are power-of-two are fastest for FFTs, but any size
    -  can be used that are supported by native machine libraries
    -this command is optional - if not used, a default
    -  mesh size will be chosen to satisfy accuracy criterion - if used, the
    -  specifed mesh size will override the default
    -
    -Default = none
    -
    -
    -

    -pppm order

    -
    -specify the order of the interpolation function that is used by coulomb
    -  style pppm to map particle charge to the particle mesh
    -order is roughly equivalent to how many mesh points a point charge
    -  overlaps onto
    -
    -Default = 5
    -
    -
    -

    -press control

    - -
    -styles:
    -
    - -
    -coeffs:   none
    -               no other parameters required
    -          nose/hoover
    -               (1) desired P at beginning of run
    -               (2) desired P at end of run
    -               (3) frequency constant for volume adjust (inverse time units)
    -
    -use appropriate number of coeffs for a particular style
    -all specified pressures are in pressure units
    -target pressure at intermediate points during run is a ramped value
    -  between the beginning and ending pressure
    -for nose/hoover style, frequency constant is like an inverse "piston" 
    -  mass which determines how rapidly the pressure fluctuates in response to a
    -  restoring force, large frequency -> small mass -> rapid fluctations
    -for nose/hoover style, units of frequency/damping constant are
    -  inverse time, so a value of 0.001 means relax in a timespan on the 
    -  order of 1000 fmsec (real units) or 1000 tau (LJ units)
    -
    -Default = none
    -
    -
    -

    -press_x control

    -

    -press_y control

    -

    -press_z control

    - -
    -styles: 
    -
    - -
    -coeffs: none
    -                no other parameters required
    -        nose/hoover
    -                (1) desired P at beginning of run
    -                (2) desired P at end of run
    -                (3) frequency constant for volume adjust (inverse time units)
    -
    -commands for anisotropic pressure control, any combination is allowed
    -for a component with style = none, the cell dimension in that direction
    -  is held constant (constant volume)
    -use appropriate number of coeffs for a particular style
    -all specified pressures are in pressure units
    -target pressure at intermediate points during run is a ramped value
    -  between the beginning and ending pressure
    -cannot be used with isotropic "press control" command
    -for nose/hoover style, frequency constant is like an inverse "piston"
    -  mass which determines how rapidly the pressure fluctuates in response to a
    -  restoring force, large frequency -> small mass -> rapid fluctations
    -for nose/hoover style, units of frequency/damping constant are
    -  inverse time, so a value of 0.001 means relax in a timespan on the
    -  order of 1000 fmsec (real units) or 1000 tau (LJ units)
    -
    -Default = none
    -
    -
    -

    -processor grid

    - -
    -specify 3-d grid of processors to map to physical simulation domain
    -for 2-d problem, specify N by M by 1 grid
    -program will choose these values to best map processor grid to physical
    -  simulation box, only use this command if wish to override program choice
    -product of 3 parameters must equal total # of processors
    -must be set before data or restart file is read
    -
    -Default = none
    -
    -
    -

    -read data

    -
    -read the initial atom positions and bond info from the specified file
    -the format for the data file is specified in the file data_format
    -if a "Coeffs" entry is in data file, the appropriate "style" command
    -  command must be used first (unless default setting is used) to tell 
    -  LAMMPS how many coefficients to expect
    -most "Coeffs" entries must be present in this file if a particular "style"
    -  is desired, an exception are the "Nonbond Coeffs" and "Bond Coeffs" entries
    -  which can be omitted if all the settings are made via "nonbond coeff"
    -  and "bond coeff" commands
    -a "Nonbond Coeffs" entry only contains one set of coefficients for each
    -  atom type, after being read-in the appropriate class I or class II mixing
    -  rules are applied to compute the cross-type coefficients (see the file
    -  data_format for more information)
    -
    -
    -

    -read restart

    -
    -read atom positions and velocities and nonbond and bond coefficients
    -  from specified file
    -allows continuation of a previous run
    -file is binary to enable exact restarts
    -do not have to restart on same # of processors, but can only do exact
    -  restarts on same # of processors
    -when restart file is read, warnings are issued if certain parameters
    -  in the restart file do not match current settings (e.g. newton flag,
    -  dimension, periodicity, units) - this usually indicates an error
    -the restart file stores all nonbond and many-body styles and coefficients,
    -  so reading the file will overwrite any current settings
    -the restart file stores the constraint assignments for each atom, but
    -  not the constraints themselves, so they must still be specified with
    -  the "fix style" command
    -for a restart do not use the "read data" and "create temp" commands
    -
    -
    -

    -reset timestep

    -
    -explicitly reset the timestep to this value
    -the "read data" and "read restart" commands set the timestep to zero
    -  and file value respectively, so this should be done after those commands
    -
    -
    -

    -respa

    - -
    -factors that affect sub-cycling of force calculations within RESPA hierarchy
    -bonded intramolecular forces are calculated every innermost sub-timestep
    -bonded 3- and 4-body forces are computed every 1st parameter sub-timesteps
    -short-range nonbond pairwise forces (LJ, Coulombic) are computed every 
    -  (2nd parameter * 1st parameter) sub-timesteps
    -long-range (Ewald, PPPM) forces are computed every 
    -  (3rd parameter * 2nd parameter * 1st parameter) sub-timesteps
    -the timestepping for all 3 inner loops (bond, 3/4-body, nonbond) is performed
    -  as sub-cycling within the long-range timestepping loop
    -the fastest (innermost) timestep size is set by the "timestep" command
    -when running RESPA, all input commands that specify numbers of timesteps
    -  (e.g. run, thermo flag, restart flag, etc) refer to the outermost loop
    -  of long-range timestepping
    -the only exception to this rule is the "neighbor" command, where the timestep
    -  parameters refer to the nonbond (short-range) timestepping
    -setting all 3 parameters to 1 turns off RESPA
    -
    -Default = 1 1 1 (no RESPA)
    -
    -
    -

    -restart

    - -
    -create a restart file every this many timesteps
    -value of 0 means never create one
    -program will toggle between 2 filenames as the run progresses
    -  so always have at least one good file even if the program dies in mid-write
    -restart file stores atom positions and velocities in binary form
    -allows program to restart from where it left off (see "read restart" commmand)
    -
    -Default = 0
    -
    -
    -

    -run

    -
    -run or continue dynamics for specified # of timesteps
    -must have performed "read data"/"create temp" or "read restart"
    -  commands first
    -
    -
    -

    -special bonds

    - -
    -weighting factors to turn on/off nonbond interactions of atom pairs that
    -  are "close" in the molecular topology
    -1st nearest neighbors are a pair of atoms connected by a bond
    -2nd nearest neighbors are a pair of atoms 2 hops away, etc.
    -weight values are from 0.0 to 1.0 and are used to multiply the
    -  energy and force interaction (both Coulombic and LJ) between the 2 atoms
    -weight of 0.0 means no interaction
    -weight of 1.0 means full interaction
    -
    -Default = 0.0 0.0 0.4 (CHARMM standard)
    -
    -
    -

    -temp control

    - -
    -styles:  
    -
    - -
    -coeffs:  none
    -               no other parameters required
    -         rescale
    -               (1) desired T at beginning of run
    -               (2) desired T at end of run
    -               (3) check for rescaling every this many timesteps
    -               (4) T window outside of which velocities will be rescaled
    -         replace
    -               (1) desired T at beginning of run
    -               (2) desired T at end of run
    -               (3) do Gaussian replacement every this many timesteps
    -               (4) random # seed to use for replacement (0 < seed <= 8 digits)
    -         langevin
    -               (1) desired T at beginning of run
    -               (2) desired T at end of run
    -               (3) Langevin damping parameter (inverse time units)
    -               (4) random seed to use for white noise (0 < seed <= 8 digits)
    -         nose/hoover
    -               (1) desired T at beginning of run
    -               (2) desired T at end of run
    -               (3) frequency constant for friction force (inverse time units)
    -
    -use appropriate number of coeffs for a particular style
    -all specified temperatures are in temperature units
    -target temperature at intermediate points during run is a ramped value
    -  between the beginning and ending temperatures
    -for rescale style, temperature is controlled by explicitly rescaling
    -  velocities to exactly the target temperature
    -for rescale style, rescaling is only done if current temperature is
    -  beyond the target temperature plus or minus the window value
    -for replace style, Gaussian RNs from the Marsaglia RNG are used
    -for langevin style, uniform RNs from the Marsaglia RNG are used
    -for replace and langevin styles, the seed is used to initialize the
    -  Marsaglia RNG, on successive runs the RNG will just continue on
    -for replace and langevin styles, generated RNs depend on # of processors
    -  so will not get same answers independent of # of processors
    -for replace and langevin styles, RNG states are not saved in restart file,
    -  so cannot do an exact restart
    -for langevin style, damping parameter means small value -> less damping
    -for nose/hoover style, frequency constant is like an inverse "piston" 
    -  mass which determines how rapidly the temperature fluctuates in response to a
    -  restoring force, large frequency -> small mass -> rapid fluctations
    -for langevin and nose/hoover styles, units of frequency/damping constant are
    -  inverse time, so a value of 0.01 means relax in a timespan on the 
    -  order of 100 fmsec (real units) or 100 tau (LJ units)
    -
    -Default = none
    -
    -
    -

    -thermo flag

    -
    -print thermodynamic info to screen and log file every this many timesteps
    -value of 0 means never print
    -
    -Default = 0
    -
    -
    -

    -thermo style

    -
    -determines format of thermodynamic output to screen and log file
    -
    - -
    -Default = 0
    -
    -
    -

    -timestep

    -
    -timestep size for MD run (time units)
    -when RESPA is run, the timestep size is for the innermost (bond) loop
    -
    -Default = 1.0
    -
    -
    -

    -true flag

    -
    -read atom positions (see "read data" command) and dump atom positions
    -  (see "dump flag" command) in one of 2 formats
    -
    - -
    -for each dimension, box count of "n" means add that many box lengths
    -  to get "true" un-remapped position, "n" can be positive, negative, or zero
    -
    -Default = 0
    -
    -
    -

    -units

    - -
    -set units to one of two options for all subsequent input parameters
    -
    -option real = conventional units:
    -
    - -
    -option lj = LJ reduced units:
    -
    - -
    -for LJ units, LAMMPS sets global epsilon,sigma,mass all equal to 1.0
    -subsequent input numbers in data and command file must be in these units
    -output numbers to screen and log and dump files will be in these units
    -must be set before data or restart file is read
    -
    -Default = real
    -
    - - diff -Naur lammps-26Jan17/doc/src/99/units.html lammps-13Feb17/doc/src/99/units.html --- lammps-26Jan17/doc/src/99/units.html 2016-05-09 16:05:30.630573000 -0600 +++ lammps-13Feb17/doc/src/99/units.html 1969-12-31 17:00:00.000000000 -0700 @@ -1,119 +0,0 @@ - - - - - - -

    -LAMMPS Units

    -

    -Return to top-level LAMMPS documentation.

    -

    -This file describes the units associated with many of the key variables -and equations used inside the LAMMPS code. Units used for input command -parameters are described in the input_commands file. The input command -"units" selects between conventional and Lennard-Jones units. -See the force_fields file for more information on units for the force -field parameters that are input from data files.

    -

    -Conventional units:

    - -

    -LJ reduced units:

    - -
    -

    -This listing of variables assumes conventional units; to convert to LJ -reduced units, simply substitute the appropriate term from the list -above. E.g. x is in sigmas in LJ units. Per-mole in any of the units -simply means for 6.023 x 10^23 atoms.

    -

    -

    -
    -Meaning        Variable        Units
    -
    -positions      x               Angstroms
    -velocities     v               Angstroms / click (see below)
    -forces         f               Kcal / (mole - Angstrom)                
    -masses         mass            gram / mole
    -charges        q               electron units (-1 for an electron)
    -                                 (1 e.u. = 1.602 x 10^-19 coul)
    -
    -time           ---             clicks (1 click = 48.88821 fmsec)
    -timestep       dt              clicks
    -input timestep dt_in           fmsec
    -time convert   dtfactor        48.88821 fmsec / click
    -
    -temperature     t_current       degrees K
    -                t_start
    -                t_stop
    -input damping   t_freq_in       inverse fmsec
    -internal temp   t_freq          inverse clicks
    -  damping
    -
    -dielec const    dielectric      1.0 (unitless)
    -Boltmann const  boltz           0.001987191 Kcal / (mole - degree K)
    -
    -virial          virial[xyz]     Kcal/mole = r dot F
    -pressure factor pfactor         68589.796 (convert internal to atmospheres)
    -internal        p_current       Kcal / (mole - Angs^3)
    -  pressure      p_start
    -                p_stop
    -input press     p_start_in      atmospheres
    -                p_stop_in
    -output press    log file        atmospheres
    -input damping   p_freq_in       inverse time
    -internal press  p_freq          inverse clicks
    -  damping
    -
    -pot eng         e_potential     Kcal/mole
    -kin eng         e_kinetic       Kcal/mole
    -eng convert     efactor         332.0636 (Kcal - Ang) / (q^2 - mole)
    -                                (convert Coulomb eng to Kcal/mole)
    -
    -LJ coeffs       lja,ljb         Kcal-Angs^(6,12)/mole
    -
    -bond            various         see force_fields file
    -  parameters    2,3,4-body
    -                terms
    -
    - - diff -Naur lammps-26Jan17/doc/src/Developer/developer.aux lammps-13Feb17/doc/src/Developer/developer.aux --- lammps-26Jan17/doc/src/Developer/developer.aux 2017-02-13 09:03:07.114413544 -0700 +++ lammps-13Feb17/doc/src/Developer/developer.aux 1969-12-31 17:00:00.000000000 -0700 @@ -1,10 +0,0 @@ -\relax -\@writefile{toc}{\contentsline {section}{\numberline {1}LAMMPS source files}{2}} -\@writefile{toc}{\contentsline {section}{\numberline {2}Class hierarchy of LAMMPS}{3}} -\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Class hierarchy within LAMMPS source code.}}{4}} -\newlabel{fig:classes}{{1}{4}} -\@writefile{toc}{\contentsline {section}{\numberline {3}How a timestep works}{6}} -\@writefile{toc}{\contentsline {section}{\numberline {4}Extending LAMMPS}{9}} -\@writefile{toc}{\contentsline {subsection}{\numberline {4.1}New fixes}{9}} -\@writefile{lof}{\contentsline {figure}{\numberline {2}{\ignorespaces Pseudo-code for the Verlet::run() method.}}{14}} -\newlabel{fig:verlet}{{2}{14}} diff -Naur lammps-26Jan17/doc/src/Developer/developer.log lammps-13Feb17/doc/src/Developer/developer.log --- lammps-26Jan17/doc/src/Developer/developer.log 2017-02-13 09:03:07.121413752 -0700 +++ lammps-13Feb17/doc/src/Developer/developer.log 1969-12-31 17:00:00.000000000 -0700 @@ -1,158 +0,0 @@ -This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6) (format=pdflatex 2016.3.22) 13 FEB 2017 09:03 -entering extended mode - %&-line parsing enabled. -**developer -(./developer.tex -LaTeX2e <2005/12/01> -Babel and hyphenation patterns for english, usenglishmax, dumylang, noh -yphenation, arabic, basque, bulgarian, coptic, welsh, czech, slovak, german, ng -erman, danish, esperanto, spanish, catalan, galician, estonian, farsi, finnish, - french, greek, monogreek, ancientgreek, croatian, hungarian, interlingua, ibyc -us, indonesian, icelandic, italian, latin, mongolian, dutch, norsk, polish, por -tuguese, pinyin, romanian, russian, slovenian, uppersorbian, serbian, swedish, -turkish, ukenglish, ukrainian, loaded. -(/usr/share/texmf/tex/latex/base/article.cls -Document Class: article 2005/09/16 v1.4f Standard LaTeX document class -(/usr/share/texmf/tex/latex/base/size10.clo -File: size10.clo 2005/09/16 v1.4f Standard LaTeX file (size option) -) -\c@part=\count79 -\c@section=\count80 -\c@subsection=\count81 -\c@subsubsection=\count82 -\c@paragraph=\count83 -\c@subparagraph=\count84 -\c@figure=\count85 -\c@table=\count86 -\abovecaptionskip=\skip41 -\belowcaptionskip=\skip42 -\bibindent=\dimen102 -) -(/usr/share/texmf/tex/latex/graphics/graphicx.sty -Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR) - -(/usr/share/texmf/tex/latex/graphics/keyval.sty -Package: keyval 1999/03/16 v1.13 key=value parser (DPC) -\KV@toks@=\toks14 -) -(/usr/share/texmf/tex/latex/graphics/graphics.sty -Package: graphics 2006/02/20 v1.0o Standard LaTeX Graphics (DPC,SPQR) - -(/usr/share/texmf/tex/latex/graphics/trig.sty -Package: trig 1999/03/16 v1.09 sin cos tan (DPC) -) -(/usr/share/texmf/tex/latex/config/graphics.cfg -File: graphics.cfg 2007/01/18 v1.5 graphics configuration of teTeX/TeXLive -) -Package graphics Info: Driver file: pdftex.def on input line 90. - -(/usr/share/texmf/tex/latex/pdftex-def/pdftex.def -File: pdftex.def 2007/01/08 v0.04d Graphics/color for pdfTeX -\Gread@gobject=\count87 -)) -\Gin@req@height=\dimen103 -\Gin@req@width=\dimen104 -) (./developer.aux) -\openout1 = `developer.aux'. - -LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 4. -LaTeX Font Info: ... okay on input line 4. -LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 4. -LaTeX Font Info: ... okay on input line 4. -LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 4. -LaTeX Font Info: ... okay on input line 4. -LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 4. -LaTeX Font Info: ... okay on input line 4. -LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 4. -LaTeX Font Info: ... okay on input line 4. -LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 4. -LaTeX Font Info: ... okay on input line 4. - -(./developer.toc -LaTeX Font Info: External font `cmex10' loaded for size -(Font) <7> on input line 5. -LaTeX Font Info: External font `cmex10' loaded for size -(Font) <5> on input line 5. -) -\tf@toc=\write3 -\openout3 = `developer.toc'. - - [1 - -{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] -[2] -Overfull \hbox (18.02841pt too wide) in paragraph at lines 95--107 -\OT1/cmr/m/n/10 ment spe-cific com-mands in the in-put script that can be in-vo -ked be-fore/after/between - [] - - -Overfull \hbox (21.68127pt too wide) in paragraph at lines 95--107 -\OT1/cmr/m/n/10 PAIR[]CLASS, BOND[]CLASS, RE-GION[]CLASS, FIX[]CLASS, COM-PUTE[ -]CLASS, - [] - - -File: classes.pdf Graphic file (type pdf) - -LaTeX Font Info: Try loading font information for OMS+cmr on input line 121. - - -(/usr/share/texmf/tex/latex/base/omscmr.fd -File: omscmr.fd 1999/05/25 v2.5h Standard LaTeX font definitions -) -LaTeX Font Info: Font shape `OMS/cmr/m/n' in size <10> not available -(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 121. - [3] [4 <./classes.pdf>] -Overfull \hbox (1.52841pt too wide) in paragraph at lines 163--168 -[]\OT1/cmr/m/n/10 The Comm class per-forms in-ter-pro-ces-sor com-mu-ni-ca-tion -, typ-i-cally of ghost - [] - -[5] -Overfull \hbox (7.86919pt too wide) in paragraph at lines 323--338 -[]\OT1/cmr/m/n/10 At var-i-ous points of the timestep, fixes are in-voked, e.g. - fix$\OMS/cmsy/m/n/10 !$\OT1/cmr/m/n/10 initial[]integrate(). - [] - -[6] [7] [8] -Missing character: There is no in font cmr10! - [9] [10] -Overfull \hbox (1.49698pt too wide) in paragraph at lines 566--566 -[] \OT1/cmtt/m/n/10 for (int particleInd = 0; particleInd < nlocal; ++particle -Ind) {[] - [] - - -Overfull \hbox (43.49661pt too wide) in paragraph at lines 566--566 -[] \OT1/cmtt/m/n/10 MPI_Allreduce(localAvgVel, globalAvgVel, 4, MPI_DOUBLE, MP -I_SUM, world);[] - [] - -[11] -Overfull \hbox (10.76607pt too wide) in paragraph at lines 637--639 -[][]\OT1/cmtt/m/n/10 memory->create(this->x, atom->nmax, 3, "FixSavePos:x");\OT -1/cmr/m/n/10 . Free mem- - [] - -[12] [13] [14] (./developer.aux) ) -Here is how much of TeX's memory you used: - 597 strings out of 256214 - 7078 string characters out of 1917000 - 60446 words of memory out of 1500000 - 3934 multiletter control sequences out of 10000+200000 - 5672 words of font info for 21 fonts, out of 1200000 for 2000 - 645 hyphenation exceptions out of 8191 - 25i,5n,19p,182b,287s stack positions out of 5000i,500n,6000p,200000b,15000s - -Output written on developer.pdf (14 pages, 97343 bytes). -PDF statistics: - 83 PDF objects out of 1000 (max. 8388607) - 0 named destinations out of 1000 (max. 131072) - 6 words of extra memory for PDF output out of 10000 (max. 10000000) - diff -Naur lammps-26Jan17/doc/src/Developer/developer.toc lammps-13Feb17/doc/src/Developer/developer.toc --- lammps-26Jan17/doc/src/Developer/developer.toc 2017-02-13 09:03:07.114413544 -0700 +++ lammps-13Feb17/doc/src/Developer/developer.toc 1969-12-31 17:00:00.000000000 -0700 @@ -1,5 +0,0 @@ -\contentsline {section}{\numberline {1}LAMMPS source files}{2} -\contentsline {section}{\numberline {2}Class hierarchy of LAMMPS}{3} -\contentsline {section}{\numberline {3}How a timestep works}{6} -\contentsline {section}{\numberline {4}Extending LAMMPS}{9} -\contentsline {subsection}{\numberline {4.1}New fixes}{9} diff -Naur lammps-26Jan17/doc/src/Manual.txt lammps-13Feb17/doc/src/Manual.txt --- lammps-26Jan17/doc/src/Manual.txt 2017-01-26 14:05:57.604833000 -0700 +++ lammps-13Feb17/doc/src/Manual.txt 2017-02-13 09:00:47.983210000 -0700 @@ -1,7 +1,7 @@ LAMMPS Users Manual - + @@ -21,7 +21,7 @@

    LAMMPS Documentation :c,h3 -26 Jan 2017 version :c,h4 +13 Feb 2017 version :c,h4 Version info: :h4 diff -Naur lammps-26Jan17/doc/src/Section_commands.txt lammps-13Feb17/doc/src/Section_commands.txt --- lammps-26Jan17/doc/src/Section_commands.txt 2017-01-19 08:50:18.533977000 -0700 +++ lammps-13Feb17/doc/src/Section_commands.txt 2017-02-03 16:20:10.815989000 -0700 @@ -969,7 +969,7 @@ "lubricateU/poly"_pair_lubricateU.html, "meam"_pair_meam.html, "mie/cut (o)"_pair_mie.html, -"morse (got)"_pair_morse.html, +"morse (gkot)"_pair_morse.html, "nb3b/harmonic (o)"_pair_nb3b_harmonic.html, "nm/cut (o)"_pair_nm.html, "nm/cut/coul/cut (o)"_pair_nm.html, diff -Naur lammps-26Jan17/doc/src/Section_errors.txt lammps-13Feb17/doc/src/Section_errors.txt --- lammps-26Jan17/doc/src/Section_errors.txt 2017-01-17 10:06:28.187521000 -0700 +++ lammps-13Feb17/doc/src/Section_errors.txt 2017-02-10 09:24:27.989902000 -0700 @@ -22,7 +22,7 @@ 12.1 Common problems :link(err_1),h4 -If two LAMMPS runs do not produce the same answer on different +If two LAMMPS runs do not produce the exact 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 @@ -80,12 +80,24 @@ may also simply 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 of 0. Careful reading of the associated doc page -for the command should allow you to fix these problems. Note that -some commands allow for variables to be specified in place of numeric -constants so that the value can be evaluated and change over the -course of a run. This is typically done with the syntax {v_name} for -a parameter, where name is the name of the variable. This is only -allowed if the command documentation says it is. +for the command should allow you to fix these problems. In most cases, +where LAMMPS expects to read a number, either integer or floating point, +it performs a stringent test on whether the provided input actually +is an integer or floating-point number, respectively, and reject the +input with an error message (for instance, when an integer is required, +but a floating-point number 1.0 is provided): + +ERROR: Expected integer parameter in input script or data file :pre + +Some commands allow for using variable references in place of numeric +constants so that the value can be evaluated and may change over the +course of a run. This is typically done with the syntax {v_name} for a +parameter, where name is the name of the variable. On the other hand, +immediate variable expansion with the syntax ${name} is performed while +reading the input and before parsing commands, + +NOTE: Using a variable reference (i.e. {v_name}) is only allowed if +the documentation of the corresponding command explicitly says it is. Generally, LAMMPS will print a message to the screen and logfile and exit gracefully when it encounters a fatal error. Sometimes it will diff -Naur lammps-26Jan17/doc/src/Section_start.txt lammps-13Feb17/doc/src/Section_start.txt --- lammps-26Jan17/doc/src/Section_start.txt 2017-01-17 09:44:40.547610000 -0700 +++ lammps-13Feb17/doc/src/Section_start.txt 2017-02-13 08:54:46.563756000 -0700 @@ -413,7 +413,7 @@ particle-mesh (PPPM) option for long-range Coulombics via the "kspace_style"_kspace_style.html command. -LAMMPS supports various open-source or vendor-supplied FFT libraries +LAMMPS supports common open-source or vendor-supplied FFT libraries for this purpose. If you leave these 3 variables blank, LAMMPS will use the open-source "KISS FFT library"_http://kissfft.sf.net, which is included in the LAMMPS distribution. This library is portable to all @@ -423,10 +423,9 @@ Otherwise, select which kinds of FFTs to use as part of the FFT_INC setting by a switch of the form -DFFT_XXX. Recommended values for XXX -are: MKL, SCSL, FFTW2, and FFTW3. Legacy options are: INTEL, SGI, -ACML, and T3E. For backward compatability, using -DFFT_FFTW will use -the FFTW2 library. Using -DFFT_NONE will use the KISS library -described above. +are: MKL or FFTW3. FFTW2 and NONE are supported as legacy options. +Selecting -DFFT_FFTW will use the FFTW3 library and -DFFT_NONE will +use the KISS library described above. You may also need to set the FFT_INC, FFT_PATH, and FFT_LIB variables, so the compiler and linker can find the needed FFT header and library diff -Naur lammps-26Jan17/doc/src/compute_group_group.txt lammps-13Feb17/doc/src/compute_group_group.txt --- lammps-26Jan17/doc/src/compute_group_group.txt 2016-05-09 11:22:38.482096000 -0600 +++ lammps-13Feb17/doc/src/compute_group_group.txt 2017-02-10 09:47:15.800372000 -0700 @@ -16,10 +16,11 @@ group/group = style name of this compute command :l group2-ID = group ID of second (or same) group :l zero or more keyword/value pairs may be appended :l -keyword = {pair} or {kspace} or {boundary} :l +keyword = {pair} or {kspace} or {boundary} or {molecule} :l {pair} value = {yes} or {no} {kspace} value = {yes} or {no} - {boundary} value = {yes} or {no} :pre + {boundary} value = {yes} or {no} + {molecule} value = {off} or {inter} or {intra} :pre :ule [Examples:] @@ -46,6 +47,13 @@ corrections, even if they are enabled via the "pair_modify"_pair_modify.html command. +If the {molecule} keyword is set to {inter} or {intra} than an +additional check is made based on the molecule IDs of the two atoms in +each pair before including their pairwise interaction energy and +force. For the {inter} setting, the two atoms must be in different +molecules. For the {intra} setting, the two atoms must be in the same +molecule. + If the {kspace} keyword is set to {yes}, which is not the default, and if a "kspace_style"_kspace_style.html is defined, then the interaction energy will include a Kspace component which is the long-range @@ -66,6 +74,10 @@ groups are charge neutral. This energy correction term is the same as that included in the regular Ewald and PPPM routines. +NOTE: The {molecule} setting only affects the group/group +contributions calculated by the {pair} keyword. It does not affect +the group/group contributions calculated by the {kspace} keyword. + This compute does not calculate any bond or angle or dihedral or improper interactions between atoms in the two groups. @@ -78,6 +90,22 @@ entire system. Thus it can be costly to invoke this compute too frequently. +NOTE: If you have a bonded system, then the settings of +"special_bonds"_special_bonds.html command can remove pairwise +interactions between atoms in the same bond, angle, or dihedral. This +is the default setting for the "special_bonds"_special_bonds.html +command, and means those pairwise interactions do not appear in the +neighbor list. Because this compute uses a neighbor list, it also +means those pairs will not be included in the group/group interaction. +This does not apply when using long-range coulomb interactions +({coul/long}, {coul/msm}, {coul/wolf} or similar. One way to get +around this would be to set special_bond scaling factors to very tiny +numbers that are not exactly zero (e.g. 1.0e-50). Another workaround +is to write a dump file, and use the "rerun"_rerun.html command to +compute the group/group interactions for snapshots in the dump file. +The rerun script can use a "special_bonds"_special_bonds.html command +that includes all pairs in the neighbor list. + If you desire a breakdown of the interactions into a pairwise and Kspace component, simply invoke the compute twice with the appropriate yes/no settings for the {pair} and {kspace} keywords. This is no more @@ -119,7 +147,8 @@ [Default:] -The option defaults are pair = yes, kspace = no, and boundary = yes. +The option defaults are pair = yes, kspace = no, boundary = yes, +molecule = off. :line diff -Naur lammps-26Jan17/doc/src/compute_rdf.txt lammps-13Feb17/doc/src/compute_rdf.txt --- lammps-26Jan17/doc/src/compute_rdf.txt 2016-09-16 10:20:06.402761000 -0600 +++ lammps-13Feb17/doc/src/compute_rdf.txt 2017-02-13 08:32:36.772361000 -0700 @@ -41,14 +41,14 @@ interactions between atoms in the same bond, angle, or dihedral. This is the default setting for the "special_bonds"_special_bonds.html command, and means those pairwise interactions do not appear in the -neighbor list. Because this fix uses the neighbor list, it also means +neighbor list. Because this fix uses a neighbor list, it also means those pairs will not be included in the RDF. This does not apply when -using long-range coulomb ({coul/long}, {coul/msm}, {coul/wolf} or -similar. One way to get around this would be to set special_bond -scaling factors to very tiny numbers that are not exactly zero -(e.g. 1.0e-50). Another workaround is to write a dump file, and use -the "rerun"_rerun.html command to compute the RDF for snapshots in the -dump file. The rerun script can use a +using long-range coulomb interactions ({coul/long}, {coul/msm}, +{coul/wolf} or similar. One way to get around this would be to set +special_bond scaling factors to very tiny numbers that are not exactly +zero (e.g. 1.0e-50). Another workaround is to write a dump file, and +use the "rerun"_rerun.html command to compute the RDF for snapshots in +the dump file. The rerun script can use a "special_bonds"_special_bonds.html command that includes all pairs in the neighbor list. diff -Naur lammps-26Jan17/doc/src/pair_morse.txt lammps-13Feb17/doc/src/pair_morse.txt --- lammps-26Jan17/doc/src/pair_morse.txt 2016-10-06 12:59:16.440173000 -0600 +++ lammps-13Feb17/doc/src/pair_morse.txt 2017-02-03 14:45:56.983493000 -0700 @@ -13,6 +13,7 @@ pair_style morse/smooth/linear command :h3 pair_style morse/smooth/linear/omp command :h3 pair_style morse/soft command :h3 +pair_style morse/kk command :h3 [Syntax:] diff -Naur lammps-26Jan17/doc/utils/txt2html/txt2html.exe lammps-13Feb17/doc/utils/txt2html/txt2html.exe --- lammps-26Jan17/doc/utils/txt2html/txt2html.exe 2017-02-13 09:02:55.633073323 -0700 +++ lammps-13Feb17/doc/utils/txt2html/txt2html.exe 1969-12-31 17:00:00.000000000 -0700 @@ -1,101 +0,0 @@ -ELF>@@(@8@@@@@@@@@@ `` 00`0`@@ PtdXX@X@Qtd/lib64/ld-linux-x86-64.so.2GNUCEA*:.#76D'981 C$?;(>&@5=-0<423 -   !)%+,/" BN]" ~@Ds= l9N\"~xH@ X@I >&qjf" ~@<U \`  `,b@<&u0`libstdc++.so.6_ZNKSs13find_first_ofEPKcmm__cxa_begin_catch_ZNSs4_Rep10_M_destroyERKSaIcE_ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_ERKS6_S8__ZSt24__throw_out_of_range_fmtPKcz_ZdaPv_ZNSs7reserveEm_Znwm_ZNKSs4findEPKcmm__gmon_start___Jv_RegisterClasses_ZNKSs16find_last_not_ofEPKcmm_ZNSs12_M_leak_hardEv_ZNSs6assignEPKcm_ZSt20__throw_length_errorPKc_ZdlPv_ZNSs9_M_mutateEmmm_ZNSsC1EPKcRKSaIcE_Znam_ITM_deregisterTMCloneTable_ZNSsD1Ev_ITM_registerTMCloneTable__gxx_personality_v0_ZNSs4_Rep20_S_empty_rep_storageE_ZNSsC1ERKSsmm_ZNKSs7compareEPKc_ZNKSs5rfindEcm_ZNKSs5rfindEPKcmm_ZSt17__throw_bad_allocv_ZNSs6appendERKSs_ZNSt8ios_base4InitD1Ev_ZNSs6appendEPKc_ZNSs4_Rep10_M_disposeERKSaIcE__cxa_end_catch_ZNKSs17find_first_not_ofEPKcmm_ZNSs6insertEmPKc_ZNKSs4findEPKcm_ZNKSs12find_last_ofEPKcmm_ZNKSs6substrEmm_ZNSt8ios_base4InitC1Ev_ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_EPKS3_RKS6__ZNKSs4findEcm__pthread_key_create_ZNSs6assignEPKc_ZNSs6assignERKSs_ZNSs6insertEmPKcm__cxa_rethrow_ZNSsC1ERKSs_ZNSs6appendEPKcmlibm.so.6libgcc_s.so.1_Unwind_Resumelibc.so.6strcpyfopenreallocstrspnstrtolfgets__cxa_atexitmemcmpstdoutfclosestderrfwritefprintfmemmovestrcmp__libc_start_mainfreeGCC_3.0GLIBC_2.2.5CXXABI_1.3GLIBCXX_3.4.20GLIBCXX_3.4. P&y K ui ӯkpt) -` `7 `80`D`` `(`0`8`@`H` P` X` ``h`p`x``````````Ȣ`Т`آ`` `!`"`#`$`%`&`' `((`)0`*8`,@`-H`.P`0X`1``2h`3p`4x`5`6`9`:`;`<`=`>`?`@ȣ`AУ`Bأ`CH-sH5 % @% h% - h% h% h% h% h% h%ڊ hp%Ҋ h`%ʊ h P%Š h -@% h 0% h % h % h% h% h% h% h%z h%r h%j h%b h%Z hp%R h`%J hP%B h@%: h0%2 h %* h%" h% h% h % - h!% h"% h#% h$% h%% h&%ډ h'p%҉ h(`%ʉ h)P%‰ h*@% h+0% h, % h-% h.% h/% h0% h1% h2%z h3%r h4%j h5%b h6%Z h7p%R h8`%J h9P1I^HHPTIp@H@Hl@/HH HtHÐ`UH-`HHvHt]`f]fffff.`UH`HHHH?HHtHt ]`]fD= u_UHS `H`HH HHH9s$fDHH `H H9r%f H[]fD(`H?u@HtUH]*ATUSHIHcH5 HNHA$Hھ -HHUHrA$Hxt HcH9HOtHcHH9HHM[]A\SHH@jH¾@HUPHE[AWAVAUATUSHIHAIALH3HHEEtHLHHH=t'uH Ԇ 5P@NHLLAy@^v DEHL9uEt@H=p n@HaHHLHHHH9u EuLHHH{LcHExxHJHEB< : H[]A\A]A^A_AUATUSHhHII;@H;mI$HHHHH|$x\@H|$DHt$HHHD$HxHt$]/HD$HxH`t1HtP PJHЅ -Ht$Qw@H;I$Hu"H H$@H=ք _H$HxH`t1HtP PJHЅ -Ht$RuH IEH$`H\@HHHRHJH9HH|$0IHt$0H|$ -a@H|$ Ht$ HIHHD$ HxHt$^QHD$ HxH`t1HtP PJHЅ -Ht$S HD$0HxH`HtP PJHЅHt$THH|$@,a@H|$@Ht$@HkHHD$@HxHt$_sHHD$@HxH`t1HtP PJHЅ -Ht$U+@H<$mIEHuH$g@H= H$HxH`HtP PJHЅHt$VHHD$HxHt$WHH$HxHt$XyH1HHD$ HxHt$Y[HHD$0HxHt$ZCHHD$@HxHt$[+HH$HxHt$\HHh[]A\A]AUATUSH(IH$`HD$`H`HD$ `   HcHс 9, T @H|$0GLH= @u@H|$0YLH=R @u@H|$0+H' J(؍@H= HT$0@H|$PM[Ht$PH|$@X@H|$@$Ht$@HHHD$@HxH$rHD$@HxH`t4HtP PJHЅ H$QHD$PHxH`t4HtP PJHЅ H$ HD$0HxH`t4HtP PJHЅ H$ 9 ? HcHw 9, @H|$0-LH=& @u@H|$0LH=~ @su@H|$0YLH=~ @Eu@H|$0+H~ J(@H=L~ JHT$0@H|$pYHt$pH|$` @H|$`Ht$`H|$JHHD$`HxH$OyHD$`HxH`t4HtP PJHЅ H$HD$pHxH`t4HtP PJHЅ H$HD$0HxH`t4HtP PJHЅ H$xo} 9ˊ@@`u@H|$ -@`͊@H$WH$H$@H$XH$H|$ !HH$HxH$IH$HxH`t4HtP PJHЅ H$zH$HxH`t4HtP PJHЅ H$1=| 7HcH}| ;,HM| H¾͊@H$UVH$H$Z@H$#H$H|$ !HH$HxH$SH$HxH`t4HtP PJHЅ H$EH$HxH`t4HtP PJHЅ H$9s{ HT$ ֊@H$@H$Sd@(`uF@H$'Hn @H=m H$@H$;HH$H$H$HzH`t3HJHt  BHJ H$xH$HzH`tLHJHt  BHJ&H$0@H$HDŽ$`ˊ@ `L4HDŽ$`[@ `)u@H$~@ `u@H$Ou@ `u@H$(N@ `u@H$'Hl 0@H=k 8H$@H$0dFH$0H$ i@H$ 2H$ H$!HH$ HxH$ H$ HzH`t3HJHt  BHJ H$RH$0HzH`t3HJHt  BHJ H$ -H$HzH`tLHJHt  BHJ&H$@H$iH$M@H$PDH$H$PH$@DH$@H$3@H$H$@HzH`tV!HH$HxH$ HJHt  BHJ H$H$PHzH`t3HJHt  BHJ H$D$,HT$,LHHyI$HXH AEFH$`=H$`H|$p H$`HxH`t4HtP PJHЅ H$H$HJLHT$pHJH$HpLH$HhHD$phHT$,LHHcD$,H9 -= i I$HHHH)ڸHEH9vHھ@X@HLHT$,LHA݋D$,HcH9=HI$HHHH)Hh HRH9HFH9vH@X@ILLVh PA9u!tHc Q@L DH$plH$pH|$p;H$pHxH`t5HPHt  PJHЅ H$Hc]@L,HT$pHJHcLHD$ppAHT$,L8HøHI$HHHH)ڸHEH9vH@X@HL=g uHc Q@L -HT$,LHøADH$H$H|$pH$HxH`t4HtP PJHЅ H$H$HJHcLH$hHT$pHJHcLHT$,LHAHAAHH$HzH`t3HJHt  BHJ H$ -H$HzH`t3HJHt  BHJ H$H$HzH`t3HJHt  BHJ H$zHT$pHzH`t3HJHt  BHJ H$5@X`vxHDŽ$` -L@HHP -LHþc@X` uf@H$sGc@X`utk@H$Cp@H$*HuH$HJL{H$HJHsLaHS -L`HP -LOH@X`H$HzH`t3HJHt  BHJ H$@P`HDŽ$`HDŽ$`@P`u3u@H$ y@H$@P`ru3~@H$ @H$@P`,u0@H$@H$j[d@P`u&p@H$C@H$1"@H$HH$- -L{HHP -L0HHuH$HJL.H$HJHpLHS -LHH$HJHLHھ -LHP -LH]@P`:H$HzH`t0Ht B BHJ H$5H$HzH`t0Ht B BHJ H$HT$`HzH`t3HJHt  BHJ H$HT$PHzH`t3HJHt  BHJ H$fHT$@HzH`t3HJHt  BHJ H$!HT$0HzH`HJHt  BHJ}H$kHH$HxH$HH$HxH$uHH$HxH$qHH$HxH$SHH$HxH$5HH$HxH$HH$HxH$HH$HxH$2HH$ HxH$HH$0HxH$HH$HxH${HH$@HxH$ZHH$PHxH$<{HH$`HxH$?HH$pHxH$!HH$HxH$HH$HxH$HH$HxH$HH$HxH$HD$pHxH$rXHH$HxH$T:HH$HxH$6H$HxH$HHD$`HxH$HHD$PHxH$HD$@HxH$HD$0HxH$HsLs,HuHH5Z\ H|$@h ARI$HPH)IEH[]A\A]A^A_AWAVAUATUSHH|$$HHT$HL$(HD$0`HDŽ$HDŽ$HDŽ$H@HZHD$H AL꾭@HIHExxH{HEB<0(LL)H@I9vHL@X@LHH$H$H|$0.H$HxH`t4HtP PJHЅ H$IAD<$L򾳋@HIHu$HUp@H=OY MHDŽ$`AG$HcL$H$LH)HH9vH)H$LH$4pH9skHHD$I9tPHHHxH`t4HtP PJHЅ H$;HI9uHD$H$H$HxH`t4HtP PJHЅ H$LL)HEH@I9vHL@X@ LHH$McH$JMn$|$$@H|$0iq<$gW ƉD$~QHW H$L:MgHÍVLtH;L9guLLuHL9uHDŽ$`D$HL%zW H kW LH)HH9vH)HH$L激`1eH9s`L4M9tPLHHxH`t4HtP PJHЅ H$<HI9uL5V H$HxH`t5HPHt  PJHЅ H$HDŽ$`NV HL%ZV H KV LH)HH9vH)HH$L``0eH9s`L4M9tPLHHxH`t4HtP PJHЅ H$=HI9uL5U H$HxH`t5HPHt  PJHЅ H$HcYU HU HDHcɍSHcLH$H$pƶHcOD HD H;HH9uH$HtHT$0HzH` HJHt  BHJH$ӲH$H$H9tLHHzH`t3HJHt  BHJ H$?vHH9uH$Ht;HT$0HzH`[HJHt  BHJ1H$ HH$HxH$ -HH$HxH$ ̰HH$HxH$ 諰sHH$HxH$ 芰RHH$HxH$i1HH$HxH$HHH$HxH$'HH$HxH$HH$ HxH$HH$HxH$įHH$0HxH$裯HH$@HxH$腯HH$PHxH$gHH$`HxH$IHH$pHxH$+HH$HxH$ -HH$HxH$HH$HxH$ȮHH$HxH$觮HH$HxH$膮{HH$HxH$hHH$HxH$JHH$HxH$ ,!HH$HxH$!HHD$pHxH$"HH$HxH$#ҭHH$HxH$$豭HH$HxH$%萭tHH$ HxH$&oSHH$0HxH$'N!HH$@HxH$(0HH$HxH$)HH$PHxH$*HH$`HxH$+Ь!HH$pHxH$,責HH$HxH$-蔬{HH$HxH$.v]HH$HxH$/X!HH$HxH$0:HH$HxH$1HHD$`HxH$2HH$HxH$3ZHH$HxH$4«!HH$HxH$5褫HHD$pHxH$6艫HHD$`HxH$7nHHD$PHxH$8SHHD$@HxH$98HH$tHD$0HxH$:HȭL@H=7 1HH[]A\A]A^A_AWAVAUATUSH|$HD$ `HD$0`HD$@`HD$P`HD$``HD$p`t+IHF8-t_A$D$JH 6 @袬H 6 )(@臬=A$D$I@H8@H8uS$$LcILLIIlH}LHHOt5RIHuHCHH 5 @賫H 5 )(@蘫ND$HcI8-D$)؉D$u9ʨHHXH\$H@`HcD$ItH萨O Hcl$HHH9HHFqH(HxH|$HtHD`HH9u|$3 Hl$WLtIHcI4HLHHHPHHL9uH3LǩADHL9umL55 H-5 I9tPLHHxH`t4HtP PJHЅ H$ 覨HH9uL55 L5W5 H-X5 I9tPLHHxH`t4HtP PJHЅ H$uHt$ H|$PA(uKHt$ H|$P(,@H|$`HL$@HT$0Ht$`H|$PoH|$ HcȺHt$ H$薥H$H$Q@H$H$H|$P舤!HH$HxH$芢=H$HxH`t4HtP PJHЅ H$Ht葒HD$II^HL$HIFHHD$0HxHt$G}H5H蝔H%谔H\$MuULd$ HD$J'Lt$(IHD$HxHt$H+LHHD$(H;\$(uHHxHt$IHI9uHD$HtHʑLl$MnH\$H)HHHD$ HHD$.HD$HD$H\$H\$(L&HX[]A\A]A^A_ÐAUATUSHIHoH?HH)HH9vH)HHHL`H9s[L,I9tMLHHxH`t1HtH Hqpȅ -Ht$HH9uMl$H[]A\A]HYAWAVAUATUSHIHHILwHGL)HH9D)MI)LHH9siHMI)LL)HHHt LLIl$LH)HHHtLH)HڑHH9D+HH9uH)tHLD(HHuID$HH$HH)HD$I?OAAHD$LAMHDH[]A\A]A^A_HT$ LGHLH)HH9vHH)HL$ Lk H9sHHGHÐfffff.Hl$Ld$H-o L%h Ll$Lt$L|$H\$H8L)AIHI Ht1@LLDAHH9rH\$Hl$Ld$Ll$ Lt$(L|$0H8ÐUHS`HH HtDHHHuH[]ÐHH.txt.htmlERROR: Could not open %s -leftrightccenter ALIGN ="topmiddlebabaselinebobottom VALIGN ="0 WIDTH=""_basic_string::substr"center""right""left" -dl

  • vector::_M_fill_insert,( -,)link
    pre
    h1

    h2

    h3

    h4

    h5
    h6
    ulb
      ule
    olb
      ole
    dlb
    dtddulol
    imageԕ@BBA A(D-(A ABB,d\%@AAD0SAA,D5@AAD0{AA<&E@BBA A(D@z(A ABB<_ Q@BBA A(GK (A ABBLDP@BBB B(A0A8G48A0A(B BBB4uBBA A(D@d(A ABBT @KBB B(A0A8D8A0A(B BBB4$BBA A(D@(A ABBL\RdKBB B(A0A8DPA8A0A(B BBBfED @Lnz#h@BBB B(A0A8G^#8A0A(B BBBLfD@BBB B(A0A8GJ8A0A(B BBBdD$Q_@XMBVjc&+#j /6M 5@`xu 9  - - -    A3X3-3-.3 .  . -. - - -. 3 1//110//100@10111131"3#2&3&2343ymH- - -s  - -  -}cF:(F:F;YF;F ; ; -F<<-F<<F>====>.FFE(D > D">"1D#?#$D#@$?$@$@%?%?&@&@&1D'@'1D(A(1D(A)D)A*D*B*A+B+B,D,B-D-C-B.C.C/D/C0D0D0C1D1C2!D3E4D46E5D5E6>FFFFV  &&{@$.K @ H@@@ -@h@ - `p`@@` o@oo@0`@@@.@>@N@^@n@~@@@@@@@@@@@.@>@N@^@n@~@@@@@@@@@@@.@>@N@^@n@~@@@@@@@@@@@.@>@N@^@n@~@@GCC: (GNU) 4.4.7 20120313 (Red Hat 4.4.7-16)GCC: (GNU) 4.9.0.symtab.strtab.shstrtab.interp.note.ABI-tag.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.gcc_except_table.ctors.dtors.jcr.dynamic.got.got.plt.data.bss.comment@#@ 1@@@(7 h@hx? -@ -Go@To@c@`m`@`p w@r@}@oH@HX@XX@X@ԕ@ԕ``(`(0`0```` 0>.9  @@@@h@ -@@@@ `@ -@ @ @ H@X@X@@ԕ@``(`0````` @`*`8(`E @Z 0@m p@8`@` @`Е@(` @ @| @@0 @Q Y@>q "@_ } .@P FI@z# &{@```` 0` `!@l p@ @" ~@D7Us" †@d   L`4```g` H@;`D^x" }@H@ " ^~@\X@+`4X@Kk} `P` ` H`>]``g``@``'; `H @X" }@xs" @" }@ ` 0` `' " ~@^ r 8`}   `  (`  -) -= -" @_ -`d -x -P` - - -` - ` # X`, @ U " }@xp " &@E ` " @u @ `  `  6 N ؤ`V y   0`  l@f  -@call_gmon_startcrtstuff.c__CTOR_LIST____DTOR_LIST____JCR_LIST__deregister_tm_clonesregister_tm_clones__do_global_dtors_auxcompleted.6557dtor_idx.6559frame_dummy__CTOR_END____FRAME_END____JCR_END____do_global_ctors_auxtxt2html.cpp_ZL6find_nRSsiRi_ZL32index_of_first_char_of_last_wordRSs_ZL14next_paragraphP8_IO_FILERSs_ZL9file_openiRSsPP8_IO_FILES2__ZL6td_tagi_ZL10substituteRSs_ZL16process_commandsiRSsS_S__GLOBAL__sub_I_alias1_ZStL8__ioinit_GLOBAL_OFFSET_TABLE___init_array_end__init_array_start_DYNAMICdata_start_ZNSs6appendEPKcm@@GLIBCXX_3.4_ZNKSs16find_last_not_ofEPKcmm@@GLIBCXX_3.4_ZSt20__throw_length_errorPKc@@GLIBCXX_3.4__libc_csu_fini_start_ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_ERKS6_S8__ZSt24__throw_out_of_range_fmtPKcz@@GLIBCXX_3.4.20_ZNSs9_M_mutateEmmm@@GLIBCXX_3.4_ZNKSs6substrEmm@@GLIBCXX_3.4_ZNSs6assignEPKc@@GLIBCXX_3.4_ZNSt6vectorIiSaIiEE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPiS1_EEmRKi__gmon_start___Jv_RegisterClasses_Znam@@GLIBCXX_3.4_ZdlPv@@GLIBCXX_3.4tableflag_ZNSs7reserveEm@@GLIBCXX_3.4_ZNSs4_Rep10_M_disposeERKSaIcE@@GLIBCXX_3.4alias2_ZNKSs5rfindEcm@@GLIBCXX_3.4exit@@GLIBC_2.2.5ncnum_fini__cxa_rethrow@@CXXABI_1.3_ZNSt8ios_base4InitC1Ev@@GLIBCXX_3.4fopen@@GLIBC_2.2.5__libc_start_main@@GLIBC_2.2.5_ZNKSs12find_last_ofEPKcmm@@GLIBCXX_3.4ncvalign_ZNSsC1ERKSs@@GLIBCXX_3.4__cxa_atexit@@GLIBC_2.2.5_ZNSt6vectorIiSaIiEED1Evfgets@@GLIBC_2.2.5_ZNSt8ios_base4InitD1Ev@@GLIBCXX_3.4_ITM_deregisterTMCloneTable_ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_ERKS6_PKS3__IO_stdin_usedcolalign_ZNSsD1Ev@@GLIBCXX_3.4_ZNKSs5rfindEPKcmm@@GLIBCXX_3.4free@@GLIBC_2.2.5_ZNKSs17find_first_not_ofEPKcmm@@GLIBCXX_3.4rowvalignnlink_ITM_registerTMCloneTable__data_start_ZNSs4_Rep10_M_destroyERKSaIcE@@GLIBCXX_3.4rowquit_ZNKSs13find_first_ofEPKcmm@@GLIBCXX_3.4_ZNSs6insertEmPKc@@GLIBCXX_3.4colvalign_ZNSs6insertEmPKcm@@GLIBCXX_3.4_ZNKSs4findEcm@@GLIBCXX_3.4_ZNKSs7compareEPKc@@GLIBCXX_3.4__TMC_END___ZNSsC1EPKcRKSaIcE@@GLIBCXX_3.4cnumdwidth__dso_handle_ZNKSs4findEPKcmm@@GLIBCXX_3.4strtol@@GLIBC_2.2.5__DTOR_END____libc_csu_init_ZNSt6vectorISsSaISsEED2Ev_ZNSt6vectorISsSaISsEE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPSsS1_EEmRKSsstrspn@@GLIBC_2.2.5memmove@@GLIBC_2.2.5_ZNSt6vectorIiSaIiEED2Evcwidthtablealign__bss_start_ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_EPKS3_RKS6_strcmp@@GLIBC_2.2.5tabledelim_ZNSs6assignEPKcm@@GLIBCXX_3.4strcpy@@GLIBC_2.2.5__pthread_key_createvacolnum_ZNSs6assignERKSs@@GLIBCXX_3.4dataalign_ZdaPv@@GLIBCXX_3.4_ZNSs6appendEPKc@@GLIBCXX_3.4memcmp@@GLIBC_2.2.5_ZNSt6vectorISsSaISsEE6resizeEmSs_endfclose@@GLIBC_2.2.5allflag__cxa_end_catch@@CXXABI_1.3_ZSt17__throw_bad_allocv@@GLIBCXX_3.4_ZNSs4_Rep20_S_empty_rep_storageE@@GLIBCXX_3.4stderr@@GLIBC_2.2.5__cxa_begin_catch@@CXXABI_1.3listflagfwrite@@GLIBC_2.2.5realloc@@GLIBC_2.2.5_ZNSt6vectorISsSaISsEED1Ev_ZNSt6vectorIiSaIiEE6resizeEmi_edata_ZNSt6vectorISsSaISsEE15_M_erase_at_endEPSs__gxx_personality_v0@@CXXABI_1.3alias1fprintf@@GLIBC_2.2.5acolnum_Znwm@@GLIBCXX_3.4_ZNSsC1ERKSsmm@@GLIBCXX_3.4_Unwind_Resume@@GCC_3.0ncalign_ZNSs12_M_leak_hardEv@@GLIBCXX_3.4_ZNSs6appendERKSs@@GLIBCXX_3.4_ZNKSs4findEPKcm@@GLIBCXX_3.4stdout@@GLIBC_2.2.5main_init \ No newline at end of file diff -Naur lammps-26Jan17/examples/VISCOSITY/in.einstein.2d lammps-13Feb17/examples/VISCOSITY/in.einstein.2d --- lammps-26Jan17/examples/VISCOSITY/in.einstein.2d 2016-04-18 17:59:16.008338000 -0600 +++ lammps-13Feb17/examples/VISCOSITY/in.einstein.2d 2017-02-07 10:50:38.330174000 -0700 @@ -54,7 +54,8 @@ variable pxy equal pxy variable pxx equal pxx-press -fix avstress all ave/time $s $p $d v_pxy v_pxx ave one file einstein.dat +fix avstress all ave/time $s $p $d v_pxy v_pxx ave one & + file profile.einstein.2d # Diagonal components of SS are larger by factor 2-2/d, # which is 4/3 for d=3, but 1 for d=2. diff -Naur lammps-26Jan17/examples/coreshell/log.9Nov16.coreshell.dsf.1 lammps-13Feb17/examples/coreshell/log.9Nov16.coreshell.dsf.1 --- lammps-26Jan17/examples/coreshell/log.9Nov16.coreshell.dsf.1 2016-11-09 15:41:17.678840000 -0700 +++ lammps-13Feb17/examples/coreshell/log.9Nov16.coreshell.dsf.1 1969-12-31 17:00:00.000000000 -0700 @@ -1,185 +0,0 @@ -LAMMPS (27 Oct 2016) -# Testsystem for core-shell model compared to Mitchel and Finchham -# Hendrik Heenen, June 2014 - -# ------------------------ INITIALIZATION ---------------------------- - -units metal -dimension 3 -boundary p p p -atom_style full - -# ----------------------- ATOM DEFINITION ---------------------------- - -fix csinfo all property/atom i_CSID -read_data data.coreshell fix csinfo NULL CS-Info - orthogonal box = (0 0 0) to (24.096 24.096 24.096) - 1 by 1 by 1 MPI processor grid - reading atoms ... - 432 atoms - scanning bonds ... - 1 = max bonds/atom - reading bonds ... - 216 bonds - 1 = max # of 1-2 neighbors - 0 = max # of 1-3 neighbors - 0 = max # of 1-4 neighbors - 1 = max # of special neighbors - -group cores type 1 2 -216 atoms in group cores -group shells type 3 4 -216 atoms in group shells - -neighbor 2.0 bin -comm_modify vel yes - -# ------------------------ FORCE FIELDS ------------------------------ - -pair_style born/coul/dsf/cs 0.1 20.0 20.0 # A, rho, sigma=0, C, D -pair_coeff * * 0.0 1.000 0.00 0.00 0.00 -pair_coeff 3 3 487.0 0.23768 0.00 1.05 0.50 #Na-Na -pair_coeff 3 4 145134.0 0.23768 0.00 6.99 8.70 #Na-Cl -pair_coeff 4 4 405774.0 0.23768 0.00 72.40 145.40 #Cl-Cl - -bond_style harmonic -bond_coeff 1 63.014 0.0 -bond_coeff 2 25.724 0.0 - -# ------------------------ Equilibration Run ------------------------------- - -reset_timestep 0 - -thermo 50 -thermo_style custom step etotal pe ke temp press epair evdwl ecoul elong ebond fnorm fmax vol - -compute CSequ all temp/cs cores shells - -# output via chunk method - -#compute prop all property/atom i_CSID -#compute cs_chunk all chunk/atom c_prop -#compute cstherm all temp/chunk cs_chunk temp internal com yes cdof 3.0 -#fix ave_chunk all ave/time 100 1 100 c_cstherm file chunk.dump mode vector - -thermo_modify temp CSequ - -# velocity bias option - -velocity all create 1427 134 dist gaussian mom yes rot no bias yes temp CSequ -Neighbor list info ... - 1 neighbor list requests - update every 1 steps, delay 10 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 22 - ghost atom cutoff = 22 - binsize = 11 -> bins = 3 3 3 -velocity all scale 1427 temp CSequ - -fix thermoberendsen all temp/berendsen 1427 1427 0.4 -fix nve all nve -fix_modify thermoberendsen temp CSequ - -# 2 fmsec timestep - -timestep 0.002 -run 500 -Memory usage per processor = 7.04355 Mbytes -Step TotEng PotEng KinEng Temp Press E_pair E_vdwl E_coul E_long E_bond Fnorm Fmax Volume - 0 -635.80596 -675.46362 39.657659 1427 -21302.622 -675.46362 1.6320365 -677.09565 0 0 1.3517686e-14 2.942091e-15 13990.5 - 50 -633.9898 -666.02679 32.03699 1152.7858 -4578.5681 -668.50431 37.800204 -706.30452 0 2.4775226 14.568073 4.3012389 13990.5 - 100 -631.89604 -661.96148 30.065442 1081.8436 -3536.6738 -664.61798 39.18583 -703.80381 0 2.6564973 14.677968 3.9051029 13990.5 - 150 -630.08723 -662.95879 32.871559 1182.816 -109.19506 -665.76772 46.247821 -712.01554 0 2.8089226 15.270039 2.9328953 13990.5 - 200 -628.55895 -663.97376 35.414806 1274.3296 -1748.35 -666.58439 41.738552 -708.32294 0 2.6106349 14.148282 3.1047826 13990.5 - 250 -627.28761 -661.92274 34.635123 1246.2743 -1280.4899 -664.917 43.045475 -707.96247 0 2.9942594 14.248617 2.4694705 13990.5 - 300 -626.6163 -663.65651 37.040209 1332.8164 -1887.9043 -666.35215 40.84964 -707.20179 0 2.6956373 13.142643 1.9263242 13990.5 - 350 -625.76781 -664.66441 38.896607 1399.6151 -1839.482 -667.47659 40.999206 -708.47579 0 2.8121749 13.601238 1.9262698 13990.5 - 400 -625.02586 -661.46042 36.434568 1311.0236 -868.2031 -664.40231 43.21398 -707.61629 0 2.9418875 14.945389 2.7493413 13990.5 - 450 -624.3278 -660.50844 36.180639 1301.8865 -2203.3944 -663.49896 40.008669 -703.50763 0 2.9905179 14.158866 1.7299899 13990.5 - 500 -623.56254 -661.33839 37.775849 1359.2869 -810.50736 -664.11652 42.993999 -707.11052 0 2.7781274 13.68709 2.9115277 13990.5 -Loop time of 10.7162 on 1 procs for 500 steps with 432 atoms - -Performance: 8.063 ns/day, 2.977 hours/ns, 46.658 timesteps/s -99.9% CPU use with 1 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 10.478 | 10.478 | 10.478 | 0.0 | 97.78 -Bond | 0.0029511 | 0.0029511 | 0.0029511 | 0.0 | 0.03 -Neigh | 0.14159 | 0.14159 | 0.14159 | 0.0 | 1.32 -Comm | 0.074382 | 0.074382 | 0.074382 | 0.0 | 0.69 -Output | 0.00054097 | 0.00054097 | 0.00054097 | 0.0 | 0.01 -Modify | 0.010588 | 0.010588 | 0.010588 | 0.0 | 0.10 -Other | | 0.007748 | | | 0.07 - -Nlocal: 432 ave 432 max 432 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 9280 ave 9280 max 9280 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 297636 ave 297636 max 297636 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 297636 -Ave neighs/atom = 688.972 -Ave special neighs/atom = 1 -Neighbor list builds = 20 -Dangerous builds = 0 - -unfix thermoberendsen - -# ------------------------ Dynamic Run ------------------------------- - -run 1000 -Memory usage per processor = 7.04355 Mbytes -Step TotEng PotEng KinEng Temp Press E_pair E_vdwl E_coul E_long E_bond Fnorm Fmax Volume - 500 -623.56254 -661.33839 37.775849 1359.2869 -810.50736 -664.11652 42.993999 -707.11052 0 2.7781274 13.68709 2.9115277 13990.5 - 550 -623.5004 -660.74472 37.244326 1340.1611 -1413.4326 -663.99669 41.875014 -705.8717 0 3.2519651 15.097948 2.278405 13990.5 - 600 -623.46963 -659.61729 36.147655 1300.6997 -521.50578 -662.54994 43.956071 -706.50601 0 2.9326492 14.99649 2.6334959 13990.5 - 650 -623.49291 -661.50698 38.014069 1367.8588 -1230.0925 -664.21074 42.027844 -706.23859 0 2.7037578 13.982308 1.6247207 13990.5 - 700 -623.4913 -660.11564 36.62434 1317.8522 -727.89052 -663.24921 43.413397 -706.66261 0 3.1335699 15.009937 2.0563966 13990.5 - 750 -623.50292 -657.95982 34.4569 1239.8613 636.46644 -661.16971 46.539267 -707.70898 0 3.2098934 15.25993 2.1864622 13990.5 - 800 -623.5176 -659.92032 36.402711 1309.8773 -912.75799 -662.84989 42.668309 -705.5182 0 2.9295708 13.577516 2.0006099 13990.5 - 850 -623.44098 -660.92727 37.486295 1348.8679 -550.40358 -664.08308 43.667245 -707.75033 0 3.1558098 14.836208 2.279198 13990.5 - 900 -623.46361 -661.21737 37.753765 1358.4923 1267.8647 -664.52195 47.67284 -712.19479 0 3.3045765 15.058502 1.886141 13990.5 - 950 -623.50114 -660.58464 37.083492 1334.3739 1754.7359 -663.48186 48.70363 -712.18549 0 2.897226 15.519042 2.2654928 13990.5 - 1000 -623.50161 -660.02915 36.527539 1314.369 228.76104 -663.31152 45.374099 -708.68562 0 3.2823685 14.783709 2.4201134 13990.5 - 1050 -623.45985 -660.57417 37.114321 1335.4832 -1490.604 -663.75391 41.258878 -705.01279 0 3.1797391 14.250262 2.3153255 13990.5 - 1100 -623.51051 -661.20338 37.692871 1356.3011 1791.7899 -664.01042 48.626451 -712.63687 0 2.807039 15.559872 3.184101 13990.5 - 1150 -623.51067 -663.19545 39.684776 1427.9758 1023.0584 -666.07723 46.5628 -712.64003 0 2.8817804 13.895322 2.3950292 13990.5 - 1200 -623.49625 -659.6715 36.175253 1301.6927 1600.2805 -662.62259 48.522365 -711.14495 0 2.9510854 15.567834 2.1677651 13990.5 - 1250 -623.48282 -660.56735 37.084533 1334.4113 -871.67341 -663.86673 42.560699 -706.42743 0 3.2993759 14.569539 2.0093709 13990.5 - 1300 -623.47744 -663.63125 40.153811 1444.853 1343.7147 -666.39564 47.104842 -713.50048 0 2.7643857 14.186019 1.4599359 13990.5 - 1350 -623.49121 -661.42731 37.936096 1365.0531 589.73669 -664.46099 45.947687 -710.40867 0 3.0336821 14.801223 2.7486556 13990.5 - 1400 -623.50803 -660.03912 36.53109 1314.4968 362.97431 -663.24909 45.772904 -709.02199 0 3.2099708 14.566488 1.9170714 13990.5 - 1450 -623.51243 -659.65548 36.143052 1300.534 2853.0755 -663.0534 51.355353 -714.40875 0 3.3979157 15.890282 2.5251359 13990.5 - 1500 -623.51621 -661.87741 38.361201 1380.3496 740.04973 -665.00896 46.208742 -711.2177 0 3.1315492 15.168927 2.4710846 13990.5 -Loop time of 22.2766 on 1 procs for 1000 steps with 432 atoms - -Performance: 7.757 ns/day, 3.094 hours/ns, 44.890 timesteps/s -99.9% CPU use with 1 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 21.8 | 21.8 | 21.8 | 0.0 | 97.86 -Bond | 0.005852 | 0.005852 | 0.005852 | 0.0 | 0.03 -Neigh | 0.30423 | 0.30423 | 0.30423 | 0.0 | 1.37 -Comm | 0.14388 | 0.14388 | 0.14388 | 0.0 | 0.65 -Output | 0.0010855 | 0.0010855 | 0.0010855 | 0.0 | 0.00 -Modify | 0.0064189 | 0.0064189 | 0.0064189 | 0.0 | 0.03 -Other | | 0.01527 | | | 0.07 - -Nlocal: 432 ave 432 max 432 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 9318 ave 9318 max 9318 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 297131 ave 297131 max 297131 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 297131 -Ave neighs/atom = 687.803 -Ave special neighs/atom = 1 -Neighbor list builds = 44 -Dangerous builds = 0 -Total wall time: 0:00:33 diff -Naur lammps-26Jan17/examples/coreshell/log.9Nov16.coreshell.dsf.g++.1 lammps-13Feb17/examples/coreshell/log.9Nov16.coreshell.dsf.g++.1 --- lammps-26Jan17/examples/coreshell/log.9Nov16.coreshell.dsf.g++.1 1969-12-31 17:00:00.000000000 -0700 +++ lammps-13Feb17/examples/coreshell/log.9Nov16.coreshell.dsf.g++.1 2017-02-07 09:56:42.784912000 -0700 @@ -0,0 +1,185 @@ +LAMMPS (27 Oct 2016) +# Testsystem for core-shell model compared to Mitchel and Finchham +# Hendrik Heenen, June 2014 + +# ------------------------ INITIALIZATION ---------------------------- + +units metal +dimension 3 +boundary p p p +atom_style full + +# ----------------------- ATOM DEFINITION ---------------------------- + +fix csinfo all property/atom i_CSID +read_data data.coreshell fix csinfo NULL CS-Info + orthogonal box = (0 0 0) to (24.096 24.096 24.096) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 432 atoms + scanning bonds ... + 1 = max bonds/atom + reading bonds ... + 216 bonds + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 1 = max # of special neighbors + +group cores type 1 2 +216 atoms in group cores +group shells type 3 4 +216 atoms in group shells + +neighbor 2.0 bin +comm_modify vel yes + +# ------------------------ FORCE FIELDS ------------------------------ + +pair_style born/coul/dsf/cs 0.1 20.0 20.0 # A, rho, sigma=0, C, D +pair_coeff * * 0.0 1.000 0.00 0.00 0.00 +pair_coeff 3 3 487.0 0.23768 0.00 1.05 0.50 #Na-Na +pair_coeff 3 4 145134.0 0.23768 0.00 6.99 8.70 #Na-Cl +pair_coeff 4 4 405774.0 0.23768 0.00 72.40 145.40 #Cl-Cl + +bond_style harmonic +bond_coeff 1 63.014 0.0 +bond_coeff 2 25.724 0.0 + +# ------------------------ Equilibration Run ------------------------------- + +reset_timestep 0 + +thermo 50 +thermo_style custom step etotal pe ke temp press epair evdwl ecoul elong ebond fnorm fmax vol + +compute CSequ all temp/cs cores shells + +# output via chunk method + +#compute prop all property/atom i_CSID +#compute cs_chunk all chunk/atom c_prop +#compute cstherm all temp/chunk cs_chunk temp internal com yes cdof 3.0 +#fix ave_chunk all ave/time 100 1 100 c_cstherm file chunk.dump mode vector + +thermo_modify temp CSequ + +# velocity bias option + +velocity all create 1427 134 dist gaussian mom yes rot no bias yes temp CSequ +Neighbor list info ... + 1 neighbor list requests + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 22 + ghost atom cutoff = 22 + binsize = 11 -> bins = 3 3 3 +velocity all scale 1427 temp CSequ + +fix thermoberendsen all temp/berendsen 1427 1427 0.4 +fix nve all nve +fix_modify thermoberendsen temp CSequ + +# 2 fmsec timestep + +timestep 0.002 +run 500 +Memory usage per processor = 7.04355 Mbytes +Step TotEng PotEng KinEng Temp Press E_pair E_vdwl E_coul E_long E_bond Fnorm Fmax Volume + 0 -635.80596 -675.46362 39.657659 1427 -21302.622 -675.46362 1.6320365 -677.09565 0 0 1.3517686e-14 2.942091e-15 13990.5 + 50 -633.9898 -666.02679 32.03699 1152.7858 -4578.5681 -668.50431 37.800204 -706.30452 0 2.4775226 14.568073 4.3012389 13990.5 + 100 -631.89604 -661.96148 30.065442 1081.8436 -3536.6738 -664.61798 39.18583 -703.80381 0 2.6564973 14.677968 3.9051029 13990.5 + 150 -630.08723 -662.95879 32.871559 1182.816 -109.19506 -665.76772 46.247821 -712.01554 0 2.8089226 15.270039 2.9328953 13990.5 + 200 -628.55895 -663.97376 35.414806 1274.3296 -1748.35 -666.58439 41.738552 -708.32294 0 2.6106349 14.148282 3.1047826 13990.5 + 250 -627.28761 -661.92274 34.635123 1246.2743 -1280.4899 -664.917 43.045475 -707.96247 0 2.9942594 14.248617 2.4694705 13990.5 + 300 -626.6163 -663.65651 37.040209 1332.8164 -1887.9043 -666.35215 40.84964 -707.20179 0 2.6956373 13.142643 1.9263242 13990.5 + 350 -625.76781 -664.66441 38.896607 1399.6151 -1839.482 -667.47659 40.999206 -708.47579 0 2.8121749 13.601238 1.9262698 13990.5 + 400 -625.02586 -661.46042 36.434568 1311.0236 -868.2031 -664.40231 43.21398 -707.61629 0 2.9418875 14.945389 2.7493413 13990.5 + 450 -624.3278 -660.50844 36.180639 1301.8865 -2203.3944 -663.49896 40.008669 -703.50763 0 2.9905179 14.158866 1.7299899 13990.5 + 500 -623.56254 -661.33839 37.775849 1359.2869 -810.50736 -664.11652 42.993999 -707.11052 0 2.7781274 13.68709 2.9115277 13990.5 +Loop time of 10.7162 on 1 procs for 500 steps with 432 atoms + +Performance: 8.063 ns/day, 2.977 hours/ns, 46.658 timesteps/s +99.9% CPU use with 1 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 10.478 | 10.478 | 10.478 | 0.0 | 97.78 +Bond | 0.0029511 | 0.0029511 | 0.0029511 | 0.0 | 0.03 +Neigh | 0.14159 | 0.14159 | 0.14159 | 0.0 | 1.32 +Comm | 0.074382 | 0.074382 | 0.074382 | 0.0 | 0.69 +Output | 0.00054097 | 0.00054097 | 0.00054097 | 0.0 | 0.01 +Modify | 0.010588 | 0.010588 | 0.010588 | 0.0 | 0.10 +Other | | 0.007748 | | | 0.07 + +Nlocal: 432 ave 432 max 432 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 9280 ave 9280 max 9280 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 297636 ave 297636 max 297636 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 297636 +Ave neighs/atom = 688.972 +Ave special neighs/atom = 1 +Neighbor list builds = 20 +Dangerous builds = 0 + +unfix thermoberendsen + +# ------------------------ Dynamic Run ------------------------------- + +run 1000 +Memory usage per processor = 7.04355 Mbytes +Step TotEng PotEng KinEng Temp Press E_pair E_vdwl E_coul E_long E_bond Fnorm Fmax Volume + 500 -623.56254 -661.33839 37.775849 1359.2869 -810.50736 -664.11652 42.993999 -707.11052 0 2.7781274 13.68709 2.9115277 13990.5 + 550 -623.5004 -660.74472 37.244326 1340.1611 -1413.4326 -663.99669 41.875014 -705.8717 0 3.2519651 15.097948 2.278405 13990.5 + 600 -623.46963 -659.61729 36.147655 1300.6997 -521.50578 -662.54994 43.956071 -706.50601 0 2.9326492 14.99649 2.6334959 13990.5 + 650 -623.49291 -661.50698 38.014069 1367.8588 -1230.0925 -664.21074 42.027844 -706.23859 0 2.7037578 13.982308 1.6247207 13990.5 + 700 -623.4913 -660.11564 36.62434 1317.8522 -727.89052 -663.24921 43.413397 -706.66261 0 3.1335699 15.009937 2.0563966 13990.5 + 750 -623.50292 -657.95982 34.4569 1239.8613 636.46644 -661.16971 46.539267 -707.70898 0 3.2098934 15.25993 2.1864622 13990.5 + 800 -623.5176 -659.92032 36.402711 1309.8773 -912.75799 -662.84989 42.668309 -705.5182 0 2.9295708 13.577516 2.0006099 13990.5 + 850 -623.44098 -660.92727 37.486295 1348.8679 -550.40358 -664.08308 43.667245 -707.75033 0 3.1558098 14.836208 2.279198 13990.5 + 900 -623.46361 -661.21737 37.753765 1358.4923 1267.8647 -664.52195 47.67284 -712.19479 0 3.3045765 15.058502 1.886141 13990.5 + 950 -623.50114 -660.58464 37.083492 1334.3739 1754.7359 -663.48186 48.70363 -712.18549 0 2.897226 15.519042 2.2654928 13990.5 + 1000 -623.50161 -660.02915 36.527539 1314.369 228.76104 -663.31152 45.374099 -708.68562 0 3.2823685 14.783709 2.4201134 13990.5 + 1050 -623.45985 -660.57417 37.114321 1335.4832 -1490.604 -663.75391 41.258878 -705.01279 0 3.1797391 14.250262 2.3153255 13990.5 + 1100 -623.51051 -661.20338 37.692871 1356.3011 1791.7899 -664.01042 48.626451 -712.63687 0 2.807039 15.559872 3.184101 13990.5 + 1150 -623.51067 -663.19545 39.684776 1427.9758 1023.0584 -666.07723 46.5628 -712.64003 0 2.8817804 13.895322 2.3950292 13990.5 + 1200 -623.49625 -659.6715 36.175253 1301.6927 1600.2805 -662.62259 48.522365 -711.14495 0 2.9510854 15.567834 2.1677651 13990.5 + 1250 -623.48282 -660.56735 37.084533 1334.4113 -871.67341 -663.86673 42.560699 -706.42743 0 3.2993759 14.569539 2.0093709 13990.5 + 1300 -623.47744 -663.63125 40.153811 1444.853 1343.7147 -666.39564 47.104842 -713.50048 0 2.7643857 14.186019 1.4599359 13990.5 + 1350 -623.49121 -661.42731 37.936096 1365.0531 589.73669 -664.46099 45.947687 -710.40867 0 3.0336821 14.801223 2.7486556 13990.5 + 1400 -623.50803 -660.03912 36.53109 1314.4968 362.97431 -663.24909 45.772904 -709.02199 0 3.2099708 14.566488 1.9170714 13990.5 + 1450 -623.51243 -659.65548 36.143052 1300.534 2853.0755 -663.0534 51.355353 -714.40875 0 3.3979157 15.890282 2.5251359 13990.5 + 1500 -623.51621 -661.87741 38.361201 1380.3496 740.04973 -665.00896 46.208742 -711.2177 0 3.1315492 15.168927 2.4710846 13990.5 +Loop time of 22.2766 on 1 procs for 1000 steps with 432 atoms + +Performance: 7.757 ns/day, 3.094 hours/ns, 44.890 timesteps/s +99.9% CPU use with 1 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 21.8 | 21.8 | 21.8 | 0.0 | 97.86 +Bond | 0.005852 | 0.005852 | 0.005852 | 0.0 | 0.03 +Neigh | 0.30423 | 0.30423 | 0.30423 | 0.0 | 1.37 +Comm | 0.14388 | 0.14388 | 0.14388 | 0.0 | 0.65 +Output | 0.0010855 | 0.0010855 | 0.0010855 | 0.0 | 0.00 +Modify | 0.0064189 | 0.0064189 | 0.0064189 | 0.0 | 0.03 +Other | | 0.01527 | | | 0.07 + +Nlocal: 432 ave 432 max 432 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 9318 ave 9318 max 9318 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 297131 ave 297131 max 297131 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 297131 +Ave neighs/atom = 687.803 +Ave special neighs/atom = 1 +Neighbor list builds = 44 +Dangerous builds = 0 +Total wall time: 0:00:33 diff -Naur lammps-26Jan17/examples/coreshell/log.9Nov16.coreshell.dsf.g++.4 lammps-13Feb17/examples/coreshell/log.9Nov16.coreshell.dsf.g++.4 --- lammps-26Jan17/examples/coreshell/log.9Nov16.coreshell.dsf.g++.4 1969-12-31 17:00:00.000000000 -0700 +++ lammps-13Feb17/examples/coreshell/log.9Nov16.coreshell.dsf.g++.4 2017-02-07 09:56:42.784912000 -0700 @@ -0,0 +1,189 @@ +LAMMPS (26 Jan 2017) +# Testsystem for core-shell model compared to Mitchel and Finchham +# Hendrik Heenen, June 2014 + +# ------------------------ INITIALIZATION ---------------------------- + +units metal +dimension 3 +boundary p p p +atom_style full + +# ----------------------- ATOM DEFINITION ---------------------------- + +fix csinfo all property/atom i_CSID +read_data data.coreshell fix csinfo NULL CS-Info + orthogonal box = (0 0 0) to (24.096 24.096 24.096) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 432 atoms + scanning bonds ... + 1 = max bonds/atom + reading bonds ... + 216 bonds + 1 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 1 = max # of special neighbors + +group cores type 1 2 +216 atoms in group cores +group shells type 3 4 +216 atoms in group shells + +neighbor 2.0 bin +comm_modify vel yes + +# ------------------------ FORCE FIELDS ------------------------------ + +pair_style born/coul/dsf/cs 0.1 20.0 20.0 # A, rho, sigma=0, C, D +pair_coeff * * 0.0 1.000 0.00 0.00 0.00 +pair_coeff 3 3 487.0 0.23768 0.00 1.05 0.50 #Na-Na +pair_coeff 3 4 145134.0 0.23768 0.00 6.99 8.70 #Na-Cl +pair_coeff 4 4 405774.0 0.23768 0.00 72.40 145.40 #Cl-Cl + +bond_style harmonic +bond_coeff 1 63.014 0.0 +bond_coeff 2 25.724 0.0 + +# ------------------------ Equilibration Run ------------------------------- + +reset_timestep 0 + +thermo 50 +thermo_style custom step etotal pe ke temp press epair evdwl ecoul elong ebond fnorm fmax vol + +compute CSequ all temp/cs cores shells + +# output via chunk method + +#compute prop all property/atom i_CSID +#compute cs_chunk all chunk/atom c_prop +#compute cstherm all temp/chunk cs_chunk temp internal com yes cdof 3.0 +#fix ave_chunk all ave/time 100 1 100 c_cstherm file chunk.dump mode vector + +thermo_modify temp CSequ + +# velocity bias option + +velocity all create 1427 134 dist gaussian mom yes rot no bias yes temp CSequ +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 22 + ghost atom cutoff = 22 + binsize = 11, bins = 3 3 3 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair born/coul/dsf/cs, half, perpetual + pair build: half/bin/newton + stencil: half/bin/3d/newton + bin: standard +velocity all scale 1427 temp CSequ + +fix thermoberendsen all temp/berendsen 1427 1427 0.4 +fix nve all nve +fix_modify thermoberendsen temp CSequ + +# 2 fmsec timestep + +timestep 0.002 +run 500 +Memory usage per processor = 6.8559 Mbytes +Step TotEng PotEng KinEng Temp Press E_pair E_vdwl E_coul E_long E_bond Fnorm Fmax Volume + 0 -635.80596 -675.46362 39.657659 1427 -21302.622 -675.46362 1.6320365 -677.09565 0 0 1.5814015e-14 3.2317898e-15 13990.5 + 50 -634.07021 -666.11867 32.048452 1153.1982 -4560.945 -668.28236 37.756542 -706.0389 0 2.163691 13.802484 3.022372 13990.5 + 100 -631.97128 -662.02544 30.054164 1081.4378 -3497.564 -664.61825 39.275003 -703.89325 0 2.5928078 13.956833 2.5417699 13990.5 + 150 -630.14953 -663.04215 32.892622 1183.5739 -88.43828 -665.63444 46.239965 -711.87441 0 2.5922927 14.667898 2.4964255 13990.5 + 200 -628.52878 -663.9795 35.45072 1275.6219 -1755.9004 -666.73564 41.758052 -708.49369 0 2.7561421 14.230743 3.0924004 13990.5 + 250 -627.27102 -662.025 34.753978 1250.5511 -1234.0918 -665.13519 43.170874 -708.30606 0 3.1101887 14.221086 1.941354 13990.5 + 300 -626.5495 -663.74287 37.193368 1338.3275 -2049.3444 -666.45574 40.476148 -706.93188 0 2.7128711 13.330425 1.7756755 13990.5 + 350 -625.87313 -665.21855 39.345421 1415.7647 -1543.1723 -667.90872 41.577366 -709.48609 0 2.6901682 13.541311 1.854662 13990.5 + 400 -625.09344 -661.26404 36.1706 1301.5253 -729.96729 -664.10334 43.468765 -707.57211 0 2.8392963 13.663555 1.9067551 13990.5 + 450 -624.46214 -660.01362 35.551477 1279.2474 -1617.7158 -663.06571 41.644856 -704.71057 0 3.0520921 14.527005 1.7280213 13990.5 + 500 -623.49246 -659.2527 35.76024 1286.7593 -935.99238 -662.32953 43.038808 -705.36834 0 3.0768302 14.099593 1.9831106 13990.5 +Loop time of 4.09864 on 4 procs for 500 steps with 432 atoms + +Performance: 21.080 ns/day, 1.139 hours/ns, 121.992 timesteps/s +99.7% CPU use with 4 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 3.3804 | 3.568 | 3.8354 | 8.9 | 87.05 +Bond | 0.00074339 | 0.00079519 | 0.00087976 | 0.0 | 0.02 +Neigh | 0.045851 | 0.046084 | 0.046361 | 0.1 | 1.12 +Comm | 0.20413 | 0.47123 | 0.65875 | 24.3 | 11.50 +Output | 0.00044298 | 0.00046057 | 0.00051165 | 0.0 | 0.01 +Modify | 0.0064909 | 0.0067219 | 0.0069766 | 0.2 | 0.16 +Other | | 0.005345 | | | 0.13 + +Nlocal: 108 ave 114 max 105 min +Histogram: 1 1 1 0 0 0 0 0 0 1 +Nghost: 6527 ave 6599 max 6472 min +Histogram: 1 0 1 0 1 0 0 0 0 1 +Neighs: 74388.2 ave 75855 max 73680 min +Histogram: 1 2 0 0 0 0 0 0 0 1 + +Total # of neighbors = 297553 +Ave neighs/atom = 688.78 +Ave special neighs/atom = 1 +Neighbor list builds = 20 +Dangerous builds = 0 + +unfix thermoberendsen + +# ------------------------ Dynamic Run ------------------------------- + +run 1000 +Memory usage per processor = 6.85787 Mbytes +Step TotEng PotEng KinEng Temp Press E_pair E_vdwl E_coul E_long E_bond Fnorm Fmax Volume + 500 -623.49319 -659.2527 35.759511 1286.7331 -936.04802 -662.32953 43.038808 -705.36834 0 3.0768302 14.099593 1.9831106 13990.5 + 550 -623.44059 -663.57938 40.138795 1444.3127 -935.73484 -666.2789 42.563337 -708.84224 0 2.6995167 13.918509 2.3189805 13990.5 + 600 -623.4703 -660.01592 36.545618 1315.0196 1327.3492 -663.08845 47.985462 -711.07391 0 3.0725254 15.192713 2.4098428 13990.5 + 650 -623.46796 -661.56776 38.099807 1370.9439 457.82439 -664.81976 45.495622 -710.31538 0 3.2519966 15.026057 1.8500226 13990.5 + 700 -623.50158 -659.5131 36.011523 1295.8012 -460.03772 -663.1078 43.938203 -707.046 0 3.5946908 14.660979 2.4825518 13990.5 + 750 -623.44787 -661.93353 38.485658 1384.8279 97.429626 -664.9551 45.083146 -710.03825 0 3.0215753 15.10043 2.3433897 13990.5 + 800 -623.48215 -659.50655 36.024402 1296.2647 1097.3866 -662.61124 47.251998 -709.86324 0 3.1046914 14.556382 2.0543766 13990.5 + 850 -623.45868 -661.13782 37.679134 1355.8068 -1802.1624 -664.41257 40.70845 -705.12102 0 3.2747525 14.691444 2.2054332 13990.5 + 900 -623.43556 -663.59137 40.155815 1444.9251 534.99197 -666.71877 45.601619 -712.32039 0 3.127395 14.741411 2.5807895 13990.5 + 950 -623.51318 -661.57916 38.06598 1369.7267 -678.12625 -664.37535 43.207862 -707.58322 0 2.7961988 14.430307 2.3936105 13990.5 + 1000 -623.47287 -661.22274 37.749874 1358.3523 634.7979 -664.42973 46.373361 -710.80309 0 3.2069879 15.891192 2.4042765 13990.5 + 1050 -623.48133 -661.52868 38.047347 1369.0562 -583.15228 -664.6098 43.618772 -708.22857 0 3.081116 14.806856 2.3447613 13990.5 + 1100 -623.47867 -661.83761 38.358946 1380.2685 -868.9779 -664.8826 42.84846 -707.73106 0 3.044983 14.69567 2.399143 13990.5 + 1150 -623.44713 -661.21299 37.765857 1358.9274 405.14554 -664.09567 45.578739 -709.6744 0 2.8826753 15.437367 3.1381305 13990.5 + 1200 -623.46549 -660.91706 37.451568 1347.6183 699.78996 -664.0883 46.36297 -710.45127 0 3.1712473 15.109665 1.8891886 13990.5 + 1250 -623.49296 -658.2218 34.728838 1249.6464 1061.0154 -661.29052 47.668699 -708.95922 0 3.0687228 14.901367 2.3964137 13990.5 + 1300 -623.49837 -660.91022 37.411844 1346.1889 226.99512 -664.35989 45.352287 -709.71217 0 3.4496704 15.161542 2.2137993 13990.5 + 1350 -623.46718 -658.80365 35.336469 1271.5108 1039.6469 -662.16908 47.565671 -709.73475 0 3.3654314 15.892516 2.7888426 13990.5 + 1400 -623.47124 -661.45375 37.982513 1366.7233 -379.56023 -664.6321 43.788306 -708.42041 0 3.1783497 14.251126 1.7415409 13990.5 + 1450 -623.46671 -660.17518 36.708464 1320.8792 -374.37056 -662.92706 44.083648 -707.01071 0 2.7518803 15.210167 1.9984277 13990.5 + 1500 -623.50515 -659.06488 35.559725 1279.5442 260.37822 -662.39548 45.779764 -708.17524 0 3.3306005 14.682396 2.4201107 13990.5 +Loop time of 8.26746 on 4 procs for 1000 steps with 432 atoms + +Performance: 20.901 ns/day, 1.148 hours/ns, 120.956 timesteps/s +99.7% CPU use with 4 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 6.706 | 7.1568 | 7.6597 | 12.7 | 86.57 +Bond | 0.0014617 | 0.0015531 | 0.0016506 | 0.2 | 0.02 +Neigh | 0.10511 | 0.10522 | 0.10532 | 0.0 | 1.27 +Comm | 0.48547 | 0.98841 | 1.4393 | 34.0 | 11.96 +Output | 0.0012085 | 0.0012462 | 0.0013196 | 0.1 | 0.02 +Modify | 0.0021446 | 0.0021989 | 0.0022545 | 0.1 | 0.03 +Other | | 0.01204 | | | 0.15 + +Nlocal: 108 ave 114 max 94 min +Histogram: 1 0 0 0 0 0 0 0 1 2 +Nghost: 6512.25 ave 6586 max 6456 min +Histogram: 1 0 0 2 0 0 0 0 0 1 +Neighs: 74248.2 ave 77441 max 65858 min +Histogram: 1 0 0 0 0 0 0 0 0 3 + +Total # of neighbors = 296993 +Ave neighs/atom = 687.484 +Ave special neighs/atom = 1 +Neighbor list builds = 46 +Dangerous builds = 0 +Total wall time: 0:00:12 diff -Naur lammps-26Jan17/potentials/Ge.tersoff lammps-13Feb17/potentials/Ge.tersoff --- lammps-26Jan17/potentials/Ge.tersoff 1969-12-31 17:00:00.000000000 -0700 +++ lammps-13Feb17/potentials/Ge.tersoff 2017-02-08 15:54:21.384206000 -0700 @@ -0,0 +1,17 @@ +# DATE: 2016-12-21 CONTRIBUTOR: Sayyed Jalil Mahdizadh, saja.mahdizadeh@gmail.com CITATION: Mahdizadeh, Akhlamadi, J. Mol. Graph. Model. 72, 1-5 (2017) + +# Tersoff parameters for various elements and mixtures +# multiple entries can be added to this file, LAMMPS reads the ones it needs +# these entries are in LAMMPS "metal" units: +# A,B = eV; lambda1,lambda2,lambda3 = 1/Angstroms; R,D = Angstroms +# other quantities are unitless + +# This is the Ge reparameterization from the following paper: +# Optimized Tersoff empirical potential for germanene +# Mahdizadeh, Akhlamadi, J. Mol. Graph. Model. 72, 1-5 (2017) + +# format of a single entry (one or more lines): +# element 1, element 2, element 3, +# m, gamma, lambda3, c, d, costheta0, n, beta, lambda2, B, R, D, lambda1, A + +Ge Ge Ge 3.0 1.0 0.0 1.0643e5 15.2 -0.35 0.75627 5.017e-7 1.71 430.0 2.95 0.15 2.4451 1760.1 diff -Naur lammps-26Jan17/src/GRANULAR/fix_wall_gran_region.cpp lammps-13Feb17/src/GRANULAR/fix_wall_gran_region.cpp --- lammps-26Jan17/src/GRANULAR/fix_wall_gran_region.cpp 2017-01-17 09:44:40.547610000 -0700 +++ lammps-13Feb17/src/GRANULAR/fix_wall_gran_region.cpp 2017-02-03 15:31:59.548063000 -0700 @@ -278,7 +278,7 @@ iold = 0; while (iold < ncontact[i]) { for (m = 0; m < nc; m++) - if (region->contact[m].iwall = walls[i][iold]) break; + if (region->contact[m].iwall == walls[i][iold]) break; if (m < nc) { ilast = ncontact[i]-1; for (j = 0; j < sheardim; j++) diff -Naur lammps-26Jan17/src/GRANULAR/pair_gran_hooke_history.cpp lammps-13Feb17/src/GRANULAR/pair_gran_hooke_history.cpp --- lammps-26Jan17/src/GRANULAR/pair_gran_hooke_history.cpp 2016-11-04 11:01:14.010162000 -0600 +++ lammps-13Feb17/src/GRANULAR/pair_gran_hooke_history.cpp 2017-02-09 15:42:59.201177000 -0700 @@ -799,3 +799,14 @@ double bytes = nmax * sizeof(double); return bytes; } + +/* ---------------------------------------------------------------------- + return ptr to FixShearHistory class + called by Neighbor when setting up neighbor lists +------------------------------------------------------------------------- */ + +void *PairGranHookeHistory::extract(const char *str, int &dim) +{ + if (strcmp(str,"history") == 0) return (void *) fix_history; + return NULL; +} diff -Naur lammps-26Jan17/src/GRANULAR/pair_gran_hooke_history.h lammps-13Feb17/src/GRANULAR/pair_gran_hooke_history.h --- lammps-26Jan17/src/GRANULAR/pair_gran_hooke_history.h 2016-02-15 09:10:43.216862000 -0700 +++ lammps-13Feb17/src/GRANULAR/pair_gran_hooke_history.h 2017-02-09 15:42:59.201177000 -0700 @@ -43,6 +43,7 @@ int pack_forward_comm(int, int *, double *, int, int *); void unpack_forward_comm(int, int, double *); double memory_usage(); + void *extract(const char *, int &); protected: double kn,kt,gamman,gammat,xmu; diff -Naur lammps-26Jan17/src/KOKKOS/Install.sh lammps-13Feb17/src/KOKKOS/Install.sh --- lammps-26Jan17/src/KOKKOS/Install.sh 2017-01-06 10:16:03.976787000 -0700 +++ lammps-13Feb17/src/KOKKOS/Install.sh 2017-02-03 14:45:56.983493000 -0700 @@ -173,6 +173,8 @@ action pair_lj_gromacs_kokkos.h action pair_lj_sdk_kokkos.cpp pair_lj_sdk.cpp action pair_lj_sdk_kokkos.h pair_lj_sdk.h +action pair_morse_kokkos.cpp +action pair_morse_kokkos.h action pair_reax_c_kokkos.cpp pair_reax_c.cpp action pair_reax_c_kokkos.h pair_reax_c.h action pair_sw_kokkos.cpp pair_sw.cpp diff -Naur lammps-26Jan17/src/KOKKOS/angle_charmm_kokkos.cpp lammps-13Feb17/src/KOKKOS/angle_charmm_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/angle_charmm_kokkos.cpp 2016-03-18 08:50:28.274912000 -0600 +++ lammps-13Feb17/src/KOKKOS/angle_charmm_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -70,23 +70,20 @@ // reallocate per-atom arrays if necessary if (eflag_atom) { - if(k_eatom.dimension_0()destroy_kokkos(k_eatom,eatom); memory->create_kokkos(k_eatom,eatom,maxeatom,"improper:eatom"); - d_eatom = k_eatom.d_view; - } + d_eatom = k_eatom.template view(); + //} } if (vflag_atom) { - if(k_vatom.dimension_0()destroy_kokkos(k_vatom,vatom); memory->create_kokkos(k_vatom,vatom,maxvatom,6,"improper:vatom"); - d_vatom = k_vatom.d_view; - } + d_vatom = k_vatom.template view(); + //} } - if (eflag || vflag) atomKK->modified(execution_space,datamask_modify); - else atomKK->modified(execution_space,F_MASK); - x = atomKK->k_x.view(); f = atomKK->k_f.view(); neighborKK->k_anglelist.template sync(); diff -Naur lammps-26Jan17/src/KOKKOS/atom_vec_angle_kokkos.cpp lammps-13Feb17/src/KOKKOS/atom_vec_angle_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/atom_vec_angle_kokkos.cpp 2017-01-06 10:16:03.976787000 -0700 +++ lammps-13Feb17/src/KOKKOS/atom_vec_angle_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -957,10 +957,10 @@ _x(i+_first,0) = _buf(i,0); _x(i+_first,1) = _buf(i,1); _x(i+_first,2) = _buf(i,2); - _tag(i+_first) = static_cast (_buf(i,3)); + _tag(i+_first) = static_cast (_buf(i,3)); _type(i+_first) = static_cast (_buf(i,4)); _mask(i+_first) = static_cast (_buf(i,5)); - _molecule(i+_first) = static_cast (_buf(i,6)); + _molecule(i+_first) = static_cast (_buf(i,6)); } }; diff -Naur lammps-26Jan17/src/KOKKOS/atom_vec_atomic_kokkos.cpp lammps-13Feb17/src/KOKKOS/atom_vec_atomic_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/atom_vec_atomic_kokkos.cpp 2017-01-06 10:16:03.976787000 -0700 +++ lammps-13Feb17/src/KOKKOS/atom_vec_atomic_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -836,7 +836,7 @@ _x(i+_first,0) = _buf(i,0); _x(i+_first,1) = _buf(i,1); _x(i+_first,2) = _buf(i,2); - _tag(i+_first) = static_cast (_buf(i,3)); + _tag(i+_first) = static_cast (_buf(i,3)); _type(i+_first) = static_cast (_buf(i,4)); _mask(i+_first) = static_cast (_buf(i,5)); // printf("%i %i %lf %lf %lf %i BORDER\n",_tag(i+_first),i+_first,_x(i+_first,0),_x(i+_first,1),_x(i+_first,2),_type(i+_first)); diff -Naur lammps-26Jan17/src/KOKKOS/atom_vec_bond_kokkos.cpp lammps-13Feb17/src/KOKKOS/atom_vec_bond_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/atom_vec_bond_kokkos.cpp 2017-01-06 10:16:03.976787000 -0700 +++ lammps-13Feb17/src/KOKKOS/atom_vec_bond_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -905,10 +905,10 @@ _x(i+_first,0) = _buf(i,0); _x(i+_first,1) = _buf(i,1); _x(i+_first,2) = _buf(i,2); - _tag(i+_first) = static_cast (_buf(i,3)); + _tag(i+_first) = static_cast (_buf(i,3)); _type(i+_first) = static_cast (_buf(i,4)); _mask(i+_first) = static_cast (_buf(i,5)); - _molecule(i+_first) = static_cast (_buf(i,6)); + _molecule(i+_first) = static_cast (_buf(i,6)); } }; diff -Naur lammps-26Jan17/src/KOKKOS/atom_vec_charge_kokkos.cpp lammps-13Feb17/src/KOKKOS/atom_vec_charge_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/atom_vec_charge_kokkos.cpp 2017-01-06 10:16:03.976787000 -0700 +++ lammps-13Feb17/src/KOKKOS/atom_vec_charge_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -872,7 +872,7 @@ _x(i+_first,0) = _buf(i,0); _x(i+_first,1) = _buf(i,1); _x(i+_first,2) = _buf(i,2); - _tag(i+_first) = static_cast (_buf(i,3)); + _tag(i+_first) = static_cast (_buf(i,3)); _type(i+_first) = static_cast (_buf(i,4)); _mask(i+_first) = static_cast (_buf(i,5)); _q(i+_first) = _buf(i,6); diff -Naur lammps-26Jan17/src/KOKKOS/atom_vec_molecular_kokkos.cpp lammps-13Feb17/src/KOKKOS/atom_vec_molecular_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/atom_vec_molecular_kokkos.cpp 2017-01-06 10:16:03.976787000 -0700 +++ lammps-13Feb17/src/KOKKOS/atom_vec_molecular_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -1029,10 +1029,10 @@ _x(i+_first,0) = _buf(i,0); _x(i+_first,1) = _buf(i,1); _x(i+_first,2) = _buf(i,2); - _tag(i+_first) = static_cast (_buf(i,3)); + _tag(i+_first) = static_cast (_buf(i,3)); _type(i+_first) = static_cast (_buf(i,4)); _mask(i+_first) = static_cast (_buf(i,5)); - _molecule(i+_first) = static_cast (_buf(i,6)); + _molecule(i+_first) = static_cast (_buf(i,6)); } }; diff -Naur lammps-26Jan17/src/KOKKOS/bond_fene_kokkos.cpp lammps-13Feb17/src/KOKKOS/bond_fene_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/bond_fene_kokkos.cpp 2016-03-18 08:50:28.274912000 -0600 +++ lammps-13Feb17/src/KOKKOS/bond_fene_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -77,21 +77,18 @@ if (eflag_atom) { memory->destroy_kokkos(k_eatom,eatom); memory->create_kokkos(k_eatom,eatom,maxeatom,"bond:eatom"); - d_eatom = k_eatom.d_view; + d_eatom = k_eatom.view(); } if (vflag_atom) { memory->destroy_kokkos(k_vatom,vatom); memory->create_kokkos(k_vatom,vatom,maxvatom,6,"bond:vatom"); - d_vatom = k_vatom.d_view; + d_vatom = k_vatom.view(); } - atomKK->sync(execution_space,datamask_read); k_k.template sync(); k_r0.template sync(); k_epsilon.template sync(); k_sigma.template sync(); - if (eflag || vflag) atomKK->modified(execution_space,datamask_modify); - else atomKK->modified(execution_space,F_MASK); x = atomKK->k_x.view(); f = atomKK->k_f.view(); diff -Naur lammps-26Jan17/src/KOKKOS/bond_fene_kokkos.h lammps-13Feb17/src/KOKKOS/bond_fene_kokkos.h --- lammps-26Jan17/src/KOKKOS/bond_fene_kokkos.h 2015-10-30 14:04:06.703402000 -0600 +++ lammps-13Feb17/src/KOKKOS/bond_fene_kokkos.h 2017-02-03 14:45:56.983493000 -0700 @@ -66,8 +66,8 @@ DAT::tdual_efloat_1d k_eatom; DAT::tdual_virial_array k_vatom; - DAT::t_efloat_1d d_eatom; - DAT::t_virial_array d_vatom; + typename ArrayTypes::t_efloat_1d d_eatom; + typename ArrayTypes::t_virial_array d_vatom; DAT::tdual_int_scalar k_warning_flag; typename AT::t_int_scalar d_warning_flag; diff -Naur lammps-26Jan17/src/KOKKOS/bond_harmonic_kokkos.cpp lammps-13Feb17/src/KOKKOS/bond_harmonic_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/bond_harmonic_kokkos.cpp 2016-03-18 08:50:28.274912000 -0600 +++ lammps-13Feb17/src/KOKKOS/bond_harmonic_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -67,18 +67,18 @@ // reallocate per-atom arrays if necessary if (eflag_atom) { - if(k_eatom.dimension_0()destroy_kokkos(k_eatom,eatom); memory->create_kokkos(k_eatom,eatom,maxeatom,"improper:eatom"); - d_eatom = k_eatom.d_view; - } + d_eatom = k_eatom.template view(); + //} } if (vflag_atom) { - if(k_vatom.dimension_0()destroy_kokkos(k_vatom,vatom); memory->create_kokkos(k_vatom,vatom,maxvatom,6,"improper:vatom"); - d_vatom = k_vatom.d_view; - } + d_vatom = k_vatom.template view(); + //} } // if (eflag || vflag) atomKK->modified(execution_space,datamask_modify); diff -Naur lammps-26Jan17/src/KOKKOS/dihedral_charmm_kokkos.cpp lammps-13Feb17/src/KOKKOS/dihedral_charmm_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/dihedral_charmm_kokkos.cpp 2016-03-18 08:50:28.274912000 -0600 +++ lammps-13Feb17/src/KOKKOS/dihedral_charmm_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -80,29 +80,24 @@ // reallocate per-atom arrays if necessary if (eflag_atom) { - if(k_eatom.dimension_0()destroy_kokkos(k_eatom,eatom); memory->create_kokkos(k_eatom,eatom,maxeatom,"dihedral:eatom"); - d_eatom = k_eatom.d_view; + d_eatom = k_eatom.template view(); k_eatom_pair = Kokkos::DualView("dihedral:eatom_pair",maxeatom); - d_eatom_pair = k_eatom.d_view; - } + d_eatom_pair = k_eatom.template view(); + //} } if (vflag_atom) { - if(k_vatom.dimension_0()destroy_kokkos(k_vatom,vatom); memory->create_kokkos(k_vatom,vatom,maxvatom,6,"dihedral:vatom"); - d_vatom = k_vatom.d_view; + d_vatom = k_vatom.template view(); k_vatom_pair = Kokkos::DualView("dihedral:vatom_pair",maxvatom); - d_vatom_pair = k_vatom.d_view; - } + d_vatom_pair = k_vatom.template view(); + //} } - - //atomKK->sync(execution_space,datamask_read); - if (eflag || vflag) atomKK->modified(execution_space,datamask_modify); - else atomKK->modified(execution_space,F_MASK); - x = atomKK->k_x.view(); f = atomKK->k_f.view(); q = atomKK->k_q.view(); diff -Naur lammps-26Jan17/src/KOKKOS/dihedral_opls_kokkos.cpp lammps-13Feb17/src/KOKKOS/dihedral_opls_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/dihedral_opls_kokkos.cpp 2016-03-18 08:50:28.274912000 -0600 +++ lammps-13Feb17/src/KOKKOS/dihedral_opls_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -77,21 +77,18 @@ if (eflag_atom) { memory->destroy_kokkos(k_eatom,eatom); memory->create_kokkos(k_eatom,eatom,maxeatom,"dihedral:eatom"); - d_eatom = k_eatom.d_view; + d_eatom = k_eatom.view(); } if (vflag_atom) { memory->destroy_kokkos(k_vatom,vatom); memory->create_kokkos(k_vatom,vatom,maxvatom,6,"dihedral:vatom"); - d_vatom = k_vatom.d_view; + d_vatom = k_vatom.view(); } - atomKK->sync(execution_space,datamask_read); k_k1.template sync(); k_k2.template sync(); k_k3.template sync(); k_k4.template sync(); - if (eflag || vflag) atomKK->modified(execution_space,datamask_modify); - else atomKK->modified(execution_space,F_MASK); x = atomKK->k_x.view(); f = atomKK->k_f.view(); diff -Naur lammps-26Jan17/src/KOKKOS/dihedral_opls_kokkos.h lammps-13Feb17/src/KOKKOS/dihedral_opls_kokkos.h --- lammps-26Jan17/src/KOKKOS/dihedral_opls_kokkos.h 2016-02-17 08:56:48.535404000 -0700 +++ lammps-13Feb17/src/KOKKOS/dihedral_opls_kokkos.h 2017-02-03 14:45:56.983493000 -0700 @@ -68,8 +68,8 @@ DAT::tdual_efloat_1d k_eatom; DAT::tdual_virial_array k_vatom; - DAT::t_efloat_1d d_eatom; - DAT::t_virial_array d_vatom; + typename ArrayTypes::t_efloat_1d d_eatom; + typename ArrayTypes::t_virial_array d_vatom; int nlocal,newton_bond; int eflag,vflag; diff -Naur lammps-26Jan17/src/KOKKOS/domain_kokkos.cpp lammps-13Feb17/src/KOKKOS/domain_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/domain_kokkos.cpp 2017-01-26 13:54:58.968983000 -0700 +++ lammps-13Feb17/src/KOKKOS/domain_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -250,7 +250,7 @@ x(i,0) += period[0]; if (DEFORM_VREMAP && (mask[i] & deform_groupbit)) v(i,0) += h_rate[0]; imageint idim = image[i] & IMGMASK; - const int otherdims = image[i] ^ idim; + const imageint otherdims = image[i] ^ idim; idim--; idim &= IMGMASK; image[i] = otherdims | idim; @@ -260,7 +260,7 @@ x(i,0) = MAX(x(i,0),lo[0]); if (DEFORM_VREMAP && (mask[i] & deform_groupbit)) v(i,0) -= h_rate[0]; imageint idim = image[i] & IMGMASK; - const int otherdims = image[i] ^ idim; + const imageint otherdims = image[i] ^ idim; idim++; idim &= IMGMASK; image[i] = otherdims | idim; diff -Naur lammps-26Jan17/src/KOKKOS/fix_qeq_reax_kokkos.cpp lammps-13Feb17/src/KOKKOS/fix_qeq_reax_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/fix_qeq_reax_kokkos.cpp 2017-01-17 09:44:40.547610000 -0700 +++ lammps-13Feb17/src/KOKKOS/fix_qeq_reax_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -387,7 +387,7 @@ void FixQEqReaxKokkos::compute_h_item(int ii, int &m_fill, const bool &final) const { const int i = d_ilist[ii]; - int j,jj,jtag,jtype,flag; + int j,jj,jtype,flag; if (mask[i] & groupbit) { @@ -395,7 +395,7 @@ const X_FLOAT ytmp = x(i,1); const X_FLOAT ztmp = x(i,2); const int itype = type(i); - const int itag = tag(i); + const tagint itag = tag(i); const int jnum = d_numneigh[i]; if (final) d_firstnbr[i] = m_fill; @@ -403,7 +403,6 @@ for (jj = 0; jj < jnum; jj++) { j = d_neighbors(i,jj); j &= NEIGHMASK; - jtype = type(j); const X_FLOAT delx = x(j,0) - xtmp; @@ -411,10 +410,11 @@ const X_FLOAT delz = x(j,2) - ztmp; if (neighflag != FULL) { + const tagint jtag = tag(j); flag = 0; if (j < nlocal) flag = 1; - else if (tag[i] < tag[j]) flag = 1; - else if (tag[i] == tag[j]) { + else if (itag < jtag) flag = 1; + else if (itag == jtag) { if (delz > SMALL) flag = 1; else if (fabs(delz) < SMALL) { if (dely > SMALL) flag = 1; diff -Naur lammps-26Jan17/src/KOKKOS/fix_qeq_reax_kokkos.h lammps-13Feb17/src/KOKKOS/fix_qeq_reax_kokkos.h --- lammps-26Jan17/src/KOKKOS/fix_qeq_reax_kokkos.h 2017-01-17 09:44:40.547610000 -0700 +++ lammps-13Feb17/src/KOKKOS/fix_qeq_reax_kokkos.h 2017-02-03 14:45:56.983493000 -0700 @@ -159,7 +159,8 @@ //typename ArrayTypes::t_float_1d_randomread mass, q; typename ArrayTypes::t_float_1d_randomread mass; typename ArrayTypes::t_float_1d q; - typename ArrayTypes::t_int_1d type, tag, mask; + typename ArrayTypes::t_int_1d type, mask; + typename ArrayTypes::t_tagint_1d tag; DAT::tdual_float_1d k_q; typename AT::t_float_1d d_q; diff -Naur lammps-26Jan17/src/KOKKOS/fix_reaxc_bonds_kokkos.cpp lammps-13Feb17/src/KOKKOS/fix_reaxc_bonds_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/fix_reaxc_bonds_kokkos.cpp 2016-11-09 13:00:27.063514000 -0700 +++ lammps-13Feb17/src/KOKKOS/fix_reaxc_bonds_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -76,7 +76,6 @@ void FixReaxCBondsKokkos::Output_ReaxC_Bonds(bigint ntimestep, FILE *fp) { - int i, j; int nbuf_local; int nlocal_max, numbonds, numbonds_max; double *buf; diff -Naur lammps-26Jan17/src/KOKKOS/improper_harmonic_kokkos.cpp lammps-13Feb17/src/KOKKOS/improper_harmonic_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/improper_harmonic_kokkos.cpp 2016-03-18 08:50:28.274912000 -0600 +++ lammps-13Feb17/src/KOKKOS/improper_harmonic_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -77,18 +77,18 @@ // reallocate per-atom arrays if necessary if (eflag_atom) { - if(k_eatom.dimension_0()destroy_kokkos(k_eatom,eatom); memory->create_kokkos(k_eatom,eatom,maxeatom,"improper:eatom"); - d_eatom = k_eatom.d_view; - } + d_eatom = k_eatom.template view(); + //} } if (vflag_atom) { - if(k_vatom.dimension_0()destroy_kokkos(k_vatom,vatom); memory->create_kokkos(k_vatom,vatom,maxvatom,6,"improper:vatom"); - d_vatom = k_vatom.d_view; - } + d_vatom = k_vatom.template view(); + //} } //atomKK->sync(execution_space,datamask_read); diff -Naur lammps-26Jan17/src/KOKKOS/npair_kokkos.cpp lammps-13Feb17/src/KOKKOS/npair_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/npair_kokkos.cpp 2016-12-13 16:27:33.803572000 -0700 +++ lammps-13Feb17/src/KOKKOS/npair_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -24,8 +24,8 @@ /* ---------------------------------------------------------------------- */ -template -NPairKokkos::NPairKokkos(LAMMPS *lmp) : NPair(lmp) { +template +NPairKokkos::NPairKokkos(LAMMPS *lmp) : NPair(lmp) { } @@ -33,8 +33,8 @@ copy needed info from Neighbor class to this build class ------------------------------------------------------------------------- */ -template -void NPairKokkos::copy_neighbor_info() +template +void NPairKokkos::copy_neighbor_info() { NPair::copy_neighbor_info(); @@ -62,8 +62,8 @@ copy per-atom and per-bin vectors from NBin class to this build class ------------------------------------------------------------------------- */ -template -void NPairKokkos::copy_bin_info() +template +void NPairKokkos::copy_bin_info() { NPair::copy_bin_info(); @@ -78,8 +78,8 @@ copy needed info from NStencil class to this build class ------------------------------------------------------------------------- */ -template -void NPairKokkos::copy_stencil_info() +template +void NPairKokkos::copy_stencil_info() { NPair::copy_stencil_info(); @@ -106,8 +106,8 @@ /* ---------------------------------------------------------------------- */ -template -void NPairKokkos::build(NeighList *list_) +template +void NPairKokkos::build(NeighList *list_) { NeighListKokkos* list = (NeighListKokkos*) list_; const int nlocal = includegroup?atom->nfirst:atom->nlocal; @@ -196,14 +196,14 @@ Kokkos::parallel_for(nall, f); } else { if (newton_pair) { - NPairKokkosBuildFunctor f(data,atoms_per_bin * 5 * sizeof(X_FLOAT) * factor); + NPairKokkosBuildFunctor f(data,atoms_per_bin * 5 * sizeof(X_FLOAT) * factor); #ifdef KOKKOS_HAVE_CUDA Kokkos::parallel_for(config, f); #else Kokkos::parallel_for(nall, f); #endif } else { - NPairKokkosBuildFunctor f(data,atoms_per_bin * 5 * sizeof(X_FLOAT) * factor); + NPairKokkosBuildFunctor f(data,atoms_per_bin * 5 * sizeof(X_FLOAT) * factor); #ifdef KOKKOS_HAVE_CUDA Kokkos::parallel_for(config, f); #else @@ -293,7 +293,7 @@ /* ---------------------------------------------------------------------- */ -template template +template template void NeighborKokkosExecute:: build_Item(const int &i) const { @@ -365,7 +365,7 @@ const int jbin = ibin + stencil[k]; // get subview of jbin - if(HalfNeigh&&(ibin==jbin)) continue; + if(HalfNeigh && (ibin==jbin)) continue; //const ArrayTypes::t_int_1d_const_um =Kokkos::subview(bins,jbin,ALL); for(int m = 0; m < c_bincount(jbin); m++) { @@ -374,6 +374,16 @@ if(HalfNeigh && !Newton && (j < i)) continue; if(!HalfNeigh && j==i) continue; + if(Tri) { + if (x(j,2) < ztmp) continue; + if (x(j,2) == ztmp) { + if (x(j,1) < ytmp) continue; + if (x(j,1) == ytmp) { + if (x(j,0) < xtmp) continue; + if (x(j,0) == xtmp && j <= i) continue; + } + } + } if(exclude && exclusion(i,j,itype,jtype)) continue; const X_FLOAT delx = xtmp - x(j, 0); @@ -428,7 +438,7 @@ /* ---------------------------------------------------------------------- */ -template template +template template __device__ inline void NeighborKokkosExecute::build_ItemCuda(typename Kokkos::TeamPolicy::member_type dev) const { @@ -491,6 +501,16 @@ ((j >= nlocal) && ((x(j, 2) < ztmp) || (x(j, 2) == ztmp && x(j, 1) < ytmp) || (x(j, 2) == ztmp && x(j, 1) == ytmp && x(j, 0) < xtmp))))) ) continue; + if(Tri) { + if (x(j,2) < ztmp) continue; + if (x(j,2) == ztmp) { + if (x(j,1) < ytmp) continue; + if (x(j,1) == ytmp) { + if (x(j,0) < xtmp) continue; + if (x(j,0) == xtmp && j <= i) continue; + } + } + } if(exclude && exclusion(i,j,itype,jtype)) continue; const X_FLOAT delx = xtmp - other_x[m]; const X_FLOAT dely = ytmp - other_x[m + atoms_per_bin]; @@ -558,6 +578,16 @@ //if(HalfNeigh && (j < i)) continue; if(HalfNeigh && !Newton && (j < i)) continue; if(!HalfNeigh && j==i) continue; + if(Tri) { + if (x(j,2) < ztmp) continue; + if (x(j,2) == ztmp) { + if (x(j,1) < ytmp) continue; + if (x(j,1) == ytmp) { + if (x(j,0) < xtmp) continue; + if (x(j,0) == xtmp && j <= i) continue; + } + } + } if(exclude && exclusion(i,j,itype,jtype)) continue; const X_FLOAT delx = xtmp - other_x[m]; @@ -736,14 +766,16 @@ } namespace LAMMPS_NS { -template class NPairKokkos; -template class NPairKokkos; -template class NPairKokkos; -template class NPairKokkos; +template class NPairKokkos; +template class NPairKokkos; +template class NPairKokkos; +template class NPairKokkos; +template class NPairKokkos; #ifdef KOKKOS_HAVE_CUDA -template class NPairKokkos; -template class NPairKokkos; -template class NPairKokkos; -template class NPairKokkos; +template class NPairKokkos; +template class NPairKokkos; +template class NPairKokkos; +template class NPairKokkos; +template class NPairKokkos; #endif } diff -Naur lammps-26Jan17/src/KOKKOS/npair_kokkos.h lammps-13Feb17/src/KOKKOS/npair_kokkos.h --- lammps-26Jan17/src/KOKKOS/npair_kokkos.h 2016-12-13 16:27:33.803572000 -0700 +++ lammps-13Feb17/src/KOKKOS/npair_kokkos.h 2017-02-03 14:45:56.983493000 -0700 @@ -13,42 +13,52 @@ #ifdef NPAIR_CLASS -typedef NPairKokkos NPairKokkosFullBinHost; +typedef NPairKokkos NPairKokkosFullBinHost; NPairStyle(full/bin/kk/host, NPairKokkosFullBinHost, NP_FULL | NP_BIN | NP_KOKKOS_HOST | NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI) -typedef NPairKokkos NPairKokkosFullBinDevice; +typedef NPairKokkos NPairKokkosFullBinDevice; NPairStyle(full/bin/kk/device, NPairKokkosFullBinDevice, NP_FULL | NP_BIN | NP_KOKKOS_DEVICE | NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI) -typedef NPairKokkos NPairKokkosFullBinGhostHost; +typedef NPairKokkos NPairKokkosFullBinGhostHost; NPairStyle(full/bin/ghost/kk/host, NPairKokkosFullBinGhostHost, NP_FULL | NP_BIN | NP_KOKKOS_HOST | NP_NEWTON | NP_NEWTOFF | NP_GHOST | NP_ORTHO | NP_TRI) -typedef NPairKokkos NPairKokkosFullBinGhostDevice; +typedef NPairKokkos NPairKokkosFullBinGhostDevice; NPairStyle(full/bin/ghost/kk/device, NPairKokkosFullBinGhostDevice, NP_FULL | NP_BIN | NP_KOKKOS_DEVICE | NP_NEWTON | NP_NEWTOFF | NP_GHOST | NP_ORTHO | NP_TRI) -typedef NPairKokkos NPairKokkosHalfBinHost; +typedef NPairKokkos NPairKokkosHalfBinHost; NPairStyle(half/bin/kk/host, NPairKokkosHalfBinHost, - NP_HALF | NP_BIN | NP_KOKKOS_HOST | NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI) + NP_HALF | NP_BIN | NP_KOKKOS_HOST | NP_NEWTON | NP_NEWTOFF | NP_ORTHO) -typedef NPairKokkos NPairKokkosHalfBinDevice; +typedef NPairKokkos NPairKokkosHalfBinDevice; NPairStyle(half/bin/kk/device, NPairKokkosHalfBinDevice, - NP_HALF | NP_BIN | NP_KOKKOS_DEVICE | NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI) + NP_HALF | NP_BIN | NP_KOKKOS_DEVICE | NP_NEWTON | NP_NEWTOFF | NP_ORTHO) -typedef NPairKokkos NPairKokkosHalfBinGhostHost; +typedef NPairKokkos NPairKokkosHalfBinHostTri; +NPairStyle(half/bin/kk/host, + NPairKokkosHalfBinHostTri, + NP_HALF | NP_BIN | NP_KOKKOS_HOST | NP_NEWTON | NP_NEWTOFF | NP_TRI) + +typedef NPairKokkos NPairKokkosHalfBinDeviceTri; +NPairStyle(half/bin/kk/device, + NPairKokkosHalfBinDeviceTri, + NP_HALF | NP_BIN | NP_KOKKOS_DEVICE | NP_NEWTON | NP_NEWTOFF | NP_TRI) + +typedef NPairKokkos NPairKokkosHalfBinGhostHost; NPairStyle(half/bin/ghost/kk/host, NPairKokkosHalfBinGhostHost, NP_HALF | NP_BIN | NP_KOKKOS_HOST | NP_NEWTON | NP_NEWTOFF | NP_GHOST | NP_ORTHO | NP_TRI) -typedef NPairKokkos NPairKokkosHalfBinGhostDevice; +typedef NPairKokkos NPairKokkosHalfBinGhostDevice; NPairStyle(half/bin/ghost/kk/device, NPairKokkosHalfBinGhostDevice, NP_HALF | NP_BIN | NP_KOKKOS_DEVICE | NP_NEWTON | NP_NEWTOFF | NP_GHOST | NP_ORTHO | NP_TRI) @@ -63,7 +73,7 @@ namespace LAMMPS_NS { -template +template class NPairKokkos : public NPair { public: NPairKokkos(class LAMMPS *); @@ -147,7 +157,8 @@ // data from Atom class const typename AT::t_x_array_randomread x; - const typename AT::t_int_1d_const type,mask,molecule; + const typename AT::t_int_1d_const type,mask; + const typename AT::t_tagint_1d_const molecule; const typename AT::t_tagint_1d_const tag; const typename AT::t_tagint_2d_const special; const typename AT::t_int_2d_const nspecial; @@ -184,7 +195,7 @@ const typename AT::t_x_array_randomread &_x, const typename AT::t_int_1d_const &_type, const typename AT::t_int_1d_const &_mask, - const typename AT::t_int_1d_const &_molecule, + const typename AT::t_tagint_1d_const &_molecule, const typename AT::t_tagint_1d_const &_tag, const typename AT::t_tagint_2d_const &_special, const typename AT::t_int_2d_const &_nspecial, @@ -252,7 +263,7 @@ ~NeighborKokkosExecute() {neigh_list.clean_copy();}; - template + template KOKKOS_FUNCTION void build_Item(const int &i) const; @@ -261,7 +272,7 @@ void build_Item_Ghost(const int &i) const; #ifdef KOKKOS_HAVE_CUDA - template + template __device__ inline void build_ItemCuda(typename Kokkos::TeamPolicy::member_type dev) const; #endif @@ -353,7 +364,7 @@ }; -template +template struct NPairKokkosBuildFunctor { typedef DeviceType device_type; @@ -366,20 +377,20 @@ KOKKOS_INLINE_FUNCTION void operator() (const int & i) const { - c.template build_Item(i); + c.template build_Item(i); } #ifdef KOKKOS_HAVE_CUDA __device__ inline void operator() (typename Kokkos::TeamPolicy::member_type dev) const { - c.template build_ItemCuda(dev); + c.template build_ItemCuda(dev); } size_t shmem_size(const int team_size) const { (void) team_size; return sharedsize; } #endif }; -template -struct NPairKokkosBuildFunctor { +template +struct NPairKokkosBuildFunctor { typedef LMPHostType device_type; const NeighborKokkosExecute c; @@ -391,7 +402,7 @@ KOKKOS_INLINE_FUNCTION void operator() (const int & i) const { - c.template build_Item(i); + c.template build_Item(i); } void operator() (typename Kokkos::TeamPolicy::member_type dev) const {} diff -Naur lammps-26Jan17/src/KOKKOS/pair_buck_coul_cut_kokkos.cpp lammps-13Feb17/src/KOKKOS/pair_buck_coul_cut_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/pair_buck_coul_cut_kokkos.cpp 2016-12-13 16:27:33.803572000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_buck_coul_cut_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -154,7 +154,7 @@ virial[5] += ev.v[5]; } - if (vflag_fdotr) virial_fdotr_compute(); + if (vflag_fdotr) pair_virial_fdotr_compute(this); if (eflag_atom) { k_eatom.template modify(); diff -Naur lammps-26Jan17/src/KOKKOS/pair_buck_coul_cut_kokkos.h lammps-13Feb17/src/KOKKOS/pair_buck_coul_cut_kokkos.h --- lammps-26Jan17/src/KOKKOS/pair_buck_coul_cut_kokkos.h 2017-01-26 13:54:58.968983000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_buck_coul_cut_kokkos.h 2017-02-03 14:45:56.983493000 -0700 @@ -34,6 +34,7 @@ enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF}; enum {COUL_FLAG=1}; typedef DeviceType device_type; + typedef ArrayTypes AT; PairBuckCoulCutKokkos(class LAMMPS *); ~PairBuckCoulCutKokkos(); @@ -83,25 +84,25 @@ F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; F_FLOAT m_cut_ljsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; F_FLOAT m_cut_coulsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; - typename ArrayTypes::t_x_array_randomread x; - typename ArrayTypes::t_x_array c_x; - typename ArrayTypes::t_f_array f; - typename ArrayTypes::t_int_1d_randomread type; - typename ArrayTypes::t_float_1d_randomread q; + typename AT::t_x_array_randomread x; + typename AT::t_x_array c_x; + typename AT::t_f_array f; + typename AT::t_int_1d_randomread type; + typename AT::t_float_1d_randomread q; DAT::tdual_efloat_1d k_eatom; DAT::tdual_virial_array k_vatom; - typename ArrayTypes::t_efloat_1d d_eatom; - typename ArrayTypes::t_virial_array d_vatom; + typename AT::t_efloat_1d d_eatom; + typename AT::t_virial_array d_vatom; int newton_pair; - typename ArrayTypes::tdual_ffloat_2d k_cutsq; - typename ArrayTypes::t_ffloat_2d d_cutsq; - typename ArrayTypes::tdual_ffloat_2d k_cut_ljsq; - typename ArrayTypes::t_ffloat_2d d_cut_ljsq; - typename ArrayTypes::tdual_ffloat_2d k_cut_coulsq; - typename ArrayTypes::t_ffloat_2d d_cut_coulsq; + typename AT::tdual_ffloat_2d k_cutsq; + typename AT::t_ffloat_2d d_cutsq; + typename AT::tdual_ffloat_2d k_cut_ljsq; + typename AT::t_ffloat_2d d_cut_ljsq; + typename AT::tdual_ffloat_2d k_cut_coulsq; + typename AT::t_ffloat_2d d_cut_coulsq; int neighflag; @@ -123,6 +124,7 @@ friend EV_FLOAT pair_compute_neighlist(PairBuckCoulCutKokkos*,NeighListKokkos*); friend EV_FLOAT pair_compute(PairBuckCoulCutKokkos*, NeighListKokkos*); + friend void pair_virial_fdotr_compute(PairBuckCoulCutKokkos*); }; diff -Naur lammps-26Jan17/src/KOKKOS/pair_buck_coul_long_kokkos.cpp lammps-13Feb17/src/KOKKOS/pair_buck_coul_long_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/pair_buck_coul_long_kokkos.cpp 2016-12-13 16:27:33.803572000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_buck_coul_long_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -114,6 +114,19 @@ if (eflag || vflag) ev_setup(eflag,vflag); else evflag = vflag_fdotr = 0; + // reallocate per-atom arrays if necessary + + if (eflag_atom) { + memory->destroy_kokkos(k_eatom,eatom); + memory->create_kokkos(k_eatom,eatom,maxeatom,"pair:eatom"); + d_eatom = k_eatom.view(); + } + if (vflag_atom) { + memory->destroy_kokkos(k_vatom,vatom); + memory->create_kokkos(k_vatom,vatom,maxvatom,6,"pair:vatom"); + d_vatom = k_vatom.view(); + } + atomKK->sync(execution_space,datamask_read); k_cutsq.template sync(); k_cut_ljsq.template sync(); diff -Naur lammps-26Jan17/src/KOKKOS/pair_buck_coul_long_kokkos.h lammps-13Feb17/src/KOKKOS/pair_buck_coul_long_kokkos.h --- lammps-26Jan17/src/KOKKOS/pair_buck_coul_long_kokkos.h 2017-01-26 13:54:58.968983000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_buck_coul_long_kokkos.h 2017-02-03 14:45:56.983493000 -0700 @@ -34,6 +34,7 @@ enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF}; enum {COUL_FLAG=1}; typedef DeviceType device_type; + typedef ArrayTypes AT; PairBuckCoulLongKokkos(class LAMMPS *); ~PairBuckCoulLongKokkos(); @@ -84,27 +85,27 @@ F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; F_FLOAT m_cut_ljsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; F_FLOAT m_cut_coulsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; - typename ArrayTypes::t_x_array_randomread x; - typename ArrayTypes::t_x_array c_x; - typename ArrayTypes::t_f_array f; - typename ArrayTypes::t_int_1d_randomread type; - typename ArrayTypes::t_float_1d_randomread q; + typename AT::t_x_array_randomread x; + typename AT::t_x_array c_x; + typename AT::t_f_array f; + typename AT::t_int_1d_randomread type; + typename AT::t_float_1d_randomread q; DAT::tdual_efloat_1d k_eatom; DAT::tdual_virial_array k_vatom; - typename ArrayTypes::t_efloat_1d d_eatom; - typename ArrayTypes::t_virial_array d_vatom; + typename AT::t_efloat_1d d_eatom; + typename AT::t_virial_array d_vatom; int newton_pair; - typename ArrayTypes::tdual_ffloat_2d k_cutsq; - typename ArrayTypes::t_ffloat_2d d_cutsq; - typename ArrayTypes::tdual_ffloat_2d k_cut_ljsq; - typename ArrayTypes::t_ffloat_2d d_cut_ljsq; - typename ArrayTypes::tdual_ffloat_2d k_cut_coulsq; - typename ArrayTypes::t_ffloat_2d d_cut_coulsq; + typename AT::tdual_ffloat_2d k_cutsq; + typename AT::t_ffloat_2d d_cutsq; + typename AT::tdual_ffloat_2d k_cut_ljsq; + typename AT::t_ffloat_2d d_cut_ljsq; + typename AT::tdual_ffloat_2d k_cut_coulsq; + typename AT::t_ffloat_2d d_cut_coulsq; - typename ArrayTypes::t_ffloat_1d_randomread + typename AT::t_ffloat_1d_randomread d_rtable, d_drtable, d_ftable, d_dftable, d_ctable, d_dctable, d_etable, d_detable; diff -Naur lammps-26Jan17/src/KOKKOS/pair_buck_kokkos.h lammps-13Feb17/src/KOKKOS/pair_buck_kokkos.h --- lammps-26Jan17/src/KOKKOS/pair_buck_kokkos.h 2017-01-26 13:54:58.968983000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_buck_kokkos.h 2017-02-03 14:45:56.983493000 -0700 @@ -34,6 +34,7 @@ enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF|N2}; enum {COUL_FLAG=0}; typedef DeviceType device_type; + typedef ArrayTypes AT; PairBuckKokkos(class LAMMPS *); ~PairBuckKokkos(); @@ -72,22 +73,22 @@ typename Kokkos::DualView::t_dev_const_um params; params_buck m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; // hardwired to space for 12 atom types F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; - typename ArrayTypes::t_x_array_randomread x; - typename ArrayTypes::t_x_array c_x; - typename ArrayTypes::t_f_array f; - typename ArrayTypes::t_int_1d_randomread type; - typename ArrayTypes::t_tagint_1d tag; + typename AT::t_x_array_randomread x; + typename AT::t_x_array c_x; + typename AT::t_f_array f; + typename AT::t_int_1d_randomread type; + typename AT::t_tagint_1d tag; DAT::tdual_efloat_1d k_eatom; DAT::tdual_virial_array k_vatom; - typename ArrayTypes::t_efloat_1d d_eatom; - typename ArrayTypes::t_virial_array d_vatom; + typename AT::t_efloat_1d d_eatom; + typename AT::t_virial_array d_vatom; int newton_pair; double special_lj[4]; - typename ArrayTypes::tdual_ffloat_2d k_cutsq; - typename ArrayTypes::t_ffloat_2d d_cutsq; + typename AT::tdual_ffloat_2d k_cutsq; + typename AT::t_ffloat_2d d_cutsq; int neighflag; diff -Naur lammps-26Jan17/src/KOKKOS/pair_coul_cut_kokkos.cpp lammps-13Feb17/src/KOKKOS/pair_coul_cut_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/pair_coul_cut_kokkos.cpp 2016-12-13 16:27:33.803572000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_coul_cut_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -83,6 +83,19 @@ if (eflag || vflag) ev_setup(eflag,vflag); else evflag = vflag_fdotr = 0; + // reallocate per-atom arrays if necessary + + if (eflag_atom) { + memory->destroy_kokkos(k_eatom,eatom); + memory->create_kokkos(k_eatom,eatom,maxeatom,"pair:eatom"); + d_eatom = k_eatom.view(); + } + if (vflag_atom) { + memory->destroy_kokkos(k_vatom,vatom); + memory->create_kokkos(k_vatom,vatom,maxvatom,6,"pair:vatom"); + d_vatom = k_vatom.view(); + } + atomKK->sync(execution_space,datamask_read); k_cutsq.template sync(); k_cut_ljsq.template sync(); @@ -124,6 +137,16 @@ virial[5] += ev.v[5]; } + if (eflag_atom) { + k_eatom.template modify(); + k_eatom.template sync(); + } + + if (vflag_atom) { + k_vatom.template modify(); + k_vatom.template sync(); + } + if (vflag_fdotr) pair_virial_fdotr_compute(this); } diff -Naur lammps-26Jan17/src/KOKKOS/pair_coul_cut_kokkos.h lammps-13Feb17/src/KOKKOS/pair_coul_cut_kokkos.h --- lammps-26Jan17/src/KOKKOS/pair_coul_cut_kokkos.h 2017-01-06 10:16:03.976787000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_coul_cut_kokkos.h 2017-02-03 14:45:56.983493000 -0700 @@ -34,6 +34,7 @@ enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF}; enum {COUL_FLAG=1}; typedef DeviceType device_type; + typedef ArrayTypes AT; PairCoulCutKokkos(class LAMMPS *); ~PairCoulCutKokkos(); @@ -87,22 +88,25 @@ F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; F_FLOAT m_cut_ljsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; F_FLOAT m_cut_coulsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; - typename ArrayTypes::t_x_array_randomread x; - typename ArrayTypes::t_x_array c_x; - typename ArrayTypes::t_f_array f; - typename ArrayTypes::t_float_1d_randomread q; - typename ArrayTypes::t_int_1d_randomread type; - typename ArrayTypes::t_efloat_1d d_eatom; - typename ArrayTypes::t_virial_array d_vatom; + typename AT::t_x_array_randomread x; + typename AT::t_x_array c_x; + typename AT::t_f_array f; + typename AT::t_float_1d_randomread q; + typename AT::t_int_1d_randomread type; + + DAT::tdual_efloat_1d k_eatom; + DAT::tdual_virial_array k_vatom; + typename AT::t_efloat_1d d_eatom; + typename AT::t_virial_array d_vatom; int newton_pair; - typename ArrayTypes::tdual_ffloat_2d k_cutsq; - typename ArrayTypes::t_ffloat_2d d_cutsq; - typename ArrayTypes::tdual_ffloat_2d k_cut_ljsq; - typename ArrayTypes::t_ffloat_2d d_cut_ljsq; - typename ArrayTypes::tdual_ffloat_2d k_cut_coulsq; - typename ArrayTypes::t_ffloat_2d d_cut_coulsq; + typename AT::tdual_ffloat_2d k_cutsq; + typename AT::t_ffloat_2d d_cutsq; + typename AT::tdual_ffloat_2d k_cut_ljsq; + typename AT::t_ffloat_2d d_cut_ljsq; + typename AT::tdual_ffloat_2d k_cut_coulsq; + typename AT::t_ffloat_2d d_cut_coulsq; int neighflag; diff -Naur lammps-26Jan17/src/KOKKOS/pair_coul_debye_kokkos.cpp lammps-13Feb17/src/KOKKOS/pair_coul_debye_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/pair_coul_debye_kokkos.cpp 2016-12-13 16:27:33.803572000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_coul_debye_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -90,6 +90,19 @@ if (eflag || vflag) ev_setup(eflag,vflag); else evflag = vflag_fdotr = 0; + // reallocate per-atom arrays if necessary + + if (eflag_atom) { + memory->destroy_kokkos(k_eatom,eatom); + memory->create_kokkos(k_eatom,eatom,maxeatom,"pair:eatom"); + d_eatom = k_eatom.view(); + } + if (vflag_atom) { + memory->destroy_kokkos(k_vatom,vatom); + memory->create_kokkos(k_vatom,vatom,maxvatom,6,"pair:vatom"); + d_vatom = k_vatom.view(); + } + atomKK->sync(execution_space,datamask_read); k_cutsq.template sync(); k_cut_ljsq.template sync(); @@ -136,7 +149,17 @@ virial[5] += ev.v[5]; } - if (vflag_fdotr) virial_fdotr_compute(); + if (eflag_atom) { + k_eatom.template modify(); + k_eatom.template sync(); + } + + if (vflag_atom) { + k_vatom.template modify(); + k_vatom.template sync(); + } + + if (vflag_fdotr) pair_virial_fdotr_compute(this); copymode = 0; } diff -Naur lammps-26Jan17/src/KOKKOS/pair_coul_debye_kokkos.h lammps-13Feb17/src/KOKKOS/pair_coul_debye_kokkos.h --- lammps-26Jan17/src/KOKKOS/pair_coul_debye_kokkos.h 2017-01-26 13:54:58.968983000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_coul_debye_kokkos.h 2017-02-03 14:45:56.983493000 -0700 @@ -34,6 +34,7 @@ enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF}; enum {COUL_FLAG=1}; typedef DeviceType device_type; + typedef ArrayTypes AT; PairCoulDebyeKokkos(class LAMMPS *); ~PairCoulDebyeKokkos(); @@ -87,22 +88,25 @@ F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; F_FLOAT m_cut_ljsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; F_FLOAT m_cut_coulsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; - typename ArrayTypes::t_x_array_randomread x; - typename ArrayTypes::t_x_array c_x; - typename ArrayTypes::t_f_array f; - typename ArrayTypes::t_int_1d_randomread type; - typename ArrayTypes::t_float_1d_randomread q; - typename ArrayTypes::t_efloat_1d d_eatom; - typename ArrayTypes::t_virial_array d_vatom; + typename AT::t_x_array_randomread x; + typename AT::t_x_array c_x; + typename AT::t_f_array f; + typename AT::t_int_1d_randomread type; + typename AT::t_float_1d_randomread q; + + DAT::tdual_efloat_1d k_eatom; + DAT::tdual_virial_array k_vatom; + typename AT::t_efloat_1d d_eatom; + typename AT::t_virial_array d_vatom; int newton_pair; - typename ArrayTypes::tdual_ffloat_2d k_cutsq; - typename ArrayTypes::t_ffloat_2d d_cutsq; - typename ArrayTypes::tdual_ffloat_2d k_cut_ljsq; - typename ArrayTypes::t_ffloat_2d d_cut_ljsq; - typename ArrayTypes::tdual_ffloat_2d k_cut_coulsq; - typename ArrayTypes::t_ffloat_2d d_cut_coulsq; + typename AT::tdual_ffloat_2d k_cutsq; + typename AT::t_ffloat_2d d_cutsq; + typename AT::tdual_ffloat_2d k_cut_ljsq; + typename AT::t_ffloat_2d d_cut_ljsq; + typename AT::tdual_ffloat_2d k_cut_coulsq; + typename AT::t_ffloat_2d d_cut_coulsq; int neighflag; @@ -124,6 +128,7 @@ friend EV_FLOAT pair_compute_neighlist(PairCoulDebyeKokkos*,NeighListKokkos*); friend EV_FLOAT pair_compute(PairCoulDebyeKokkos*, NeighListKokkos*); + friend void pair_virial_fdotr_compute(PairCoulDebyeKokkos*); }; diff -Naur lammps-26Jan17/src/KOKKOS/pair_coul_dsf_kokkos.cpp lammps-13Feb17/src/KOKKOS/pair_coul_dsf_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/pair_coul_dsf_kokkos.cpp 2016-12-13 16:27:33.803572000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_coul_dsf_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -88,12 +88,12 @@ if (eflag_atom) { memory->destroy_kokkos(k_eatom,eatom); memory->create_kokkos(k_eatom,eatom,maxeatom,"pair:eatom"); - d_eatom = k_eatom.d_view; + d_eatom = k_eatom.view(); } if (vflag_atom) { memory->destroy_kokkos(k_vatom,vatom); memory->create_kokkos(k_vatom,vatom,maxvatom,6,"pair:vatom"); - d_vatom = k_vatom.d_view; + d_vatom = k_vatom.view(); } atomKK->sync(execution_space,datamask_read); @@ -183,8 +183,6 @@ virial[5] += ev.v[5]; } - if (vflag_fdotr) pair_virial_fdotr_compute(this); - if (eflag_atom) { k_eatom.template modify(); k_eatom.template sync(); @@ -195,6 +193,8 @@ k_vatom.template sync(); } + if (vflag_fdotr) pair_virial_fdotr_compute(this); + copymode = 0; } diff -Naur lammps-26Jan17/src/KOKKOS/pair_coul_dsf_kokkos.h lammps-13Feb17/src/KOKKOS/pair_coul_dsf_kokkos.h --- lammps-26Jan17/src/KOKKOS/pair_coul_dsf_kokkos.h 2015-12-15 15:30:45.621458000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_coul_dsf_kokkos.h 2017-02-03 14:45:56.983493000 -0700 @@ -37,6 +37,7 @@ enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF}; enum {COUL_FLAG=1}; typedef DeviceType device_type; + typedef ArrayTypes AT; typedef EV_FLOAT value_type; PairCoulDSFKokkos(class LAMMPS *); ~PairCoulDSFKokkos(); @@ -61,16 +62,16 @@ KOKKOS_INLINE_FUNCTION int sbmask(const int& j) const; - protected: + typename AT::t_x_array_randomread x; + typename AT::t_f_array f; + typename AT::t_float_1d_randomread q; - typename ArrayTypes::t_x_array_randomread x; - typename ArrayTypes::t_f_array f; - typename ArrayTypes::t_float_1d_randomread q; + protected: DAT::tdual_efloat_1d k_eatom; DAT::tdual_virial_array k_vatom; - DAT::t_efloat_1d d_eatom; - DAT::t_virial_array d_vatom; + typename AT::t_efloat_1d d_eatom; + typename AT::t_virial_array d_vatom; int neighflag,newton_pair; @@ -79,9 +80,9 @@ double special_coul[4]; double qqrd2e; - typename ArrayTypes::t_neighbors_2d d_neighbors; - typename ArrayTypes::t_int_1d_randomread d_ilist; - typename ArrayTypes::t_int_1d_randomread d_numneigh; + typename AT::t_neighbors_2d d_neighbors; + typename AT::t_int_1d_randomread d_ilist; + typename AT::t_int_1d_randomread d_numneigh; //NeighListKokkos k_list; friend void pair_virial_fdotr_compute(PairCoulDSFKokkos*); diff -Naur lammps-26Jan17/src/KOKKOS/pair_coul_long_kokkos.cpp lammps-13Feb17/src/KOKKOS/pair_coul_long_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/pair_coul_long_kokkos.cpp 2016-12-13 16:27:33.803572000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_coul_long_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -107,6 +107,19 @@ if (eflag || vflag) ev_setup(eflag,vflag); else evflag = vflag_fdotr = 0; + // reallocate per-atom arrays if necessary + + if (eflag_atom) { + memory->destroy_kokkos(k_eatom,eatom); + memory->create_kokkos(k_eatom,eatom,maxeatom,"pair:eatom"); + d_eatom = k_eatom.view(); + } + if (vflag_atom) { + memory->destroy_kokkos(k_vatom,vatom); + memory->create_kokkos(k_vatom,vatom,maxvatom,6,"pair:vatom"); + d_vatom = k_vatom.view(); + } + atomKK->sync(execution_space,datamask_read); k_cutsq.template sync(); k_cut_coulsq.template sync(); @@ -158,6 +171,16 @@ virial[5] += ev.v[5]; } + if (eflag_atom) { + k_eatom.template modify(); + k_eatom.template sync(); + } + + if (vflag_atom) { + k_vatom.template modify(); + k_vatom.template sync(); + } + if (vflag_fdotr) pair_virial_fdotr_compute(this); copymode = 0; diff -Naur lammps-26Jan17/src/KOKKOS/pair_coul_long_kokkos.h lammps-13Feb17/src/KOKKOS/pair_coul_long_kokkos.h --- lammps-26Jan17/src/KOKKOS/pair_coul_long_kokkos.h 2017-01-06 10:16:03.976787000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_coul_long_kokkos.h 2017-02-03 14:45:56.983493000 -0700 @@ -34,6 +34,7 @@ enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF}; enum {COUL_FLAG=1}; typedef DeviceType device_type; + typedef ArrayTypes AT; PairCoulLongKokkos(class LAMMPS *); ~PairCoulLongKokkos(); @@ -45,7 +46,9 @@ double init_one(int, int); struct params_coul{ + KOKKOS_INLINE_FUNCTION params_coul(){cut_coulsq=0;}; + KOKKOS_INLINE_FUNCTION params_coul(int i){cut_coulsq=0;}; F_FLOAT cut_coulsq; }; @@ -86,27 +89,27 @@ F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; F_FLOAT m_cut_ljsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; F_FLOAT m_cut_coulsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; - typename ArrayTypes::t_x_array_randomread x; - typename ArrayTypes::t_x_array c_x; - typename ArrayTypes::t_f_array f; - typename ArrayTypes::t_int_1d_randomread type; - typename ArrayTypes::t_float_1d_randomread q; + typename AT::t_x_array_randomread x; + typename AT::t_x_array c_x; + typename AT::t_f_array f; + typename AT::t_int_1d_randomread type; + typename AT::t_float_1d_randomread q; DAT::tdual_efloat_1d k_eatom; DAT::tdual_virial_array k_vatom; - typename ArrayTypes::t_efloat_1d d_eatom; - typename ArrayTypes::t_virial_array d_vatom; + typename AT::t_efloat_1d d_eatom; + typename AT::t_virial_array d_vatom; int newton_pair; - typename ArrayTypes::tdual_ffloat_2d k_cutsq; - typename ArrayTypes::t_ffloat_2d d_cutsq; - typename ArrayTypes::tdual_ffloat_2d k_cut_ljsq; - typename ArrayTypes::t_ffloat_2d d_cut_ljsq; - typename ArrayTypes::tdual_ffloat_2d k_cut_coulsq; - typename ArrayTypes::t_ffloat_2d d_cut_coulsq; + typename AT::tdual_ffloat_2d k_cutsq; + typename AT::t_ffloat_2d d_cutsq; + typename AT::tdual_ffloat_2d k_cut_ljsq; + typename AT::t_ffloat_2d d_cut_ljsq; + typename AT::tdual_ffloat_2d k_cut_coulsq; + typename AT::t_ffloat_2d d_cut_coulsq; - typename ArrayTypes::t_ffloat_1d_randomread + typename AT::t_ffloat_1d_randomread d_rtable, d_drtable, d_ftable, d_dftable, d_ctable, d_dctable, d_etable, d_detable; diff -Naur lammps-26Jan17/src/KOKKOS/pair_coul_wolf_kokkos.cpp lammps-13Feb17/src/KOKKOS/pair_coul_wolf_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/pair_coul_wolf_kokkos.cpp 2016-12-13 16:27:33.803572000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_coul_wolf_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -83,12 +83,12 @@ if (eflag_atom) { memory->destroy_kokkos(k_eatom,eatom); memory->create_kokkos(k_eatom,eatom,maxeatom,"pair:eatom"); - d_eatom = k_eatom.d_view; + d_eatom = k_eatom.view(); } if (vflag_atom) { memory->destroy_kokkos(k_vatom,vatom); memory->create_kokkos(k_vatom,vatom,maxvatom,6,"pair:vatom"); - d_vatom = k_vatom.d_view; + d_vatom = k_vatom.view(); } atomKK->sync(execution_space,datamask_read); @@ -184,8 +184,6 @@ virial[5] += ev.v[5]; } - if (vflag_fdotr) pair_virial_fdotr_compute(this); - if (eflag_atom) { k_eatom.template modify(); k_eatom.template sync(); @@ -196,6 +194,8 @@ k_vatom.template sync(); } + if (vflag_fdotr) pair_virial_fdotr_compute(this); + copymode = 0; } diff -Naur lammps-26Jan17/src/KOKKOS/pair_coul_wolf_kokkos.h lammps-13Feb17/src/KOKKOS/pair_coul_wolf_kokkos.h --- lammps-26Jan17/src/KOKKOS/pair_coul_wolf_kokkos.h 2015-12-15 15:30:45.621458000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_coul_wolf_kokkos.h 2017-02-03 14:45:56.983493000 -0700 @@ -37,6 +37,7 @@ enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF}; enum {COUL_FLAG=1}; typedef DeviceType device_type; + typedef ArrayTypes AT; typedef EV_FLOAT value_type; PairCoulWolfKokkos(class LAMMPS *); ~PairCoulWolfKokkos(); @@ -63,14 +64,14 @@ protected: - typename ArrayTypes::t_x_array_randomread x; - typename ArrayTypes::t_f_array f; - typename ArrayTypes::t_float_1d_randomread q; + typename AT::t_x_array_randomread x; + typename AT::t_f_array f; + typename AT::t_float_1d_randomread q; DAT::tdual_efloat_1d k_eatom; DAT::tdual_virial_array k_vatom; - DAT::t_efloat_1d d_eatom; - DAT::t_virial_array d_vatom; + typename ArrayTypes::t_efloat_1d d_eatom; + typename ArrayTypes::t_virial_array d_vatom; int neighflag,newton_pair; @@ -81,9 +82,9 @@ double special_coul[4]; double qqrd2e; - typename ArrayTypes::t_neighbors_2d d_neighbors; - typename ArrayTypes::t_int_1d_randomread d_ilist; - typename ArrayTypes::t_int_1d_randomread d_numneigh; + typename AT::t_neighbors_2d d_neighbors; + typename AT::t_int_1d_randomread d_ilist; + typename AT::t_int_1d_randomread d_numneigh; //NeighListKokkos k_list; friend void pair_virial_fdotr_compute(PairCoulWolfKokkos*); diff -Naur lammps-26Jan17/src/KOKKOS/pair_eam_alloy_kokkos.cpp lammps-13Feb17/src/KOKKOS/pair_eam_alloy_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/pair_eam_alloy_kokkos.cpp 2016-12-13 16:27:33.803572000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_eam_alloy_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -82,12 +82,12 @@ if (eflag_atom) { memory->destroy_kokkos(k_eatom,eatom); memory->create_kokkos(k_eatom,eatom,maxeatom,"pair:eatom"); - d_eatom = k_eatom.d_view; + d_eatom = k_eatom.view(); } if (vflag_atom) { memory->destroy_kokkos(k_vatom,vatom); memory->create_kokkos(k_vatom,vatom,maxvatom,6,"pair:vatom"); - d_vatom = k_vatom.d_view; + d_vatom = k_vatom.view(); } atomKK->sync(execution_space,datamask_read); @@ -246,8 +246,6 @@ virial[5] += ev.v[5]; } - if (vflag_fdotr) pair_virial_fdotr_compute(this); - if (eflag_atom) { k_eatom.template modify(); k_eatom.template sync(); @@ -258,6 +256,8 @@ k_vatom.template sync(); } + if (vflag_fdotr) pair_virial_fdotr_compute(this); + copymode = 0; } diff -Naur lammps-26Jan17/src/KOKKOS/pair_eam_alloy_kokkos.h lammps-13Feb17/src/KOKKOS/pair_eam_alloy_kokkos.h --- lammps-26Jan17/src/KOKKOS/pair_eam_alloy_kokkos.h 2016-09-23 15:04:56.462536000 -0600 +++ lammps-13Feb17/src/KOKKOS/pair_eam_alloy_kokkos.h 2017-02-03 14:45:56.983493000 -0700 @@ -125,8 +125,8 @@ DAT::tdual_efloat_1d k_eatom; DAT::tdual_virial_array k_vatom; - DAT::t_efloat_1d d_eatom; - DAT::t_virial_array d_vatom; + typename ArrayTypes::t_efloat_1d d_eatom; + typename ArrayTypes::t_virial_array d_vatom; DAT::tdual_ffloat_1d k_rho; DAT::tdual_ffloat_1d k_fp; @@ -154,9 +154,9 @@ void interpolate(int, double, double *, t_host_ffloat_2d_n7, int); void read_file(char *); - typename ArrayTypes::t_neighbors_2d d_neighbors; - typename ArrayTypes::t_int_1d_randomread d_ilist; - typename ArrayTypes::t_int_1d_randomread d_numneigh; + typename AT::t_neighbors_2d d_neighbors; + typename AT::t_int_1d_randomread d_ilist; + typename AT::t_int_1d_randomread d_numneigh; //NeighListKokkos k_list; int iswap; diff -Naur lammps-26Jan17/src/KOKKOS/pair_eam_fs_kokkos.cpp lammps-13Feb17/src/KOKKOS/pair_eam_fs_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/pair_eam_fs_kokkos.cpp 2016-12-13 16:27:33.803572000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_eam_fs_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -82,12 +82,12 @@ if (eflag_atom) { memory->destroy_kokkos(k_eatom,eatom); memory->create_kokkos(k_eatom,eatom,maxeatom,"pair:eatom"); - d_eatom = k_eatom.d_view; + d_eatom = k_eatom.view(); } if (vflag_atom) { memory->destroy_kokkos(k_vatom,vatom); memory->create_kokkos(k_vatom,vatom,maxvatom,6,"pair:vatom"); - d_vatom = k_vatom.d_view; + d_vatom = k_vatom.view(); } atomKK->sync(execution_space,datamask_read); diff -Naur lammps-26Jan17/src/KOKKOS/pair_eam_fs_kokkos.h lammps-13Feb17/src/KOKKOS/pair_eam_fs_kokkos.h --- lammps-26Jan17/src/KOKKOS/pair_eam_fs_kokkos.h 2016-09-23 15:04:56.462536000 -0600 +++ lammps-13Feb17/src/KOKKOS/pair_eam_fs_kokkos.h 2017-02-03 14:45:56.983493000 -0700 @@ -125,8 +125,8 @@ DAT::tdual_efloat_1d k_eatom; DAT::tdual_virial_array k_vatom; - DAT::t_efloat_1d d_eatom; - DAT::t_virial_array d_vatom; + typename ArrayTypes::t_efloat_1d d_eatom; + typename ArrayTypes::t_virial_array d_vatom; DAT::tdual_ffloat_1d k_rho; DAT::tdual_ffloat_1d k_fp; @@ -154,9 +154,9 @@ void interpolate(int, double, double *, t_host_ffloat_2d_n7, int); void read_file(char *); - typename ArrayTypes::t_neighbors_2d d_neighbors; - typename ArrayTypes::t_int_1d_randomread d_ilist; - typename ArrayTypes::t_int_1d_randomread d_numneigh; + typename AT::t_neighbors_2d d_neighbors; + typename AT::t_int_1d_randomread d_ilist; + typename AT::t_int_1d_randomread d_numneigh; //NeighListKokkos k_list; int iswap; diff -Naur lammps-26Jan17/src/KOKKOS/pair_eam_kokkos.cpp lammps-13Feb17/src/KOKKOS/pair_eam_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/pair_eam_kokkos.cpp 2016-12-13 16:27:33.803572000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_eam_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -77,12 +77,12 @@ if (eflag_atom) { memory->destroy_kokkos(k_eatom,eatom); memory->create_kokkos(k_eatom,eatom,maxeatom,"pair:eatom"); - d_eatom = k_eatom.d_view; + d_eatom = k_eatom.view(); } if (vflag_atom) { memory->destroy_kokkos(k_vatom,vatom); memory->create_kokkos(k_vatom,vatom,maxvatom,6,"pair:vatom"); - d_vatom = k_vatom.d_view; + d_vatom = k_vatom.view(); } atomKK->sync(execution_space,datamask_read); diff -Naur lammps-26Jan17/src/KOKKOS/pair_eam_kokkos.h lammps-13Feb17/src/KOKKOS/pair_eam_kokkos.h --- lammps-26Jan17/src/KOKKOS/pair_eam_kokkos.h 2016-09-23 15:04:56.462536000 -0600 +++ lammps-13Feb17/src/KOKKOS/pair_eam_kokkos.h 2017-02-03 14:45:56.983493000 -0700 @@ -122,8 +122,8 @@ DAT::tdual_efloat_1d k_eatom; DAT::tdual_virial_array k_vatom; - DAT::t_efloat_1d d_eatom; - DAT::t_virial_array d_vatom; + typename ArrayTypes::t_efloat_1d d_eatom; + typename ArrayTypes::t_virial_array d_vatom; DAT::tdual_ffloat_1d k_rho; DAT::tdual_ffloat_1d k_fp; @@ -149,9 +149,9 @@ virtual void file2array(); void array2spline(); - typename ArrayTypes::t_neighbors_2d d_neighbors; - typename ArrayTypes::t_int_1d_randomread d_ilist; - typename ArrayTypes::t_int_1d_randomread d_numneigh; + typename AT::t_neighbors_2d d_neighbors; + typename AT::t_int_1d_randomread d_ilist; + typename AT::t_int_1d_randomread d_numneigh; //NeighListKokkos k_list; int iswap; diff -Naur lammps-26Jan17/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.cpp lammps-13Feb17/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.cpp 2017-01-06 10:16:03.976787000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -115,6 +115,19 @@ if (eflag || vflag) ev_setup(eflag,vflag); else evflag = vflag_fdotr = 0; + // reallocate per-atom arrays if necessary + + if (eflag_atom) { + memory->destroy_kokkos(k_eatom,eatom); + memory->create_kokkos(k_eatom,eatom,maxeatom,"pair:eatom"); + d_eatom = k_eatom.view(); + } + if (vflag_atom) { + memory->destroy_kokkos(k_vatom,vatom); + memory->create_kokkos(k_vatom,vatom,maxvatom,6,"pair:vatom"); + d_vatom = k_vatom.view(); + } + atomKK->sync(execution_space,datamask_read); k_cutsq.template sync(); k_cut_ljsq.template sync(); @@ -167,6 +180,16 @@ virial[5] += ev.v[5]; } + if (eflag_atom) { + k_eatom.template modify(); + k_eatom.template sync(); + } + + if (vflag_atom) { + k_vatom.template modify(); + k_vatom.template sync(); + } + if (vflag_fdotr) pair_virial_fdotr_compute(this); copymode = 0; diff -Naur lammps-26Jan17/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.h lammps-13Feb17/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.h --- lammps-26Jan17/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.h 2017-01-17 09:44:40.547610000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.h 2017-02-03 14:45:56.983493000 -0700 @@ -34,6 +34,7 @@ enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF}; enum {COUL_FLAG=1}; typedef DeviceType device_type; + typedef ArrayTypes AT; PairLJCharmmCoulCharmmImplicitKokkos(class LAMMPS *); ~PairLJCharmmCoulCharmmImplicitKokkos(); @@ -77,27 +78,27 @@ F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; F_FLOAT m_cut_ljsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; F_FLOAT m_cut_coulsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; - typename ArrayTypes::t_x_array_randomread x; - typename ArrayTypes::t_x_array c_x; - typename ArrayTypes::t_f_array f; - typename ArrayTypes::t_int_1d_randomread type; - typename ArrayTypes::t_float_1d_randomread q; + typename AT::t_x_array_randomread x; + typename AT::t_x_array c_x; + typename AT::t_f_array f; + typename AT::t_int_1d_randomread type; + typename AT::t_float_1d_randomread q; DAT::tdual_efloat_1d k_eatom; DAT::tdual_virial_array k_vatom; - typename ArrayTypes::t_efloat_1d d_eatom; - typename ArrayTypes::t_virial_array d_vatom; + typename AT::t_efloat_1d d_eatom; + typename AT::t_virial_array d_vatom; int newton_pair; - typename ArrayTypes::tdual_ffloat_2d k_cutsq; - typename ArrayTypes::t_ffloat_2d d_cutsq; - typename ArrayTypes::tdual_ffloat_2d k_cut_ljsq; - typename ArrayTypes::t_ffloat_2d d_cut_ljsq; - typename ArrayTypes::tdual_ffloat_2d k_cut_coulsq; - typename ArrayTypes::t_ffloat_2d d_cut_coulsq; + typename AT::tdual_ffloat_2d k_cutsq; + typename AT::t_ffloat_2d d_cutsq; + typename AT::tdual_ffloat_2d k_cut_ljsq; + typename AT::t_ffloat_2d d_cut_ljsq; + typename AT::tdual_ffloat_2d k_cut_coulsq; + typename AT::t_ffloat_2d d_cut_coulsq; - typename ArrayTypes::t_ffloat_1d_randomread + typename AT::t_ffloat_1d_randomread d_rtable, d_drtable, d_ftable, d_dftable, d_ctable, d_dctable, d_etable, d_detable; diff -Naur lammps-26Jan17/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp lammps-13Feb17/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp 2017-01-06 10:16:03.976787000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -115,6 +115,19 @@ if (eflag || vflag) ev_setup(eflag,vflag); else evflag = vflag_fdotr = 0; + // reallocate per-atom arrays if necessary + + if (eflag_atom) { + memory->destroy_kokkos(k_eatom,eatom); + memory->create_kokkos(k_eatom,eatom,maxeatom,"pair:eatom"); + d_eatom = k_eatom.view(); + } + if (vflag_atom) { + memory->destroy_kokkos(k_vatom,vatom); + memory->create_kokkos(k_vatom,vatom,maxvatom,6,"pair:vatom"); + d_vatom = k_vatom.view(); + } + atomKK->sync(execution_space,datamask_read); k_cutsq.template sync(); k_cut_ljsq.template sync(); @@ -167,6 +180,16 @@ virial[5] += ev.v[5]; } + if (eflag_atom) { + k_eatom.template modify(); + k_eatom.template sync(); + } + + if (vflag_atom) { + k_vatom.template modify(); + k_vatom.template sync(); + } + if (vflag_fdotr) pair_virial_fdotr_compute(this); copymode = 0; diff -Naur lammps-26Jan17/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.h lammps-13Feb17/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.h --- lammps-26Jan17/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.h 2017-01-17 09:44:40.547610000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.h 2017-02-03 14:45:56.983493000 -0700 @@ -34,6 +34,7 @@ enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF}; enum {COUL_FLAG=1}; typedef DeviceType device_type; + typedef ArrayTypes AT; PairLJCharmmCoulCharmmKokkos(class LAMMPS *); ~PairLJCharmmCoulCharmmKokkos(); @@ -77,27 +78,27 @@ F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; F_FLOAT m_cut_ljsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; F_FLOAT m_cut_coulsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; - typename ArrayTypes::t_x_array_randomread x; - typename ArrayTypes::t_x_array c_x; - typename ArrayTypes::t_f_array f; - typename ArrayTypes::t_int_1d_randomread type; - typename ArrayTypes::t_float_1d_randomread q; + typename AT::t_x_array_randomread x; + typename AT::t_x_array c_x; + typename AT::t_f_array f; + typename AT::t_int_1d_randomread type; + typename AT::t_float_1d_randomread q; DAT::tdual_efloat_1d k_eatom; DAT::tdual_virial_array k_vatom; - typename ArrayTypes::t_efloat_1d d_eatom; - typename ArrayTypes::t_virial_array d_vatom; + typename AT::t_efloat_1d d_eatom; + typename AT::t_virial_array d_vatom; int newton_pair; - typename ArrayTypes::tdual_ffloat_2d k_cutsq; - typename ArrayTypes::t_ffloat_2d d_cutsq; - typename ArrayTypes::tdual_ffloat_2d k_cut_ljsq; - typename ArrayTypes::t_ffloat_2d d_cut_ljsq; - typename ArrayTypes::tdual_ffloat_2d k_cut_coulsq; - typename ArrayTypes::t_ffloat_2d d_cut_coulsq; + typename AT::tdual_ffloat_2d k_cutsq; + typename AT::t_ffloat_2d d_cutsq; + typename AT::tdual_ffloat_2d k_cut_ljsq; + typename AT::t_ffloat_2d d_cut_ljsq; + typename AT::tdual_ffloat_2d k_cut_coulsq; + typename AT::t_ffloat_2d d_cut_coulsq; - typename ArrayTypes::t_ffloat_1d_randomread + typename AT::t_ffloat_1d_randomread d_rtable, d_drtable, d_ftable, d_dftable, d_ctable, d_dctable, d_etable, d_detable; diff -Naur lammps-26Jan17/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp lammps-13Feb17/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp 2017-01-06 10:16:03.976787000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -180,8 +180,6 @@ virial[5] += ev.v[5]; } - if (vflag_fdotr) pair_virial_fdotr_compute(this); - if (eflag_atom) { k_eatom.template modify(); k_eatom.template sync(); @@ -192,6 +190,8 @@ k_vatom.template sync(); } + if (vflag_fdotr) pair_virial_fdotr_compute(this); + copymode = 0; } diff -Naur lammps-26Jan17/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.h lammps-13Feb17/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.h --- lammps-26Jan17/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.h 2017-01-17 09:44:40.547610000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.h 2017-02-03 14:45:56.983493000 -0700 @@ -34,6 +34,7 @@ enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF}; enum {COUL_FLAG=1}; typedef DeviceType device_type; + typedef ArrayTypes AT; PairLJCharmmCoulLongKokkos(class LAMMPS *); ~PairLJCharmmCoulLongKokkos(); @@ -75,27 +76,27 @@ F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; F_FLOAT m_cut_ljsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; F_FLOAT m_cut_coulsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; - typename ArrayTypes::t_x_array_randomread x; - typename ArrayTypes::t_x_array c_x; - typename ArrayTypes::t_f_array f; - typename ArrayTypes::t_int_1d_randomread type; - typename ArrayTypes::t_float_1d_randomread q; + typename AT::t_x_array_randomread x; + typename AT::t_x_array c_x; + typename AT::t_f_array f; + typename AT::t_int_1d_randomread type; + typename AT::t_float_1d_randomread q; DAT::tdual_efloat_1d k_eatom; DAT::tdual_virial_array k_vatom; - typename ArrayTypes::t_efloat_1d d_eatom; - typename ArrayTypes::t_virial_array d_vatom; + typename AT::t_efloat_1d d_eatom; + typename AT::t_virial_array d_vatom; int newton_pair; - typename ArrayTypes::tdual_ffloat_2d k_cutsq; - typename ArrayTypes::t_ffloat_2d d_cutsq; - typename ArrayTypes::tdual_ffloat_2d k_cut_ljsq; - typename ArrayTypes::t_ffloat_2d d_cut_ljsq; - typename ArrayTypes::tdual_ffloat_2d k_cut_coulsq; - typename ArrayTypes::t_ffloat_2d d_cut_coulsq; + typename AT::tdual_ffloat_2d k_cutsq; + typename AT::t_ffloat_2d d_cutsq; + typename AT::tdual_ffloat_2d k_cut_ljsq; + typename AT::t_ffloat_2d d_cut_ljsq; + typename AT::tdual_ffloat_2d k_cut_coulsq; + typename AT::t_ffloat_2d d_cut_coulsq; - typename ArrayTypes::t_ffloat_1d_randomread + typename AT::t_ffloat_1d_randomread d_rtable, d_drtable, d_ftable, d_dftable, d_ctable, d_dctable, d_etable, d_detable; diff -Naur lammps-26Jan17/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp lammps-13Feb17/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp 2017-01-06 10:16:03.976787000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -92,6 +92,19 @@ if (eflag || vflag) ev_setup(eflag,vflag); else evflag = vflag_fdotr = 0; + // reallocate per-atom arrays if necessary + + if (eflag_atom) { + memory->destroy_kokkos(k_eatom,eatom); + memory->create_kokkos(k_eatom,eatom,maxeatom,"pair:eatom"); + d_eatom = k_eatom.view(); + } + if (vflag_atom) { + memory->destroy_kokkos(k_vatom,vatom); + memory->create_kokkos(k_vatom,vatom,maxvatom,6,"pair:vatom"); + d_vatom = k_vatom.view(); + } + atomKK->sync(execution_space,datamask_read); k_cutsq.template sync(); k_cut_ljsq.template sync(); @@ -138,7 +151,17 @@ virial[5] += ev.v[5]; } - if (vflag_fdotr) virial_fdotr_compute(); + if (eflag_atom) { + k_eatom.template modify(); + k_eatom.template sync(); + } + + if (vflag_atom) { + k_vatom.template modify(); + k_vatom.template sync(); + } + + if (vflag_fdotr) pair_virial_fdotr_compute(this); copymode = 0; } diff -Naur lammps-26Jan17/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.h lammps-13Feb17/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.h --- lammps-26Jan17/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.h 2017-01-17 09:44:40.547610000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.h 2017-02-03 14:45:56.983493000 -0700 @@ -34,6 +34,7 @@ enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF}; enum {COUL_FLAG=1}; typedef DeviceType device_type; + typedef ArrayTypes AT; PairLJClass2CoulCutKokkos(class LAMMPS *); ~PairLJClass2CoulCutKokkos(); @@ -76,22 +77,25 @@ F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; F_FLOAT m_cut_ljsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; F_FLOAT m_cut_coulsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; - typename ArrayTypes::t_x_array_randomread x; - typename ArrayTypes::t_x_array c_x; - typename ArrayTypes::t_f_array f; - typename ArrayTypes::t_int_1d_randomread type; - typename ArrayTypes::t_float_1d_randomread q; - typename ArrayTypes::t_efloat_1d d_eatom; - typename ArrayTypes::t_virial_array d_vatom; + typename AT::t_x_array_randomread x; + typename AT::t_x_array c_x; + typename AT::t_f_array f; + typename AT::t_int_1d_randomread type; + typename AT::t_float_1d_randomread q; + + DAT::tdual_efloat_1d k_eatom; + DAT::tdual_virial_array k_vatom; + typename AT::t_efloat_1d d_eatom; + typename AT::t_virial_array d_vatom; int newton_pair; - typename ArrayTypes::tdual_ffloat_2d k_cutsq; - typename ArrayTypes::t_ffloat_2d d_cutsq; - typename ArrayTypes::tdual_ffloat_2d k_cut_ljsq; - typename ArrayTypes::t_ffloat_2d d_cut_ljsq; - typename ArrayTypes::tdual_ffloat_2d k_cut_coulsq; - typename ArrayTypes::t_ffloat_2d d_cut_coulsq; + typename AT::tdual_ffloat_2d k_cutsq; + typename AT::t_ffloat_2d d_cutsq; + typename AT::tdual_ffloat_2d k_cut_ljsq; + typename AT::t_ffloat_2d d_cut_ljsq; + typename AT::tdual_ffloat_2d k_cut_coulsq; + typename AT::t_ffloat_2d d_cut_coulsq; int neighflag; int nlocal,nall,eflag,vflag; @@ -112,6 +116,7 @@ friend EV_FLOAT pair_compute_neighlist(PairLJClass2CoulCutKokkos*,NeighListKokkos*); friend EV_FLOAT pair_compute(PairLJClass2CoulCutKokkos*, NeighListKokkos*); + friend void pair_virial_fdotr_compute(PairLJClass2CoulCutKokkos*); }; diff -Naur lammps-26Jan17/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp lammps-13Feb17/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp 2017-01-06 10:16:03.976787000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -100,6 +100,19 @@ if (eflag || vflag) ev_setup(eflag,vflag); else evflag = vflag_fdotr = 0; + // reallocate per-atom arrays if necessary + + if (eflag_atom) { + memory->destroy_kokkos(k_eatom,eatom); + memory->create_kokkos(k_eatom,eatom,maxeatom,"pair:eatom"); + d_eatom = k_eatom.view(); + } + if (vflag_atom) { + memory->destroy_kokkos(k_vatom,vatom); + memory->create_kokkos(k_vatom,vatom,maxvatom,6,"pair:vatom"); + d_vatom = k_vatom.view(); + } + atomKK->sync(execution_space,datamask_read); k_cutsq.template sync(); k_cut_ljsq.template sync(); @@ -152,6 +165,16 @@ virial[5] += ev.v[5]; } + if (eflag_atom) { + k_eatom.template modify(); + k_eatom.template sync(); + } + + if (vflag_atom) { + k_vatom.template modify(); + k_vatom.template sync(); + } + if (vflag_fdotr) pair_virial_fdotr_compute(this); copymode = 0; diff -Naur lammps-26Jan17/src/KOKKOS/pair_lj_class2_coul_long_kokkos.h lammps-13Feb17/src/KOKKOS/pair_lj_class2_coul_long_kokkos.h --- lammps-26Jan17/src/KOKKOS/pair_lj_class2_coul_long_kokkos.h 2017-01-17 09:44:40.547610000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_lj_class2_coul_long_kokkos.h 2017-02-03 14:45:56.983493000 -0700 @@ -34,6 +34,7 @@ enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF}; enum {COUL_FLAG=1}; typedef DeviceType device_type; + typedef ArrayTypes AT; PairLJClass2CoulLongKokkos(class LAMMPS *); ~PairLJClass2CoulLongKokkos(); @@ -76,24 +77,27 @@ F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; F_FLOAT m_cut_ljsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; F_FLOAT m_cut_coulsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; - typename ArrayTypes::t_x_array_randomread x; - typename ArrayTypes::t_x_array c_x; - typename ArrayTypes::t_f_array f; - typename ArrayTypes::t_int_1d_randomread type; - typename ArrayTypes::t_float_1d_randomread q; - typename ArrayTypes::t_efloat_1d d_eatom; - typename ArrayTypes::t_virial_array d_vatom; + typename AT::t_x_array_randomread x; + typename AT::t_x_array c_x; + typename AT::t_f_array f; + typename AT::t_int_1d_randomread type; + typename AT::t_float_1d_randomread q; + + DAT::tdual_efloat_1d k_eatom; + DAT::tdual_virial_array k_vatom; + typename AT::t_efloat_1d d_eatom; + typename AT::t_virial_array d_vatom; int newton_pair; - typename ArrayTypes::tdual_ffloat_2d k_cutsq; - typename ArrayTypes::t_ffloat_2d d_cutsq; - typename ArrayTypes::tdual_ffloat_2d k_cut_ljsq; - typename ArrayTypes::t_ffloat_2d d_cut_ljsq; - typename ArrayTypes::tdual_ffloat_2d k_cut_coulsq; - typename ArrayTypes::t_ffloat_2d d_cut_coulsq; + typename AT::tdual_ffloat_2d k_cutsq; + typename AT::t_ffloat_2d d_cutsq; + typename AT::tdual_ffloat_2d k_cut_ljsq; + typename AT::t_ffloat_2d d_cut_ljsq; + typename AT::tdual_ffloat_2d k_cut_coulsq; + typename AT::t_ffloat_2d d_cut_coulsq; - typename ArrayTypes::t_ffloat_1d_randomread + typename AT::t_ffloat_1d_randomread d_rtable, d_drtable, d_ftable, d_dftable, d_ctable, d_dctable, d_etable, d_detable; diff -Naur lammps-26Jan17/src/KOKKOS/pair_lj_class2_kokkos.cpp lammps-13Feb17/src/KOKKOS/pair_lj_class2_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/pair_lj_class2_kokkos.cpp 2017-01-06 10:16:03.976787000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_lj_class2_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -92,6 +92,19 @@ if (eflag || vflag) ev_setup(eflag,vflag); else evflag = vflag_fdotr = 0; + // reallocate per-atom arrays if necessary + + if (eflag_atom) { + memory->destroy_kokkos(k_eatom,eatom); + memory->create_kokkos(k_eatom,eatom,maxeatom,"pair:eatom"); + d_eatom = k_eatom.view(); + } + if (vflag_atom) { + memory->destroy_kokkos(k_vatom,vatom); + memory->create_kokkos(k_vatom,vatom,maxvatom,6,"pair:vatom"); + d_vatom = k_vatom.view(); + } + atomKK->sync(execution_space,datamask_read); k_cutsq.template sync(); k_params.template sync(); @@ -125,7 +138,18 @@ virial[5] += ev.v[5]; } + if (eflag_atom) { + k_eatom.template modify(); + k_eatom.template sync(); + } + + if (vflag_atom) { + k_vatom.template modify(); + k_vatom.template sync(); + } + if (vflag_fdotr) pair_virial_fdotr_compute(this); + } template diff -Naur lammps-26Jan17/src/KOKKOS/pair_lj_class2_kokkos.h lammps-13Feb17/src/KOKKOS/pair_lj_class2_kokkos.h --- lammps-26Jan17/src/KOKKOS/pair_lj_class2_kokkos.h 2017-01-26 13:54:58.968983000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_lj_class2_kokkos.h 2017-02-03 14:45:56.983493000 -0700 @@ -34,6 +34,7 @@ enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF|N2}; enum {COUL_FLAG=0}; typedef DeviceType device_type; + typedef ArrayTypes AT; PairLJClass2Kokkos(class LAMMPS *); ~PairLJClass2Kokkos(); @@ -79,19 +80,22 @@ typename Kokkos::DualView::t_dev_const_um params; params_lj m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; // hardwired to space for 12 atom types F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; - typename ArrayTypes::t_x_array_randomread x; - typename ArrayTypes::t_x_array c_x; - typename ArrayTypes::t_f_array f; - typename ArrayTypes::t_int_1d_randomread type; - typename ArrayTypes::t_efloat_1d d_eatom; - typename ArrayTypes::t_virial_array d_vatom; - typename ArrayTypes::t_tagint_1d tag; + typename AT::t_x_array_randomread x; + typename AT::t_x_array c_x; + typename AT::t_f_array f; + typename AT::t_int_1d_randomread type; + typename AT::t_tagint_1d tag; + + DAT::tdual_efloat_1d k_eatom; + DAT::tdual_virial_array k_vatom; + typename AT::t_efloat_1d d_eatom; + typename AT::t_virial_array d_vatom; int newton_pair; double special_lj[4]; - typename ArrayTypes::tdual_ffloat_2d k_cutsq; - typename ArrayTypes::t_ffloat_2d d_cutsq; + typename AT::tdual_ffloat_2d k_cutsq; + typename AT::t_ffloat_2d d_cutsq; int neighflag; int nlocal,nall,eflag,vflag; diff -Naur lammps-26Jan17/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp lammps-13Feb17/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp 2017-01-06 10:16:03.976787000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -92,6 +92,19 @@ if (eflag || vflag) ev_setup(eflag,vflag); else evflag = vflag_fdotr = 0; + // reallocate per-atom arrays if necessary + + if (eflag_atom) { + memory->destroy_kokkos(k_eatom,eatom); + memory->create_kokkos(k_eatom,eatom,maxeatom,"pair:eatom"); + d_eatom = k_eatom.view(); + } + if (vflag_atom) { + memory->destroy_kokkos(k_vatom,vatom); + memory->create_kokkos(k_vatom,vatom,maxvatom,6,"pair:vatom"); + d_vatom = k_vatom.view(); + } + atomKK->sync(execution_space,datamask_read); k_cutsq.template sync(); k_cut_ljsq.template sync(); @@ -136,7 +149,18 @@ virial[5] += ev.v[5]; } - if (vflag_fdotr) virial_fdotr_compute(); + if (eflag_atom) { + k_eatom.template modify(); + k_eatom.template sync(); + } + + if (vflag_atom) { + k_vatom.template modify(); + k_vatom.template sync(); + } + + if (vflag_fdotr) pair_virial_fdotr_compute(this); + } /* ---------------------------------------------------------------------- diff -Naur lammps-26Jan17/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.h lammps-13Feb17/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.h --- lammps-26Jan17/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.h 2017-01-17 09:44:40.547610000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.h 2017-02-03 14:45:56.983493000 -0700 @@ -34,6 +34,7 @@ enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF}; enum {COUL_FLAG=1}; typedef DeviceType device_type; + typedef ArrayTypes AT; PairLJCutCoulCutKokkos(class LAMMPS *); ~PairLJCutCoulCutKokkos(); @@ -75,22 +76,25 @@ F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; F_FLOAT m_cut_ljsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; F_FLOAT m_cut_coulsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; - typename ArrayTypes::t_x_array_randomread x; - typename ArrayTypes::t_x_array c_x; - typename ArrayTypes::t_f_array f; - typename ArrayTypes::t_int_1d_randomread type; - typename ArrayTypes::t_float_1d_randomread q; - typename ArrayTypes::t_efloat_1d d_eatom; - typename ArrayTypes::t_virial_array d_vatom; + typename AT::t_x_array_randomread x; + typename AT::t_x_array c_x; + typename AT::t_f_array f; + typename AT::t_int_1d_randomread type; + typename AT::t_float_1d_randomread q; + + DAT::tdual_efloat_1d k_eatom; + DAT::tdual_virial_array k_vatom; + typename AT::t_efloat_1d d_eatom; + typename AT::t_virial_array d_vatom; int newton_pair; - typename ArrayTypes::tdual_ffloat_2d k_cutsq; - typename ArrayTypes::t_ffloat_2d d_cutsq; - typename ArrayTypes::tdual_ffloat_2d k_cut_ljsq; - typename ArrayTypes::t_ffloat_2d d_cut_ljsq; - typename ArrayTypes::tdual_ffloat_2d k_cut_coulsq; - typename ArrayTypes::t_ffloat_2d d_cut_coulsq; + typename AT::tdual_ffloat_2d k_cutsq; + typename AT::t_ffloat_2d d_cutsq; + typename AT::tdual_ffloat_2d k_cut_ljsq; + typename AT::t_ffloat_2d d_cut_ljsq; + typename AT::tdual_ffloat_2d k_cut_coulsq; + typename AT::t_ffloat_2d d_cut_coulsq; int neighflag; @@ -112,6 +116,7 @@ friend EV_FLOAT pair_compute_neighlist(PairLJCutCoulCutKokkos*,NeighListKokkos*); friend EV_FLOAT pair_compute(PairLJCutCoulCutKokkos*, NeighListKokkos*); + friend void pair_virial_fdotr_compute(PairLJCutCoulCutKokkos*); }; diff -Naur lammps-26Jan17/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp lammps-13Feb17/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp 2017-01-06 10:16:03.976787000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -96,6 +96,19 @@ if (eflag || vflag) ev_setup(eflag,vflag); else evflag = vflag_fdotr = 0; + // reallocate per-atom arrays if necessary + + if (eflag_atom) { + memory->destroy_kokkos(k_eatom,eatom); + memory->create_kokkos(k_eatom,eatom,maxeatom,"pair:eatom"); + d_eatom = k_eatom.view(); + } + if (vflag_atom) { + memory->destroy_kokkos(k_vatom,vatom); + memory->create_kokkos(k_vatom,vatom,maxvatom,6,"pair:vatom"); + d_vatom = k_vatom.view(); + } + atomKK->sync(execution_space,datamask_read); k_cutsq.template sync(); k_cut_ljsq.template sync(); @@ -142,7 +155,17 @@ virial[5] += ev.v[5]; } - if (vflag_fdotr) virial_fdotr_compute(); + if (eflag_atom) { + k_eatom.template modify(); + k_eatom.template sync(); + } + + if (vflag_atom) { + k_vatom.template modify(); + k_vatom.template sync(); + } + + if (vflag_fdotr) pair_virial_fdotr_compute(this); copymode = 0; } diff -Naur lammps-26Jan17/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.h lammps-13Feb17/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.h --- lammps-26Jan17/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.h 2017-01-17 09:44:40.547610000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.h 2017-02-03 14:45:56.983493000 -0700 @@ -34,6 +34,7 @@ enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF}; enum {COUL_FLAG=1}; typedef DeviceType device_type; + typedef ArrayTypes AT; PairLJCutCoulDebyeKokkos(class LAMMPS *); ~PairLJCutCoulDebyeKokkos(); @@ -75,22 +76,25 @@ F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; F_FLOAT m_cut_ljsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; F_FLOAT m_cut_coulsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; - typename ArrayTypes::t_x_array_randomread x; - typename ArrayTypes::t_x_array c_x; - typename ArrayTypes::t_f_array f; - typename ArrayTypes::t_int_1d_randomread type; - typename ArrayTypes::t_float_1d_randomread q; - typename ArrayTypes::t_efloat_1d d_eatom; - typename ArrayTypes::t_virial_array d_vatom; + typename AT::t_x_array_randomread x; + typename AT::t_x_array c_x; + typename AT::t_f_array f; + typename AT::t_int_1d_randomread type; + typename AT::t_float_1d_randomread q; + + DAT::tdual_efloat_1d k_eatom; + DAT::tdual_virial_array k_vatom; + typename AT::t_efloat_1d d_eatom; + typename AT::t_virial_array d_vatom; int newton_pair; - typename ArrayTypes::tdual_ffloat_2d k_cutsq; - typename ArrayTypes::t_ffloat_2d d_cutsq; - typename ArrayTypes::tdual_ffloat_2d k_cut_ljsq; - typename ArrayTypes::t_ffloat_2d d_cut_ljsq; - typename ArrayTypes::tdual_ffloat_2d k_cut_coulsq; - typename ArrayTypes::t_ffloat_2d d_cut_coulsq; + typename AT::tdual_ffloat_2d k_cutsq; + typename AT::t_ffloat_2d d_cutsq; + typename AT::tdual_ffloat_2d k_cut_ljsq; + typename AT::t_ffloat_2d d_cut_ljsq; + typename AT::tdual_ffloat_2d k_cut_coulsq; + typename AT::t_ffloat_2d d_cut_coulsq; int neighflag; @@ -112,6 +116,7 @@ friend EV_FLOAT pair_compute_neighlist(PairLJCutCoulDebyeKokkos*,NeighListKokkos*); friend EV_FLOAT pair_compute(PairLJCutCoulDebyeKokkos*, NeighListKokkos*); + friend void pair_virial_fdotr_compute(PairLJCutCoulDebyeKokkos*); }; diff -Naur lammps-26Jan17/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp lammps-13Feb17/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp 2017-01-06 10:16:03.976787000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -104,6 +104,19 @@ if (eflag || vflag) ev_setup(eflag,vflag); else evflag = vflag_fdotr = 0; + // reallocate per-atom arrays if necessary + + if (eflag_atom) { + memory->destroy_kokkos(k_eatom,eatom); + memory->create_kokkos(k_eatom,eatom,maxeatom,"pair:eatom"); + d_eatom = k_eatom.view(); + } + if (vflag_atom) { + memory->destroy_kokkos(k_vatom,vatom); + memory->create_kokkos(k_vatom,vatom,maxvatom,6,"pair:vatom"); + d_vatom = k_vatom.view(); + } + atomKK->sync(execution_space,datamask_read); k_cutsq.template sync(); k_cut_ljsq.template sync(); @@ -160,7 +173,17 @@ virial[5] += ev.v[5]; } - if (vflag_fdotr) virial_fdotr_compute(); + if (eflag_atom) { + k_eatom.template modify(); + k_eatom.template sync(); + } + + if (vflag_atom) { + k_vatom.template modify(); + k_vatom.template sync(); + } + + if (vflag_fdotr) pair_virial_fdotr_compute(this); copymode = 0; } diff -Naur lammps-26Jan17/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.h lammps-13Feb17/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.h --- lammps-26Jan17/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.h 2017-01-17 09:44:40.547610000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.h 2017-02-03 14:45:56.983493000 -0700 @@ -34,6 +34,7 @@ enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF}; enum {COUL_FLAG=1}; typedef DeviceType device_type; + typedef ArrayTypes AT; PairLJCutCoulDSFKokkos(class LAMMPS *); ~PairLJCutCoulDSFKokkos(); @@ -74,22 +75,25 @@ F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; F_FLOAT m_cut_ljsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; F_FLOAT m_cut_coulsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; - typename ArrayTypes::t_x_array_randomread x; - typename ArrayTypes::t_x_array c_x; - typename ArrayTypes::t_f_array f; - typename ArrayTypes::t_int_1d_randomread type; - typename ArrayTypes::t_float_1d_randomread q; - typename ArrayTypes::t_efloat_1d d_eatom; - typename ArrayTypes::t_virial_array d_vatom; + typename AT::t_x_array_randomread x; + typename AT::t_x_array c_x; + typename AT::t_f_array f; + typename AT::t_int_1d_randomread type; + typename AT::t_float_1d_randomread q; + + DAT::tdual_efloat_1d k_eatom; + DAT::tdual_virial_array k_vatom; + typename AT::t_efloat_1d d_eatom; + typename AT::t_virial_array d_vatom; int newton_pair; - typename ArrayTypes::tdual_ffloat_2d k_cutsq; - typename ArrayTypes::t_ffloat_2d d_cutsq; - typename ArrayTypes::tdual_ffloat_2d k_cut_ljsq; - typename ArrayTypes::t_ffloat_2d d_cut_ljsq; - typename ArrayTypes::tdual_ffloat_2d k_cut_coulsq; - typename ArrayTypes::t_ffloat_2d d_cut_coulsq; + typename AT::tdual_ffloat_2d k_cutsq; + typename AT::t_ffloat_2d d_cutsq; + typename AT::tdual_ffloat_2d k_cut_ljsq; + typename AT::t_ffloat_2d d_cut_ljsq; + typename AT::tdual_ffloat_2d k_cut_coulsq; + typename AT::t_ffloat_2d d_cut_coulsq; int neighflag; @@ -111,6 +115,7 @@ friend EV_FLOAT pair_compute_neighlist(PairLJCutCoulDSFKokkos*,NeighListKokkos*); friend EV_FLOAT pair_compute(PairLJCutCoulDSFKokkos*, NeighListKokkos*); + friend void pair_virial_fdotr_compute(PairLJCutCoulDSFKokkos*); }; diff -Naur lammps-26Jan17/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp lammps-13Feb17/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp 2017-01-06 10:16:03.976787000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -168,8 +168,6 @@ virial[5] += ev.v[5]; } - if (vflag_fdotr) pair_virial_fdotr_compute(this); - if (eflag_atom) { k_eatom.template modify(); k_eatom.template sync(); @@ -179,6 +177,9 @@ k_vatom.template modify(); k_vatom.template sync(); } + + if (vflag_fdotr) pair_virial_fdotr_compute(this); + } /* ---------------------------------------------------------------------- diff -Naur lammps-26Jan17/src/KOKKOS/pair_lj_cut_coul_long_kokkos.h lammps-13Feb17/src/KOKKOS/pair_lj_cut_coul_long_kokkos.h --- lammps-26Jan17/src/KOKKOS/pair_lj_cut_coul_long_kokkos.h 2017-01-17 09:44:40.547610000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_lj_cut_coul_long_kokkos.h 2017-02-03 14:45:56.983493000 -0700 @@ -34,6 +34,7 @@ enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF}; enum {COUL_FLAG=1}; typedef DeviceType device_type; + typedef ArrayTypes AT; PairLJCutCoulLongKokkos(class LAMMPS *); ~PairLJCutCoulLongKokkos(); @@ -76,27 +77,27 @@ F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; F_FLOAT m_cut_ljsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; F_FLOAT m_cut_coulsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; - typename ArrayTypes::t_x_array_randomread x; - typename ArrayTypes::t_x_array c_x; - typename ArrayTypes::t_f_array f; - typename ArrayTypes::t_int_1d_randomread type; - typename ArrayTypes::t_float_1d_randomread q; + typename AT::t_x_array_randomread x; + typename AT::t_x_array c_x; + typename AT::t_f_array f; + typename AT::t_int_1d_randomread type; + typename AT::t_float_1d_randomread q; DAT::tdual_efloat_1d k_eatom; DAT::tdual_virial_array k_vatom; - typename ArrayTypes::t_efloat_1d d_eatom; - typename ArrayTypes::t_virial_array d_vatom; + typename AT::t_efloat_1d d_eatom; + typename AT::t_virial_array d_vatom; int newton_pair; - typename ArrayTypes::tdual_ffloat_2d k_cutsq; - typename ArrayTypes::t_ffloat_2d d_cutsq; - typename ArrayTypes::tdual_ffloat_2d k_cut_ljsq; - typename ArrayTypes::t_ffloat_2d d_cut_ljsq; - typename ArrayTypes::tdual_ffloat_2d k_cut_coulsq; - typename ArrayTypes::t_ffloat_2d d_cut_coulsq; + typename AT::tdual_ffloat_2d k_cutsq; + typename AT::t_ffloat_2d d_cutsq; + typename AT::tdual_ffloat_2d k_cut_ljsq; + typename AT::t_ffloat_2d d_cut_ljsq; + typename AT::tdual_ffloat_2d k_cut_coulsq; + typename AT::t_ffloat_2d d_cut_coulsq; - typename ArrayTypes::t_ffloat_1d_randomread + typename AT::t_ffloat_1d_randomread d_rtable, d_drtable, d_ftable, d_dftable, d_ctable, d_dctable, d_etable, d_detable; diff -Naur lammps-26Jan17/src/KOKKOS/pair_lj_cut_kokkos.cpp lammps-13Feb17/src/KOKKOS/pair_lj_cut_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/pair_lj_cut_kokkos.cpp 2017-01-06 10:16:03.976787000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_lj_cut_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -138,8 +138,6 @@ virial[5] += ev.v[5]; } - if (vflag_fdotr) pair_virial_fdotr_compute(this); - if (eflag_atom) { k_eatom.template modify(); k_eatom.template sync(); @@ -149,6 +147,9 @@ k_vatom.template modify(); k_vatom.template sync(); } + + if (vflag_fdotr) pair_virial_fdotr_compute(this); + } template diff -Naur lammps-26Jan17/src/KOKKOS/pair_lj_cut_kokkos.h lammps-13Feb17/src/KOKKOS/pair_lj_cut_kokkos.h --- lammps-26Jan17/src/KOKKOS/pair_lj_cut_kokkos.h 2017-01-06 10:16:03.976787000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_lj_cut_kokkos.h 2017-02-03 14:45:56.983493000 -0700 @@ -34,6 +34,7 @@ enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF|N2}; enum {COUL_FLAG=0}; typedef DeviceType device_type; + typedef ArrayTypes AT; PairLJCutKokkos(class LAMMPS *); ~PairLJCutKokkos(); @@ -73,22 +74,22 @@ typename Kokkos::DualView::t_dev_const_um params; params_lj m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; // hardwired to space for 12 atom types F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; - typename ArrayTypes::t_x_array_randomread x; - typename ArrayTypes::t_x_array c_x; - typename ArrayTypes::t_f_array f; - typename ArrayTypes::t_int_1d_randomread type; + typename AT::t_x_array_randomread x; + typename AT::t_x_array c_x; + typename AT::t_f_array f; + typename AT::t_int_1d_randomread type; DAT::tdual_efloat_1d k_eatom; DAT::tdual_virial_array k_vatom; - typename ArrayTypes::t_efloat_1d d_eatom; - typename ArrayTypes::t_virial_array d_vatom; - typename ArrayTypes::t_tagint_1d tag; + typename AT::t_efloat_1d d_eatom; + typename AT::t_virial_array d_vatom; + typename AT::t_tagint_1d tag; int newton_pair; double special_lj[4]; - typename ArrayTypes::tdual_ffloat_2d k_cutsq; - typename ArrayTypes::t_ffloat_2d d_cutsq; + typename AT::tdual_ffloat_2d k_cutsq; + typename AT::t_ffloat_2d d_cutsq; int neighflag; diff -Naur lammps-26Jan17/src/KOKKOS/pair_lj_expand_kokkos.cpp lammps-13Feb17/src/KOKKOS/pair_lj_expand_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/pair_lj_expand_kokkos.cpp 2017-01-06 10:16:03.976787000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_lj_expand_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -91,6 +91,19 @@ if (eflag || vflag) ev_setup(eflag,vflag); else evflag = vflag_fdotr = 0; + // reallocate per-atom arrays if necessary + + if (eflag_atom) { + memory->destroy_kokkos(k_eatom,eatom); + memory->create_kokkos(k_eatom,eatom,maxeatom,"pair:eatom"); + d_eatom = k_eatom.view(); + } + if (vflag_atom) { + memory->destroy_kokkos(k_vatom,vatom); + memory->create_kokkos(k_vatom,vatom,maxvatom,6,"pair:vatom"); + d_vatom = k_vatom.view(); + } + atomKK->sync(execution_space,datamask_read); k_cutsq.template sync(); k_params.template sync(); @@ -126,6 +139,16 @@ virial[5] += ev.v[5]; } + if (eflag_atom) { + k_eatom.template modify(); + k_eatom.template sync(); + } + + if (vflag_atom) { + k_vatom.template modify(); + k_vatom.template sync(); + } + if (vflag_fdotr) pair_virial_fdotr_compute(this); copymode = 0; diff -Naur lammps-26Jan17/src/KOKKOS/pair_lj_expand_kokkos.h lammps-13Feb17/src/KOKKOS/pair_lj_expand_kokkos.h --- lammps-26Jan17/src/KOKKOS/pair_lj_expand_kokkos.h 2017-01-26 13:54:58.968983000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_lj_expand_kokkos.h 2017-02-03 14:45:56.983493000 -0700 @@ -34,6 +34,7 @@ enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF|N2}; enum {COUL_FLAG=0}; typedef DeviceType device_type; + typedef ArrayTypes AT; PairLJExpandKokkos(class LAMMPS *); ~PairLJExpandKokkos(); @@ -79,19 +80,22 @@ typename Kokkos::DualView::t_dev_const_um params; params_lj m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; // hardwired to space for 12 atom types F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; - typename ArrayTypes::t_x_array_randomread x; - typename ArrayTypes::t_x_array c_x; - typename ArrayTypes::t_f_array f; - typename ArrayTypes::t_int_1d_randomread type; - typename ArrayTypes::t_efloat_1d d_eatom; - typename ArrayTypes::t_virial_array d_vatom; - typename ArrayTypes::t_tagint_1d tag; + typename AT::t_x_array_randomread x; + typename AT::t_x_array c_x; + typename AT::t_f_array f; + typename AT::t_int_1d_randomread type; + typename AT::t_tagint_1d tag; + + DAT::tdual_efloat_1d k_eatom; + DAT::tdual_virial_array k_vatom; + typename AT::t_efloat_1d d_eatom; + typename AT::t_virial_array d_vatom; int newton_pair; double special_lj[4]; - typename ArrayTypes::tdual_ffloat_2d k_cutsq; - typename ArrayTypes::t_ffloat_2d d_cutsq; + typename AT::tdual_ffloat_2d k_cutsq; + typename AT::t_ffloat_2d d_cutsq; int neighflag; diff -Naur lammps-26Jan17/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.cpp lammps-13Feb17/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.cpp 2017-01-17 09:44:40.547610000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -106,6 +106,19 @@ if (eflag || vflag) ev_setup(eflag,vflag); else evflag = vflag_fdotr = 0; + // reallocate per-atom arrays if necessary + + if (eflag_atom) { + memory->destroy_kokkos(k_eatom,eatom); + memory->create_kokkos(k_eatom,eatom,maxeatom,"pair:eatom"); + d_eatom = k_eatom.view(); + } + if (vflag_atom) { + memory->destroy_kokkos(k_vatom,vatom); + memory->create_kokkos(k_vatom,vatom,maxvatom,6,"pair:vatom"); + d_vatom = k_vatom.view(); + } + atomKK->sync(execution_space,datamask_read); k_cutsq.template sync(); k_cut_ljsq.template sync(); @@ -158,6 +171,16 @@ virial[5] += ev.v[5]; } + if (eflag_atom) { + k_eatom.template modify(); + k_eatom.template sync(); + } + + if (vflag_atom) { + k_vatom.template modify(); + k_vatom.template sync(); + } + if (vflag_fdotr) pair_virial_fdotr_compute(this); copymode = 0; diff -Naur lammps-26Jan17/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.h lammps-13Feb17/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.h --- lammps-26Jan17/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.h 2017-01-17 09:44:40.547610000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.h 2017-02-03 14:45:56.983493000 -0700 @@ -34,6 +34,7 @@ enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF}; enum {COUL_FLAG=1}; typedef DeviceType device_type; + typedef ArrayTypes AT; PairLJGromacsCoulGromacsKokkos(class LAMMPS *); ~PairLJGromacsCoulGromacsKokkos(); @@ -84,27 +85,27 @@ F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; F_FLOAT m_cut_ljsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; F_FLOAT m_cut_coulsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; - typename ArrayTypes::t_x_array_randomread x; - typename ArrayTypes::t_x_array c_x; - typename ArrayTypes::t_f_array f; - typename ArrayTypes::t_int_1d_randomread type; - typename ArrayTypes::t_float_1d_randomread q; + typename AT::t_x_array_randomread x; + typename AT::t_x_array c_x; + typename AT::t_f_array f; + typename AT::t_int_1d_randomread type; + typename AT::t_float_1d_randomread q; DAT::tdual_efloat_1d k_eatom; DAT::tdual_virial_array k_vatom; - typename ArrayTypes::t_efloat_1d d_eatom; - typename ArrayTypes::t_virial_array d_vatom; + typename AT::t_efloat_1d d_eatom; + typename AT::t_virial_array d_vatom; int newton_pair; - typename ArrayTypes::tdual_ffloat_2d k_cutsq; - typename ArrayTypes::t_ffloat_2d d_cutsq; - typename ArrayTypes::tdual_ffloat_2d k_cut_ljsq; - typename ArrayTypes::t_ffloat_2d d_cut_ljsq; - typename ArrayTypes::tdual_ffloat_2d k_cut_coulsq; - typename ArrayTypes::t_ffloat_2d d_cut_coulsq; + typename AT::tdual_ffloat_2d k_cutsq; + typename AT::t_ffloat_2d d_cutsq; + typename AT::tdual_ffloat_2d k_cut_ljsq; + typename AT::t_ffloat_2d d_cut_ljsq; + typename AT::tdual_ffloat_2d k_cut_coulsq; + typename AT::t_ffloat_2d d_cut_coulsq; - typename ArrayTypes::t_ffloat_1d_randomread + typename AT::t_ffloat_1d_randomread d_rtable, d_drtable, d_ftable, d_dftable, d_ctable, d_dctable, d_etable, d_detable; diff -Naur lammps-26Jan17/src/KOKKOS/pair_lj_gromacs_kokkos.cpp lammps-13Feb17/src/KOKKOS/pair_lj_gromacs_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/pair_lj_gromacs_kokkos.cpp 2017-01-06 10:16:03.976787000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_lj_gromacs_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -103,6 +103,19 @@ if (eflag || vflag) ev_setup(eflag,vflag); else evflag = vflag_fdotr = 0; + // reallocate per-atom arrays if necessary + + if (eflag_atom) { + memory->destroy_kokkos(k_eatom,eatom); + memory->create_kokkos(k_eatom,eatom,maxeatom,"pair:eatom"); + d_eatom = k_eatom.view(); + } + if (vflag_atom) { + memory->destroy_kokkos(k_vatom,vatom); + memory->create_kokkos(k_vatom,vatom,maxvatom,6,"pair:vatom"); + d_vatom = k_vatom.view(); + } + atomKK->sync(execution_space,datamask_read); k_cutsq.template sync(); k_cut_inner.template sync(); @@ -145,6 +158,16 @@ virial[5] += ev.v[5]; } + if (eflag_atom) { + k_eatom.template modify(); + k_eatom.template sync(); + } + + if (vflag_atom) { + k_vatom.template modify(); + k_vatom.template sync(); + } + if (vflag_fdotr) pair_virial_fdotr_compute(this); copymode = 0; diff -Naur lammps-26Jan17/src/KOKKOS/pair_lj_gromacs_kokkos.h lammps-13Feb17/src/KOKKOS/pair_lj_gromacs_kokkos.h --- lammps-26Jan17/src/KOKKOS/pair_lj_gromacs_kokkos.h 2017-01-26 13:54:58.968983000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_lj_gromacs_kokkos.h 2017-02-03 14:45:56.983493000 -0700 @@ -34,6 +34,7 @@ enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF}; enum {COUL_FLAG=0}; typedef DeviceType device_type; + typedef ArrayTypes AT; PairLJGromacsKokkos(class LAMMPS *); ~PairLJGromacsKokkos(); @@ -87,27 +88,27 @@ F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; F_FLOAT m_cut_inner[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; F_FLOAT m_cut_inner_sq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; - typename ArrayTypes::t_x_array_randomread x; - typename ArrayTypes::t_x_array c_x; - typename ArrayTypes::t_f_array f; - typename ArrayTypes::t_int_1d_randomread type; - typename ArrayTypes::t_float_1d_randomread q; + typename AT::t_x_array_randomread x; + typename AT::t_x_array c_x; + typename AT::t_f_array f; + typename AT::t_int_1d_randomread type; + typename AT::t_float_1d_randomread q; DAT::tdual_efloat_1d k_eatom; DAT::tdual_virial_array k_vatom; - typename ArrayTypes::t_efloat_1d d_eatom; - typename ArrayTypes::t_virial_array d_vatom; + typename AT::t_efloat_1d d_eatom; + typename AT::t_virial_array d_vatom; int newton_pair; - typename ArrayTypes::tdual_ffloat_2d k_cutsq; - typename ArrayTypes::t_ffloat_2d d_cutsq; - typename ArrayTypes::tdual_ffloat_2d k_cut_inner; - typename ArrayTypes::t_ffloat_2d d_cut_inner; - typename ArrayTypes::tdual_ffloat_2d k_cut_inner_sq; - typename ArrayTypes::t_ffloat_2d d_cut_inner_sq; + typename AT::tdual_ffloat_2d k_cutsq; + typename AT::t_ffloat_2d d_cutsq; + typename AT::tdual_ffloat_2d k_cut_inner; + typename AT::t_ffloat_2d d_cut_inner; + typename AT::tdual_ffloat_2d k_cut_inner_sq; + typename AT::t_ffloat_2d d_cut_inner_sq; - typename ArrayTypes::t_ffloat_1d_randomread + typename AT::t_ffloat_1d_randomread d_rtable, d_drtable, d_ftable, d_dftable, d_ctable, d_dctable, d_etable, d_detable; diff -Naur lammps-26Jan17/src/KOKKOS/pair_lj_sdk_kokkos.cpp lammps-13Feb17/src/KOKKOS/pair_lj_sdk_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/pair_lj_sdk_kokkos.cpp 2017-01-06 10:16:03.976787000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_lj_sdk_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -91,6 +91,19 @@ if (eflag || vflag) ev_setup(eflag,vflag); else evflag = vflag_fdotr = 0; + // reallocate per-atom arrays if necessary + + if (eflag_atom) { + memory->destroy_kokkos(k_eatom,eatom); + memory->create_kokkos(k_eatom,eatom,maxeatom,"pair:eatom"); + d_eatom = k_eatom.view(); + } + if (vflag_atom) { + memory->destroy_kokkos(k_vatom,vatom); + memory->create_kokkos(k_vatom,vatom,maxvatom,6,"pair:vatom"); + d_vatom = k_vatom.view(); + } + atomKK->sync(execution_space,datamask_read); k_cutsq.template sync(); k_params.template sync(); @@ -124,7 +137,18 @@ virial[5] += ev.v[5]; } + if (eflag_atom) { + k_eatom.template modify(); + k_eatom.template sync(); + } + + if (vflag_atom) { + k_vatom.template modify(); + k_vatom.template sync(); + } + if (vflag_fdotr) pair_virial_fdotr_compute(this); + } template diff -Naur lammps-26Jan17/src/KOKKOS/pair_lj_sdk_kokkos.h lammps-13Feb17/src/KOKKOS/pair_lj_sdk_kokkos.h --- lammps-26Jan17/src/KOKKOS/pair_lj_sdk_kokkos.h 2017-01-06 10:16:03.976787000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_lj_sdk_kokkos.h 2017-02-03 14:45:56.983493000 -0700 @@ -34,6 +34,7 @@ enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF|N2}; enum {COUL_FLAG=0}; typedef DeviceType device_type; + typedef ArrayTypes AT; PairLJSDKKokkos(class LAMMPS *); ~PairLJSDKKokkos(); @@ -74,19 +75,22 @@ typename Kokkos::DualView::t_dev_const_um params; params_lj m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; // hardwired to space for 12 atom types F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; - typename ArrayTypes::t_x_array_randomread x; - typename ArrayTypes::t_x_array c_x; - typename ArrayTypes::t_f_array f; - typename ArrayTypes::t_int_1d_randomread type; - typename ArrayTypes::t_efloat_1d d_eatom; - typename ArrayTypes::t_virial_array d_vatom; - typename ArrayTypes::t_tagint_1d tag; + typename AT::t_x_array_randomread x; + typename AT::t_x_array c_x; + typename AT::t_f_array f; + typename AT::t_int_1d_randomread type; + typename AT::t_tagint_1d tag; + + DAT::tdual_efloat_1d k_eatom; + DAT::tdual_virial_array k_vatom; + typename AT::t_efloat_1d d_eatom; + typename AT::t_virial_array d_vatom; int newton_pair; double special_lj[4]; - typename ArrayTypes::tdual_ffloat_2d k_cutsq; - typename ArrayTypes::t_ffloat_2d d_cutsq; + typename AT::tdual_ffloat_2d k_cutsq; + typename AT::t_ffloat_2d d_cutsq; int neighflag; diff -Naur lammps-26Jan17/src/KOKKOS/pair_morse_kokkos.cpp lammps-13Feb17/src/KOKKOS/pair_morse_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/pair_morse_kokkos.cpp 1969-12-31 17:00:00.000000000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_morse_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -0,0 +1,310 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Contributing authors: Stefan Paquay (Eindhoven University of Technology) +------------------------------------------------------------------------- */ + +#include +#include +#include +#include +#include "pair_morse_kokkos.h" +#include "kokkos.h" +#include "atom_kokkos.h" +#include "comm.h" +#include "force.h" +#include "neighbor.h" +#include "neigh_list.h" +#include "neigh_request.h" +#include "update.h" +#include "integrate.h" +#include "respa.h" +#include "math_const.h" +#include "memory.h" +#include "error.h" +#include "atom_masks.h" + +using namespace LAMMPS_NS; +using namespace MathConst; + +#define KOKKOS_CUDA_MAX_THREADS 256 +#define KOKKOS_CUDA_MIN_BLOCKS 8 + +/* ---------------------------------------------------------------------- */ + +template +PairMorseKokkos::PairMorseKokkos(LAMMPS *lmp) : PairMorse(lmp) +{ + respa_enable = 0; + + atomKK = (AtomKokkos *) atom; + execution_space = ExecutionSpaceFromDevice::space; + datamask_read = X_MASK | F_MASK | TYPE_MASK | ENERGY_MASK | VIRIAL_MASK; + datamask_modify = F_MASK | ENERGY_MASK | VIRIAL_MASK; + cutsq = NULL; +} + +/* ---------------------------------------------------------------------- */ + +template +PairMorseKokkos::~PairMorseKokkos() +{ + if (allocated) { + memory->destroy_kokkos(k_eatom,eatom); + memory->destroy_kokkos(k_vatom,vatom); + k_cutsq = DAT::tdual_ffloat_2d(); + memory->sfree(cutsq); + eatom = NULL; + vatom = NULL; + cutsq = NULL; + } +} + +/* ---------------------------------------------------------------------- */ + +template +void PairMorseKokkos::cleanup_copy() { + // WHY needed: this prevents parent copy from deallocating any arrays + allocated = 0; + cutsq = NULL; + eatom = NULL; + vatom = NULL; +} + +/* ---------------------------------------------------------------------- */ + +template +void PairMorseKokkos::compute(int eflag_in, int vflag_in) +{ + eflag = eflag_in; + vflag = vflag_in; + + + if (neighflag == FULL) no_virial_fdotr_compute = 1; + + if (eflag || vflag) ev_setup(eflag,vflag); + else evflag = vflag_fdotr = 0; + + // reallocate per-atom arrays if necessary + + if (eflag_atom) { + memory->destroy_kokkos(k_eatom,eatom); + memory->create_kokkos(k_eatom,eatom,maxeatom,"pair:eatom"); + d_eatom = k_eatom.view(); + } + if (vflag_atom) { + memory->destroy_kokkos(k_vatom,vatom); + memory->create_kokkos(k_vatom,vatom,maxvatom,6,"pair:vatom"); + d_vatom = k_vatom.view(); + } + + atomKK->sync(execution_space,datamask_read); + k_cutsq.template sync(); + k_params.template sync(); + if (eflag || vflag) atomKK->modified(execution_space,datamask_modify); + else atomKK->modified(execution_space,F_MASK); + + x = atomKK->k_x.view(); + c_x = atomKK->k_x.view(); + f = atomKK->k_f.view(); + type = atomKK->k_type.view(); + tag = atomKK->k_tag.view(); + nlocal = atom->nlocal; + nall = atom->nlocal + atom->nghost; + newton_pair = force->newton_pair; + special_lj[0] = force->special_lj[0]; + special_lj[1] = force->special_lj[1]; + special_lj[2] = force->special_lj[2]; + special_lj[3] = force->special_lj[3]; + + // loop over neighbors of my atoms + + EV_FLOAT ev = pair_compute,void >(this,(NeighListKokkos*)list); + + if (eflag_global) eng_vdwl += ev.evdwl; + if (vflag_global) { + virial[0] += ev.v[0]; + virial[1] += ev.v[1]; + virial[2] += ev.v[2]; + virial[3] += ev.v[3]; + virial[4] += ev.v[4]; + virial[5] += ev.v[5]; + } + + if (vflag_fdotr) pair_virial_fdotr_compute(this); + + if (eflag_atom) { + k_eatom.template modify(); + k_eatom.template sync(); + } + + if (vflag_atom) { + k_vatom.template modify(); + k_vatom.template sync(); + } +} + +template +template +KOKKOS_INLINE_FUNCTION +F_FLOAT PairMorseKokkos:: +compute_fpair(const F_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const { + (void) i; + (void) j; + const F_FLOAT rr = sqrt(rsq); + const F_FLOAT r0 = STACKPARAMS ? m_params[itype][jtype].r0 : params(itype,jtype).r0; + const F_FLOAT d0 = STACKPARAMS ? m_params[itype][jtype].d0 : params(itype,jtype).d0; + const F_FLOAT aa = STACKPARAMS ? m_params[itype][jtype].alpha : params(itype,jtype).alpha; + const F_FLOAT dr = rr - r0; + + // U = d0 * [ exp( -2*a*(x-r0)) - 2*exp(-a*(x-r0)) ] + // f = -2*a*d0*[ -exp( -2*a*(x-r0) ) + exp( -a*(x-r0) ) ] * grad(r) + // = +2*a*d0*[ exp( -2*a*(x-r0) ) - exp( -a*(x-r0) ) ] * grad(r) + const F_FLOAT dexp = exp( -aa*dr ); + const F_FLOAT forcelj = 2*aa*d0*dexp*(dexp-1.0); + + return forcelj / rr; +} + +template +template +KOKKOS_INLINE_FUNCTION +F_FLOAT PairMorseKokkos:: +compute_evdwl(const F_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const { + (void) i; + (void) j; + const F_FLOAT rr = sqrt(rsq); + const F_FLOAT r0 = STACKPARAMS ? m_params[itype][jtype].r0 : params(itype,jtype).r0; + const F_FLOAT d0 = STACKPARAMS ? m_params[itype][jtype].d0 : params(itype,jtype).d0; + const F_FLOAT aa = STACKPARAMS ? m_params[itype][jtype].alpha : params(itype,jtype).alpha; + const F_FLOAT dr = rr - r0; + + // U = d0 * [ exp( -2*a*(x-r0)) - 2*exp(-a*(x-r0)) ] + // f = -2*a*d0*[ -exp( -2*a*(x-r0) ) + exp( -a*(x-r0) ) ] * grad(r) + // = +2*a*d0*[ exp( -2*a*(x-r0) ) - exp( -a*(x-r0) ) ] * grad(r) + const F_FLOAT dexp = exp( -aa*dr ); + + return d0 * dexp * ( dexp - 2.0 ); +} + +/* ---------------------------------------------------------------------- + allocate all arrays +------------------------------------------------------------------------- */ + +template +void PairMorseKokkos::allocate() +{ + PairMorse::allocate(); + + int n = atom->ntypes; + memory->destroy(cutsq); + memory->create_kokkos(k_cutsq,cutsq,n+1,n+1,"pair:cutsq"); + d_cutsq = k_cutsq.template view(); + k_params = Kokkos::DualView("PairMorse::params",n+1,n+1); + params = k_params.d_view; +} + +/* ---------------------------------------------------------------------- + global settings +------------------------------------------------------------------------- */ + +template +void PairMorseKokkos::settings(int narg, char **arg) +{ + if (narg > 2) error->all(FLERR,"Illegal pair_style command"); + + PairMorse::settings(1,arg); +} + +/* ---------------------------------------------------------------------- + init specific to this pair style +------------------------------------------------------------------------- */ + +template +void PairMorseKokkos::init_style() +{ + PairMorse::init_style(); + + // error if rRESPA with inner levels + + if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) { + int respa = 0; + if (((Respa *) update->integrate)->level_inner >= 0) respa = 1; + if (((Respa *) update->integrate)->level_middle >= 0) respa = 2; + if (respa) + error->all(FLERR,"Cannot use Kokkos pair style with rRESPA inner/middle"); + } + + // irequest = neigh request made by parent class + + neighflag = lmp->kokkos->neighflag; + int irequest = neighbor->nrequest - 1; + + neighbor->requests[irequest]-> + kokkos_host = Kokkos::Impl::is_same::value && + !Kokkos::Impl::is_same::value; + neighbor->requests[irequest]-> + kokkos_device = Kokkos::Impl::is_same::value; + + if (neighflag == FULL) { + neighbor->requests[irequest]->full = 1; + neighbor->requests[irequest]->half = 0; + } else if (neighflag == HALF || neighflag == HALFTHREAD) { + neighbor->requests[irequest]->full = 0; + neighbor->requests[irequest]->half = 1; + } else if (neighflag == N2) { + neighbor->requests[irequest]->full = 0; + neighbor->requests[irequest]->half = 0; + } else { + error->all(FLERR,"Cannot use chosen neighbor list style with morse/kk"); + } +} + +/* ---------------------------------------------------------------------- + init for one type pair i,j and corresponding j,i +------------------------------------------------------------------------- */ +// Rewrite this. +template +double PairMorseKokkos::init_one(int i, int j) +{ + double cutone = PairMorse::init_one(i,j); + + k_params.h_view(i,j).d0 = d0[i][j]; + k_params.h_view(i,j).alpha = alpha[i][j]; + k_params.h_view(i,j).r0 = r0[i][j]; + k_params.h_view(i,j).offset = offset[i][j]; + k_params.h_view(i,j).cutsq = cutone*cutone; + k_params.h_view(j,i) = k_params.h_view(i,j); + + if(i(); + k_params.template modify(); + + return cutone; +} + + + +namespace LAMMPS_NS { +template class PairMorseKokkos; +#ifdef KOKKOS_HAVE_CUDA +template class PairMorseKokkos; +#endif +} + diff -Naur lammps-26Jan17/src/KOKKOS/pair_morse_kokkos.h lammps-13Feb17/src/KOKKOS/pair_morse_kokkos.h --- lammps-26Jan17/src/KOKKOS/pair_morse_kokkos.h 1969-12-31 17:00:00.000000000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_morse_kokkos.h 2017-02-03 14:45:56.983493000 -0700 @@ -0,0 +1,135 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef PAIR_CLASS + +PairStyle(morse/kk,PairMorseKokkos) +PairStyle(morse/kk/device,PairMorseKokkos) +PairStyle(morse/kk/host,PairMorseKokkos) + +#else + +#ifndef LMP_PAIR_MORSE_KOKKOS_H +#define LMP_PAIR_MORSE_KOKKOS_H + +#include "pair_kokkos.h" +#include "pair_morse.h" +#include "neigh_list_kokkos.h" + +namespace LAMMPS_NS { + +template +class PairMorseKokkos : public PairMorse { + public: + enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF|N2}; + enum {COUL_FLAG=0}; + typedef DeviceType device_type; + PairMorseKokkos(class LAMMPS *); + virtual ~PairMorseKokkos(); + + void compute(int, int); + + void settings(int, char **); + void init_style(); + double init_one(int, int); + + struct params_morse{ + KOKKOS_INLINE_FUNCTION + params_morse(){cutsq=0,d0=0;alpha=0;r0=0;offset=0;} + KOKKOS_INLINE_FUNCTION + params_morse(int i){cutsq=0,d0=0;alpha=0;r0=0;offset=0;} + F_FLOAT cutsq,d0,alpha,r0,offset; + }; + + protected: + void cleanup_copy(); + + template + KOKKOS_INLINE_FUNCTION + F_FLOAT compute_fpair(const F_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; + + template + KOKKOS_INLINE_FUNCTION + F_FLOAT compute_evdwl(const F_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const; + + template + KOKKOS_INLINE_FUNCTION + F_FLOAT compute_ecoul(const F_FLOAT& rsq, const int& i, const int&j, const int& itype, const int& jtype) const { + return 0; + } + + + Kokkos::DualView k_params; + typename Kokkos::DualView::t_dev_const_um params; + params_morse m_params[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; + F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; + typename ArrayTypes::t_x_array_randomread x; + typename ArrayTypes::t_x_array c_x; + typename ArrayTypes::t_f_array f; + typename ArrayTypes::t_int_1d_randomread type; + + DAT::tdual_efloat_1d k_eatom; + DAT::tdual_virial_array k_vatom; + typename ArrayTypes::t_efloat_1d d_eatom; + typename ArrayTypes::t_virial_array d_vatom; + typename ArrayTypes::t_tagint_1d tag; + + int newton_pair; + double special_lj[4]; + + typename ArrayTypes::tdual_ffloat_2d k_cutsq; + typename ArrayTypes::t_ffloat_2d d_cutsq; + + + int neighflag; + int nlocal,nall,eflag,vflag; + + void allocate(); + friend class PairComputeFunctor; + friend class PairComputeFunctor; + friend class PairComputeFunctor; + friend class PairComputeFunctor; + friend class PairComputeFunctor; + friend class PairComputeFunctor; + friend class PairComputeFunctor; + friend class PairComputeFunctor; + friend EV_FLOAT pair_compute_neighlist(PairMorseKokkos*,NeighListKokkos*); + friend EV_FLOAT pair_compute_neighlist(PairMorseKokkos*,NeighListKokkos*); + friend EV_FLOAT pair_compute_neighlist(PairMorseKokkos*,NeighListKokkos*); + friend EV_FLOAT pair_compute_neighlist(PairMorseKokkos*,NeighListKokkos*); + friend EV_FLOAT pair_compute(PairMorseKokkos*,NeighListKokkos*); + friend void pair_virial_fdotr_compute(PairMorseKokkos*); +}; + +} + +#endif +#endif + +/* ERROR/WARNING messages: + +E: Illegal ... command + +Self-explanatory. Check the input script syntax and compare to the +documentation for the command. You can use -echo screen as a +command-line option when running LAMMPS to see the offending line. + +E: Cannot use Kokkos pair style with rRESPA inner/middle + +Self-explanatory. + +E: Cannot use chosen neighbor list style with morse/kk + +That style is not supported by Kokkos. + +*/ diff -Naur lammps-26Jan17/src/KOKKOS/pair_reax_c_kokkos.cpp lammps-13Feb17/src/KOKKOS/pair_reax_c_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/pair_reax_c_kokkos.cpp 2016-12-13 16:27:33.803572000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_reax_c_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -1046,7 +1046,7 @@ const X_FLOAT ztmp = x(i,2); const F_FLOAT qi = q(i); const int itype = type(i); - const int itag = tag(i); + const tagint itag = tag(i); const int jnum = d_numneigh[i]; F_FLOAT fxtmp, fytmp, fztmp; @@ -1056,7 +1056,7 @@ int j = d_neighbors(i,jj); j &= NEIGHMASK; const int jtype = type(j); - const int jtag = tag(j); + const tagint jtag = tag(j); const F_FLOAT qj = q(j); if (NEIGHFLAG != FULL) { @@ -1201,7 +1201,7 @@ const X_FLOAT ztmp = x(i,2); const F_FLOAT qi = q(i); const int itype = type(i); - const int itag = tag(i); + const tagint itag = tag(i); const int jnum = d_numneigh[i]; F_FLOAT fxtmp, fytmp, fztmp; @@ -1211,7 +1211,7 @@ int j = d_neighbors(i,jj); j &= NEIGHMASK; const int jtype = type(j); - const int jtag = tag(j); + const tagint jtag = tag(j); const F_FLOAT qj = q(j); if (NEIGHFLAG != FULL) { @@ -1580,7 +1580,7 @@ const X_FLOAT ytmp = x(i,1); const X_FLOAT ztmp = x(i,2); const int itype = type(i); - const int itag = tag(i); + const tagint itag = tag(i); const int jnum = d_numneigh[i]; F_FLOAT C12, C34, C56, BO_s, BO_pi, BO_pi2, BO, delij[3], dBOp_i[3], dln_BOp_pi_i[3], dln_BOp_pi2_i[3]; @@ -1605,7 +1605,7 @@ for (int jj = 0; jj < jnum; jj++) { int j = d_neighbors(i,jj); j &= NEIGHMASK; - const int jtag = tag(j); + const tagint jtag = tag(j); d_bo_first[j] = j*maxbo; d_hb_first[j] = j*maxhb; @@ -1802,7 +1802,7 @@ const X_FLOAT ytmp = x(i,1); const X_FLOAT ztmp = x(i,2); const int itype = type(i); - const int itag = tag(i); + const tagint itag = tag(i); const int jnum = d_numneigh[i]; F_FLOAT C12, C34, C56, BO_s, BO_pi, BO_pi2, BO, delij[3]; @@ -1826,7 +1826,7 @@ for (int jj = 0; jj < jnum; jj++) { int j = d_neighbors(i,jj); j &= NEIGHMASK; - const int jtag = tag(j); + const tagint jtag = tag(j); d_bo_first[j] = j*maxbo; d_hb_first[j] = j*maxhb; @@ -2752,7 +2752,7 @@ const int i = d_ilist[ii]; const int itype = type(i); - const int itag = tag(i); + const tagint itag = tag(i); const X_FLOAT xtmp = x(i,0); const X_FLOAT ytmp = x(i,1); const X_FLOAT ztmp = x(i,2); @@ -2768,7 +2768,7 @@ for (int jj = j_start; jj < j_end; jj++) { int j = d_bo_list[jj]; j &= NEIGHMASK; - const int jtag = tag(j); + const tagint jtag = tag(j); const int jtype = type(j); const int j_index = jj - j_start; @@ -3113,7 +3113,7 @@ const X_FLOAT xtmp = x(i,0); const X_FLOAT ytmp = x(i,1); const X_FLOAT ztmp = x(i,2); - const int itag = tag(i); + const tagint itag = tag(i); const int j_start = d_bo_first[i]; const int j_end = j_start + d_bo_num[i]; @@ -3140,7 +3140,7 @@ for (int kk = k_start; kk < k_end; kk++) { int k = d_hb_list[kk]; k &= NEIGHMASK; - const int ktag = tag(k); + const tagint ktag = tag(k); const int ktype = type(k); delik[0] = x(k,0) - xtmp; @@ -3153,7 +3153,7 @@ const int jj = hblist[itr]; int j = d_bo_list[jj]; j &= NEIGHMASK; - const int jtag = tag(j); + const tagint jtag = tag(j); if (jtag == ktag) continue; const int jtype = type(j); @@ -3247,14 +3247,14 @@ Kokkos::View::value> > a_Cdbopi2 = d_Cdbopi2; const int i = d_ilist[ii]; - const int itag = tag(i); + const tagint itag = tag(i); const int j_start = d_bo_first[i]; const int j_end = j_start + d_bo_num[i]; for (int jj = j_start; jj < j_end; jj++) { int j = d_bo_list[jj]; j &= NEIGHMASK; - const int jtag = tag(j); + const tagint jtag = tag(j); const int j_index = jj - j_start; const F_FLOAT Cdbo_i = d_Cdbo(i,j_index); const F_FLOAT Cdbopi_i = d_Cdbopi(i,j_index); @@ -3302,7 +3302,7 @@ const X_FLOAT ytmp = x(i,1); const X_FLOAT ztmp = x(i,2); const int itype = type(i); - const int itag = tag(i); + const tagint itag = tag(i); const F_FLOAT imass = paramssing(itype).mass; const F_FLOAT val_i = paramssing(itype).valency; const int j_start = d_bo_first[i]; @@ -3313,7 +3313,7 @@ for (int jj = j_start; jj < j_end; jj++) { int j = d_bo_list[jj]; j &= NEIGHMASK; - const int jtag = tag(j); + const tagint jtag = tag(j); if (itag > jtag) { if ((itag+jtag) % 2 == 0) continue; @@ -3438,7 +3438,7 @@ const X_FLOAT ytmp = x(i,1); const X_FLOAT ztmp = x(i,2); const int itype = type(i); - const int itag = tag(i); + const tagint itag = tag(i); const F_FLOAT imass = paramssing(itype).mass; const F_FLOAT val_i = paramssing(itype).valency; const int j_start = d_bo_first[i]; @@ -3451,7 +3451,7 @@ for (int jj = j_start; jj < j_end; jj++) { int j = d_bo_list[jj]; j &= NEIGHMASK; - const int jtag = tag(j); + const tagint jtag = tag(j); if (itag > jtag) { if ((itag+jtag) % 2 == 0) continue; diff -Naur lammps-26Jan17/src/KOKKOS/pair_reax_c_kokkos.h lammps-13Feb17/src/KOKKOS/pair_reax_c_kokkos.h --- lammps-26Jan17/src/KOKKOS/pair_reax_c_kokkos.h 2016-10-31 18:22:36.727135000 -0600 +++ lammps-13Feb17/src/KOKKOS/pair_reax_c_kokkos.h 2017-02-03 14:45:56.983493000 -0700 @@ -392,7 +392,7 @@ typename AT::t_efloat_1d v_eatom; DAT::tdual_virial_array k_vatom; - DAT::t_virial_array d_vatom; + typename ArrayTypes::t_virial_array d_vatom; typename AT::t_virial_array v_vatom; HAT::t_virial_array h_vatom; @@ -414,9 +414,9 @@ typedef typename tdual_ffloat_2d_n7::t_dev_const_randomread t_ffloat_2d_n7_randomread; typedef typename tdual_ffloat_2d_n7::t_host t_host_ffloat_2d_n7; - typename ArrayTypes::t_neighbors_2d d_neighbors; - typename ArrayTypes::t_int_1d_randomread d_ilist; - typename ArrayTypes::t_int_1d_randomread d_numneigh; + typename AT::t_neighbors_2d d_neighbors; + typename AT::t_int_1d_randomread d_ilist; + typename AT::t_int_1d_randomread d_numneigh; typename AT::t_int_1d d_bo_first, d_bo_num, d_bo_list, d_hb_first, d_hb_num, d_hb_list; diff -Naur lammps-26Jan17/src/KOKKOS/pair_sw_kokkos.cpp lammps-13Feb17/src/KOKKOS/pair_sw_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/pair_sw_kokkos.cpp 2016-12-13 16:27:33.803572000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_sw_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -88,12 +88,12 @@ if (eflag_atom) { memory->destroy_kokkos(k_eatom,eatom); memory->create_kokkos(k_eatom,eatom,maxeatom,"pair:eatom"); - d_eatom = k_eatom.d_view; + d_eatom = k_eatom.view(); } if (vflag_atom) { memory->destroy_kokkos(k_vatom,vatom); memory->create_kokkos(k_vatom,vatom,maxvatom,6,"pair:vatom"); - d_vatom = k_vatom.d_view; + d_vatom = k_vatom.view(); } atomKK->sync(execution_space,datamask_read); @@ -171,8 +171,6 @@ virial[5] += ev_all.v[5]; } - if (vflag_fdotr) pair_virial_fdotr_compute(this); - if (eflag_atom) { k_eatom.template modify(); k_eatom.template sync(); @@ -183,6 +181,8 @@ k_vatom.template sync(); } + if (vflag_fdotr) pair_virial_fdotr_compute(this); + copymode = 0; } diff -Naur lammps-26Jan17/src/KOKKOS/pair_sw_kokkos.h lammps-13Feb17/src/KOKKOS/pair_sw_kokkos.h --- lammps-26Jan17/src/KOKKOS/pair_sw_kokkos.h 2016-10-28 12:42:43.947156000 -0600 +++ lammps-13Feb17/src/KOKKOS/pair_sw_kokkos.h 2017-02-03 14:45:56.983493000 -0700 @@ -118,23 +118,23 @@ void threebodyj(const Param&, const Param&, const Param&, const F_FLOAT&, const F_FLOAT&, F_FLOAT *, F_FLOAT *, F_FLOAT *) const; - typename ArrayTypes::t_x_array_randomread x; - typename ArrayTypes::t_f_array f; - typename ArrayTypes::t_tagint_1d tag; - typename ArrayTypes::t_int_1d_randomread type; + typename AT::t_x_array_randomread x; + typename AT::t_f_array f; + typename AT::t_tagint_1d tag; + typename AT::t_int_1d_randomread type; DAT::tdual_efloat_1d k_eatom; DAT::tdual_virial_array k_vatom; - DAT::t_efloat_1d d_eatom; - DAT::t_virial_array d_vatom; + typename ArrayTypes::t_efloat_1d d_eatom; + typename ArrayTypes::t_virial_array d_vatom; DAT::t_int_1d_randomread d_type2frho; DAT::t_int_2d_randomread d_type2rhor; DAT::t_int_2d_randomread d_type2z2r; - typename ArrayTypes::t_neighbors_2d d_neighbors; - typename ArrayTypes::t_int_1d_randomread d_ilist; - typename ArrayTypes::t_int_1d_randomread d_numneigh; + typename AT::t_neighbors_2d d_neighbors; + typename AT::t_int_1d_randomread d_ilist; + typename AT::t_int_1d_randomread d_numneigh; //NeighListKokkos k_list; int neighflag,newton_pair; diff -Naur lammps-26Jan17/src/KOKKOS/pair_table_kokkos.cpp lammps-13Feb17/src/KOKKOS/pair_table_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/pair_table_kokkos.cpp 2017-01-06 10:16:03.976787000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_table_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -12,7 +12,7 @@ ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- - Contributing author: Paul Crozier (SNL) + Contributing author: Christian Trott (SNL) ------------------------------------------------------------------------- */ #include @@ -89,6 +89,19 @@ if (eflag || vflag) ev_setup(eflag,vflag); else evflag = vflag_fdotr = 0; + // reallocate per-atom arrays if necessary + + if (eflag_atom) { + memory->destroy_kokkos(k_eatom,eatom); + memory->create_kokkos(k_eatom,eatom,maxeatom,"pair:eatom"); + d_eatom = k_eatom.view(); + } + if (vflag_atom) { + memory->destroy_kokkos(k_vatom,vatom); + memory->create_kokkos(k_vatom,vatom,maxvatom,6,"pair:vatom"); + d_vatom = k_vatom.view(); + } + atomKK->sync(execution_space,datamask_read); //k_cutsq.template sync(); //k_params.template sync(); @@ -165,7 +178,18 @@ virial[5] += ev.v[5]; } + if (eflag_atom) { + k_eatom.template modify(); + k_eatom.template sync(); + } + + if (vflag_atom) { + k_vatom.template modify(); + k_vatom.template sync(); + } + if (vflag_fdotr) pair_virial_fdotr_compute(this); + } template diff -Naur lammps-26Jan17/src/KOKKOS/pair_table_kokkos.h lammps-13Feb17/src/KOKKOS/pair_table_kokkos.h --- lammps-26Jan17/src/KOKKOS/pair_table_kokkos.h 2017-01-06 10:16:03.976787000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_table_kokkos.h 2017-02-03 14:45:56.983493000 -0700 @@ -44,6 +44,7 @@ enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF|N2}; enum {COUL_FLAG=0}; typedef DeviceType device_type; + typedef ArrayTypes AT; PairTableKokkos(class LAMMPS *); virtual ~PairTableKokkos(); @@ -62,27 +63,27 @@ protected: /*struct TableDeviceConst { - typename ArrayTypes::t_ffloat_2d_randomread cutsq; - typename ArrayTypes::t_int_2d_randomread tabindex; - typename ArrayTypes::t_int_1d_randomread nshiftbits,nmask; - typename ArrayTypes::t_ffloat_1d_randomread innersq,invdelta,deltasq6; - typename ArrayTypes::t_ffloat_2d_randomread rsq,drsq,e,de,f,df,e2,f2; + typename AT::t_ffloat_2d_randomread cutsq; + typename AT::t_int_2d_randomread tabindex; + typename AT::t_int_1d_randomread nshiftbits,nmask; + typename AT::t_ffloat_1d_randomread innersq,invdelta,deltasq6; + typename AT::t_ffloat_2d_randomread rsq,drsq,e,de,f,df,e2,f2; };*/ //Its faster not to use texture fetch if the number of tables is less than 32! struct TableDeviceConst { - typename ArrayTypes::t_ffloat_2d cutsq; - typename ArrayTypes::t_int_2d tabindex; - typename ArrayTypes::t_int_1d nshiftbits,nmask; - typename ArrayTypes::t_ffloat_1d innersq,invdelta,deltasq6; - typename ArrayTypes::t_ffloat_2d_randomread rsq,drsq,e,de,f,df,e2,f2; + typename AT::t_ffloat_2d cutsq; + typename AT::t_int_2d tabindex; + typename AT::t_int_1d nshiftbits,nmask; + typename AT::t_ffloat_1d innersq,invdelta,deltasq6; + typename AT::t_ffloat_2d_randomread rsq,drsq,e,de,f,df,e2,f2; }; struct TableDevice { - typename ArrayTypes::t_ffloat_2d cutsq; - typename ArrayTypes::t_int_2d tabindex; - typename ArrayTypes::t_int_1d nshiftbits,nmask; - typename ArrayTypes::t_ffloat_1d innersq,invdelta,deltasq6; - typename ArrayTypes::t_ffloat_2d rsq,drsq,e,de,f,df,e2,f2; + typename AT::t_ffloat_2d cutsq; + typename AT::t_int_2d tabindex; + typename AT::t_int_1d nshiftbits,nmask; + typename AT::t_ffloat_1d innersq,invdelta,deltasq6; + typename AT::t_ffloat_2d rsq,drsq,e,de,f,df,e2,f2; }; struct TableHost { @@ -99,17 +100,20 @@ F_FLOAT m_cutsq[MAX_TYPES_STACKPARAMS+1][MAX_TYPES_STACKPARAMS+1]; - typename ArrayTypes::t_ffloat_2d d_cutsq; + typename AT::t_ffloat_2d d_cutsq; virtual void allocate(); void compute_table(Table *); - typename ArrayTypes::t_x_array_randomread x; - typename ArrayTypes::t_x_array_const c_x; - typename ArrayTypes::t_f_array f; - typename ArrayTypes::t_int_1d_randomread type; - typename ArrayTypes::t_efloat_1d d_eatom; - typename ArrayTypes::t_virial_array d_vatom; + typename AT::t_x_array_randomread x; + typename AT::t_x_array_const c_x; + typename AT::t_f_array f; + typename AT::t_int_1d_randomread type; + + DAT::tdual_efloat_1d k_eatom; + DAT::tdual_virial_array k_vatom; + typename AT::t_efloat_1d d_eatom; + typename AT::t_virial_array d_vatom; protected: int nlocal,nall,eflag,vflag,neighflag,newton_pair; diff -Naur lammps-26Jan17/src/KOKKOS/pair_tersoff_kokkos.cpp lammps-13Feb17/src/KOKKOS/pair_tersoff_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/pair_tersoff_kokkos.cpp 2017-01-06 10:16:03.976787000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_tersoff_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -172,12 +172,12 @@ if (eflag_atom) { memory->destroy_kokkos(k_eatom,eatom); memory->create_kokkos(k_eatom,eatom,maxeatom,"pair:eatom"); - d_eatom = k_eatom.d_view; + d_eatom = k_eatom.view(); } if (vflag_atom) { memory->destroy_kokkos(k_vatom,vatom); memory->create_kokkos(k_vatom,vatom,maxvatom,6,"pair:vatom"); - d_vatom = k_vatom.d_view; + d_vatom = k_vatom.view(); } atomKK->sync(execution_space,datamask_read); @@ -254,8 +254,6 @@ virial[5] += ev_all.v[5]; } - if (vflag_fdotr) pair_virial_fdotr_compute(this); - if (eflag_atom) { k_eatom.template modify(); k_eatom.template sync(); @@ -266,6 +264,8 @@ k_vatom.template sync(); } + if (vflag_fdotr) pair_virial_fdotr_compute(this); + copymode = 0; } @@ -314,7 +314,7 @@ const X_FLOAT ytmp = x(i,1); const X_FLOAT ztmp = x(i,2); const int itype = type(i); - const int itag = tag(i); + const tagint itag = tag(i); F_FLOAT fi[3], fj[3], fk[3]; @@ -331,7 +331,7 @@ int j = d_neighbors_short(i,jj); j &= NEIGHMASK; const int jtype = type(j); - const int jtag = tag(j); + const tagint jtag = tag(j); if (itag > jtag) { if ((itag+jtag) % 2 == 0) continue; diff -Naur lammps-26Jan17/src/KOKKOS/pair_tersoff_kokkos.h lammps-13Feb17/src/KOKKOS/pair_tersoff_kokkos.h --- lammps-26Jan17/src/KOKKOS/pair_tersoff_kokkos.h 2017-01-06 10:16:03.976787000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_tersoff_kokkos.h 2017-02-03 14:45:56.983493000 -0700 @@ -197,16 +197,16 @@ DAT::tdual_efloat_1d k_eatom; DAT::tdual_virial_array k_vatom; - DAT::t_efloat_1d d_eatom; - DAT::t_virial_array d_vatom; + typename ArrayTypes::t_efloat_1d d_eatom; + typename ArrayTypes::t_virial_array d_vatom; typedef Kokkos::DualView tdual_ffloat_2d_n7; typedef typename tdual_ffloat_2d_n7::t_dev_const_randomread t_ffloat_2d_n7_randomread; typedef typename tdual_ffloat_2d_n7::t_host t_host_ffloat_2d_n7; - typename ArrayTypes::t_neighbors_2d d_neighbors; - typename ArrayTypes::t_int_1d_randomread d_ilist; - typename ArrayTypes::t_int_1d_randomread d_numneigh; + typename AT::t_neighbors_2d d_neighbors; + typename AT::t_int_1d_randomread d_ilist; + typename AT::t_int_1d_randomread d_numneigh; //NeighListKokkos k_list; int neighflag,newton_pair; diff -Naur lammps-26Jan17/src/KOKKOS/pair_tersoff_mod_kokkos.cpp lammps-13Feb17/src/KOKKOS/pair_tersoff_mod_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/pair_tersoff_mod_kokkos.cpp 2017-01-06 10:16:03.976787000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_tersoff_mod_kokkos.cpp 2017-02-10 09:24:27.989902000 -0700 @@ -172,12 +172,12 @@ if (eflag_atom) { memory->destroy_kokkos(k_eatom,eatom); memory->create_kokkos(k_eatom,eatom,maxeatom,"pair:eatom"); - d_eatom = k_eatom.d_view; + d_eatom = k_eatom.view(); } if (vflag_atom) { memory->destroy_kokkos(k_vatom,vatom); memory->create_kokkos(k_vatom,vatom,maxvatom,6,"pair:vatom"); - d_vatom = k_vatom.d_view; + d_vatom = k_vatom.view(); } atomKK->sync(execution_space,datamask_read); @@ -254,8 +254,6 @@ virial[5] += ev_all.v[5]; } - if (vflag_fdotr) pair_virial_fdotr_compute(this); - if (eflag_atom) { k_eatom.template modify(); k_eatom.template sync(); @@ -266,6 +264,8 @@ k_vatom.template sync(); } + if (vflag_fdotr) pair_virial_fdotr_compute(this); + copymode = 0; } @@ -314,7 +314,7 @@ const X_FLOAT ytmp = x(i,1); const X_FLOAT ztmp = x(i,2); const int itype = type(i); - const int itag = tag(i); + const tagint itag = tag(i); F_FLOAT fi[3], fj[3], fk[3]; @@ -331,7 +331,7 @@ int j = d_neighbors_short(i,jj); j &= NEIGHMASK; const int jtype = type(j); - const int jtag = tag(j); + const tagint jtag = tag(j); if (itag > jtag) { if ((itag+jtag) % 2 == 0) continue; diff -Naur lammps-26Jan17/src/KOKKOS/pair_tersoff_mod_kokkos.h lammps-13Feb17/src/KOKKOS/pair_tersoff_mod_kokkos.h --- lammps-26Jan17/src/KOKKOS/pair_tersoff_mod_kokkos.h 2017-01-06 10:16:03.976787000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_tersoff_mod_kokkos.h 2017-02-03 14:45:56.983493000 -0700 @@ -197,16 +197,16 @@ DAT::tdual_efloat_1d k_eatom; DAT::tdual_virial_array k_vatom; - DAT::t_efloat_1d d_eatom; - DAT::t_virial_array d_vatom; + typename ArrayTypes::t_efloat_1d d_eatom; + typename ArrayTypes::t_virial_array d_vatom; typedef Kokkos::DualView tdual_ffloat_2d_n7; typedef typename tdual_ffloat_2d_n7::t_dev_const_randomread t_ffloat_2d_n7_randomread; typedef typename tdual_ffloat_2d_n7::t_host t_host_ffloat_2d_n7; - typename ArrayTypes::t_neighbors_2d d_neighbors; - typename ArrayTypes::t_int_1d_randomread d_ilist; - typename ArrayTypes::t_int_1d_randomread d_numneigh; + typename AT::t_neighbors_2d d_neighbors; + typename AT::t_int_1d_randomread d_ilist; + typename AT::t_int_1d_randomread d_numneigh; //NeighListKokkos k_list; int neighflag,newton_pair; diff -Naur lammps-26Jan17/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp lammps-13Feb17/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp 2017-01-06 10:16:03.976787000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -186,12 +186,12 @@ if (eflag_atom) { memory->destroy_kokkos(k_eatom,eatom); memory->create_kokkos(k_eatom,eatom,maxeatom,"pair:eatom"); - d_eatom = k_eatom.d_view; + d_eatom = k_eatom.view(); } if (vflag_atom) { memory->destroy_kokkos(k_vatom,vatom); memory->create_kokkos(k_vatom,vatom,maxvatom,6,"pair:vatom"); - d_vatom = k_vatom.d_view; + d_vatom = k_vatom.view(); } atomKK->sync(execution_space,datamask_read); @@ -268,8 +268,6 @@ virial[5] += ev_all.v[5]; } - if (vflag_fdotr) pair_virial_fdotr_compute(this); - if (eflag_atom) { k_eatom.template modify(); k_eatom.template sync(); @@ -280,6 +278,8 @@ k_vatom.template sync(); } + if (vflag_fdotr) pair_virial_fdotr_compute(this); + copymode = 0; } @@ -328,7 +328,7 @@ const X_FLOAT ytmp = x(i,1); const X_FLOAT ztmp = x(i,2); const int itype = type(i); - const int itag = tag(i); + const tagint itag = tag(i); F_FLOAT fi[3], fj[3], fk[3]; @@ -345,7 +345,7 @@ int j = d_neighbors_short(i,jj); j &= NEIGHMASK; const int jtype = type(j); - const int jtag = tag(j); + const tagint jtag = tag(j); if (itag > jtag) { if ((itag+jtag) % 2 == 0) continue; diff -Naur lammps-26Jan17/src/KOKKOS/pair_tersoff_zbl_kokkos.h lammps-13Feb17/src/KOKKOS/pair_tersoff_zbl_kokkos.h --- lammps-26Jan17/src/KOKKOS/pair_tersoff_zbl_kokkos.h 2017-01-06 10:16:03.976787000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_tersoff_zbl_kokkos.h 2017-02-03 14:45:56.983493000 -0700 @@ -202,8 +202,8 @@ DAT::tdual_efloat_1d k_eatom; DAT::tdual_virial_array k_vatom; - DAT::t_efloat_1d d_eatom; - DAT::t_virial_array d_vatom; + typename ArrayTypes::t_efloat_1d d_eatom; + typename ArrayTypes::t_virial_array d_vatom; typedef Kokkos::DualView tdual_ffloat_2d_n7; typedef typename tdual_ffloat_2d_n7::t_dev_const_randomread t_ffloat_2d_n7_randomread; diff -Naur lammps-26Jan17/src/KOKKOS/pair_vashishta_kokkos.cpp lammps-13Feb17/src/KOKKOS/pair_vashishta_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/pair_vashishta_kokkos.cpp 2016-11-17 09:06:01.269535000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_vashishta_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -12,8 +12,7 @@ ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- - Contributing author: Stan Moore (SNL) - Anders Hafreager (UiO), andershaf@gmail.com + Contributing author: Anders Hafreager (UiO), andershaf@gmail.com ------------------------------------------------------------------------- */ #include @@ -88,12 +87,12 @@ if (eflag_atom) { memory->destroy_kokkos(k_eatom,eatom); memory->create_kokkos(k_eatom,eatom,maxeatom,"pair:eatom"); - d_eatom = k_eatom.d_view; + d_eatom = k_eatom.view(); } if (vflag_atom) { memory->destroy_kokkos(k_vatom,vatom); memory->create_kokkos(k_vatom,vatom,maxvatom,6,"pair:vatom"); - d_vatom = k_vatom.d_view; + d_vatom = k_vatom.view(); } atomKK->sync(execution_space,datamask_read); @@ -182,8 +181,6 @@ virial[5] += ev_all.v[5]; } - if (vflag_fdotr) pair_virial_fdotr_compute(this); - if (eflag_atom) { k_eatom.template modify(); k_eatom.template sync(); @@ -194,6 +191,8 @@ k_vatom.template sync(); } + if (vflag_fdotr) pair_virial_fdotr_compute(this); + copymode = 0; } diff -Naur lammps-26Jan17/src/KOKKOS/pair_vashishta_kokkos.h lammps-13Feb17/src/KOKKOS/pair_vashishta_kokkos.h --- lammps-26Jan17/src/KOKKOS/pair_vashishta_kokkos.h 2016-11-17 09:06:01.269535000 -0700 +++ lammps-13Feb17/src/KOKKOS/pair_vashishta_kokkos.h 2017-02-03 14:45:56.983493000 -0700 @@ -118,23 +118,23 @@ void threebodyj(const Param&, const Param&, const Param&, const F_FLOAT&, const F_FLOAT&, F_FLOAT *, F_FLOAT *, F_FLOAT *) const; - typename ArrayTypes::t_x_array_randomread x; - typename ArrayTypes::t_f_array f; - typename ArrayTypes::t_tagint_1d tag; - typename ArrayTypes::t_int_1d_randomread type; + typename AT::t_x_array_randomread x; + typename AT::t_f_array f; + typename AT::t_tagint_1d tag; + typename AT::t_int_1d_randomread type; DAT::tdual_efloat_1d k_eatom; DAT::tdual_virial_array k_vatom; - DAT::t_efloat_1d d_eatom; - DAT::t_virial_array d_vatom; + typename ArrayTypes::t_efloat_1d d_eatom; + typename ArrayTypes::t_virial_array d_vatom; DAT::t_int_1d_randomread d_type2frho; DAT::t_int_2d_randomread d_type2rhor; DAT::t_int_2d_randomread d_type2z2r; - typename ArrayTypes::t_neighbors_2d d_neighbors; - typename ArrayTypes::t_int_1d_randomread d_ilist; - typename ArrayTypes::t_int_1d_randomread d_numneigh; + typename AT::t_neighbors_2d d_neighbors; + typename AT::t_int_1d_randomread d_ilist; + typename AT::t_int_1d_randomread d_numneigh; //NeighListKokkos k_list; int neighflag,newton_pair; diff -Naur lammps-26Jan17/src/KOKKOS/pppm_kokkos.cpp lammps-13Feb17/src/KOKKOS/pppm_kokkos.cpp --- lammps-26Jan17/src/KOKKOS/pppm_kokkos.cpp 2016-09-01 14:53:40.250187000 -0600 +++ lammps-13Feb17/src/KOKKOS/pppm_kokkos.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -374,7 +374,6 @@ error->all(FLERR,"Incorrect boundaries with slab PPPM"); } - int i,j,k,n; double *prd; // volume-dependent factors @@ -417,10 +416,6 @@ DeviceType::fence(); copymode = 0; - // virial coefficients - - double sqk,vterm; - // merge three outer loops into one for better threading numz_fft = nzhi_fft-nzlo_fft + 1; @@ -615,7 +610,7 @@ template void PPPMKokkos::compute(int eflag, int vflag) { - int i,j; + int i; // set energy/virial flags // invoke allocate_peratom() if needed for first time @@ -646,10 +641,7 @@ x = atomKK->k_x.view(); f = atomKK->k_f.view(); q = atomKK->k_q.view(); - - atomKK->sync(execution_space,datamask_read); - atomKK->modified(execution_space,datamask_modify); - + //nlocal = atomKK->nlocal; //nall = atomKK->nlocal + atomKK->nghost; //newton_pair = force->newton_pair; @@ -977,7 +969,6 @@ // fluid-occupied volume used to estimate real-space error // zprd used rather than zprd_slab - double h; bigint natoms = atomKK->natoms; if (!gewaldflag) { @@ -1639,9 +1630,6 @@ template void PPPMKokkos::make_rho() { - int l,m,n,nx,ny,nz,mx,my,mz; - FFT_SCALAR dx,dy,dz,x0,y0,z0; - // clear 3d density array //memset(&(density_brick(nzlo_out,nylo_out,nxlo_out)),0, @@ -1848,8 +1836,7 @@ template void PPPMKokkos::poisson_ik() { - int i,j,k,n; - double eng; + int j; // transform charge density (r -> k) @@ -1880,7 +1867,6 @@ for (j = 0; j < 6; j++) virial[j] += ev.v[j]; energy += ev.ecoul; } else { - n = 0; copymode = 1; Kokkos::parallel_reduce(Kokkos::RangePolicy(0,nfft),*this,ev); DeviceType::fence(); @@ -2217,8 +2203,6 @@ template void PPPMKokkos::poisson_peratom() { - int i,j,k,n; - // merge three outer loops into one for better threading numz_inout = (nzhi_in-nzlo_out)-(nzlo_in-nzlo_out) + 1; @@ -2570,22 +2554,17 @@ void PPPMKokkos::operator()(TagPPPM_fieldforce_ik, const int &i) const { int l,m,n,nx,ny,nz,mx,my,mz; - FFT_SCALAR dx,dy,dz,x0,y0,z0; + FFT_SCALAR x0,y0,z0; FFT_SCALAR ekx,eky,ekz; nx = d_part2grid(i,0); ny = d_part2grid(i,1); nz = d_part2grid(i,2); - dx = nx+shiftone - (x(i,0)-boxlo[0])*delxinv; - dy = ny+shiftone - (x(i,1)-boxlo[1])*delyinv; - dz = nz+shiftone - (x(i,2)-boxlo[2])*delzinv; nz -= nzlo_out; ny -= nylo_out; nx -= nxlo_out; - //compute_rho1d(i,dx,dy,dz); // hasn't changed from make_rho - ekx = eky = ekz = ZEROF; for (n = nlower; n <= nupper; n++) { mz = n+nz; @@ -2845,8 +2824,8 @@ d_list_index = Kokkos::subview(d_list,index,Kokkos::ALL()); d_buf = k_buf.view(); - int nx = (nxhi_out-nxlo_out+1); - int ny = (nyhi_out-nylo_out+1); + nx = (nxhi_out-nxlo_out+1); + ny = (nyhi_out-nylo_out+1); copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,nlist),*this); @@ -3015,7 +2994,6 @@ // sum local contributions to get global dipole moment - dipole_all; MPI_Allreduce(&dipole,&dipole_all,1,MPI_DOUBLE,MPI_SUM,world); // need to make non-neutral systems and/or diff -Naur lammps-26Jan17/src/KSPACE/fft3d.cpp lammps-13Feb17/src/KSPACE/fft3d.cpp --- lammps-26Jan17/src/KSPACE/fft3d.cpp 2015-10-30 14:04:06.703402000 -0600 +++ lammps-13Feb17/src/KSPACE/fft3d.cpp 2017-02-13 08:57:42.734794000 -0700 @@ -67,28 +67,18 @@ void fft_3d(FFT_DATA *in, FFT_DATA *out, int flag, struct fft_plan_3d *plan) { int i,total,length,offset,num; - FFT_SCALAR norm, *out_ptr; + FFT_SCALAR norm; +#if defined(FFT_FFTW3) + FFT_SCALAR *out_ptr; +#endif FFT_DATA *data,*copy; // system specific constants -#if defined(FFT_SCSL) - int isys = 0; - FFT_PREC scalef = 1.0; -#elif defined(FFT_DEC) - char c = 'C'; - char f = 'F'; - char b = 'B'; - int one = 1; -#elif defined(FFT_T3E) - int isys = 0; - double scalef = 1.0; -#elif defined(FFT_ACML) - int info; -#elif defined(FFT_FFTW3) +#if defined(FFT_FFTW3) FFTW_API(plan) theplan; #else - // nothing to do for other FFTs. + // nothing to do for other FFTs #endif // pre-remap to prepare for 1st FFTs if needed @@ -97,8 +87,8 @@ if (plan->pre_plan) { if (plan->pre_target == 0) copy = out; else copy = plan->copy; - remap_3d((FFT_SCALAR *) in, (FFT_SCALAR *) copy, (FFT_SCALAR *) plan->scratch, - plan->pre_plan); + remap_3d((FFT_SCALAR *) in, (FFT_SCALAR *) copy, + (FFT_SCALAR *) plan->scratch, plan->pre_plan); data = copy; } else @@ -109,35 +99,11 @@ total = plan->total1; length = plan->length1; -#if defined(FFT_SGI) - for (offset = 0; offset < total; offset += length) - FFT_1D(flag,length,&data[offset],1,plan->coeff1); -#elif defined(FFT_SCSL) - for (offset = 0; offset < total; offset += length) - FFT_1D(flag,length,scalef,&data[offset],&data[offset],plan->coeff1, - plan->work1,&isys); -#elif defined(FFT_ACML) - num=total/length; - FFT_1D(&flag,&num,&length,data,plan->coeff1,&info); -#elif defined(FFT_INTEL) - for (offset = 0; offset < total; offset += length) - FFT_1D(&data[offset],&length,&flag,plan->coeff1); -#elif defined(FFT_MKL) +#if defined(FFT_MKL) if (flag == -1) DftiComputeForward(plan->handle_fast,data); else DftiComputeBackward(plan->handle_fast,data); -#elif defined(FFT_DEC) - if (flag == -1) - for (offset = 0; offset < total; offset += length) - FFT_1D(&c,&c,&f,&data[offset],&data[offset],&length,&one); - else - for (offset = 0; offset < total; offset += length) - FFT_1D(&c,&c,&b,&data[offset],&data[offset],&length,&one); -#elif defined(FFT_T3E) - for (offset = 0; offset < total; offset += length) - FFT_1D(&flag,&length,&scalef,&data[offset],&data[offset],plan->coeff1, - plan->work1,&isys); #elif defined(FFT_FFTW2) if (flag == -1) fftw(plan->plan_fast_forward,total/length,data,1,length,NULL,0,0); @@ -163,8 +129,8 @@ if (plan->mid1_target == 0) copy = out; else copy = plan->copy; - remap_3d((FFT_SCALAR *) data, (FFT_SCALAR *) copy, (FFT_SCALAR *) plan->scratch, - plan->mid1_plan); + remap_3d((FFT_SCALAR *) data, (FFT_SCALAR *) copy, + (FFT_SCALAR *) plan->scratch, plan->mid1_plan); data = copy; // 1d FFTs along mid axis @@ -172,35 +138,11 @@ total = plan->total2; length = plan->length2; -#if defined(FFT_SGI) - for (offset = 0; offset < total; offset += length) - FFT_1D(flag,length,&data[offset],1,plan->coeff2); -#elif defined(FFT_SCSL) - for (offset = 0; offset < total; offset += length) - FFT_1D(flag,length,scalef,&data[offset],&data[offset],plan->coeff2, - plan->work2,&isys); -#elif defined(FFT_ACML) - num=total/length; - FFT_1D(&flag,&num,&length,data,plan->coeff2,&info); -#elif defined(FFT_INTEL) - for (offset = 0; offset < total; offset += length) - FFT_1D(&data[offset],&length,&flag,plan->coeff2); -#elif defined(FFT_MKL) +#if defined(FFT_MKL) if (flag == -1) DftiComputeForward(plan->handle_mid,data); else DftiComputeBackward(plan->handle_mid,data); -#elif defined(FFT_DEC) - if (flag == -1) - for (offset = 0; offset < total; offset += length) - FFT_1D(&c,&c,&f,&data[offset],&data[offset],&length,&one); - else - for (offset = 0; offset < total; offset += length) - FFT_1D(&c,&c,&b,&data[offset],&data[offset],&length,&one); -#elif defined(FFT_T3E) - for (offset = 0; offset < total; offset += length) - FFT_1D(&flag,&length,&scalef,&data[offset],&data[offset],plan->coeff2, - plan->work2,&isys); #elif defined(FFT_FFTW2) if (flag == -1) fftw(plan->plan_mid_forward,total/length,data,1,length,NULL,0,0); @@ -226,8 +168,8 @@ if (plan->mid2_target == 0) copy = out; else copy = plan->copy; - remap_3d((FFT_SCALAR *) data, (FFT_SCALAR *) copy, (FFT_SCALAR *) plan->scratch, - plan->mid2_plan); + remap_3d((FFT_SCALAR *) data, (FFT_SCALAR *) copy, + (FFT_SCALAR *) plan->scratch, plan->mid2_plan); data = copy; // 1d FFTs along slow axis @@ -235,35 +177,11 @@ total = plan->total3; length = plan->length3; -#if defined(FFT_SGI) - for (offset = 0; offset < total; offset += length) - FFT_1D(flag,length,&data[offset],1,plan->coeff3); -#elif defined(FFT_SCSL) - for (offset = 0; offset < total; offset += length) - FFT_1D(flag,length,scalef,&data[offset],&data[offset],plan->coeff3, - plan->work3,&isys); -#elif defined(FFT_ACML) - num=total/length; - FFT_1D(&flag,&num,&length,data,plan->coeff3,&info); -#elif defined(FFT_INTEL) - for (offset = 0; offset < total; offset += length) - FFT_1D(&data[offset],&length,&flag,plan->coeff3); -#elif defined(FFT_MKL) +#if defined(FFT_MKL) if (flag == -1) DftiComputeForward(plan->handle_slow,data); else DftiComputeBackward(plan->handle_slow,data); -#elif defined(FFT_DEC) - if (flag == -1) - for (offset = 0; offset < total; offset += length) - FFT_1D(&c,&c,&f,&data[offset],&data[offset],&length,&one); - else - for (offset = 0; offset < total; offset += length) - FFT_1D(&c,&c,&b,&data[offset],&data[offset],&length,&one); -#elif defined(FFT_T3E) - for (offset = 0; offset < total; offset += length) - FFT_1D(&flag,&length,&scalef,&data[offset],&data[offset],plan->coeff3, - plan->work3,&isys); #elif defined(FFT_FFTW2) if (flag == -1) fftw(plan->plan_slow_forward,total/length,data,1,length,NULL,0,0); @@ -288,15 +206,16 @@ // destination is always out if (plan->post_plan) - remap_3d((FFT_SCALAR *) data, (FFT_SCALAR *) out, (FFT_SCALAR *) plan->scratch, - plan->post_plan); + remap_3d((FFT_SCALAR *) data, (FFT_SCALAR *) out, + (FFT_SCALAR *) plan->scratch, plan->post_plan); // scaling if required -#if !defined(FFT_T3E) && !defined(FFT_ACML) if (flag == 1 && plan->scaled) { norm = plan->norm; num = plan->normnum; +#if defined(FFT_FFTW3) out_ptr = (FFT_SCALAR *)out; +#endif for (i = 0; i < num; i++) { #if defined(FFT_FFTW3) *(out_ptr++) *= norm; @@ -309,25 +228,6 @@ #endif } } -#endif - -#ifdef FFT_T3E - if (flag == 1 && plan->scaled) { - norm = plan->norm; - num = plan->normnum; - for (i = 0; i < num; i++) out[i] *= (norm,norm); - } -#endif - -#ifdef FFT_ACML - norm = plan->norm; - num = plan->normnum; - for (i = 0; i < num; i++) { - out[i].re *= norm; - out[i].im *= norm; - } -#endif - } /* ---------------------------------------------------------------------- @@ -361,30 +261,12 @@ { struct fft_plan_3d *plan; int me,nprocs; - int i,num,flag,remapflag,fftflag; + int flag,remapflag; int first_ilo,first_ihi,first_jlo,first_jhi,first_klo,first_khi; int second_ilo,second_ihi,second_jlo,second_jhi,second_klo,second_khi; int third_ilo,third_ihi,third_jlo,third_jhi,third_klo,third_khi; int out_size,first_size,second_size,third_size,copy_size,scratch_size; int np1,np2,ip1,ip2; - int list[50]; - - // system specific variables - -#ifdef FFT_SCSL - FFT_DATA dummy_d[5]; - FFT_PREC dummy_p[5]; - int isign,isys; - FFT_PREC scalef; -#endif -#ifdef FFT_INTEL - FFT_DATA dummy; -#endif -#ifdef FFT_T3E - FFT_DATA dummy[5]; - int isign,isys; - double scalef; -#endif // query MPI info @@ -421,8 +303,7 @@ first_klo = in_klo; first_khi = in_khi; plan->pre_plan = NULL; - } - else { + } else { first_ilo = 0; first_ihi = nfast - 1; first_jlo = ip1*nmid/np1; @@ -456,7 +337,8 @@ first_ilo,first_ihi,first_jlo,first_jhi, first_klo,first_khi, second_ilo,second_ihi,second_jlo,second_jhi, - second_klo,second_khi,2,1,0,FFT_PRECISION,usecollective); + second_klo,second_khi,2,1,0,FFT_PRECISION, + usecollective); if (plan->mid1_plan == NULL) return NULL; // 1d FFTs along mid axis @@ -483,8 +365,7 @@ third_jhi = out_jhi; third_klo = out_klo; third_khi = out_khi; - } - else { + } else { third_ilo = ip1*nfast/np1; third_ihi = (ip1+1)*nfast/np1 - 1; third_jlo = ip2*nmid/np2; @@ -533,7 +414,8 @@ // configure plan memory pointers and allocate work space // out_size = amount of memory given to FFT by user - // first/second/third_size = amount of memory needed after pre,mid1,mid2 remaps + // first/second/third_size = + // amount of memory needed after pre,mid1,mid2 remaps // copy_size = amount needed internally for extra copy of data // scratch_size = amount needed internally for remap scratch space // for each remap: @@ -601,152 +483,29 @@ // system specific pre-computation of 1d FFT coeffs // and scaling normalization -#if defined(FFT_SGI) - - plan->coeff1 = (FFT_DATA *) malloc((nfast+15)*sizeof(FFT_DATA)); - plan->coeff2 = (FFT_DATA *) malloc((nmid+15)*sizeof(FFT_DATA)); - plan->coeff3 = (FFT_DATA *) malloc((nslow+15)*sizeof(FFT_DATA)); - - if (plan->coeff1 == NULL || plan->coeff2 == NULL || - plan->coeff3 == NULL) return NULL; - - FFT_1D_INIT(nfast,plan->coeff1); - FFT_1D_INIT(nmid,plan->coeff2); - FFT_1D_INIT(nslow,plan->coeff3); - - if (scaled == 0) - plan->scaled = 0; - else { - plan->scaled = 1; - plan->norm = 1.0/(nfast*nmid*nslow); - plan->normnum = (out_ihi-out_ilo+1) * (out_jhi-out_jlo+1) * - (out_khi-out_klo+1); - } - -#elif defined(FFT_SCSL) - - plan->coeff1 = (FFT_PREC *) malloc((2*nfast+30)*sizeof(FFT_PREC)); - plan->coeff2 = (FFT_PREC *) malloc((2*nmid+30)*sizeof(FFT_PREC)); - plan->coeff3 = (FFT_PREC *) malloc((2*nslow+30)*sizeof(FFT_PREC)); - - if (plan->coeff1 == NULL || plan->coeff2 == NULL || - plan->coeff3 == NULL) return NULL; - - plan->work1 = (FFT_PREC *) malloc((2*nfast)*sizeof(FFT_PREC)); - plan->work2 = (FFT_PREC *) malloc((2*nmid)*sizeof(FFT_PREC)); - plan->work3 = (FFT_PREC *) malloc((2*nslow)*sizeof(FFT_PREC)); - - if (plan->work1 == NULL || plan->work2 == NULL || - plan->work3 == NULL) return NULL; - - isign = 0; - scalef = 1.0; - isys = 0; - - FFT_1D_INIT(isign,nfast,scalef,dummy_d,dummy_d,plan->coeff1,dummy_p,&isys); - FFT_1D_INIT(isign,nmid,scalef,dummy_d,dummy_d,plan->coeff2,dummy_p,&isys); - FFT_1D_INIT(isign,nslow,scalef,dummy_d,dummy_d,plan->coeff3,dummy_p,&isys); - - if (scaled == 0) - plan->scaled = 0; - else { - plan->scaled = 1; - plan->norm = 1.0/(nfast*nmid*nslow); - plan->normnum = (out_ihi-out_ilo+1) * (out_jhi-out_jlo+1) * - (out_khi-out_klo+1); - } - -#elif defined(FFT_ACML) - - plan->coeff1 = (FFT_DATA *) malloc((3*nfast+100)*sizeof(FFT_DATA)); - plan->coeff2 = (FFT_DATA *) malloc((3*nmid+100)*sizeof(FFT_DATA)); - plan->coeff3 = (FFT_DATA *) malloc((3*nslow+100)*sizeof(FFT_DATA)); - - if (plan->coeff1 == NULL || plan->coeff2 == NULL || - plan->coeff3 == NULL) return NULL; - - int isign = 100; - int isys = 1; - int info = 0; - FFT_DATA *dummy = NULL; - - FFT_1D(&isign,&isys,&nfast,dummy,plan->coeff1,&info); - FFT_1D(&isign,&isys,&nmid,dummy,plan->coeff2,&info); - FFT_1D(&isign,&isys,&nslow,dummy,plan->coeff3,&info); - - if (scaled == 0) { - plan->scaled = 0; - plan->norm = sqrt(nfast*nmid*nslow); - plan->normnum = (out_ihi-out_ilo+1) * (out_jhi-out_jlo+1) * - (out_khi-out_klo+1); - } else { - plan->scaled = 1; - plan->norm = sqrt(nfast*nmid*nslow); - plan->normnum = (out_ihi-out_ilo+1) * (out_jhi-out_jlo+1) * - (out_khi-out_klo+1); - } - -#elif defined(FFT_INTEL) - - flag = 0; - - num = 0; - factor(nfast,&num,list); - for (i = 0; i < num; i++) - if (list[i] != 2 && list[i] != 3 && list[i] != 5) flag = 1; - num = 0; - factor(nmid,&num,list); - for (i = 0; i < num; i++) - if (list[i] != 2 && list[i] != 3 && list[i] != 5) flag = 1; - num = 0; - factor(nslow,&num,list); - for (i = 0; i < num; i++) - if (list[i] != 2 && list[i] != 3 && list[i] != 5) flag = 1; - - MPI_Allreduce(&flag,&fftflag,1,MPI_INT,MPI_MAX,comm); - if (fftflag) { - if (me == 0) printf("ERROR: FFTs are not power of 2,3,5\n"); - return NULL; - } - - plan->coeff1 = (FFT_DATA *) malloc((3*nfast/2+1)*sizeof(FFT_DATA)); - plan->coeff2 = (FFT_DATA *) malloc((3*nmid/2+1)*sizeof(FFT_DATA)); - plan->coeff3 = (FFT_DATA *) malloc((3*nslow/2+1)*sizeof(FFT_DATA)); - - if (plan->coeff1 == NULL || plan->coeff2 == NULL || - plan->coeff3 == NULL) return NULL; - - flag = 0; - FFT_1D_INIT(&dummy,&nfast,&flag,plan->coeff1); - FFT_1D_INIT(&dummy,&nmid,&flag,plan->coeff2); - FFT_1D_INIT(&dummy,&nslow,&flag,plan->coeff3); - - if (scaled == 0) { - plan->scaled = 1; - plan->norm = nfast*nmid*nslow; - plan->normnum = (out_ihi-out_ilo+1) * (out_jhi-out_jlo+1) * - (out_khi-out_klo+1); - } - else - plan->scaled = 0; - -#elif defined(FFT_MKL) - DftiCreateDescriptor( &(plan->handle_fast), FFT_MKL_PREC, DFTI_COMPLEX, 1, (MKL_LONG)nfast); - DftiSetValue(plan->handle_fast, DFTI_NUMBER_OF_TRANSFORMS, (MKL_LONG)plan->total1/nfast); +#if defined(FFT_MKL) + DftiCreateDescriptor( &(plan->handle_fast), FFT_MKL_PREC, DFTI_COMPLEX, 1, + (MKL_LONG)nfast); + DftiSetValue(plan->handle_fast, DFTI_NUMBER_OF_TRANSFORMS, + (MKL_LONG)plan->total1/nfast); DftiSetValue(plan->handle_fast, DFTI_PLACEMENT,DFTI_INPLACE); DftiSetValue(plan->handle_fast, DFTI_INPUT_DISTANCE, (MKL_LONG)nfast); DftiSetValue(plan->handle_fast, DFTI_OUTPUT_DISTANCE, (MKL_LONG)nfast); DftiCommitDescriptor(plan->handle_fast); - DftiCreateDescriptor( &(plan->handle_mid), FFT_MKL_PREC, DFTI_COMPLEX, 1, (MKL_LONG)nmid); - DftiSetValue(plan->handle_mid, DFTI_NUMBER_OF_TRANSFORMS, (MKL_LONG)plan->total2/nmid); + DftiCreateDescriptor( &(plan->handle_mid), FFT_MKL_PREC, DFTI_COMPLEX, 1, + (MKL_LONG)nmid); + DftiSetValue(plan->handle_mid, DFTI_NUMBER_OF_TRANSFORMS, + (MKL_LONG)plan->total2/nmid); DftiSetValue(plan->handle_mid, DFTI_PLACEMENT,DFTI_INPLACE); DftiSetValue(plan->handle_mid, DFTI_INPUT_DISTANCE, (MKL_LONG)nmid); DftiSetValue(plan->handle_mid, DFTI_OUTPUT_DISTANCE, (MKL_LONG)nmid); DftiCommitDescriptor(plan->handle_mid); - DftiCreateDescriptor( &(plan->handle_slow), FFT_MKL_PREC, DFTI_COMPLEX, 1, (MKL_LONG)nslow); - DftiSetValue(plan->handle_slow, DFTI_NUMBER_OF_TRANSFORMS, (MKL_LONG)plan->total3/nslow); + DftiCreateDescriptor( &(plan->handle_slow), FFT_MKL_PREC, DFTI_COMPLEX, 1, + (MKL_LONG)nslow); + DftiSetValue(plan->handle_slow, DFTI_NUMBER_OF_TRANSFORMS, + (MKL_LONG)plan->total3/nslow); DftiSetValue(plan->handle_slow, DFTI_PLACEMENT,DFTI_INPLACE); DftiSetValue(plan->handle_slow, DFTI_INPUT_DISTANCE, (MKL_LONG)nslow); DftiSetValue(plan->handle_slow, DFTI_OUTPUT_DISTANCE, (MKL_LONG)nslow); @@ -761,50 +520,6 @@ (out_khi-out_klo+1); } -#elif defined(FFT_DEC) - - if (scaled == 0) { - plan->scaled = 1; - plan->norm = nfast*nmid*nslow; - plan->normnum = (out_ihi-out_ilo+1) * (out_jhi-out_jlo+1) * - (out_khi-out_klo+1); - } - else - plan->scaled = 0; - -#elif defined(FFT_T3E) - - plan->coeff1 = (double *) malloc((12*nfast)*sizeof(double)); - plan->coeff2 = (double *) malloc((12*nmid)*sizeof(double)); - plan->coeff3 = (double *) malloc((12*nslow)*sizeof(double)); - - if (plan->coeff1 == NULL || plan->coeff2 == NULL || - plan->coeff3 == NULL) return NULL; - - plan->work1 = (double *) malloc((8*nfast)*sizeof(double)); - plan->work2 = (double *) malloc((8*nmid)*sizeof(double)); - plan->work3 = (double *) malloc((8*nslow)*sizeof(double)); - - if (plan->work1 == NULL || plan->work2 == NULL || - plan->work3 == NULL) return NULL; - - isign = 0; - scalef = 1.0; - isys = 0; - - FFT_1D_INIT(&isign,&nfast,&scalef,dummy,dummy,plan->coeff1,dummy,&isys); - FFT_1D_INIT(&isign,&nmid,&scalef,dummy,dummy,plan->coeff2,dummy,&isys); - FFT_1D_INIT(&isign,&nslow,&scalef,dummy,dummy,plan->coeff3,dummy,&isys); - - if (scaled == 0) - plan->scaled = 0; - else { - plan->scaled = 1; - plan->norm = 1.0/(nfast*nmid*nslow); - plan->normnum = (out_ihi-out_ilo+1) * (out_jhi-out_jlo+1) * - (out_khi-out_klo+1); - } - #elif defined(FFT_FFTW2) plan->plan_fast_forward = @@ -941,36 +656,10 @@ if (plan->copy) free(plan->copy); if (plan->scratch) free(plan->scratch); -#if defined(FFT_SGI) - free(plan->coeff1); - free(plan->coeff2); - free(plan->coeff3); -#elif defined(FFT_SCSL) - free(plan->coeff1); - free(plan->coeff2); - free(plan->coeff3); - free(plan->work1); - free(plan->work2); - free(plan->work3); -#elif defined(FFT_ACML) - free(plan->coeff1); - free(plan->coeff2); - free(plan->coeff3); -#elif defined(FFT_INTEL) - free(plan->coeff1); - free(plan->coeff2); - free(plan->coeff3); -#elif defined(FFT_MKL) +#if defined(FFT_MKL) DftiFreeDescriptor(&(plan->handle_fast)); DftiFreeDescriptor(&(plan->handle_mid)); DftiFreeDescriptor(&(plan->handle_slow)); -#elif defined(FFT_T3E) - free(plan->coeff1); - free(plan->coeff2); - free(plan->coeff3); - free(plan->work1); - free(plan->work2); - free(plan->work3); #elif defined(FFT_FFTW2) if (plan->plan_slow_forward != plan->plan_fast_forward && plan->plan_slow_forward != plan->plan_mid_forward) { @@ -1015,38 +704,31 @@ { if (n == 1) { return; - } - else if (n % 2 == 0) { + } else if (n % 2 == 0) { *list = 2; (*num)++; factor(n/2,num,list+1); - } - else if (n % 3 == 0) { + } else if (n % 3 == 0) { *list = 3; (*num)++; factor(n/3,num,list+1); - } - else if (n % 5 == 0) { + } else if (n % 5 == 0) { *list = 5; (*num)++; factor(n/5,num,list+1); - } - else if (n % 7 == 0) { + } else if (n % 7 == 0) { *list = 7; (*num)++; factor(n/7,num,list+1); - } - else if (n % 11 == 0) { + } else if (n % 11 == 0) { *list = 11; (*num)++; factor(n/11,num,list+1); - } - else if (n % 13 == 0) { + } else if (n % 13 == 0) { *list = 13; (*num)++; factor(n/13,num,list+1); - } - else { + } else { *list = n; (*num)++; return; @@ -1086,24 +768,10 @@ void fft_1d_only(FFT_DATA *data, int nsize, int flag, struct fft_plan_3d *plan) { - int i,total,length,offset,num; - FFT_SCALAR norm, *data_ptr; - - // system specific constants - -#ifdef FFT_SCSL - int isys = 0; - FFT_PREC scalef = 1.0; -#endif -#ifdef FFT_DEC - char c = 'C'; - char f = 'F'; - char b = 'B'; - int one = 1; -#endif -#ifdef FFT_T3E - int isys = 0; - double scalef = 1.0; + int i,num; + FFT_SCALAR norm; +#if defined(FFT_FFTW3) + FFT_SCALAR *data_ptr; #endif // total = size of data needed in each dim @@ -1131,39 +799,7 @@ // perform 1d FFTs in each of 3 dimensions // data is just an array of 0.0 -#ifdef FFT_SGI - for (offset = 0; offset < total1; offset += length1) - FFT_1D(flag,length1,&data[offset],1,plan->coeff1); - for (offset = 0; offset < total2; offset += length2) - FFT_1D(flag,length2,&data[offset],1,plan->coeff2); - for (offset = 0; offset < total3; offset += length3) - FFT_1D(flag,length3,&data[offset],1,plan->coeff3); -#elif defined(FFT_SCSL) - for (offset = 0; offset < total1; offset += length1) - FFT_1D(flag,length1,scalef,&data[offset],&data[offset],plan->coeff1, - plan->work1,&isys); - for (offset = 0; offset < total2; offset += length2) - FFT_1D(flag,length2,scalef,&data[offset],&data[offset],plan->coeff2, - plan->work2,&isys); - for (offset = 0; offset < total3; offset += length3) - FFT_1D(flag,length3,scalef,&data[offset],&data[offset],plan->coeff3, - plan->work3,&isys); -#elif defined(FFT_ACML) - int info=0; - num=total1/length1; - FFT_1D(&flag,&num,&length1,data,plan->coeff1,&info); - num=total2/length2; - FFT_1D(&flag,&num,&length2,data,plan->coeff2,&info); - num=total3/length3; - FFT_1D(&flag,&num,&length3,data,plan->coeff3,&info); -#elif defined(FFT_INTEL) - for (offset = 0; offset < total1; offset += length1) - FFT_1D(&data[offset],&length1,&flag,plan->coeff1); - for (offset = 0; offset < total2; offset += length2) - FFT_1D(&data[offset],&length2,&flag,plan->coeff2); - for (offset = 0; offset < total3; offset += length3) - FFT_1D(&data[offset],&length3,&flag,plan->coeff3); -#elif defined(FFT_MKL) +#if defined(FFT_MKL) if (flag == -1) { DftiComputeForward(plan->handle_fast,data); DftiComputeForward(plan->handle_mid,data); @@ -1173,32 +809,6 @@ DftiComputeBackward(plan->handle_mid,data); DftiComputeBackward(plan->handle_slow,data); } -#elif defined(FFT_DEC) - if (flag == -1) { - for (offset = 0; offset < total1; offset += length1) - FFT_1D(&c,&c,&f,&data[offset],&data[offset],&length1,&one); - for (offset = 0; offset < total2; offset += length2) - FFT_1D(&c,&c,&f,&data[offset],&data[offset],&length2,&one); - for (offset = 0; offset < total3; offset += length3) - FFT_1D(&c,&c,&f,&data[offset],&data[offset],&length3,&one); - } else { - for (offset = 0; offset < total1; offset += length1) - FFT_1D(&c,&c,&b,&data[offset],&data[offset],&length1,&one); - for (offset = 0; offset < total2; offset += length2) - FFT_1D(&c,&c,&b,&data[offset],&data[offset],&length2,&one); - for (offset = 0; offset < total3; offset += length3) - FFT_1D(&c,&c,&b,&data[offset],&data[offset],&length3,&one); - } -#elif defined(FFT_T3E) - for (offset = 0; offset < total1; offset += length1) - FFT_1D(&flag,&length1,&scalef,&data[offset],&data[offset],plan->coeff1, - plan->work1,&isys); - for (offset = 0; offset < total2; offset += length2) - FFT_1D(&flag,&length2,&scalef,&data[offset],&data[offset],plan->coeff2, - plan->work2,&isys); - for (offset = 0; offset < total3; offset += length3) - FFT_1D(&flag,&length3,&scalef,&data[offset],&data[offset],plan->coeff3, - plan->work3,&isys); #elif defined(FFT_FFTW2) if (flag == -1) { fftw(plan->plan_fast_forward,total1/length1,data,1,0,NULL,0,0); @@ -1228,18 +838,18 @@ FFTW_API(execute_dft)(theplan,data,data); #else if (flag == -1) { - for (offset = 0; offset < total1; offset += length1) + for (int offset = 0; offset < total1; offset += length1) kiss_fft(plan->cfg_fast_forward,&data[offset],&data[offset]); - for (offset = 0; offset < total2; offset += length2) + for (int offset = 0; offset < total2; offset += length2) kiss_fft(plan->cfg_mid_forward,&data[offset],&data[offset]); - for (offset = 0; offset < total3; offset += length3) + for (int offset = 0; offset < total3; offset += length3) kiss_fft(plan->cfg_slow_forward,&data[offset],&data[offset]); } else { - for (offset = 0; offset < total1; offset += length1) + for (int offset = 0; offset < total1; offset += length1) kiss_fft(plan->cfg_fast_backward,&data[offset],&data[offset]); - for (offset = 0; offset < total2; offset += length2) + for (int offset = 0; offset < total2; offset += length2) kiss_fft(plan->cfg_mid_backward,&data[offset],&data[offset]); - for (offset = 0; offset < total3; offset += length3) + for (int offset = 0; offset < total3; offset += length3) kiss_fft(plan->cfg_slow_backward,&data[offset],&data[offset]); } #endif @@ -1247,11 +857,12 @@ // scaling if required // limit num to size of data -#ifndef FFT_T3E if (flag == 1 && plan->scaled) { norm = plan->norm; num = MIN(plan->normnum,nsize); +#if defined(FFT_FFTW3) data_ptr = (FFT_SCALAR *)data; +#endif for (i = 0; i < num; i++) { #if defined(FFT_FFTW3) *(data_ptr++) *= norm; @@ -1264,13 +875,4 @@ #endif } } -#endif - -#ifdef FFT_T3E - if (flag == 1 && plan->scaled) { - norm = plan->norm; - num = MIN(plan->normnum,nsize); - for (i = 0; i < num; i++) data[i] *= (norm,norm); - } -#endif } diff -Naur lammps-26Jan17/src/KSPACE/fft3d.h lammps-13Feb17/src/KSPACE/fft3d.h --- lammps-26Jan17/src/KSPACE/fft3d.h 2015-10-30 14:04:06.703402000 -0600 +++ lammps-13Feb17/src/KSPACE/fft3d.h 2017-02-13 08:54:46.563756000 -0700 @@ -27,7 +27,7 @@ // set default fftw library. switch to FFT_FFTW3 when convenient. #ifdef FFT_FFTW -#define FFT_FFTW2 +#define FFT_FFTW3 #endif // ------------------------------------------------------------------------- @@ -36,73 +36,11 @@ #if FFT_PRECISION == 1 -#if defined(FFT_SGI) -#include "fft.h" -typedef complex FFT_DATA; -#define FFT_1D cfft1d -#define FFT_1D_INIT cfft1di -extern "C" { - int cfft1d(int, int, FFT_DATA *, int, FFT_DATA *); - FFT_DATA *cfft1di(int, FFT_DATA *); -} - -#elif defined(FFT_SCSL) -#include -typedef scsl_complex FFT_DATA; -typedef float FFT_PREC; -#define FFT_1D ccfft -#define FFT_1D_INIT ccfft -extern "C" { - int ccfft(int, int, FFT_PREC, FFT_DATA *, FFT_DATA *, - FFT_PREC *, FFT_PREC *, int *); -} - -#elif defined(FFT_ACML) -typedef struct { - float re; - float im; -} FFT_DATA; -#define FFT_1D cfft1m_ -extern "C" { - void cfft1m_(int *, int *, int *, FFT_DATA *, FFT_DATA *, int *); -} - -#elif defined(FFT_INTEL) -typedef struct { - float re; - float im; -} FFT_DATA; -#define FFT_1D cfft1d_ -#define FFT_1D_INIT cfft1d_ -extern "C" { - void cfft1d_(FFT_DATA *, int *, int *, FFT_DATA *); -} - -#elif defined(FFT_MKL) +#if defined(FFT_MKL) #include "mkl_dfti.h" typedef float _Complex FFT_DATA; #define FFT_MKL_PREC DFTI_SINGLE -#elif defined(FFT_DEC) -typedef struct { - float re; - float im; -} FFT_DATA; -#define FFT_1D cfft_ -extern "C" { - void cfft_(char *, char *, char *, FFT_DATA *, FFT_DATA *, int *, int *); -} - -#elif defined(FFT_T3E) -#include -typedef complex single FFT_DATA; -#define FFT_1D GGFFT -#define FFT_1D_INIT GGFFT -extern "C" { - void GGFFT(int *, int *, double *, FFT_DATA *, FFT_DATA *, - double *, double *, int *); -} - #elif defined(FFT_FFTW2) #if defined(FFTW_SIZE) #include "sfftw.h" @@ -138,73 +76,11 @@ #elif FFT_PRECISION == 2 -#if defined(FFT_SGI) -#include "fft.h" -typedef zomplex FFT_DATA; -#define FFT_1D zfft1d -#define FFT_1D_INIT zfft1di -extern "C" { - int zfft1d(int, int, FFT_DATA *, int, FFT_DATA *); - FFT_DATA *zfft1di(int, FFT_DATA *); -} - -#elif defined(FFT_SCSL) -#include -typedef scsl_zomplex FFT_DATA; -typedef double FFT_PREC; -#define FFT_1D zzfft -#define FFT_1D_INIT zzfft -extern "C" { - int zzfft(int, int, FFT_PREC, FFT_DATA *, FFT_DATA *, - FFT_PREC *, FFT_PREC *, int *); -} - -#elif defined(FFT_ACML) -typedef struct { - double re; - double im; -} FFT_DATA; -#define FFT_1D zfft1m_ -extern "C" { - void zfft1m_(int *, int *, int *, FFT_DATA *, FFT_DATA *, int *); -} - -#elif defined(FFT_INTEL) -typedef struct { - double re; - double im; -} FFT_DATA; -#define FFT_1D zfft1d_ -#define FFT_1D_INIT zfft1d_ -extern "C" { - void zfft1d_(FFT_DATA *, int *, int *, FFT_DATA *); -} - -#elif defined(FFT_MKL) +#if defined(FFT_MKL) #include "mkl_dfti.h" typedef double _Complex FFT_DATA; #define FFT_MKL_PREC DFTI_DOUBLE -#elif defined(FFT_DEC) -typedef struct { - double re; - double im; -} FFT_DATA; -#define FFT_1D zfft_ -extern "C" { - void zfft_(char *, char *, char *, FFT_DATA *, FFT_DATA *, int *, int *); -} - -#elif defined(FFT_T3E) -#include -typedef complex double FFT_DATA; -#define FFT_1D CCFFT -#define FFT_1D_INIT CCFFT -extern "C" { - void CCFFT(int *, int *, double *, FFT_DATA *, FFT_DATA *, - double *, double *, int *); -} - #elif defined(FFT_FFTW2) #if defined(FFTW_SIZE) #include "dfftw.h" @@ -258,36 +134,10 @@ double norm; // normalization factor for rescaling // system specific 1d FFT info -#if defined(FFT_SGI) - FFT_DATA *coeff1; - FFT_DATA *coeff2; - FFT_DATA *coeff3; -#elif defined(FFT_SCSL) - FFT_PREC *coeff1; - FFT_PREC *coeff2; - FFT_PREC *coeff3; - FFT_PREC *work1; - FFT_PREC *work2; - FFT_PREC *work3; -#elif defined(FFT_ACML) - FFT_DATA *coeff1; - FFT_DATA *coeff2; - FFT_DATA *coeff3; -#elif defined(FFT_INTEL) - FFT_DATA *coeff1; - FFT_DATA *coeff2; - FFT_DATA *coeff3; -#elif defined(FFT_MKL) +#if defined(FFT_MKL) DFTI_DESCRIPTOR *handle_fast; DFTI_DESCRIPTOR *handle_mid; DFTI_DESCRIPTOR *handle_slow; -#elif defined(FFT_T3E) - double *coeff1; - double *coeff2; - double *coeff3; - double *work1; - double *work2; - double *work3; #elif defined(FFT_FFTW2) fftw_plan plan_fast_forward; fftw_plan plan_fast_backward; diff -Naur lammps-26Jan17/src/MAKE/MACHINES/Makefile.bgl lammps-13Feb17/src/MAKE/MACHINES/Makefile.bgl --- lammps-26Jan17/src/MAKE/MACHINES/Makefile.bgl 2016-03-10 09:31:34.087033000 -0700 +++ lammps-13Feb17/src/MAKE/MACHINES/Makefile.bgl 2017-02-13 08:54:46.563756000 -0700 @@ -56,7 +56,7 @@ # PATH = path for FFT library # LIB = name of FFT library -FFT_INC = -DFFT_FFTW +FFT_INC = -DFFT_FFTW2 FFT_PATH = FFT_LIB = -lfftw diff -Naur lammps-26Jan17/src/MAKE/MACHINES/Makefile.bgq lammps-13Feb17/src/MAKE/MACHINES/Makefile.bgq --- lammps-26Jan17/src/MAKE/MACHINES/Makefile.bgq 2016-03-10 09:31:34.087033000 -0700 +++ lammps-13Feb17/src/MAKE/MACHINES/Makefile.bgq 2017-02-13 08:54:46.563756000 -0700 @@ -8,7 +8,7 @@ # do not edit this section # select which compiler by editing Makefile.bgq.details -include ../MAKE/Makefile.bgq.details +include ../MAKE/MACHINES/Makefile.bgq.details include Makefile.package.settings include Makefile.package diff -Naur lammps-26Jan17/src/MAKE/MACHINES/Makefile.bgq.details lammps-13Feb17/src/MAKE/MACHINES/Makefile.bgq.details --- lammps-26Jan17/src/MAKE/MACHINES/Makefile.bgq.details 2016-03-10 09:31:34.087033000 -0700 +++ lammps-13Feb17/src/MAKE/MACHINES/Makefile.bgq.details 2017-02-13 08:54:46.563756000 -0700 @@ -101,7 +101,7 @@ # PATH = path for FFT library # LIB = name of FFT library -FFT_INC = -I/soft/libraries/alcf/current/xl/FFTW2/include -DFFT_FFTW -DFFTW_SIZE +FFT_INC = -I/soft/libraries/alcf/current/xl/FFTW2/include -DFFT_FFTW2 -DFFTW_SIZE FFT_PATH = #/soft/libraries/alcf/current/xl/FFTW2 FFT_LIB = -L/soft/libraries/alcf/current/xl/FFTW2/lib -ldfftw diff -Naur lammps-26Jan17/src/MAKE/MACHINES/Makefile.chama lammps-13Feb17/src/MAKE/MACHINES/Makefile.chama --- lammps-26Jan17/src/MAKE/MACHINES/Makefile.chama 2016-03-10 09:31:34.087033000 -0700 +++ lammps-13Feb17/src/MAKE/MACHINES/Makefile.chama 2017-02-13 08:54:46.563756000 -0700 @@ -50,7 +50,7 @@ # PATH = path for FFT library # LIB = name of FFT library -#FFT_INC = -DFFT_FFTW -I${FFTW_INCLUDE} +#FFT_INC = -DFFT_FFTW2 -I${FFTW_INCLUDE} #FFT_PATH = -L${FFTW_LIB} #FFT_LIB = -lfftw diff -Naur lammps-26Jan17/src/MAKE/MACHINES/Makefile.cygwin lammps-13Feb17/src/MAKE/MACHINES/Makefile.cygwin --- lammps-26Jan17/src/MAKE/MACHINES/Makefile.cygwin 2016-03-10 09:31:34.087033000 -0700 +++ lammps-13Feb17/src/MAKE/MACHINES/Makefile.cygwin 2017-02-13 08:54:46.563756000 -0700 @@ -50,7 +50,7 @@ # PATH = path for FFT library # LIB = name of FFT library -FFT_INC = -DFFT_FFTW -I/cygdrive/c/cygwin/usr/local/include +FFT_INC = -DFFT_FFTW2 -I/cygdrive/c/cygwin/usr/local/include FFT_PATH = -L/cygdrive/c/cygwin/usr/local/lib FFT_LIB = -lfftw diff -Naur lammps-26Jan17/src/MAKE/MACHINES/Makefile.glory lammps-13Feb17/src/MAKE/MACHINES/Makefile.glory --- lammps-26Jan17/src/MAKE/MACHINES/Makefile.glory 2016-03-10 09:31:34.087033000 -0700 +++ lammps-13Feb17/src/MAKE/MACHINES/Makefile.glory 2017-02-13 08:54:46.563756000 -0700 @@ -67,7 +67,7 @@ # PATH = path for FFT library # LIB = name of FFT library -FFT_INC = -DFFT_FFTW -I${FFTW_INCLUDE} +FFT_INC = -DFFT_FFTW2 -I${FFTW_INCLUDE} FFT_PATH = -L${FFTW_LIB} FFT_LIB = -lfftw diff -Naur lammps-26Jan17/src/MAKE/MACHINES/Makefile.mac lammps-13Feb17/src/MAKE/MACHINES/Makefile.mac --- lammps-26Jan17/src/MAKE/MACHINES/Makefile.mac 2016-03-10 09:31:34.087033000 -0700 +++ lammps-13Feb17/src/MAKE/MACHINES/Makefile.mac 2017-02-13 08:54:46.563756000 -0700 @@ -50,7 +50,7 @@ # PATH = path for FFT library # LIB = name of FFT library -FFT_INC = -DFFT_FFTW +FFT_INC = -DFFT_FFTW2 FFT_PATH = FFT_LIB = -lfftw diff -Naur lammps-26Jan17/src/MAKE/MACHINES/Makefile.mac_mpi lammps-13Feb17/src/MAKE/MACHINES/Makefile.mac_mpi --- lammps-26Jan17/src/MAKE/MACHINES/Makefile.mac_mpi 2016-03-10 09:31:34.087033000 -0700 +++ lammps-13Feb17/src/MAKE/MACHINES/Makefile.mac_mpi 2017-02-13 08:54:46.563756000 -0700 @@ -53,7 +53,7 @@ FFTW = /usr/local -FFT_INC = -DFFT_FFTW -I${FFTW}/include +FFT_INC = -DFFT_FFTW2 -I${FFTW}/include FFT_PATH = -L${FFTW}/lib FFT_LIB = -lfftw diff -Naur lammps-26Jan17/src/MAKE/MACHINES/Makefile.power lammps-13Feb17/src/MAKE/MACHINES/Makefile.power --- lammps-26Jan17/src/MAKE/MACHINES/Makefile.power 2016-03-10 09:31:34.087033000 -0700 +++ lammps-13Feb17/src/MAKE/MACHINES/Makefile.power 2017-02-13 08:54:46.563756000 -0700 @@ -51,7 +51,7 @@ # PATH = path for FFT library # LIB = name of FFT library -FFT_INC = -DFFT_FFTW -I/scr/oppe/LAMMPS/fftw-2.1.5/include +FFT_INC = -DFFT_FFTW2 -I/scr/oppe/LAMMPS/fftw-2.1.5/include FFT_PATH = -L/scr/oppe/LAMMPS/fftw-2.1.5/lib FFT_LIB = -lfftw diff -Naur lammps-26Jan17/src/MAKE/MACHINES/Makefile.redsky lammps-13Feb17/src/MAKE/MACHINES/Makefile.redsky --- lammps-26Jan17/src/MAKE/MACHINES/Makefile.redsky 2016-03-10 09:31:34.087033000 -0700 +++ lammps-13Feb17/src/MAKE/MACHINES/Makefile.redsky 2017-02-13 08:54:46.563756000 -0700 @@ -70,7 +70,7 @@ # PATH = path for FFT library # LIB = name of FFT library -#FFT_INC = -DFFT_FFTW -I${FFTW_INCLUDE} +#FFT_INC = -DFFT_FFTW2 -I${FFTW_INCLUDE} #FFT_PATH = -L${FFTW_LIB} #FFT_LIB = -lfftw diff -Naur lammps-26Jan17/src/MAKE/MACHINES/Makefile.storm lammps-13Feb17/src/MAKE/MACHINES/Makefile.storm --- lammps-26Jan17/src/MAKE/MACHINES/Makefile.storm 2016-03-10 09:31:34.087033000 -0700 +++ lammps-13Feb17/src/MAKE/MACHINES/Makefile.storm 2017-02-13 08:54:46.563756000 -0700 @@ -51,7 +51,7 @@ # PATH = path for FFT library # LIB = name of FFT library -FFT_INC = -DFFT_FFTW -I/projects/fftw/fftw-2.1.5/include +FFT_INC = -DFFT_FFTW2 -I/projects/fftw/fftw-2.1.5/include FFT_PATH = FFT_LIB = -lfftw diff -Naur lammps-26Jan17/src/MAKE/MACHINES/Makefile.tacc lammps-13Feb17/src/MAKE/MACHINES/Makefile.tacc --- lammps-26Jan17/src/MAKE/MACHINES/Makefile.tacc 2016-03-10 09:31:34.087033000 -0700 +++ lammps-13Feb17/src/MAKE/MACHINES/Makefile.tacc 2017-02-13 08:54:46.563756000 -0700 @@ -53,7 +53,7 @@ FFTW_INC = ${TACC_FFTW2_INC} FFTW_LIB = ${TACC_FFTW2_LIB} -FFT_INC = -DFFT_FFTW -I${FFTW_INC} +FFT_INC = -DFFT_FFTW2 -I${FFTW_INC} FFT_PATH = -L${FFTW_LIB} FFT_LIB = ${FFTW_LIB}/libfftw.a diff -Naur lammps-26Jan17/src/MAKE/MACHINES/Makefile.xe6 lammps-13Feb17/src/MAKE/MACHINES/Makefile.xe6 --- lammps-26Jan17/src/MAKE/MACHINES/Makefile.xe6 2016-03-10 09:31:34.087033000 -0700 +++ lammps-13Feb17/src/MAKE/MACHINES/Makefile.xe6 2017-02-13 08:54:46.563756000 -0700 @@ -51,7 +51,7 @@ # PATH = path for FFT library # LIB = name of FFT library -FFT_INC = -DFFT_FFTW +FFT_INC = -DFFT_FFTW2 FFT_PATH = FFT_LIB = -lfftw diff -Naur lammps-26Jan17/src/MAKE/MACHINES/Makefile.xt3 lammps-13Feb17/src/MAKE/MACHINES/Makefile.xt3 --- lammps-26Jan17/src/MAKE/MACHINES/Makefile.xt3 2016-03-10 09:31:34.087033000 -0700 +++ lammps-13Feb17/src/MAKE/MACHINES/Makefile.xt3 2017-02-13 08:54:46.563756000 -0700 @@ -52,7 +52,7 @@ # PATH = path for FFT library # LIB = name of FFT library -FFT_INC = -DFFT_FFTW -I$(FFTW_INC) +FFT_INC = -DFFT_FFTW2 -I$(FFTW_INC) FFT_PATH = -L$(FFTW_LIB) FFT_LIB = -ldfftw diff -Naur lammps-26Jan17/src/MAKE/MACHINES/Makefile.xt5 lammps-13Feb17/src/MAKE/MACHINES/Makefile.xt5 --- lammps-26Jan17/src/MAKE/MACHINES/Makefile.xt5 2016-03-10 09:31:34.087033000 -0700 +++ lammps-13Feb17/src/MAKE/MACHINES/Makefile.xt5 2017-02-13 08:54:46.563756000 -0700 @@ -51,7 +51,7 @@ # PATH = path for FFT library # LIB = name of FFT library -FFT_INC = -DFFT_FFTW -I/home/sjplimp/fftw/fftw +FFT_INC = -DFFT_FFTW2 -I/home/sjplimp/fftw/fftw FFT_PATH = -L/home/sjplimp/fftw/fftw/.libs FFT_LIB = -lfftw diff -Naur lammps-26Jan17/src/MOLECULE/fix_cmap.cpp lammps-13Feb17/src/MOLECULE/fix_cmap.cpp --- lammps-26Jan17/src/MOLECULE/fix_cmap.cpp 2017-01-05 13:13:13.972934000 -0700 +++ lammps-13Feb17/src/MOLECULE/fix_cmap.cpp 2017-02-03 14:45:56.983493000 -0700 @@ -230,7 +230,7 @@ void FixCMAP::pre_neighbor() { - int i,m,itype,atom1,atom2,atom3,atom4,atom5; + int i,m,atom1,atom2,atom3,atom4,atom5; // guesstimate initial length of local crossterm list // if ncmap was not set (due to read_restart, no read_data), @@ -842,7 +842,7 @@ // use the bicubic spline to calculate the derivatives int i, j, k, ii, jj, xm, p; - double phi, psi, y, d1y, d2y, d12y, tyyk,tdyk; + double phi, psi, d1y, d2y, d12y, tyyk,tdyk; double *tmp_y, *tmp_dy, *tmp_ddy, **tmap, **tddmap; int ix; double a,b,a1,b1,a2,b2; @@ -850,7 +850,6 @@ xm = CMAPDIM/2; p = CMAPDIM; - y = 0.; d1y = 0.; d2y = 0.; d12y = 0.; @@ -907,8 +906,6 @@ b1 = b*b*b-b; a2 = 3.0*a*a-1.0; b2 = 3.0*b*b-1.0; - y = a*tmp_y[ix]+b*tmp_y[ix+1]+ - (a1*tmp_ddy[ix]+b1*tmp_ddy[ix+1])*(CMAPDX*CMAPDX)/6.0; d1y = (tmp_y[ix+1]-tmp_y[ix])/CMAPDX- a2/6.0*CMAPDX*tmp_ddy[ix]+b2/6.0*CMAPDX*tmp_ddy[ix+1]; spline(tmp_dy,tmp_ddy,CMAPDIM+xm+xm); @@ -1015,8 +1012,8 @@ // gradients and cross-derivatives // calculate the interpolated value of the point of interest (POI) - int i, p=12; - double t, u, fac, gs1l, gs2l, gs1u, gs2u; + int i; + double t, u, gs1l, gs2l; // set the interpolation coefficients diff -Naur lammps-26Jan17/src/USER-MISC/dihedral_nharmonic.cpp lammps-13Feb17/src/USER-MISC/dihedral_nharmonic.cpp --- lammps-26Jan17/src/USER-MISC/dihedral_nharmonic.cpp 2016-11-30 14:03:35.888101000 -0700 +++ lammps-13Feb17/src/USER-MISC/dihedral_nharmonic.cpp 2017-02-09 09:04:24.568594000 -0700 @@ -180,6 +180,7 @@ // force & energy // p = sum (i=1,n) a_i * c**(i-1) // pd = dp/dc + c_ = c; p = this->a[type][0]; pd = this->a[type][1]; @@ -276,7 +277,8 @@ if (narg < 4 ) error->all(FLERR,"Incorrect args for dihedral coefficients"); int n = force->inumeric(FLERR,arg[1]); - if (narg != n + 2 ) error->all(FLERR,"Incorrect args for dihedral coefficients"); + if (narg != n + 2) + error->all(FLERR,"Incorrect args for dihedral coefficients"); if (!allocated) allocate(); diff -Naur lammps-26Jan17/src/compute_group_group.cpp lammps-13Feb17/src/compute_group_group.cpp --- lammps-26Jan17/src/compute_group_group.cpp 2016-08-29 16:52:03.449758000 -0600 +++ lammps-13Feb17/src/compute_group_group.cpp 2017-02-10 16:54:51.390897000 -0700 @@ -39,6 +39,8 @@ #define SMALL 0.00001 +enum{OFF,INTER,INTRA}; + /* ---------------------------------------------------------------------- */ ComputeGroupGroup::ComputeGroupGroup(LAMMPS *lmp, int narg, char **arg) : @@ -64,6 +66,7 @@ pairflag = 1; kspaceflag = 0; boundaryflag = 1; + molflag = OFF; int iarg = 4; while (iarg < narg) { @@ -88,6 +91,16 @@ else if (strcmp(arg[iarg+1],"no") == 0) boundaryflag = 0; else error->all(FLERR,"Illegal compute group/group command"); iarg += 2; + } else if (strcmp(arg[iarg],"molecule") == 0) { + if (iarg+2 > narg) + error->all(FLERR,"Illegal compute group/group command"); + if (strcmp(arg[iarg+1],"off") == 0) molflag = OFF; + else if (strcmp(arg[iarg+1],"inter") == 0) molflag = INTER; + else if (strcmp(arg[iarg+1],"intra") == 0) molflag = INTRA; + else error->all(FLERR,"Illegal compute group/group command"); + if (molflag != OFF && atom->molecule_flag == 0) + error->all(FLERR,"Compute group/group molecule requires molecule IDs"); + iarg += 2; } else error->all(FLERR,"Illegal compute group/group command"); } @@ -203,6 +216,7 @@ int *ilist,*jlist,*numneigh,**firstneigh; double **x = atom->x; + tagint *molecule = atom->molecule; int *type = atom->type; int *mask = atom->mask; int nlocal = atom->nlocal; @@ -243,13 +257,27 @@ factor_coul = special_coul[sbmask(j)]; j &= NEIGHMASK; - if (!(mask[j] & groupbit || mask[j] & jgroupbit)) continue; // skip if atom J is not in either group + // skip if atom J is not in either group + + if (!(mask[j] & groupbit || mask[j] & jgroupbit)) continue; + + // skip if atoms I,J are only in the same group int ij_flag = 0; int ji_flag = 0; if (mask[i] & groupbit && mask[j] & jgroupbit) ij_flag = 1; if (mask[j] & groupbit && mask[i] & jgroupbit) ji_flag = 1; - if (!ij_flag && !ji_flag) continue; // skip if atoms I,J are only in the same group + if (!ij_flag && !ji_flag) continue; + + // skip if molecule IDs of atoms I,J do not satisfy molflag setting + + if (molflag != OFF) { + if (molflag == INTER) { + if (molecule[i] == molecule[j]) continue; + } else { + if (molecule[i] != molecule[j]) continue; + } + } delx = xtmp - x[j][0]; dely = ytmp - x[j][1]; diff -Naur lammps-26Jan17/src/compute_group_group.h lammps-13Feb17/src/compute_group_group.h --- lammps-26Jan17/src/compute_group_group.h 2014-10-21 11:09:24.014764000 -0600 +++ lammps-13Feb17/src/compute_group_group.h 2017-02-10 09:09:43.513978000 -0700 @@ -38,7 +38,7 @@ int jgroup,jgroupbit,othergroupbit; double **cutsq; double e_self,e_correction; - int pairflag,kspaceflag,boundaryflag; + int pairflag,kspaceflag,boundaryflag,molflag; class Pair *pair; class NeighList *list; class KSpace *kspace; diff -Naur lammps-26Jan17/src/fix.cpp lammps-13Feb17/src/fix.cpp --- lammps-26Jan17/src/fix.cpp 2016-11-09 15:37:03.095210000 -0700 +++ lammps-13Feb17/src/fix.cpp 2017-02-07 13:22:40.152603000 -0700 @@ -31,9 +31,10 @@ /* ---------------------------------------------------------------------- */ -Fix::Fix(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp), -id(NULL), style(NULL), extlist(NULL), vector_atom(NULL), array_atom(NULL), -vector_local(NULL), array_local(NULL), eatom(NULL), vatom(NULL) +Fix::Fix(LAMMPS *lmp, int narg, char **arg) : + Pointers(lmp), + id(NULL), style(NULL), extlist(NULL), vector_atom(NULL), array_atom(NULL), + vector_local(NULL), array_local(NULL), eatom(NULL), vatom(NULL) { instance_me = instance_total++; diff -Naur lammps-26Jan17/src/pair_buck.cpp lammps-13Feb17/src/pair_buck.cpp --- lammps-26Jan17/src/pair_buck.cpp 2016-11-04 11:01:14.010162000 -0600 +++ lammps-13Feb17/src/pair_buck.cpp 2017-02-09 15:41:10.777613000 -0700 @@ -187,7 +187,8 @@ void PairBuck::coeff(int narg, char **arg) { - if (narg < 5 || narg > 6) error->all(FLERR,"Incorrect args for pair coefficients"); + if (narg < 5 || narg > 6) + error->all(FLERR,"Incorrect args for pair coefficients"); if (!allocated) allocate(); int ilo,ihi,jlo,jhi; diff -Naur lammps-26Jan17/src/pair_morse.h lammps-13Feb17/src/pair_morse.h --- lammps-26Jan17/src/pair_morse.h 2015-04-27 10:08:53.812639000 -0600 +++ lammps-13Feb17/src/pair_morse.h 2017-02-03 14:45:56.983493000 -0700 @@ -28,8 +28,8 @@ public: PairMorse(class LAMMPS *); virtual ~PairMorse(); - virtual void compute(int, int); + void settings(int, char **); void coeff(int, char **); double init_one(int, int); @@ -49,7 +49,7 @@ double **morse1; double **offset; - void allocate(); + virtual void allocate(); }; } diff -Naur lammps-26Jan17/src/version.h lammps-13Feb17/src/version.h --- lammps-26Jan17/src/version.h 2017-01-26 14:05:55.021815000 -0700 +++ lammps-13Feb17/src/version.h 2017-02-13 09:00:47.555899000 -0700 @@ -1 +1 @@ -#define LAMMPS_VERSION "26 Jan 2017" +#define LAMMPS_VERSION "13 Feb 2017" diff -Naur lammps-26Jan17/tools/drude/polarizer.py lammps-13Feb17/tools/drude/polarizer.py --- lammps-26Jan17/tools/drude/polarizer.py 2015-07-27 08:58:04.907365000 -0600 +++ lammps-13Feb17/tools/drude/polarizer.py 2017-02-10 09:24:27.989902000 -0700 @@ -2,7 +2,7 @@ # polarizer.py - add Drude oscillators to LAMMPS data file. # Agilio Padua # Alain Dequidt -# version 2015/07/17 +# version 2017/02/03 import sys import argparse @@ -560,17 +560,17 @@ print("# Commands to include in the LAMMPS input script\n") - print("# adapt the pair_style line as needed") - print("pair_style hybrid/overlay ... coul/long {0:.1f} "\ + print("# adapt the pair_style command as needed") + print("pair_style hybrid/overlay ... coul/long/cs {0:.1f} "\ "thole {1:.3f} {0:.1f}\n".format(cutoff, thole)) print("read_data {0}\n".format(outfile)) - print("# add interactions between any atoms and Drude particles") - print("pair_coeff * {0}* coul/long".format(att['id'])) + print("# add interactions between atoms and Drude particles") + print("pair_coeff * {0:3d}* coul/long/cs".format(att['id'])) # Thole parameters for I,J pairs - print("# add Thole screening if more than 1 Drude per molecule") + print("# add Thole damping if more than 1 Drude per molecule") ifound = False for atti in self.atomtypes: itype = atti['type'].split()[0] @@ -596,9 +596,14 @@ if ifound and jfound: alphaij = (alphai * alphaj)**0.5 tholeij = (tholei + tholej) / 2.0 - print("pair_coeff {0:4} {1:4} thole {2:7.3f} "\ - "{3:7.3f}".format(atti['id'], attj['id'], - alphaij, tholeij)) + if tholeij == thole: + print("pair_coeff {0:4} {1:4} thole {2:7.3f}".format( + atti['id'], attj['id'], alphaij)) + else: + print("pair_coeff {0:4} {1:4} thole {2:7.3f} "\ + "{3:7.3f}".format(atti['id'],attj['id'], + alphaij, tholeij)) + jfound = False ifound = False print("") @@ -627,11 +632,18 @@ print("# ATTENTION!") print("# * special_bonds may need 'extra' keyword, LAMMPS will exit " - "with a message") - print("# * give all I<=J pair interactions, no mixing") - print("# * if using fix shake the group-ID must not include " - "Drude particles") - print("# use group ATOMS for example") + "with a message.") + print("# * If using fix shake the group-ID must not include " + "Drude particles.") + print("# Use group ATOMS for example.") + print("# * Give all I<=J pair interactions, no mixing.") + print("# * Pair style coul/long/cs from CORESHELL package is used "\ + "for interactions") + print("# of Drude particles. Alternatively pair lj/cut/thole/long "\ + "could be used,") + print("# avoiding hybrid/overlay and allowing mixing. See doc "\ + "pages.") + # --------------------------------------