From 0bc648e23e3a495be12eeaaebc6f779ee2abb56f Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Tue, 18 Jun 2019 14:30:30 -0600 Subject: [PATCH 01/51] add message quit protocol, to allow for non-quantum MD steps --- doc/src/Howto_client_server.txt | 33 +++++++++++++++-- doc/src/fix_client_md.txt | 12 +++---- doc/src/message.txt | 47 ++++++++++++++++--------- doc/src/server.txt | 2 +- examples/COUPLE/lammps_vasp/in.client.W | 1 + examples/message/in.message.client | 2 ++ examples/message/in.message.tilt.client | 2 ++ src/MESSAGE/fix_client_md.cpp | 15 -------- src/MESSAGE/message.cpp | 39 +++++++++++++++++++- src/MESSAGE/message.h | 3 ++ 10 files changed, 115 insertions(+), 41 deletions(-) diff --git a/doc/src/Howto_client_server.txt b/doc/src/Howto_client_server.txt index 96939809dc..37b622151c 100644 --- a/doc/src/Howto_client_server.txt +++ b/doc/src/Howto_client_server.txt @@ -32,9 +32,38 @@ atoms. The quantum code computes energy and forces based on the coords. It returns them as a message to LAMMPS, which completes the timestep. +A more complex example is where LAMMPS is the client code and +processes a series of data files, sending each configuration to a +quantum code to compute energy and forces. Or LAMMPS runs dynamics +with an atomistic force field, but pauses every N steps to ask the +quantum code to compute energy and forces. + Alternate methods for code coupling with LAMMPS are described on the "Howto couple"_Howto_couple.html doc page. +The protocol for using LAMMPS as a client is to use these 3 commands +in this order (other commands may come in between): + +"message client"_message.html # initiate client/server interaction +"fix client/md"_fix_client_md.html # any client fix which makes specific requests to the server +"message quit"_message.html # terminate client/server interaction :ul + +In between the two message commands, a client fix command and +"unfix"_unfix.html command can be used multiple times. Similarly, +this sequence of 3 commands can be repeated multiple times, assuming +the server program operates in a similar fashion, to initiate and +terminate client/server communication. + +The protocol for using LAMMPS as a server is to use these 2 commands +in this order (other commands may come in between): + +"message server"_message.html # initiate client/server interaction +"server md"_server__md.html # any server command which responds to specific requests from the client :ul + +This sequence of 2 commands can be repeated multiple times, assuming +the client program operates in a similar fashion, to initiate and +terminate client/server communication. + LAMMPS support for client/server coupling is in its "MESSAGE package"_Packages_details.html#PKG-MESSAGE which implements several commands that enable LAMMPS to act as a client or server, as discussed @@ -46,8 +75,8 @@ in the lib/message dir. The CSlib has its own programs. NOTE: For client/server coupling to work between LAMMPS and another -code, the other code also has to use the CSlib. This can sometimes be -done without any modifications to the other code by simply wrapping it +code, the other code also has to use the CSlib. This can often be +done without any modification to the other code by simply wrapping it with a Python script that exchanges CSlib messages with LAMMPS and prepares input for or processes output from the other code. The other code also has to implement a matching protocol for the format and diff --git a/doc/src/fix_client_md.txt b/doc/src/fix_client_md.txt index 5fee8511fe..d43da450af 100644 --- a/doc/src/fix_client_md.txt +++ b/doc/src/fix_client_md.txt @@ -37,10 +37,10 @@ computes their interaction, and returns the energy, forces, and virial for the interacting particles to LAMMPS, so it can complete the timestep. -The server code could be a quantum code, or another classical MD code -which encodes a force field (pair_style in LAMMPS lingo) which LAMMPS -does not have. In the quantum case, this fix is a mechanism for -running {ab initio} MD with quantum forces. +Note that the server code can be a quantum code, or another classical +MD code which encodes a force field (pair_style in LAMMPS lingo) which +LAMMPS does not have. In the quantum case, this fix is a mechanism +for running {ab initio} MD with quantum forces. The group associated with this fix is ignored. @@ -96,8 +96,8 @@ was built with that package. See the "Build package"_Build_package.html doc page for more info. A script that uses this command must also use the -"message"_message.html command to setup the messaging protocol with -the other server code. +"message"_message.html command to setup and shut down the messaging +protocol with the server code. [Related commands:] diff --git a/doc/src/message.txt b/doc/src/message.txt index 0c10af4ac6..71e3550b42 100644 --- a/doc/src/message.txt +++ b/doc/src/message.txt @@ -12,7 +12,7 @@ message command :h3 message which protocol mode arg :pre -which = {client} or {server} :ulb,l +which = {client} or {server} or {quit} :ulb,l protocol = {md} or {mc} :l mode = {file} or {zmq} or {mpi/one} or {mpi/two} :l {file} arg = filename @@ -39,6 +39,8 @@ message server md mpi/one :pre message client md mpi/two tmp.couple message server md mpi/two tmp.couple :pre +message quit :pre + [Description:] Establish a messaging protocol between LAMMPS and another code for the @@ -54,6 +56,10 @@ enables the two codes to work in tandem to perform a simulation. The {which} argument defines LAMMPS to be the client or the server. +As explained below the {quit} option should be used when LAMMPS is +finished as a client. It sends a message to the server to tell it to +shut down. + :line The {protocol} argument defines the format and content of messages @@ -121,12 +127,12 @@ path/file in a common filesystem. :line -Normally, the message command should be used at the top of a LAMMPS -input script. It performs an initial handshake with the other code to -setup messaging and to verify that both codes are using the same -message protocol and mode. Assuming both codes are launched at -(nearly) the same time, the other code should perform the same kind of -initialization. +Normally, the message client or message server command should be used +at the top of a LAMMPS input script. It performs an initial handshake +with the other code to setup messaging and to verify that both codes +are using the same message protocol and mode. Assuming both codes are +launched at (nearly) the same time, the other code should perform the +same kind of initialization. If LAMMPS is the client code, it will begin sending messages when a LAMMPS client command begins its operation. E.g. for the "fix @@ -136,16 +142,25 @@ command is executed. If LAMMPS is the server code, it will begin receiving messages when the "server"_server.html command is invoked. -A fix client command will terminate its messaging with the server when -LAMMPS ends, or the fix is deleted via the "unfix"_unfix.html command. -The server command will terminate its messaging with the client when the -client signals it. Then the remainder of the LAMMPS input script will -be processed. +If LAMMPS is being used as a client, the message quit command will +terminate its messaging with the server. If you do not use this +command and just allow LAMMPS to exit, then the server will continue +to wait for further messages. This may not be a problem, but if both +the client and server programs were launched in the same batch script, +then if the server runs indefinitely, it may consume the full allocation +of computer time, even if the calculation finishes sooner. -If both codes do something similar, this means a new round of -client/server messaging can be initiated after termination by re-using -a 2nd message command in your LAMMPS input script, followed by a new -fix client or server command. +Note that if LAMMPS is the client or server, it will continue +processing the rest of its input script after client/server +communication terminates. + +If both codes cooperate in this manner, a new round of client/server +messaging can be initiated after termination by re-using a 2nd message +command in your LAMMPS input script, followed by a new fix client or +server command, followed by another message quit command (if LAMMPS is +the client). As an example, this can be performed in a loop to use a +quantum code as a server to compute quantum forces for multiple LAMMPS +data files or periodic snapshots while running dynamics. :line diff --git a/doc/src/server.txt b/doc/src/server.txt index 8f87b5c76b..d30d398598 100644 --- a/doc/src/server.txt +++ b/doc/src/server.txt @@ -35,7 +35,7 @@ enables the two codes to work in tandem to perform a simulation. When this command is invoked, LAMMPS will run in server mode in an endless loop, waiting for messages from the client code. The client signals when it is done sending messages to LAMMPS, at which point the -loop will exit, and the remainder of the LAMMPS script will be +loop will exit, and the remainder of the LAMMPS input script will be processed. The {protocol} argument defines the format and content of messages diff --git a/examples/COUPLE/lammps_vasp/in.client.W b/examples/COUPLE/lammps_vasp/in.client.W index 3eaf99dcbb..1af1c312e4 100644 --- a/examples/COUPLE/lammps_vasp/in.client.W +++ b/examples/COUPLE/lammps_vasp/in.client.W @@ -32,3 +32,4 @@ fix_modify 2 energy yes thermo 1 run 3 +message quit diff --git a/examples/message/in.message.client b/examples/message/in.message.client index f1ec644a80..cd0a40367a 100644 --- a/examples/message/in.message.client +++ b/examples/message/in.message.client @@ -39,3 +39,5 @@ fix_modify 2 energy yes thermo 10 run 50 + +message quit diff --git a/examples/message/in.message.tilt.client b/examples/message/in.message.tilt.client index b55bc6585b..d178c801f5 100644 --- a/examples/message/in.message.tilt.client +++ b/examples/message/in.message.tilt.client @@ -40,3 +40,5 @@ thermo_style custom step temp epair etotal press xy thermo 1000 run 50000 + +message quit diff --git a/src/MESSAGE/fix_client_md.cpp b/src/MESSAGE/fix_client_md.cpp index 727481dcc0..82a1b78d03 100644 --- a/src/MESSAGE/fix_client_md.cpp +++ b/src/MESSAGE/fix_client_md.cpp @@ -80,21 +80,6 @@ FixClientMD::FixClientMD(LAMMPS *lmp, int narg, char **arg) : FixClientMD::~FixClientMD() { memory->destroy(xpbc); - - CSlib *cs = (CSlib *) lmp->cslib; - - // all-done message to server - - cs->send(-1,0); - - int nfield; - int *fieldID,*fieldtype,*fieldlen; - cs->recv(nfield,fieldID,fieldtype,fieldlen); - - // clean-up - - delete cs; - lmp->cslib = NULL; } /* ---------------------------------------------------------------------- */ diff --git a/src/MESSAGE/message.cpp b/src/MESSAGE/message.cpp index 61221ca26e..fa48b19d1d 100644 --- a/src/MESSAGE/message.cpp +++ b/src/MESSAGE/message.cpp @@ -26,16 +26,31 @@ using namespace CSLIB_NS; void Message::command(int narg, char **arg) { - if (narg < 3) error->all(FLERR,"Illegal message command"); + if (narg < 1) error->all(FLERR,"Illegal message command"); int clientserver; if (strcmp(arg[0],"client") == 0) clientserver = 1; else if (strcmp(arg[0],"server") == 0) clientserver = 2; + else if (strcmp(arg[0],"quit") == 0) clientserver = 0; else error->all(FLERR,"Illegal message command"); + + // shutdown current client mode + + if (clientserver == 0) { + if (lmp->clientserver != 1) + error->all(FLERR,"Cannot message quit if not in client mode"); + quit(); + return; + } + + // setup client or server mode + lmp->clientserver = clientserver; // validate supported protocols + if (narg < 3) error->all(FLERR,"Illegal message command"); + if ((strcmp(arg[1],"md") != 0) && (strcmp(arg[1],"mc") != 0)) error->all(FLERR,"Unknown message protocol"); @@ -82,3 +97,25 @@ void Message::command(int narg, char **arg) cs->send(0,0); } } + +/* ---------------------------------------------------------------------- */ + +void Message::quit() +{ + CSlib *cs = (CSlib *) lmp->cslib; + + // send all-done message to server + // receive acknowledgement back + + cs->send(-1,0); + + int nfield; + int *fieldID,*fieldtype,*fieldlen; + cs->recv(nfield,fieldID,fieldtype,fieldlen); + + // clean-up + + delete cs; + lmp->cslib = NULL; + lmp->clientserver = 0; +} diff --git a/src/MESSAGE/message.h b/src/MESSAGE/message.h index c384a5a7b7..f8b2d47a21 100644 --- a/src/MESSAGE/message.h +++ b/src/MESSAGE/message.h @@ -28,6 +28,9 @@ class Message : protected Pointers { public: Message(class LAMMPS *lmp) : Pointers(lmp) {}; void command(int, char **); + + private: + void quit(); }; } From 25c3a452f20a8ebd793d3ab5c717527e5f579047 Mon Sep 17 00:00:00 2001 From: Tongtong Shen Date: Wed, 18 Sep 2019 17:29:45 -0400 Subject: [PATCH 02/51] Added New keywords rotation rx ry rz to fix_deposit --- src/MISC/fix_deposit.cpp | 27 ++++++++++++++++++++++----- src/MISC/fix_deposit.h | 5 +++-- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/src/MISC/fix_deposit.cpp b/src/MISC/fix_deposit.cpp index c9d4958594..c56929d4b3 100644 --- a/src/MISC/fix_deposit.cpp +++ b/src/MISC/fix_deposit.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include "fix_deposit.h" -#include #include +#include #include +#include "fix_deposit.h" #include "atom.h" #include "atom_vec.h" #include "molecule.h" @@ -418,9 +418,15 @@ void FixDeposit::pre_exchange() while (rng > molfrac[imol]) imol++; natom = onemols[imol]->natoms; if (dimension == 3) { - r[0] = random->uniform() - 0.5; - r[1] = random->uniform() - 0.5; - r[2] = random->uniform() - 0.5; + if (rflag == 1) { + r[0] = rx; + r[1] = ry; + r[2] = rz; + } else { + r[0] = random->uniform() - 0.5; + r[1] = random->uniform() - 0.5; + r[2] = random->uniform() - 0.5; + } } else { r[0] = r[1] = 0.0; r[2] = 1.0; @@ -659,6 +665,10 @@ void FixDeposit::options(int narg, char **arg) xmid = ymid = zmid = 0.0; scaleflag = 1; targetflag = 0; + rflag = 0; + rx = 0.0; + ry = 0.0; + rz = 0.0; int iarg = 0; while (iarg < narg) { @@ -766,6 +776,13 @@ void FixDeposit::options(int narg, char **arg) vzlo = force->numeric(FLERR,arg[iarg+1]); vzhi = force->numeric(FLERR,arg[iarg+2]); iarg += 3; + } else if (strcmp(arg[iarg],"rotation") == 0) { + if (iarg+4 > narg) error->all(FLERR,"Illegal fix deposit command"); + rflag = 1; + rx = force->numeric(FLERR,arg[iarg+1]); + ry = force->numeric(FLERR,arg[iarg+2]); + rz = force->numeric(FLERR,arg[iarg+3]); + iarg += 4; } else if (strcmp(arg[iarg],"units") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix deposit command"); if (strcmp(arg[iarg+1],"box") == 0) scaleflag = 0; diff --git a/src/MISC/fix_deposit.h b/src/MISC/fix_deposit.h index e3104c890d..e9b08253b5 100644 --- a/src/MISC/fix_deposit.h +++ b/src/MISC/fix_deposit.h @@ -20,6 +20,7 @@ FixStyle(deposit,FixDeposit) #ifndef LMP_FIX_DEPOSIT_H #define LMP_FIX_DEPOSIT_H +#include #include "fix.h" namespace LAMMPS_NS { @@ -38,9 +39,9 @@ class FixDeposit : public Fix { private: int ninsert,ntype,nfreq,seed; int iregion,globalflag,localflag,maxattempt,rateflag,scaleflag,targetflag; - int mode,rigidflag,shakeflag,idnext,distflag; + int mode,rigidflag,shakeflag,idnext,distflag,rflag; double lo,hi,deltasq,nearsq,rate,sigma; - double vxlo,vxhi,vylo,vyhi,vzlo,vzhi; + double vxlo,vxhi,vylo,vyhi,vzlo,vzhi,rx,ry,rz; double xlo,xhi,ylo,yhi,zlo,zhi,xmid,ymid,zmid; double tx,ty,tz; char *idregion; From ff991c4c53b9fd2e70e00ea9efbb4ea0dcf63ae1 Mon Sep 17 00:00:00 2001 From: Tongtong Shen Date: Tue, 24 Sep 2019 15:10:47 -0400 Subject: [PATCH 03/51] Added new keywords orientation rx ry rz to restrict random rotation --- src/MISC/fix_deposit.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/MISC/fix_deposit.cpp b/src/MISC/fix_deposit.cpp index c56929d4b3..cb2b7e6531 100644 --- a/src/MISC/fix_deposit.cpp +++ b/src/MISC/fix_deposit.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include #include "fix_deposit.h" +#include +#include +#include #include "atom.h" #include "atom_vec.h" #include "molecule.h" @@ -776,7 +776,7 @@ void FixDeposit::options(int narg, char **arg) vzlo = force->numeric(FLERR,arg[iarg+1]); vzhi = force->numeric(FLERR,arg[iarg+2]); iarg += 3; - } else if (strcmp(arg[iarg],"rotation") == 0) { + } else if (strcmp(arg[iarg],"orientation") == 0) { if (iarg+4 > narg) error->all(FLERR,"Illegal fix deposit command"); rflag = 1; rx = force->numeric(FLERR,arg[iarg+1]); From a705b635a51f2b244f1db577b47b96c84f8be57f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 25 Sep 2019 14:36:26 -0400 Subject: [PATCH 04/51] remove cstdio include cstdio is implicitly included by pointers.h which is included by fix.h. --- src/MISC/fix_deposit.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/MISC/fix_deposit.h b/src/MISC/fix_deposit.h index e9b08253b5..bc24dba2d2 100644 --- a/src/MISC/fix_deposit.h +++ b/src/MISC/fix_deposit.h @@ -20,7 +20,6 @@ FixStyle(deposit,FixDeposit) #ifndef LMP_FIX_DEPOSIT_H #define LMP_FIX_DEPOSIT_H -#include #include "fix.h" namespace LAMMPS_NS { From 227a82e19f5e24905cd03183751760ba34894ad5 Mon Sep 17 00:00:00 2001 From: Tongtong Shen Date: Wed, 2 Oct 2019 15:47:10 -0400 Subject: [PATCH 05/51] an update to the documentation in doc/src/fix_deposit.txt describing the orientation rx ry rz to restrict random rotation --- doc/src/fix_deposit.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/src/fix_deposit.txt b/doc/src/fix_deposit.txt index 9ab125a55f..fb597b6374 100644 --- a/doc/src/fix_deposit.txt +++ b/doc/src/fix_deposit.txt @@ -57,7 +57,9 @@ keyword = {region} or {id} or {global} or {local} or {near} or {gaussian} or {at fix-ID = ID of "fix shake"_fix_shake.html command {units} value = {lattice} or {box} lattice = the geometry is defined in lattice units - box = the geometry is defined in simulation box units :pre + box = the geometry is defined in simulation box units + {orientation} value = rx ry rz + rx,ry,rz = axis of orientation vector :pre :ule [Examples:] From 877329c1e4ef0495ba3fdbee909b28373a51c593 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 8 Oct 2019 16:35:50 +0200 Subject: [PATCH 06/51] rename rflag to orientflag to be consistent with documentation and more readable --- src/MISC/fix_deposit.cpp | 6 +++--- src/MISC/fix_deposit.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/MISC/fix_deposit.cpp b/src/MISC/fix_deposit.cpp index cb2b7e6531..267bce9a02 100644 --- a/src/MISC/fix_deposit.cpp +++ b/src/MISC/fix_deposit.cpp @@ -418,7 +418,7 @@ void FixDeposit::pre_exchange() while (rng > molfrac[imol]) imol++; natom = onemols[imol]->natoms; if (dimension == 3) { - if (rflag == 1) { + if (orientflag == 1) { r[0] = rx; r[1] = ry; r[2] = rz; @@ -665,7 +665,7 @@ void FixDeposit::options(int narg, char **arg) xmid = ymid = zmid = 0.0; scaleflag = 1; targetflag = 0; - rflag = 0; + orientflag = 0; rx = 0.0; ry = 0.0; rz = 0.0; @@ -778,7 +778,7 @@ void FixDeposit::options(int narg, char **arg) iarg += 3; } else if (strcmp(arg[iarg],"orientation") == 0) { if (iarg+4 > narg) error->all(FLERR,"Illegal fix deposit command"); - rflag = 1; + orientflag = 1; rx = force->numeric(FLERR,arg[iarg+1]); ry = force->numeric(FLERR,arg[iarg+2]); rz = force->numeric(FLERR,arg[iarg+3]); diff --git a/src/MISC/fix_deposit.h b/src/MISC/fix_deposit.h index bc24dba2d2..92598862d2 100644 --- a/src/MISC/fix_deposit.h +++ b/src/MISC/fix_deposit.h @@ -38,7 +38,7 @@ class FixDeposit : public Fix { private: int ninsert,ntype,nfreq,seed; int iregion,globalflag,localflag,maxattempt,rateflag,scaleflag,targetflag; - int mode,rigidflag,shakeflag,idnext,distflag,rflag; + int mode,rigidflag,shakeflag,idnext,distflag,orientflag; double lo,hi,deltasq,nearsq,rate,sigma; double vxlo,vxhi,vylo,vyhi,vzlo,vzhi,rx,ry,rz; double xlo,xhi,ylo,yhi,zlo,zhi,xmid,ymid,zmid; From 87a04db02c2ef792f4fc10547f959b4a72acbea6 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 26 Nov 2019 16:24:03 -0500 Subject: [PATCH 07/51] add prototype of style checking script (incomplete) so far, this code can compile a list of styles with flags indicating support for accelerated styles --- doc/utils/check-styles.py | 125 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100755 doc/utils/check-styles.py diff --git a/doc/utils/check-styles.py b/doc/utils/check-styles.py new file mode 100755 index 0000000000..3acd2aa0a9 --- /dev/null +++ b/doc/utils/check-styles.py @@ -0,0 +1,125 @@ +#!/usr/bin/env python + +from __future__ import print_function +from glob import glob +import os, re + +headers = glob(os.path.join('..', '..', 'src', '*', '*.h')) +headers += glob(os.path.join('..', '..', 'src', '*.h')) + +angle = {} +atom = {} +body = {} +bond = {} +command = {} +compute = {} +dihedral = {} +dump = {} +fix = {} +improper = {} +integrate = {} +kspace = {} +minimize = {} +pair = {} +reader = {} +region = {} + +upper = re.compile("[A-Z]+") +gpu = re.compile("(.+)/gpu$") +intel = re.compile("(.+)/intel$") +kokkos = re.compile("(.+)/kk$") +kokkos_skip = re.compile("(.+)/kk/(host|device)$") +omp = re.compile("(.+)/omp$") +opt = re.compile("(.+)/opt$") +removed = re.compile("(.+)Deprecated$") + +def register_style(list,style,info): + if style in list.keys(): + list[style]['gpu'] += info['gpu'] + list[style]['intel'] += info['intel'] + list[style]['kokkos'] += info['kokkos'] + list[style]['omp'] += info['omp'] + list[style]['opt'] += info['opt'] + list[style]['removed'] += info['removed'] + else: + list[style] = info + +for h in headers: + # print("Checking ", h) + fp = open(h) + text = fp.read() + matches = re.findall("(.+)Style\((.+),(.+)\)",text,re.MULTILINE) + for m in matches: + + # skip over internal styles w/o explicit documentation + style = m[1] + if upper.match(style): + continue + + # detect, process, and flag suffix styles: + info = { 'kokkos': 0, 'gpu': 0, 'intel': 0, \ + 'omp': 0, 'opt': 0, 'removed': 0 } + suffix = kokkos_skip.match(style) + if suffix: + continue + suffix = gpu.match(style) + if suffix: + style = suffix.groups()[0] + info['gpu'] = 1 + suffix = intel.match(style) + if suffix: + style = suffix.groups()[0] + info['intel'] = 1 + suffix = kokkos.match(style) + if suffix: + style = suffix.groups()[0] + info['kokkos'] = 1 + suffix = omp.match(style) + if suffix: + style = suffix.groups()[0] + info['omp'] = 1 + suffix = opt.match(style) + if suffix: + style = suffix.groups()[0] + info['opt'] = 1 + deprecated = removed.match(m[2]) + if deprecated: + info['removed'] = 1 + + # register style and suffix flags + if m[0] == 'Angle': + register_style(angle,style,info) + elif m[0] == 'Atom': + register_style(atom,style,info) + elif m[0] == 'Body': + register_style(body,style,info) + elif m[0] == 'Bond': + register_style(bond,style,info) + elif m[0] == 'Command': + register_style(command,style,info) + elif m[0] == 'Compute': + register_style(compute,style,info) + elif m[0] == 'Dihedral': + register_style(dihedral,style,info) + elif m[0] == 'Dump': + register_style(dump,style,info) + elif m[0] == 'Fix': + register_style(fix,style,info) + elif m[0] == 'Improper': + register_style(improper,style,info) + elif m[0] == 'Integrate': + register_style(integrate,style,info) + elif m[0] == 'KSpace': + register_style(kspace,style,info) + elif m[0] == 'Minimize': + register_style(minimize,style,info) + elif m[0] == 'Pair': + register_style(pair,style,info) + elif m[0] == 'Reader': + register_style(reader,style,info) + elif m[0] == 'Region': + register_style(region,style,info) + else: + print("Skipping over: ",m) +fp.close() + From 38e82cbbcc9c599c67a1ab5273e220feea357469 Mon Sep 17 00:00:00 2001 From: Tongtong Shen Date: Fri, 6 Dec 2019 12:02:42 -0500 Subject: [PATCH 08/51] This fix_deposit document added the description of the new rotation flag and its use. --- doc/src/fix_deposit.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/src/fix_deposit.txt b/doc/src/fix_deposit.txt index fb597b6374..45ef7d655e 100644 --- a/doc/src/fix_deposit.txt +++ b/doc/src/fix_deposit.txt @@ -19,7 +19,7 @@ type = atom type to assign to inserted atoms (offset for molecule insertion) :l M = insert a single atom or molecule every M steps :l seed = random # seed (positive integer) :l one or more keyword/value pairs may be appended to args :l -keyword = {region} or {id} or {global} or {local} or {near} or {gaussian} or {attempt} or {rate} or {vx} or {vy} or {vz} or {mol} or {rigid} or {shake} or {units} :l +keyword = {region} or {id} or {global} or {local} or {near} or {gaussian} or {attempt} or {rate} or {vx} or {vy} or {vz} or {mol} or {rigid} or {shake} or {units} or {orientation} :l {region} value = region-ID region-ID = ID of region to use as insertion volume {id} value = {max} or {next} @@ -248,6 +248,8 @@ command must have been previously used to define the lattice spacing. Note that the units choice affects all the keyword values that have units of distance or velocity. +The {orientation} keyword determines the fixed rotation axis r = (rx,ry,rz) for randomly rotated of any inserted molecules. Note that the for a 2d simulation, (rx,ry,rz) should equal to (0,0,1). + NOTE: If you are monitoring the temperature of a system where the atom count is changing due to adding particles, you typically should use the "compute_modify dynamic yes"_compute_modify.html command for the From d1222bd3c051730f0f7a7d9293d35b453b3f1f4c Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Thu, 9 Jan 2020 17:38:50 -0700 Subject: [PATCH 09/51] minor omissions in recent patch release --- doc/src/Commands_pair.rst | 2 +- doc/src/pair_lj.rst | 3 +++ examples/README | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/src/Commands_pair.rst b/doc/src/Commands_pair.rst index b4371420a7..0844e0a2fe 100644 --- a/doc/src/Commands_pair.rst +++ b/doc/src/Commands_pair.rst @@ -146,7 +146,7 @@ OPT. * :doc:`lj/cut/soft (o) ` * :doc:`lj/cut/thole/long (o) ` * :doc:`lj/cut/tip4p/cut (o) ` - * :doc:`lj/cut/tip4p/long (ot) ` + * :doc:`lj/cut/tip4p/long (got) ` * :doc:`lj/cut/tip4p/long/soft (o) ` * :doc:`lj/expand (gko) ` * :doc:`lj/expand/coul/long (g) ` diff --git a/doc/src/pair_lj.rst b/doc/src/pair_lj.rst index 54140a9faf..2b75c96a89 100644 --- a/doc/src/pair_lj.rst +++ b/doc/src/pair_lj.rst @@ -90,6 +90,9 @@ pair\_style lj/cut/coul/wolf/omp command pair\_style lj/cut/tip4p/cut command ==================================== +pair\_style lj/cut/tip4p/cut/gpu command +==================================== + pair\_style lj/cut/tip4p/cut/omp command ======================================== diff --git a/examples/README b/examples/README index 47463a85d8..fd57d5316d 100644 --- a/examples/README +++ b/examples/README @@ -164,6 +164,9 @@ The MC directory has an example script for using LAMMPS as an energy-evaluation engine in a iterative Monte Carlo energy-relaxation loop. +The TIP4P directory has an example for comparing testing forces +computed on a GPU. + The UNITS directory contains examples of input scripts modeling the same Lennard-Jones liquid model, written in 3 different unit systems: lj, real, and metal. So that you can see how to scale/unscale input From 664227ff11c5dedbadbb64eeae79ed0f5b242295 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Thu, 9 Jan 2020 17:41:02 -0700 Subject: [PATCH 10/51] one more tweak --- examples/README | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/README b/examples/README index fd57d5316d..8412f7b3ee 100644 --- a/examples/README +++ b/examples/README @@ -164,8 +164,8 @@ The MC directory has an example script for using LAMMPS as an energy-evaluation engine in a iterative Monte Carlo energy-relaxation loop. -The TIP4P directory has an example for comparing testing forces -computed on a GPU. +The TIP4P directory has an example for testing forces computed on a +GPU. The UNITS directory contains examples of input scripts modeling the same Lennard-Jones liquid model, written in 3 different unit systems: From f073a64549431579119071e22f5c1de411d2bfaa Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 10 Jan 2020 15:29:53 -0500 Subject: [PATCH 11/51] add suffix_flag settings to GPU package styles --- src/GPU/pair_beck_gpu.cpp | 2 ++ src/GPU/pair_born_coul_long_cs_gpu.cpp | 2 ++ src/GPU/pair_born_coul_long_gpu.cpp | 2 ++ src/GPU/pair_born_coul_wolf_cs_gpu.cpp | 2 ++ src/GPU/pair_born_coul_wolf_gpu.cpp | 2 ++ src/GPU/pair_born_gpu.cpp | 2 ++ src/GPU/pair_buck_coul_cut_gpu.cpp | 2 ++ src/GPU/pair_buck_coul_long_gpu.cpp | 2 ++ src/GPU/pair_buck_gpu.cpp | 2 ++ src/GPU/pair_colloid_gpu.cpp | 2 ++ src/GPU/pair_coul_cut_gpu.cpp | 2 ++ src/GPU/pair_coul_debye_gpu.cpp | 2 ++ src/GPU/pair_coul_dsf_gpu.cpp | 2 ++ src/GPU/pair_coul_long_cs_gpu.cpp | 2 ++ src/GPU/pair_coul_long_gpu.cpp | 2 ++ src/GPU/pair_dpd_gpu.cpp | 2 ++ src/GPU/pair_dpd_tstat_gpu.cpp | 2 ++ src/GPU/pair_eam_alloy_gpu.cpp | 3 ++- src/GPU/pair_eam_fs_gpu.cpp | 2 ++ src/GPU/pair_eam_gpu.cpp | 2 ++ src/GPU/pair_gauss_gpu.cpp | 2 ++ src/GPU/pair_gayberne_gpu.cpp | 2 ++ src/GPU/pair_lj96_cut_gpu.cpp | 2 ++ src/GPU/pair_lj_charmm_coul_long_gpu.cpp | 2 ++ src/GPU/pair_lj_class2_coul_long_gpu.cpp | 2 ++ src/GPU/pair_lj_class2_gpu.cpp | 2 ++ src/GPU/pair_lj_cubic_gpu.cpp | 2 ++ src/GPU/pair_lj_cut_coul_cut_gpu.cpp | 2 ++ src/GPU/pair_lj_cut_coul_debye_gpu.cpp | 2 ++ src/GPU/pair_lj_cut_coul_dsf_gpu.cpp | 2 ++ src/GPU/pair_lj_cut_coul_long_gpu.cpp | 2 ++ src/GPU/pair_lj_cut_coul_msm_gpu.cpp | 2 ++ src/GPU/pair_lj_cut_dipole_cut_gpu.cpp | 2 ++ src/GPU/pair_lj_cut_dipole_long_gpu.cpp | 2 ++ src/GPU/pair_lj_cut_gpu.cpp | 2 ++ src/GPU/pair_lj_cut_tip4p_long_gpu.cpp | 2 ++ src/GPU/pair_lj_expand_coul_long_gpu.cpp | 2 ++ src/GPU/pair_lj_expand_gpu.cpp | 2 ++ src/GPU/pair_lj_gromacs_gpu.cpp | 2 ++ src/GPU/pair_lj_sdk_coul_long_gpu.cpp | 2 ++ src/GPU/pair_lj_sdk_gpu.cpp | 2 ++ src/GPU/pair_lj_sf_dipole_sf_gpu.cpp | 2 ++ src/GPU/pair_mie_cut_gpu.cpp | 2 ++ src/GPU/pair_morse_gpu.cpp | 2 ++ src/GPU/pair_resquared_gpu.cpp | 2 ++ src/GPU/pair_soft_gpu.cpp | 2 ++ src/GPU/pair_sw_gpu.cpp | 2 ++ src/GPU/pair_table_gpu.cpp | 2 ++ src/GPU/pair_tersoff_gpu.cpp | 2 ++ src/GPU/pair_tersoff_mod_gpu.cpp | 2 ++ src/GPU/pair_tersoff_zbl_gpu.cpp | 2 ++ src/GPU/pair_ufm_gpu.cpp | 2 ++ src/GPU/pair_vashishta_gpu.cpp | 2 ++ src/GPU/pair_yukawa_colloid_gpu.cpp | 2 ++ src/GPU/pair_yukawa_gpu.cpp | 2 ++ src/GPU/pair_zbl_gpu.cpp | 2 ++ 56 files changed, 112 insertions(+), 1 deletion(-) diff --git a/src/GPU/pair_beck_gpu.cpp b/src/GPU/pair_beck_gpu.cpp index d4d36a5837..f4b73ba5a6 100644 --- a/src/GPU/pair_beck_gpu.cpp +++ b/src/GPU/pair_beck_gpu.cpp @@ -35,6 +35,7 @@ #include "domain.h" #include "gpu_extra.h" #include "math_special.h" +#include "suffix.h" using namespace LAMMPS_NS; using namespace MathSpecial; @@ -68,6 +69,7 @@ PairBeckGPU::PairBeckGPU(LAMMPS *lmp) : PairBeck(lmp), gpu_mode(GPU_FORCE) respa_enable = 0; reinitflag = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_born_coul_long_cs_gpu.cpp b/src/GPU/pair_born_coul_long_cs_gpu.cpp index 7314024d71..bab66e0351 100644 --- a/src/GPU/pair_born_coul_long_cs_gpu.cpp +++ b/src/GPU/pair_born_coul_long_cs_gpu.cpp @@ -36,6 +36,7 @@ #include "domain.h" #include "kspace.h" #include "gpu_extra.h" +#include "suffix.h" using namespace LAMMPS_NS; using namespace MathConst; @@ -90,6 +91,7 @@ PairBornCoulLongCSGPU::PairBornCoulLongCSGPU(LAMMPS *lmp) : respa_enable = 0; reinitflag = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_born_coul_long_gpu.cpp b/src/GPU/pair_born_coul_long_gpu.cpp index 79c0d5f147..39d34420a8 100644 --- a/src/GPU/pair_born_coul_long_gpu.cpp +++ b/src/GPU/pair_born_coul_long_gpu.cpp @@ -36,6 +36,7 @@ #include "domain.h" #include "kspace.h" #include "gpu_extra.h" +#include "suffix.h" #define EWALD_F 1.12837917 #define EWALD_P 0.3275911 @@ -85,6 +86,7 @@ PairBornCoulLongGPU::PairBornCoulLongGPU(LAMMPS *lmp) : respa_enable = 0; reinitflag = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_born_coul_wolf_cs_gpu.cpp b/src/GPU/pair_born_coul_wolf_cs_gpu.cpp index 5f74d3fc7c..b00b5a0b56 100644 --- a/src/GPU/pair_born_coul_wolf_cs_gpu.cpp +++ b/src/GPU/pair_born_coul_wolf_cs_gpu.cpp @@ -35,6 +35,7 @@ #include "update.h" #include "domain.h" #include "gpu_extra.h" +#include "suffix.h" using namespace LAMMPS_NS; using namespace MathConst; @@ -78,6 +79,7 @@ PairBornCoulWolfCSGPU::PairBornCoulWolfCSGPU(LAMMPS *lmp) : PairBornCoulWolfCS(l respa_enable = 0; reinitflag = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_born_coul_wolf_gpu.cpp b/src/GPU/pair_born_coul_wolf_gpu.cpp index 693c2abffb..c5243dc443 100644 --- a/src/GPU/pair_born_coul_wolf_gpu.cpp +++ b/src/GPU/pair_born_coul_wolf_gpu.cpp @@ -35,6 +35,7 @@ #include "update.h" #include "domain.h" #include "gpu_extra.h" +#include "suffix.h" using namespace LAMMPS_NS; using namespace MathConst; @@ -76,6 +77,7 @@ PairBornCoulWolfGPU::PairBornCoulWolfGPU(LAMMPS *lmp) : PairBornCoulWolf(lmp), respa_enable = 0; reinitflag = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_born_gpu.cpp b/src/GPU/pair_born_gpu.cpp index e9edc4f1c2..b71a296d66 100644 --- a/src/GPU/pair_born_gpu.cpp +++ b/src/GPU/pair_born_gpu.cpp @@ -34,6 +34,7 @@ #include "update.h" #include "domain.h" #include "gpu_extra.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -71,6 +72,7 @@ PairBornGPU::PairBornGPU(LAMMPS *lmp) : PairBorn(lmp), gpu_mode(GPU_FORCE) { respa_enable = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_buck_coul_cut_gpu.cpp b/src/GPU/pair_buck_coul_cut_gpu.cpp index 182673fb0d..5d27ee8c51 100644 --- a/src/GPU/pair_buck_coul_cut_gpu.cpp +++ b/src/GPU/pair_buck_coul_cut_gpu.cpp @@ -34,6 +34,7 @@ #include "update.h" #include "domain.h" #include "gpu_extra.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -72,6 +73,7 @@ PairBuckCoulCutGPU::PairBuckCoulCutGPU(LAMMPS *lmp) : PairBuckCoulCut(lmp), respa_enable = 0; reinitflag = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_buck_coul_long_gpu.cpp b/src/GPU/pair_buck_coul_long_gpu.cpp index 75e784fafa..e30230d5a0 100644 --- a/src/GPU/pair_buck_coul_long_gpu.cpp +++ b/src/GPU/pair_buck_coul_long_gpu.cpp @@ -35,6 +35,7 @@ #include "domain.h" #include "kspace.h" #include "gpu_extra.h" +#include "suffix.h" #define EWALD_F 1.12837917 #define EWALD_P 0.3275911 @@ -81,6 +82,7 @@ PairBuckCoulLongGPU::PairBuckCoulLongGPU(LAMMPS *lmp) : respa_enable = 0; reinitflag = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_buck_gpu.cpp b/src/GPU/pair_buck_gpu.cpp index 1559c45b88..b4d5677d53 100644 --- a/src/GPU/pair_buck_gpu.cpp +++ b/src/GPU/pair_buck_gpu.cpp @@ -34,6 +34,7 @@ #include "update.h" #include "domain.h" #include "gpu_extra.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -69,6 +70,7 @@ PairBuckGPU::PairBuckGPU(LAMMPS *lmp) : PairBuck(lmp), gpu_mode(GPU_FORCE) { respa_enable = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_colloid_gpu.cpp b/src/GPU/pair_colloid_gpu.cpp index 4db18dbc52..230adb3db0 100644 --- a/src/GPU/pair_colloid_gpu.cpp +++ b/src/GPU/pair_colloid_gpu.cpp @@ -34,6 +34,7 @@ #include "update.h" #include "domain.h" #include "gpu_extra.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -69,6 +70,7 @@ PairColloidGPU::PairColloidGPU(LAMMPS *lmp) : PairColloid(lmp), gpu_mode(GPU_FOR respa_enable = 0; reinitflag = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_coul_cut_gpu.cpp b/src/GPU/pair_coul_cut_gpu.cpp index 8a3eb12f8d..0242c98343 100644 --- a/src/GPU/pair_coul_cut_gpu.cpp +++ b/src/GPU/pair_coul_cut_gpu.cpp @@ -34,6 +34,7 @@ #include "update.h" #include "domain.h" #include "gpu_extra.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -69,6 +70,7 @@ PairCoulCutGPU::PairCoulCutGPU(LAMMPS *lmp) : PairCoulCut(lmp), gpu_mode(GPU_FOR { respa_enable = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_coul_debye_gpu.cpp b/src/GPU/pair_coul_debye_gpu.cpp index 1fc07f8dac..198f7f5f67 100644 --- a/src/GPU/pair_coul_debye_gpu.cpp +++ b/src/GPU/pair_coul_debye_gpu.cpp @@ -34,6 +34,7 @@ #include "update.h" #include "domain.h" #include "gpu_extra.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -70,6 +71,7 @@ PairCoulDebyeGPU::PairCoulDebyeGPU(LAMMPS *lmp) : { respa_enable = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_coul_dsf_gpu.cpp b/src/GPU/pair_coul_dsf_gpu.cpp index 408be036dd..67d025ff70 100644 --- a/src/GPU/pair_coul_dsf_gpu.cpp +++ b/src/GPU/pair_coul_dsf_gpu.cpp @@ -34,6 +34,7 @@ #include "update.h" #include "domain.h" #include "gpu_extra.h" +#include "suffix.h" #define MY_PIS 1.77245385090551602729 #define EWALD_F 1.12837917 @@ -81,6 +82,7 @@ PairCoulDSFGPU::PairCoulDSFGPU(LAMMPS *lmp) : PairCoulDSF(lmp), respa_enable = 0; reinitflag = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_coul_long_cs_gpu.cpp b/src/GPU/pair_coul_long_cs_gpu.cpp index c70424e472..afd0d6cf56 100644 --- a/src/GPU/pair_coul_long_cs_gpu.cpp +++ b/src/GPU/pair_coul_long_cs_gpu.cpp @@ -35,6 +35,7 @@ #include "domain.h" #include "kspace.h" #include "gpu_extra.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -83,6 +84,7 @@ PairCoulLongCSGPU::PairCoulLongCSGPU(LAMMPS *lmp) : { respa_enable = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_coul_long_gpu.cpp b/src/GPU/pair_coul_long_gpu.cpp index 9623c25f2f..485e45ddc6 100644 --- a/src/GPU/pair_coul_long_gpu.cpp +++ b/src/GPU/pair_coul_long_gpu.cpp @@ -35,6 +35,7 @@ #include "domain.h" #include "kspace.h" #include "gpu_extra.h" +#include "suffix.h" #define EWALD_F 1.12837917 #define EWALD_P 0.3275911 @@ -78,6 +79,7 @@ PairCoulLongGPU::PairCoulLongGPU(LAMMPS *lmp) : { respa_enable = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_dpd_gpu.cpp b/src/GPU/pair_dpd_gpu.cpp index 5fcad6a350..9e14164c57 100644 --- a/src/GPU/pair_dpd_gpu.cpp +++ b/src/GPU/pair_dpd_gpu.cpp @@ -35,6 +35,7 @@ #include "update.h" #include "domain.h" #include "gpu_extra.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -209,6 +210,7 @@ PairDPDGPU::PairDPDGPU(LAMMPS *lmp) : PairDPD(lmp), gpu_mode(GPU_FORCE) respa_enable = 0; reinitflag = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_dpd_tstat_gpu.cpp b/src/GPU/pair_dpd_tstat_gpu.cpp index 2d6798a12d..920eb8dd8a 100644 --- a/src/GPU/pair_dpd_tstat_gpu.cpp +++ b/src/GPU/pair_dpd_tstat_gpu.cpp @@ -35,6 +35,7 @@ #include "update.h" #include "domain.h" #include "gpu_extra.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -212,6 +213,7 @@ PairDPDTstatGPU::PairDPDTstatGPU(LAMMPS *lmp) : PairDPDTstat(lmp), respa_enable = 0; reinitflag = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_eam_alloy_gpu.cpp b/src/GPU/pair_eam_alloy_gpu.cpp index bc55c66676..e7503839f6 100644 --- a/src/GPU/pair_eam_alloy_gpu.cpp +++ b/src/GPU/pair_eam_alloy_gpu.cpp @@ -30,7 +30,7 @@ #include "gpu_extra.h" #include "domain.h" #include "utils.h" - +#include "suffix.h" using namespace LAMMPS_NS; @@ -72,6 +72,7 @@ PairEAMAlloyGPU::PairEAMAlloyGPU(LAMMPS *lmp) : PairEAM(lmp), gpu_mode(GPU_FORCE respa_enable = 0; reinitflag = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_eam_fs_gpu.cpp b/src/GPU/pair_eam_fs_gpu.cpp index ac379a9ce6..6edfa69359 100644 --- a/src/GPU/pair_eam_fs_gpu.cpp +++ b/src/GPU/pair_eam_fs_gpu.cpp @@ -29,6 +29,7 @@ #include "neigh_request.h" #include "gpu_extra.h" #include "domain.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -70,6 +71,7 @@ PairEAMFSGPU::PairEAMFSGPU(LAMMPS *lmp) : PairEAM(lmp), gpu_mode(GPU_FORCE) respa_enable = 0; reinitflag = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_eam_gpu.cpp b/src/GPU/pair_eam_gpu.cpp index 57106f48a4..fb851770f9 100644 --- a/src/GPU/pair_eam_gpu.cpp +++ b/src/GPU/pair_eam_gpu.cpp @@ -30,6 +30,7 @@ #include "error.h" #include "neigh_request.h" #include "gpu_extra.h" +#include "suffix.h" #define MAXLINE 1024 @@ -71,6 +72,7 @@ PairEAMGPU::PairEAMGPU(LAMMPS *lmp) : PairEAM(lmp), gpu_mode(GPU_FORCE) respa_enable = 0; reinitflag = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_gauss_gpu.cpp b/src/GPU/pair_gauss_gpu.cpp index 842b84acf2..17125f9875 100644 --- a/src/GPU/pair_gauss_gpu.cpp +++ b/src/GPU/pair_gauss_gpu.cpp @@ -34,6 +34,7 @@ #include "update.h" #include "domain.h" #include "gpu_extra.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -66,6 +67,7 @@ PairGaussGPU::PairGaussGPU(LAMMPS *lmp) : PairGauss(lmp), gpu_mode(GPU_FORCE) { respa_enable = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_gayberne_gpu.cpp b/src/GPU/pair_gayberne_gpu.cpp index f00accda15..445c74487f 100644 --- a/src/GPU/pair_gayberne_gpu.cpp +++ b/src/GPU/pair_gayberne_gpu.cpp @@ -36,6 +36,7 @@ #include "domain.h" #include "update.h" #include "gpu_extra.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -74,6 +75,7 @@ PairGayBerneGPU::PairGayBerneGPU(LAMMPS *lmp) : PairGayBerne(lmp), quat_nmax = 0; reinitflag = 0; quat = NULL; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_lj96_cut_gpu.cpp b/src/GPU/pair_lj96_cut_gpu.cpp index 16b6b835c0..f6f9bd379b 100644 --- a/src/GPU/pair_lj96_cut_gpu.cpp +++ b/src/GPU/pair_lj96_cut_gpu.cpp @@ -34,6 +34,7 @@ #include "update.h" #include "domain.h" #include "gpu_extra.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -66,6 +67,7 @@ PairLJ96CutGPU::PairLJ96CutGPU(LAMMPS *lmp) : PairLJ96Cut(lmp), gpu_mode(GPU_FOR respa_enable = 0; reinitflag = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_lj_charmm_coul_long_gpu.cpp b/src/GPU/pair_lj_charmm_coul_long_gpu.cpp index bacbb400b1..6eda677928 100644 --- a/src/GPU/pair_lj_charmm_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_charmm_coul_long_gpu.cpp @@ -35,6 +35,7 @@ #include "domain.h" #include "kspace.h" #include "gpu_extra.h" +#include "suffix.h" #define EWALD_F 1.12837917 #define EWALD_P 0.3275911 @@ -83,6 +84,7 @@ PairLJCharmmCoulLongGPU::PairLJCharmmCoulLongGPU(LAMMPS *lmp) : respa_enable = 0; reinitflag = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_lj_class2_coul_long_gpu.cpp b/src/GPU/pair_lj_class2_coul_long_gpu.cpp index e34dbb0f99..4ee776b4ff 100644 --- a/src/GPU/pair_lj_class2_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_class2_coul_long_gpu.cpp @@ -35,6 +35,7 @@ #include "domain.h" #include "kspace.h" #include "gpu_extra.h" +#include "suffix.h" #define EWALD_F 1.12837917 #define EWALD_P 0.3275911 @@ -80,6 +81,7 @@ PairLJClass2CoulLongGPU::PairLJClass2CoulLongGPU(LAMMPS *lmp) : { cpu_time = 0.0; reinitflag = 0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_lj_class2_gpu.cpp b/src/GPU/pair_lj_class2_gpu.cpp index 68f27598f3..643e3ff090 100644 --- a/src/GPU/pair_lj_class2_gpu.cpp +++ b/src/GPU/pair_lj_class2_gpu.cpp @@ -34,6 +34,7 @@ #include "update.h" #include "domain.h" #include "gpu_extra.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -65,6 +66,7 @@ PairLJClass2GPU::PairLJClass2GPU(LAMMPS *lmp) : PairLJClass2(lmp), gpu_mode(GPU_ { reinitflag = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_lj_cubic_gpu.cpp b/src/GPU/pair_lj_cubic_gpu.cpp index 542de37840..64fd6119c3 100644 --- a/src/GPU/pair_lj_cubic_gpu.cpp +++ b/src/GPU/pair_lj_cubic_gpu.cpp @@ -34,6 +34,7 @@ #include "update.h" #include "domain.h" #include "gpu_extra.h" +#include "suffix.h" using namespace LAMMPS_NS; using namespace PairLJCubicConstants; @@ -70,6 +71,7 @@ PairLJCubicGPU::PairLJCubicGPU(LAMMPS *lmp) : PairLJCubic(lmp), respa_enable = 0; cpu_time = 0.0; reinitflag = 0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_lj_cut_coul_cut_gpu.cpp b/src/GPU/pair_lj_cut_coul_cut_gpu.cpp index cf3dd711dc..e52a971786 100644 --- a/src/GPU/pair_lj_cut_coul_cut_gpu.cpp +++ b/src/GPU/pair_lj_cut_coul_cut_gpu.cpp @@ -34,6 +34,7 @@ #include "update.h" #include "domain.h" #include "gpu_extra.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -71,6 +72,7 @@ PairLJCutCoulCutGPU::PairLJCutCoulCutGPU(LAMMPS *lmp) : PairLJCutCoulCut(lmp), g respa_enable = 0; reinitflag = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_lj_cut_coul_debye_gpu.cpp b/src/GPU/pair_lj_cut_coul_debye_gpu.cpp index 20354e732c..4c8920450f 100644 --- a/src/GPU/pair_lj_cut_coul_debye_gpu.cpp +++ b/src/GPU/pair_lj_cut_coul_debye_gpu.cpp @@ -34,6 +34,7 @@ #include "update.h" #include "domain.h" #include "gpu_extra.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -73,6 +74,7 @@ PairLJCutCoulDebyeGPU::PairLJCutCoulDebyeGPU(LAMMPS *lmp) : respa_enable = 0; reinitflag = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_lj_cut_coul_dsf_gpu.cpp b/src/GPU/pair_lj_cut_coul_dsf_gpu.cpp index ccaf86efa6..acfbcd847e 100644 --- a/src/GPU/pair_lj_cut_coul_dsf_gpu.cpp +++ b/src/GPU/pair_lj_cut_coul_dsf_gpu.cpp @@ -34,6 +34,7 @@ #include "update.h" #include "domain.h" #include "gpu_extra.h" +#include "suffix.h" #define MY_PIS 1.77245385090551602729 #define EWALD_F 1.12837917 @@ -82,6 +83,7 @@ PairLJCutCoulDSFGPU::PairLJCutCoulDSFGPU(LAMMPS *lmp) : PairLJCutCoulDSF(lmp), g respa_enable = 0; reinitflag = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_lj_cut_coul_long_gpu.cpp b/src/GPU/pair_lj_cut_coul_long_gpu.cpp index 36c72f1143..24ce118c6d 100644 --- a/src/GPU/pair_lj_cut_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_cut_coul_long_gpu.cpp @@ -35,6 +35,7 @@ #include "domain.h" #include "kspace.h" #include "gpu_extra.h" +#include "suffix.h" #define EWALD_F 1.12837917 #define EWALD_P 0.3275911 @@ -83,6 +84,7 @@ PairLJCutCoulLongGPU::PairLJCutCoulLongGPU(LAMMPS *lmp) : { respa_enable = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_lj_cut_coul_msm_gpu.cpp b/src/GPU/pair_lj_cut_coul_msm_gpu.cpp index 79ca90698a..0e700f6fb2 100644 --- a/src/GPU/pair_lj_cut_coul_msm_gpu.cpp +++ b/src/GPU/pair_lj_cut_coul_msm_gpu.cpp @@ -35,6 +35,7 @@ #include "domain.h" #include "kspace.h" #include "gpu_extra.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -72,6 +73,7 @@ PairLJCutCoulMSMGPU::PairLJCutCoulMSMGPU(LAMMPS *lmp) : respa_enable = 0; reinitflag = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_lj_cut_dipole_cut_gpu.cpp b/src/GPU/pair_lj_cut_dipole_cut_gpu.cpp index e2c8b8d686..6c53b02227 100644 --- a/src/GPU/pair_lj_cut_dipole_cut_gpu.cpp +++ b/src/GPU/pair_lj_cut_dipole_cut_gpu.cpp @@ -34,6 +34,7 @@ #include "update.h" #include "domain.h" #include "gpu_extra.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -73,6 +74,7 @@ PairLJCutDipoleCutGPU::PairLJCutDipoleCutGPU(LAMMPS *lmp) : PairLJCutDipoleCut(l respa_enable = 0; reinitflag = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_lj_cut_dipole_long_gpu.cpp b/src/GPU/pair_lj_cut_dipole_long_gpu.cpp index fb76376d34..0535735820 100644 --- a/src/GPU/pair_lj_cut_dipole_long_gpu.cpp +++ b/src/GPU/pair_lj_cut_dipole_long_gpu.cpp @@ -36,6 +36,7 @@ #include "update.h" #include "domain.h" #include "gpu_extra.h" +#include "suffix.h" #define EWALD_F 1.12837917 #define EWALD_P 0.3275911 @@ -84,6 +85,7 @@ PairLJCutDipoleLongGPU::PairLJCutDipoleLongGPU(LAMMPS *lmp) : PairLJCutDipoleLon respa_enable = 0; reinitflag = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_lj_cut_gpu.cpp b/src/GPU/pair_lj_cut_gpu.cpp index 809e5cf05e..c6f61a7e96 100644 --- a/src/GPU/pair_lj_cut_gpu.cpp +++ b/src/GPU/pair_lj_cut_gpu.cpp @@ -34,6 +34,7 @@ #include "update.h" #include "domain.h" #include "gpu_extra.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -70,6 +71,7 @@ PairLJCutGPU::PairLJCutGPU(LAMMPS *lmp) : PairLJCut(lmp), gpu_mode(GPU_FORCE) { respa_enable = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_lj_cut_tip4p_long_gpu.cpp b/src/GPU/pair_lj_cut_tip4p_long_gpu.cpp index 99668d26b8..a7875f15c4 100644 --- a/src/GPU/pair_lj_cut_tip4p_long_gpu.cpp +++ b/src/GPU/pair_lj_cut_tip4p_long_gpu.cpp @@ -37,6 +37,7 @@ #include "angle.h" #include "bond.h" #include "gpu_extra.h" +#include "suffix.h" #define EWALD_F 1.12837917 #define EWALD_P 0.3275911 @@ -91,6 +92,7 @@ PairLJCutTIP4PLongGPU::PairLJCutTIP4PLongGPU(LAMMPS *lmp) respa_enable = 0; reinitflag = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_lj_expand_coul_long_gpu.cpp b/src/GPU/pair_lj_expand_coul_long_gpu.cpp index a530f7ff9a..a906f57707 100644 --- a/src/GPU/pair_lj_expand_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_expand_coul_long_gpu.cpp @@ -35,6 +35,7 @@ #include "domain.h" #include "kspace.h" #include "gpu_extra.h" +#include "suffix.h" #define EWALD_F 1.12837917 #define EWALD_P 0.3275911 @@ -83,6 +84,7 @@ PairLJExpandCoulLongGPU::PairLJExpandCoulLongGPU(LAMMPS *lmp) : { respa_enable = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_lj_expand_gpu.cpp b/src/GPU/pair_lj_expand_gpu.cpp index 86f8a76b52..db88e8dae8 100644 --- a/src/GPU/pair_lj_expand_gpu.cpp +++ b/src/GPU/pair_lj_expand_gpu.cpp @@ -34,6 +34,7 @@ #include "update.h" #include "domain.h" #include "gpu_extra.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -69,6 +70,7 @@ PairLJExpandGPU::PairLJExpandGPU(LAMMPS *lmp) : PairLJExpand(lmp), gpu_mode(GPU_ { respa_enable = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_lj_gromacs_gpu.cpp b/src/GPU/pair_lj_gromacs_gpu.cpp index 78f8b8b461..6989d73d50 100644 --- a/src/GPU/pair_lj_gromacs_gpu.cpp +++ b/src/GPU/pair_lj_gromacs_gpu.cpp @@ -35,6 +35,7 @@ #include "domain.h" #include "kspace.h" #include "gpu_extra.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -71,6 +72,7 @@ PairLJGromacsGPU::PairLJGromacsGPU(LAMMPS *lmp) : respa_enable = 0; reinitflag = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_lj_sdk_coul_long_gpu.cpp b/src/GPU/pair_lj_sdk_coul_long_gpu.cpp index 24ff8a4f28..3bcaa78d46 100644 --- a/src/GPU/pair_lj_sdk_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_sdk_coul_long_gpu.cpp @@ -35,6 +35,7 @@ #include "domain.h" #include "kspace.h" #include "gpu_extra.h" +#include "suffix.h" #define EWALD_F 1.12837917 #define EWALD_P 0.3275911 @@ -86,6 +87,7 @@ PairLJSDKCoulLongGPU::PairLJSDKCoulLongGPU(LAMMPS *lmp) : respa_enable = 0; reinitflag = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_lj_sdk_gpu.cpp b/src/GPU/pair_lj_sdk_gpu.cpp index 2621f49aeb..c0a3e8ec39 100644 --- a/src/GPU/pair_lj_sdk_gpu.cpp +++ b/src/GPU/pair_lj_sdk_gpu.cpp @@ -34,6 +34,7 @@ #include "update.h" #include "domain.h" #include "gpu_extra.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -71,6 +72,7 @@ PairLJSDKGPU::PairLJSDKGPU(LAMMPS *lmp) : PairLJSDK(lmp), gpu_mode(GPU_FORCE) respa_enable = 0; reinitflag = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_lj_sf_dipole_sf_gpu.cpp b/src/GPU/pair_lj_sf_dipole_sf_gpu.cpp index cf26cdf3b4..d001c282e2 100644 --- a/src/GPU/pair_lj_sf_dipole_sf_gpu.cpp +++ b/src/GPU/pair_lj_sf_dipole_sf_gpu.cpp @@ -34,6 +34,7 @@ #include "update.h" #include "domain.h" #include "gpu_extra.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -72,6 +73,7 @@ PairLJSFDipoleSFGPU::PairLJSFDipoleSFGPU(LAMMPS *lmp) : PairLJSFDipoleSF(lmp), respa_enable = 0; reinitflag = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_mie_cut_gpu.cpp b/src/GPU/pair_mie_cut_gpu.cpp index f3a384113f..84cc903dee 100644 --- a/src/GPU/pair_mie_cut_gpu.cpp +++ b/src/GPU/pair_mie_cut_gpu.cpp @@ -34,6 +34,7 @@ #include "update.h" #include "domain.h" #include "gpu_extra.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -67,6 +68,7 @@ PairMIECutGPU::PairMIECutGPU(LAMMPS *lmp) : PairMIECut(lmp), gpu_mode(GPU_FORCE) respa_enable = 0; reinitflag = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_morse_gpu.cpp b/src/GPU/pair_morse_gpu.cpp index dcad227045..5bcda54d85 100644 --- a/src/GPU/pair_morse_gpu.cpp +++ b/src/GPU/pair_morse_gpu.cpp @@ -34,6 +34,7 @@ #include "update.h" #include "domain.h" #include "gpu_extra.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -65,6 +66,7 @@ PairMorseGPU::PairMorseGPU(LAMMPS *lmp) : PairMorse(lmp), gpu_mode(GPU_FORCE) { reinitflag = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_resquared_gpu.cpp b/src/GPU/pair_resquared_gpu.cpp index b12a790c81..b03834d5d1 100644 --- a/src/GPU/pair_resquared_gpu.cpp +++ b/src/GPU/pair_resquared_gpu.cpp @@ -36,6 +36,7 @@ #include "domain.h" #include "update.h" #include "gpu_extra.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -76,6 +77,7 @@ PairRESquaredGPU::PairRESquaredGPU(LAMMPS *lmp) : PairRESquared(lmp), error->all(FLERR,"Pair resquared/gpu requires atom style ellipsoid"); quat_nmax = 0; quat = NULL; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_soft_gpu.cpp b/src/GPU/pair_soft_gpu.cpp index 0efcb20c8d..04efb1e96a 100644 --- a/src/GPU/pair_soft_gpu.cpp +++ b/src/GPU/pair_soft_gpu.cpp @@ -35,6 +35,7 @@ #include "domain.h" #include "gpu_extra.h" #include "math_const.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -70,6 +71,7 @@ PairSoftGPU::PairSoftGPU(LAMMPS *lmp) : PairSoft(lmp), gpu_mode(GPU_FORCE) { respa_enable = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_sw_gpu.cpp b/src/GPU/pair_sw_gpu.cpp index 906f8a7e83..8e75aff545 100644 --- a/src/GPU/pair_sw_gpu.cpp +++ b/src/GPU/pair_sw_gpu.cpp @@ -32,6 +32,7 @@ #include "error.h" #include "domain.h" #include "gpu_extra.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -72,6 +73,7 @@ PairSWGPU::PairSWGPU(LAMMPS *lmp) : PairSW(lmp), gpu_mode(GPU_FORCE) { cpu_time = 0.0; reinitflag = 0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); cutghost = NULL; diff --git a/src/GPU/pair_table_gpu.cpp b/src/GPU/pair_table_gpu.cpp index 4432265874..563b070bda 100644 --- a/src/GPU/pair_table_gpu.cpp +++ b/src/GPU/pair_table_gpu.cpp @@ -34,6 +34,7 @@ #include "update.h" #include "domain.h" #include "gpu_extra.h" +#include "suffix.h" #define LOOKUP 0 #define LINEAR 1 @@ -73,6 +74,7 @@ PairTableGPU::PairTableGPU(LAMMPS *lmp) : PairTable(lmp), respa_enable = 0; reinitflag = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_tersoff_gpu.cpp b/src/GPU/pair_tersoff_gpu.cpp index 15fc5c95da..33bac49e5e 100644 --- a/src/GPU/pair_tersoff_gpu.cpp +++ b/src/GPU/pair_tersoff_gpu.cpp @@ -32,6 +32,7 @@ #include "error.h" #include "domain.h" #include "gpu_extra.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -76,6 +77,7 @@ extern double lmp_gpu_forces(double **f, double **tor, double *eatom, PairTersoffGPU::PairTersoffGPU(LAMMPS *lmp) : PairTersoff(lmp), gpu_mode(GPU_FORCE) { cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); cutghost = NULL; diff --git a/src/GPU/pair_tersoff_mod_gpu.cpp b/src/GPU/pair_tersoff_mod_gpu.cpp index 2ff09c3248..ebcdf0f7dd 100644 --- a/src/GPU/pair_tersoff_mod_gpu.cpp +++ b/src/GPU/pair_tersoff_mod_gpu.cpp @@ -32,6 +32,7 @@ #include "error.h" #include "domain.h" #include "gpu_extra.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -69,6 +70,7 @@ PairTersoffMODGPU::PairTersoffMODGPU(LAMMPS *lmp) : PairTersoffMOD(lmp), gpu_mode(GPU_FORCE) { cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); cutghost = NULL; diff --git a/src/GPU/pair_tersoff_zbl_gpu.cpp b/src/GPU/pair_tersoff_zbl_gpu.cpp index b8d02f09ab..09b5a7f838 100644 --- a/src/GPU/pair_tersoff_zbl_gpu.cpp +++ b/src/GPU/pair_tersoff_zbl_gpu.cpp @@ -32,6 +32,7 @@ #include "error.h" #include "domain.h" #include "gpu_extra.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -77,6 +78,7 @@ PairTersoffZBLGPU::PairTersoffZBLGPU(LAMMPS *lmp) : PairTersoffZBL(lmp), gpu_mode(GPU_FORCE) { cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); cutghost = NULL; diff --git a/src/GPU/pair_ufm_gpu.cpp b/src/GPU/pair_ufm_gpu.cpp index 97c2eebf24..49ed6289e1 100644 --- a/src/GPU/pair_ufm_gpu.cpp +++ b/src/GPU/pair_ufm_gpu.cpp @@ -36,6 +36,7 @@ #include "update.h" #include "domain.h" #include "gpu_extra.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -72,6 +73,7 @@ PairUFMGPU::PairUFMGPU(LAMMPS *lmp) : PairUFM(lmp), gpu_mode(GPU_FORCE) { respa_enable = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_vashishta_gpu.cpp b/src/GPU/pair_vashishta_gpu.cpp index 56199f7e54..6f0d938440 100644 --- a/src/GPU/pair_vashishta_gpu.cpp +++ b/src/GPU/pair_vashishta_gpu.cpp @@ -32,6 +32,7 @@ #include "error.h" #include "domain.h" #include "gpu_extra.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -73,6 +74,7 @@ PairVashishtaGPU::PairVashishtaGPU(LAMMPS *lmp) : PairVashishta(lmp), gpu_mode(G cpu_time = 0.0; reinitflag = 0; gpu_allocated = false; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); cutghost = NULL; diff --git a/src/GPU/pair_yukawa_colloid_gpu.cpp b/src/GPU/pair_yukawa_colloid_gpu.cpp index 51c7e683db..7bbed7d89b 100644 --- a/src/GPU/pair_yukawa_colloid_gpu.cpp +++ b/src/GPU/pair_yukawa_colloid_gpu.cpp @@ -34,6 +34,7 @@ #include "update.h" #include "domain.h" #include "gpu_extra.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -68,6 +69,7 @@ PairYukawaColloidGPU::PairYukawaColloidGPU(LAMMPS *lmp) : PairYukawaColloid(lmp) respa_enable = 0; reinitflag = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_yukawa_gpu.cpp b/src/GPU/pair_yukawa_gpu.cpp index 5dc13c7750..9d702daf20 100644 --- a/src/GPU/pair_yukawa_gpu.cpp +++ b/src/GPU/pair_yukawa_gpu.cpp @@ -34,6 +34,7 @@ #include "update.h" #include "domain.h" #include "gpu_extra.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -67,6 +68,7 @@ PairYukawaGPU::PairYukawaGPU(LAMMPS *lmp) : PairYukawa(lmp), respa_enable = 0; reinitflag = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } diff --git a/src/GPU/pair_zbl_gpu.cpp b/src/GPU/pair_zbl_gpu.cpp index 5e24281145..23c3c077fa 100644 --- a/src/GPU/pair_zbl_gpu.cpp +++ b/src/GPU/pair_zbl_gpu.cpp @@ -35,6 +35,7 @@ #include "update.h" #include "domain.h" #include "gpu_extra.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -70,6 +71,7 @@ PairZBLGPU::PairZBLGPU(LAMMPS *lmp) : PairZBL(lmp), gpu_mode(GPU_FORCE) respa_enable = 0; reinitflag = 0; cpu_time = 0.0; + suffix_flag |= Suffix::GPU; GPU_EXTRA::gpu_ready(lmp->modify, lmp->error); } From 4989c3a878a27f3fcea4457a547cc72c90a3a6f2 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 10 Jan 2020 15:30:26 -0500 Subject: [PATCH 12/51] convert static const ints to an enumerator --- src/suffix.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/suffix.h b/src/suffix.h index 817600dfd5..88629aa796 100644 --- a/src/suffix.h +++ b/src/suffix.h @@ -16,13 +16,14 @@ namespace LAMMPS_NS { -namespace Suffix { - static const int NONE = 0; - static const int OPT = 1<<0; - static const int GPU = 1<<1; - static const int OMP = 1<<2; - static const int INTEL = 1<<3; -} +enum Suffix { + NONE = 0, + OPT = 1<<0, + GPU = 1<<1, + OMP = 1<<2, + INTEL = 1<<3, + KOKKOS = 1<<4 +}; } From 6e3559a6e710989b7bd73ef4c3c91639c2f40094 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Fri, 10 Jan 2020 14:09:38 -0700 Subject: [PATCH 13/51] added rerun example dir --- examples/README | 1 + examples/rerun/in.first | 33 ++++++ examples/rerun/in.read_dump | 37 +++++++ examples/rerun/in.rerun | 29 +++++ examples/rerun/log.20Jan20.first.g++.4 | 97 +++++++++++++++++ examples/rerun/log.20Jan20.read_dump.g++.4 | 118 +++++++++++++++++++++ examples/rerun/log.20Jan20.rerun.g++.4 | 86 +++++++++++++++ 7 files changed, 401 insertions(+) create mode 100644 examples/rerun/in.first create mode 100644 examples/rerun/in.read_dump create mode 100644 examples/rerun/in.rerun create mode 100644 examples/rerun/log.20Jan20.first.g++.4 create mode 100644 examples/rerun/log.20Jan20.read_dump.g++.4 create mode 100644 examples/rerun/log.20Jan20.rerun.g++.4 diff --git a/examples/README b/examples/README index 47463a85d8..0589055e4a 100644 --- a/examples/README +++ b/examples/README @@ -101,6 +101,7 @@ prd: parallel replica dynamics of vacancy diffusion in bulk Si python: use of PYTHON package to invoke Python code from input script qeq: use of QEQ package for charge equilibration reax: RDX and TATB and several other models using ReaxFF +rerun: use of rerun and read_dump commands rigid: rigid bodies modeled as independent or coupled shear: sideways shear applied to 2d solid, with and without a void snap: examples for using several bundled SNAP potentials diff --git a/examples/rerun/in.first b/examples/rerun/in.first new file mode 100644 index 0000000000..2aa4c1974c --- /dev/null +++ b/examples/rerun/in.first @@ -0,0 +1,33 @@ +# 3d Lennard-Jones melt + +variable x index 1 +variable y index 1 +variable z index 1 + +variable xx equal 20*$x +variable yy equal 20*$y +variable zz equal 20*$z + +units lj +atom_style atomic + +lattice fcc 0.8442 +region box block 0 ${xx} 0 ${yy} 0 ${zz} +create_box 1 box +create_atoms 1 box +mass 1 1.0 + +velocity all create 1.44 87287 loop geom + +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 2.5 + +neighbor 0.3 bin +neigh_modify delay 0 every 20 check no + +fix 1 all nve + +dump 1 all custom 100 lj.dump id type x y z vx vy vz + +thermo 100 +run 1000 diff --git a/examples/rerun/in.read_dump b/examples/rerun/in.read_dump new file mode 100644 index 0000000000..3c1310b305 --- /dev/null +++ b/examples/rerun/in.read_dump @@ -0,0 +1,37 @@ +# 3d Lennard-Jones melt + +variable x index 1 +variable y index 1 +variable z index 1 + +variable xx equal 20*$x +variable yy equal 20*$y +variable zz equal 20*$z + +units lj +atom_style atomic + +lattice fcc 0.8442 +region box block 0 ${xx} 0 ${yy} 0 ${zz} +create_box 1 box +create_atoms 1 box +mass 1 1.0 + +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 2.5 + +neighbor 0.3 bin + +thermo 100 + +read_dump lj.dump 200 x y z vx vy vz +run 0 post no + +read_dump lj.dump 800 x y z vx vy vz +run 0 post no + +read_dump lj.dump 600 x y z vx vy vz +run 0 post no + +read_dump lj.dump 400 x y z vx vy vz +run 0 post no diff --git a/examples/rerun/in.rerun b/examples/rerun/in.rerun new file mode 100644 index 0000000000..a695006f26 --- /dev/null +++ b/examples/rerun/in.rerun @@ -0,0 +1,29 @@ +# 3d Lennard-Jones melt + +variable x index 1 +variable y index 1 +variable z index 1 + +variable xx equal 20*$x +variable yy equal 20*$y +variable zz equal 20*$z + +units lj +atom_style atomic + +lattice fcc 0.8442 +region box block 0 ${xx} 0 ${yy} 0 ${zz} +create_box 1 box +create_atoms 1 box +mass 1 1.0 + +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 2.5 + +neighbor 0.3 bin + +thermo 100 + +rerun lj.dump first 200 last 800 every 200 & + dump x y z vx vy vz + diff --git a/examples/rerun/log.20Jan20.first.g++.4 b/examples/rerun/log.20Jan20.first.g++.4 new file mode 100644 index 0000000000..cabc17c851 --- /dev/null +++ b/examples/rerun/log.20Jan20.first.g++.4 @@ -0,0 +1,97 @@ +LAMMPS (09 Jan 2020) +# 3d Lennard-Jones melt + +variable x index 1 +variable y index 1 +variable z index 1 + +variable xx equal 20*$x +variable xx equal 20*1 +variable yy equal 20*$y +variable yy equal 20*1 +variable zz equal 20*$z +variable zz equal 20*1 + +units lj +atom_style atomic + +lattice fcc 0.8442 +Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 +region box block 0 ${xx} 0 ${yy} 0 ${zz} +region box block 0 20 0 ${yy} 0 ${zz} +region box block 0 20 0 20 0 ${zz} +region box block 0 20 0 20 0 20 +create_box 1 box +Created orthogonal box = (0 0 0) to (33.5919 33.5919 33.5919) + 1 by 2 by 2 MPI processor grid +create_atoms 1 box +Created 32000 atoms + create_atoms CPU = 0.00173283 secs +mass 1 1.0 + +velocity all create 1.44 87287 loop geom + +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 2.5 + +neighbor 0.3 bin +neigh_modify delay 0 every 20 check no + +fix 1 all nve + +dump 1 all custom 100 lj.dump id type x y z vx vy vz + +thermo 100 +run 1000 +Neighbor list info ... + update every 20 steps, delay 0 steps, check no + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 24 24 24 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 7.869 | 7.869 | 7.869 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 1.44 -6.7733681 0 -4.6134356 -5.0197073 + 100 0.7574531 -5.7585055 0 -4.6223613 0.20726105 + 200 0.75953175 -5.7618892 0 -4.6226272 0.20910575 + 300 0.74624286 -5.741962 0 -4.6226327 0.32016436 + 400 0.74155675 -5.7343359 0 -4.6220356 0.3777989 + 500 0.73249345 -5.7206946 0 -4.6219887 0.44253023 + 600 0.72087255 -5.7029314 0 -4.6216563 0.55730354 + 700 0.71489947 -5.693532 0 -4.6212164 0.61322381 + 800 0.70876958 -5.6840594 0 -4.6209382 0.66822293 + 900 0.70799522 -5.6828388 0 -4.6208791 0.66961272 + 1000 0.70325878 -5.6750833 0 -4.6202281 0.7112575 +Loop time of 6.3349 on 4 procs for 1000 steps with 32000 atoms + +Performance: 68193.673 tau/day, 157.856 timesteps/s +99.8% CPU use with 4 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 4.3538 | 4.6712 | 5.0021 | 12.8 | 73.74 +Neigh | 0.59378 | 0.65229 | 0.75202 | 8.0 | 10.30 +Comm | 0.28101 | 0.69839 | 1.0586 | 38.5 | 11.02 +Output | 0.21601 | 0.21682 | 0.21718 | 0.1 | 3.42 +Modify | 0.074002 | 0.074803 | 0.075779 | 0.2 | 1.18 +Other | | 0.0214 | | | 0.34 + +Nlocal: 8000 ave 8049 max 7942 min +Histogram: 1 0 0 1 0 0 0 1 0 1 +Nghost: 8632.5 ave 8685 max 8591 min +Histogram: 1 0 0 1 1 0 0 0 0 1 +Neighs: 299934 ave 303105 max 295137 min +Histogram: 1 0 0 0 0 0 1 1 0 1 + +Total # of neighbors = 1199738 +Ave neighs/atom = 37.4918 +Neighbor list builds = 50 +Dangerous builds not checked +Total wall time: 0:00:06 diff --git a/examples/rerun/log.20Jan20.read_dump.g++.4 b/examples/rerun/log.20Jan20.read_dump.g++.4 new file mode 100644 index 0000000000..874309aaa3 --- /dev/null +++ b/examples/rerun/log.20Jan20.read_dump.g++.4 @@ -0,0 +1,118 @@ +LAMMPS (09 Jan 2020) +# 3d Lennard-Jones melt + +variable x index 1 +variable y index 1 +variable z index 1 + +variable xx equal 20*$x +variable xx equal 20*1 +variable yy equal 20*$y +variable yy equal 20*1 +variable zz equal 20*$z +variable zz equal 20*1 + +units lj +atom_style atomic + +lattice fcc 0.8442 +Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 +region box block 0 ${xx} 0 ${yy} 0 ${zz} +region box block 0 20 0 ${yy} 0 ${zz} +region box block 0 20 0 20 0 ${zz} +region box block 0 20 0 20 0 20 +create_box 1 box +Created orthogonal box = (0 0 0) to (33.5919 33.5919 33.5919) + 1 by 2 by 2 MPI processor grid +create_atoms 1 box +Created 32000 atoms + create_atoms CPU = 0.001724 secs +mass 1 1.0 + +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 2.5 + +neighbor 0.3 bin + +thermo 100 + +read_dump lj.dump 200 x y z vx vy vz + orthogonal box = (0 0 0) to (33.5919 33.5919 33.5919) + 32000 atoms before read + 32000 atoms in snapshot + 0 atoms purged + 32000 atoms replaced + 0 atoms trimmed + 0 atoms added + 32000 atoms after read +run 0 post no +WARNING: No fixes defined, atoms won't move (../verlet.cpp:52) +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 24 24 24 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 6.841 | 6.843 | 6.846 Mbytes +Step Temp E_pair E_mol TotEng Press + 200 0.75953173 -5.7618854 0 -4.6226234 0.20912952 +Loop time of 2.26498e-06 on 4 procs for 0 steps with 32000 atoms + + +read_dump lj.dump 800 x y z vx vy vz + orthogonal box = (0 0 0) to (33.5919 33.5919 33.5919) + 32000 atoms before read + 32000 atoms in snapshot + 0 atoms purged + 32000 atoms replaced + 0 atoms trimmed + 0 atoms added + 32000 atoms after read +run 0 post no +WARNING: No fixes defined, atoms won't move (../verlet.cpp:52) +Per MPI rank memory allocation (min/avg/max) = 6.841 | 6.843 | 6.846 Mbytes +Step Temp E_pair E_mol TotEng Press + 800 0.70876957 -5.6840545 0 -4.6209334 0.66823926 +Loop time of 5.36442e-07 on 4 procs for 0 steps with 32000 atoms + + +read_dump lj.dump 600 x y z vx vy vz + orthogonal box = (0 0 0) to (33.5919 33.5919 33.5919) + 32000 atoms before read + 32000 atoms in snapshot + 0 atoms purged + 32000 atoms replaced + 0 atoms trimmed + 0 atoms added + 32000 atoms after read +run 0 post no +WARNING: No fixes defined, atoms won't move (../verlet.cpp:52) +Per MPI rank memory allocation (min/avg/max) = 6.841 | 6.843 | 6.846 Mbytes +Step Temp E_pair E_mol TotEng Press + 600 0.72087256 -5.7029306 0 -4.6216556 0.55729873 +Loop time of 7.7486e-07 on 4 procs for 0 steps with 32000 atoms + + +read_dump lj.dump 400 x y z vx vy vz + orthogonal box = (0 0 0) to (33.5919 33.5919 33.5919) + 32000 atoms before read + 32000 atoms in snapshot + 0 atoms purged + 32000 atoms replaced + 0 atoms trimmed + 0 atoms added + 32000 atoms after read +run 0 post no +WARNING: No fixes defined, atoms won't move (../verlet.cpp:52) +Per MPI rank memory allocation (min/avg/max) = 6.841 | 6.843 | 6.846 Mbytes +Step Temp E_pair E_mol TotEng Press + 400 0.74155677 -5.7343336 0 -4.6220332 0.37780193 +Loop time of 5.36442e-07 on 4 procs for 0 steps with 32000 atoms + +Total wall time: 0:00:00 diff --git a/examples/rerun/log.20Jan20.rerun.g++.4 b/examples/rerun/log.20Jan20.rerun.g++.4 new file mode 100644 index 0000000000..f654e2c777 --- /dev/null +++ b/examples/rerun/log.20Jan20.rerun.g++.4 @@ -0,0 +1,86 @@ +LAMMPS (09 Jan 2020) +# 3d Lennard-Jones melt + +variable x index 1 +variable y index 1 +variable z index 1 + +variable xx equal 20*$x +variable xx equal 20*1 +variable yy equal 20*$y +variable yy equal 20*1 +variable zz equal 20*$z +variable zz equal 20*1 + +units lj +atom_style atomic + +lattice fcc 0.8442 +Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 +region box block 0 ${xx} 0 ${yy} 0 ${zz} +region box block 0 20 0 ${yy} 0 ${zz} +region box block 0 20 0 20 0 ${zz} +region box block 0 20 0 20 0 20 +create_box 1 box +Created orthogonal box = (0 0 0) to (33.5919 33.5919 33.5919) + 1 by 2 by 2 MPI processor grid +create_atoms 1 box +Created 32000 atoms + create_atoms CPU = 0.00100017 secs +mass 1 1.0 + +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 2.5 + +neighbor 0.3 bin + +thermo 100 + +rerun lj.dump first 200 last 800 every 200 dump x y z vx vy vz +WARNING: No fixes defined, atoms won't move (../verlet.cpp:52) +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 24 24 24 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 6.716 | 6.718 | 6.721 Mbytes +Step Temp E_pair E_mol TotEng Press + 200 0.75953173 -5.7618854 0 -4.6226234 0.20912952 + 400 0.74155677 -5.7343336 0 -4.6220332 0.37780193 + 600 0.72087256 -5.7029306 0 -4.6216556 0.55729873 + 800 0.70876957 -5.6840545 0 -4.6209334 0.66823926 +Loop time of 0.375898 on 4 procs for 4 steps with 32000 atoms + +Performance: 4596.990 tau/day, 10.641 timesteps/s +98.0% CPU use with 4 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0 | 0 | 0 | 0.0 | 0.00 +Output | 0 | 0 | 0 | 0.0 | 0.00 +Modify | 0 | 0 | 0 | 0.0 | 0.00 +Other | | 0.3759 | | |100.00 + +Nlocal: 8000 ave 8073 max 7933 min +Histogram: 1 0 1 0 0 0 1 0 0 1 +Nghost: 8693.25 ave 8731 max 8658 min +Histogram: 1 1 0 0 0 0 0 0 1 1 +Neighs: 299786 ave 302947 max 293888 min +Histogram: 1 0 0 0 0 0 0 1 1 1 + +Total # of neighbors = 1199142 +Ave neighs/atom = 37.4732 +Neighbor list builds = 0 +Dangerous builds = 0 + +Total wall time: 0:00:00 From d5192c10438964e2593c9ed92273d2e10e30fae1 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Fri, 10 Jan 2020 14:37:45 -0700 Subject: [PATCH 14/51] added an example for recalculating the RDF at a longer cutoff via rerun --- examples/rerun/README | 17 ++++ examples/rerun/in.rdf.first | 36 +++++++ examples/rerun/in.rdf.rerun | 31 ++++++ examples/rerun/log.20Jan20.rdf.first.g++.4 | 105 +++++++++++++++++++++ examples/rerun/log.20Jan20.rdf.rerun.g++.4 | 100 ++++++++++++++++++++ examples/rerun/rdf.20Jan20.first.g++.4 | 54 +++++++++++ examples/rerun/rdf.20Jan20.rerun.g++.4 | 104 ++++++++++++++++++++ 7 files changed, 447 insertions(+) create mode 100644 examples/rerun/README create mode 100644 examples/rerun/in.rdf.first create mode 100644 examples/rerun/in.rdf.rerun create mode 100644 examples/rerun/log.20Jan20.rdf.first.g++.4 create mode 100644 examples/rerun/log.20Jan20.rdf.rerun.g++.4 create mode 100644 examples/rerun/rdf.20Jan20.first.g++.4 create mode 100644 examples/rerun/rdf.20Jan20.rerun.g++.4 diff --git a/examples/rerun/README b/examples/rerun/README new file mode 100644 index 0000000000..66db685d92 --- /dev/null +++ b/examples/rerun/README @@ -0,0 +1,17 @@ +Examples of how to use the rerun and read_dump commands + +in.first - run on any number of procs for any size problem +in.rerun - run on same or different proc count for same size problem +in.read_dump - ditto to in.rerun + +The thermo output on the same timesteps should be identical +to within round-off errors. + +in.rdf.first - produces RDF in rdf.first, 50 bins out to 2.5 sigma +in.rdf.rerun - produces RDF in rdf.rerun, 100 bins out to 5 sigma + +In both bases the time averaged RDF is computed 10x times, every 100 +steps for 1000 total. In the rerun, the pair style cutoff is changed +so the RDF can be computed to a longer distance without re-running the +simulation. The RDF values in the 2 files should be the same (within +round-off) for the first 50 bins. diff --git a/examples/rerun/in.rdf.first b/examples/rerun/in.rdf.first new file mode 100644 index 0000000000..f9d1ecf55e --- /dev/null +++ b/examples/rerun/in.rdf.first @@ -0,0 +1,36 @@ +# 3d Lennard-Jones melt + +variable x index 1 +variable y index 1 +variable z index 1 + +variable xx equal 20*$x +variable yy equal 20*$y +variable zz equal 20*$z + +units lj +atom_style atomic + +lattice fcc 0.8442 +region box block 0 ${xx} 0 ${yy} 0 ${zz} +create_box 1 box +create_atoms 1 box +mass 1 1.0 + +velocity all create 1.44 87287 loop geom + +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 + +neighbor 0.3 bin +neigh_modify delay 0 every 20 check no + +fix 1 all nve + +dump 1 all custom 100 lj.dump id type x y z + +compute myRDF all rdf 50 cutoff 2.5 +fix 2 all ave/time 100 10 1000 c_myRDF[*] file rdf.first mode vector + +thermo 100 +run 1000 diff --git a/examples/rerun/in.rdf.rerun b/examples/rerun/in.rdf.rerun new file mode 100644 index 0000000000..5562cac74d --- /dev/null +++ b/examples/rerun/in.rdf.rerun @@ -0,0 +1,31 @@ +# 3d Lennard-Jones melt + +variable x index 1 +variable y index 1 +variable z index 1 + +variable xx equal 20*$x +variable yy equal 20*$y +variable zz equal 20*$z + +units lj +atom_style atomic + +lattice fcc 0.8442 +region box block 0 ${xx} 0 ${yy} 0 ${zz} +create_box 1 box +create_atoms 1 box +mass 1 1.0 + +pair_style lj/cut 5.0 +pair_coeff 1 1 1.0 1.0 + +neighbor 0.3 bin + +compute myRDF all rdf 100 cutoff 5.0 +fix 2 all ave/time 100 10 1000 c_myRDF[*] file rdf.rerun mode vector + +thermo 100 + +rerun lj.dump dump x y z + diff --git a/examples/rerun/log.20Jan20.rdf.first.g++.4 b/examples/rerun/log.20Jan20.rdf.first.g++.4 new file mode 100644 index 0000000000..7d029f23d4 --- /dev/null +++ b/examples/rerun/log.20Jan20.rdf.first.g++.4 @@ -0,0 +1,105 @@ +LAMMPS (09 Jan 2020) +# 3d Lennard-Jones melt + +variable x index 1 +variable y index 1 +variable z index 1 + +variable xx equal 20*$x +variable xx equal 20*1 +variable yy equal 20*$y +variable yy equal 20*1 +variable zz equal 20*$z +variable zz equal 20*1 + +units lj +atom_style atomic + +lattice fcc 0.8442 +Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 +region box block 0 ${xx} 0 ${yy} 0 ${zz} +region box block 0 20 0 ${yy} 0 ${zz} +region box block 0 20 0 20 0 ${zz} +region box block 0 20 0 20 0 20 +create_box 1 box +Created orthogonal box = (0 0 0) to (33.5919 33.5919 33.5919) + 1 by 2 by 2 MPI processor grid +create_atoms 1 box +Created 32000 atoms + create_atoms CPU = 0.00100017 secs +mass 1 1.0 + +velocity all create 1.44 87287 loop geom + +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 + +neighbor 0.3 bin +neigh_modify delay 0 every 20 check no + +fix 1 all nve + +dump 1 all custom 100 lj.dump id type x y z + +compute myRDF all rdf 50 cutoff 2.5 +fix 2 all ave/time 100 10 1000 c_myRDF[*] file rdf.first mode vector + +thermo 100 +run 1000 +Neighbor list info ... + update every 20 steps, delay 0 steps, check no + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 24 24 24 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard + (2) compute rdf, occasional + attributes: half, newton on, cut 2.8 + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 8.487 | 8.487 | 8.487 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 1.44 -6.7733681 0 -4.6134356 -5.0197073 + 100 0.7574531 -5.7585055 0 -4.6223613 0.20726105 + 200 0.75953175 -5.7618892 0 -4.6226272 0.20910575 + 300 0.74624286 -5.741962 0 -4.6226327 0.32016436 + 400 0.74155675 -5.7343359 0 -4.6220356 0.3777989 + 500 0.73249345 -5.7206946 0 -4.6219887 0.44253023 + 600 0.72087255 -5.7029314 0 -4.6216563 0.55730354 + 700 0.71489947 -5.693532 0 -4.6212164 0.61322381 + 800 0.70876958 -5.6840594 0 -4.6209382 0.66822293 + 900 0.70799522 -5.6828388 0 -4.6208791 0.66961272 + 1000 0.70325878 -5.6750833 0 -4.6202281 0.7112575 +Loop time of 7.44016 on 4 procs for 1000 steps with 32000 atoms + +Performance: 58063.267 tau/day, 134.406 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 | 5.3881 | 5.5809 | 5.7111 | 5.4 | 75.01 +Neigh | 0.80101 | 0.82776 | 0.85702 | 2.2 | 11.13 +Comm | 0.31801 | 0.48426 | 0.72201 | 22.5 | 6.51 +Output | 0.17801 | 0.17801 | 0.17801 | 0.0 | 2.39 +Modify | 0.31201 | 0.33076 | 0.33701 | 1.9 | 4.45 +Other | | 0.0385 | | | 0.52 + +Nlocal: 8000 ave 8049 max 7942 min +Histogram: 1 0 0 1 0 0 0 1 0 1 +Nghost: 8632.5 ave 8685 max 8591 min +Histogram: 1 0 0 1 1 0 0 0 0 1 +Neighs: 299934 ave 303105 max 295137 min +Histogram: 1 0 0 0 0 0 1 1 0 1 + +Total # of neighbors = 1199738 +Ave neighs/atom = 37.4918 +Neighbor list builds = 50 +Dangerous builds not checked +Total wall time: 0:00:07 diff --git a/examples/rerun/log.20Jan20.rdf.rerun.g++.4 b/examples/rerun/log.20Jan20.rdf.rerun.g++.4 new file mode 100644 index 0000000000..7c5137bb08 --- /dev/null +++ b/examples/rerun/log.20Jan20.rdf.rerun.g++.4 @@ -0,0 +1,100 @@ +LAMMPS (09 Jan 2020) +# 3d Lennard-Jones melt + +variable x index 1 +variable y index 1 +variable z index 1 + +variable xx equal 20*$x +variable xx equal 20*1 +variable yy equal 20*$y +variable yy equal 20*1 +variable zz equal 20*$z +variable zz equal 20*1 + +units lj +atom_style atomic + +lattice fcc 0.8442 +Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 +region box block 0 ${xx} 0 ${yy} 0 ${zz} +region box block 0 20 0 ${yy} 0 ${zz} +region box block 0 20 0 20 0 ${zz} +region box block 0 20 0 20 0 20 +create_box 1 box +Created orthogonal box = (0 0 0) to (33.5919 33.5919 33.5919) + 1 by 2 by 2 MPI processor grid +create_atoms 1 box +Created 32000 atoms + create_atoms CPU = 0.00183487 secs +mass 1 1.0 + +pair_style lj/cut 5.0 +pair_coeff 1 1 1.0 1.0 + +neighbor 0.3 bin + +compute myRDF all rdf 100 cutoff 5.0 +fix 2 all ave/time 100 10 1000 c_myRDF[*] file rdf.rerun mode vector + +thermo 100 + +rerun lj.dump dump x y z +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 5.3 + ghost atom cutoff = 5.3 + binsize = 2.65, bins = 13 13 13 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard + (2) compute rdf, occasional + attributes: half, newton on, cut 5.3 + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 15.19 | 15.19 | 15.19 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 0 -7.1616928 0 -7.1616928 -6.8899898 + 100 0 -6.1442754 0 -6.1442754 -1.0825318 + 200 0 -6.1472483 0 -6.1472483 -1.0817213 + 300 0 -6.1274033 0 -6.1274033 -0.95961014 + 400 0 -6.1202956 0 -6.1202956 -0.8988851 + 500 0 -6.1067136 0 -6.1067136 -0.82660368 + 600 0 -6.0893179 0 -6.0893179 -0.70264528 + 700 0 -6.0803044 0 -6.0803044 -0.64232743 + 800 0 -6.0710303 0 -6.0710303 -0.5824798 + 900 0 -6.0698963 0 -6.0698963 -0.58057929 + 1000 0 -6.0627642 0 -6.0627642 -0.53599799 +Loop time of 3.07661 on 4 procs for 11 steps with 32000 atoms + +Performance: 1544.558 tau/day, 3.575 timesteps/s +99.8% CPU use with 4 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0 | 0 | 0 | 0.0 | 0.00 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0 | 0 | 0 | 0.0 | 0.00 +Output | 0 | 0 | 0 | 0.0 | 0.00 +Modify | 0 | 0 | 0 | 0.0 | 0.00 +Other | | 3.077 | | |100.00 + +Nlocal: 8000 ave 8049 max 7942 min +Histogram: 1 0 0 1 0 0 0 1 0 1 +Nghost: 20028 ave 20060 max 19988 min +Histogram: 1 0 0 0 1 0 0 0 1 1 +Neighs: 2.10417e+06 ave 2.12604e+06 max 2.07878e+06 min +Histogram: 1 0 0 1 0 0 0 0 1 1 + +Total # of neighbors = 8416685 +Ave neighs/atom = 263.021 +Neighbor list builds = 0 +Dangerous builds = 0 + +Total wall time: 0:00:03 diff --git a/examples/rerun/rdf.20Jan20.first.g++.4 b/examples/rerun/rdf.20Jan20.first.g++.4 new file mode 100644 index 0000000000..d78e0ce2c1 --- /dev/null +++ b/examples/rerun/rdf.20Jan20.first.g++.4 @@ -0,0 +1,54 @@ +# Time-averaged data for fix 2 +# TimeStep Number-of-rows +# Row c_myRDF[1] c_myRDF[2] c_myRDF[3] +1000 50 +1 0.025 0 0 +2 0.075 0 0 +3 0.125 0 0 +4 0.175 0 0 +5 0.225 0 0 +6 0.275 0 0 +7 0.325 0 0 +8 0.375 0 0 +9 0.425 0 0 +10 0.475 0 0 +11 0.525 0 0 +12 0.575 0 0 +13 0.625 0 0 +14 0.675 0 0 +15 0.725 0 0 +16 0.775 0 0 +17 0.825 0 0 +18 0.875 1.53863e-05 6.25e-06 +19 0.925 0.0217263 0.00986875 +20 0.975 0.506735 0.265431 +21 1.025 1.92083 1.33605 +22 1.075 2.8749 3.09855 +23 1.125 2.7805 4.96541 +24 1.175 2.21879 6.59047 +25 1.225 1.67622 7.92484 +26 1.275 1.25407 9.00629 +27 1.325 0.963413 9.90353 +28 1.375 0.774441 10.6802 +29 1.425 0.656196 11.3871 +30 1.475 0.589364 12.0672 +31 1.525 0.560681 12.7589 +32 1.575 0.560195 13.4961 +33 1.625 0.587995 14.3197 +34 1.675 0.632155 15.2605 +35 1.725 0.706585 16.3758 +36 1.775 0.805303 17.7216 +37 1.825 0.925415 19.3565 +38 1.875 1.05672 21.3271 +39 1.925 1.17634 23.6394 +40 1.975 1.2557 26.2375 +41 2.025 1.30009 29.0653 +42 2.075 1.30889 32.0546 +43 2.125 1.27704 35.1135 +44 2.175 1.21808 38.17 +45 2.225 1.13622 41.1536 +46 2.275 1.05072 44.0382 +47 2.325 0.973786 46.8303 +48 2.375 0.910095 49.5533 +49 2.425 0.866474 52.256 +50 2.475 0.841724 54.991 diff --git a/examples/rerun/rdf.20Jan20.rerun.g++.4 b/examples/rerun/rdf.20Jan20.rerun.g++.4 new file mode 100644 index 0000000000..3fa6acc461 --- /dev/null +++ b/examples/rerun/rdf.20Jan20.rerun.g++.4 @@ -0,0 +1,104 @@ +# Time-averaged data for fix 2 +# TimeStep Number-of-rows +# Row c_myRDF[1] c_myRDF[2] c_myRDF[3] +1000 100 +1 0.025 0 0 +2 0.075 0 0 +3 0.125 0 0 +4 0.175 0 0 +5 0.225 0 0 +6 0.275 0 0 +7 0.325 0 0 +8 0.375 0 0 +9 0.425 0 0 +10 0.475 0 0 +11 0.525 0 0 +12 0.575 0 0 +13 0.625 0 0 +14 0.675 0 0 +15 0.725 0 0 +16 0.775 0 0 +17 0.825 0 0 +18 0.875 1.53863e-05 6.25e-06 +19 0.925 0.021685 0.00985 +20 0.975 0.506834 0.265463 +21 1.025 1.92047 1.33588 +22 1.075 2.87514 3.09853 +23 1.125 2.78062 4.96547 +24 1.175 2.21869 6.59046 +25 1.225 1.67626 7.92486 +26 1.275 1.25409 9.00633 +27 1.325 0.963245 9.90341 +28 1.375 0.774535 10.6802 +29 1.425 0.65626 11.3871 +30 1.475 0.58925 12.0672 +31 1.525 0.560782 12.759 +32 1.575 0.560133 13.496 +33 1.625 0.588008 14.3197 +34 1.675 0.632185 15.2605 +35 1.725 0.706541 16.3757 +36 1.775 0.805341 17.7216 +37 1.825 0.925351 19.3565 +38 1.875 1.05677 21.3271 +39 1.925 1.17639 23.6395 +40 1.975 1.25571 26.2376 +41 2.025 1.30011 29.0655 +42 2.075 1.30883 32.0547 +43 2.125 1.27702 35.1134 +44 2.175 1.21813 38.17 +45 2.225 1.13617 41.1536 +46 2.275 1.05073 44.0382 +47 2.325 0.97376 46.8302 +48 2.375 0.91012 49.5533 +49 2.425 0.866556 52.2563 +50 2.475 0.841651 54.991 +51 2.525 0.839516 57.8301 +52 2.575 0.848795 60.8153 +53 2.625 0.868861 63.991 +54 2.675 0.896335 67.393 +55 2.725 0.925794 71.0395 +56 2.775 0.961909 74.9685 +57 2.825 0.999727 79.2005 +58 2.875 1.03745 83.749 +59 2.925 1.07355 88.6208 +60 2.975 1.10406 93.8039 +61 3.025 1.11993 99.2397 +62 3.075 1.12062 104.86 +63 3.125 1.10531 110.586 +64 3.175 1.07711 116.345 +65 3.225 1.04268 122.097 +66 3.275 1.00838 127.834 +67 3.325 0.974855 133.55 +68 3.375 0.949817 139.289 +69 3.425 0.936519 145.116 +70 3.475 0.92942 151.069 +71 3.525 0.930926 157.205 +72 3.575 0.940561 163.581 +73 3.625 0.94956 170.199 +74 3.675 0.964202 177.107 +75 3.725 0.97905 184.312 +76 3.775 0.991906 191.81 +77 3.825 1.00093 199.577 +78 3.875 1.01248 207.641 +79 3.925 1.02301 216.001 +80 3.975 1.03474 224.673 +81 4.025 1.04171 233.624 +82 4.075 1.04725 242.849 +83 4.125 1.04997 252.325 +84 4.175 1.04758 262.01 +85 4.225 1.03985 271.856 +86 4.275 1.02755 281.817 +87 4.325 1.00883 291.826 +88 4.375 0.99045 301.882 +89 4.425 0.97287 311.986 +90 4.475 0.958469 322.166 +91 4.525 0.952552 332.512 +92 4.575 0.948064 343.037 +93 4.625 0.952592 353.845 +94 4.675 0.958837 364.96 +95 4.725 0.970831 376.457 +96 4.775 0.985248 388.372 +97 4.825 0.998873 400.707 +98 4.875 1.0119 413.462 +99 4.925 1.02446 426.643 +100 4.975 1.03613 440.245 From d0eb41b61eed5c50cfa177fcdb9c189866da120b Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 10 Jan 2020 16:58:39 -0500 Subject: [PATCH 15/51] disallow per substyle special bond factors with certain suffix styles --- src/pair_hybrid.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/pair_hybrid.cpp b/src/pair_hybrid.cpp index eb9423aa57..b88fa49a85 100644 --- a/src/pair_hybrid.cpp +++ b/src/pair_hybrid.cpp @@ -27,6 +27,7 @@ #include "error.h" #include "respa.h" #include "utils.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -919,6 +920,12 @@ void PairHybrid::modify_special(int m, int /*narg*/, char **arg) special[2] = force->numeric(FLERR,arg[2]); special[3] = force->numeric(FLERR,arg[3]); + // have to cast to PairHybrid to work around C++ access restriction + + if (((PairHybrid *)styles[m])->suffix_flag & (Suffix::INTEL|Suffix::GPU)) + error->all(FLERR,"Pair_modify special is not compatible with " + "suffix version of hybrid substyle"); + if (strcmp(arg[0],"lj/coul") == 0) { if (!special_lj[m]) special_lj[m] = new double[4]; if (!special_coul[m]) special_coul[m] = new double[4]; From 8fa0700df10c79183778a171236d8fcd46a0cb4f Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Fri, 10 Jan 2020 16:49:09 -0700 Subject: [PATCH 16/51] add warning to fix bond/create --- src/MC/fix_bond_break.cpp | 3 ++- src/MC/fix_bond_create.cpp | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/MC/fix_bond_break.cpp b/src/MC/fix_bond_break.cpp index 2ff0e4126f..520abb9d32 100644 --- a/src/MC/fix_bond_break.cpp +++ b/src/MC/fix_bond_break.cpp @@ -33,7 +33,8 @@ using namespace FixConst; FixBondBreak::FixBondBreak(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), - partner(NULL), finalpartner(NULL), distsq(NULL), probability(NULL), broken(NULL), copy(NULL), random(NULL) + partner(NULL), finalpartner(NULL), distsq(NULL), probability(NULL), + broken(NULL), copy(NULL), random(NULL) { if (narg < 6) error->all(FLERR,"Illegal fix bond/break command"); diff --git a/src/MC/fix_bond_create.cpp b/src/MC/fix_bond_create.cpp index 3f63a22d60..a7f955ad0b 100644 --- a/src/MC/fix_bond_create.cpp +++ b/src/MC/fix_bond_create.cpp @@ -18,6 +18,7 @@ #include "respa.h" #include "atom.h" #include "force.h" +#include "modify.h" #include "pair.h" #include "comm.h" #include "neighbor.h" @@ -216,6 +217,19 @@ void FixBondCreate::init() if (force->pair == NULL || cutsq > force->pair->cutsq[iatomtype][jatomtype]) error->all(FLERR,"Fix bond/create cutoff is longer than pairwise cutoff"); + // warn if more than one fix bond/create or also a fix bond/break + // because this fix stores per-atom state in bondcount + // if other fixes create/break bonds, this fix will not know about it + + int count = 0; + for (int i = 0; i < modify->nfix; i++) { + if (strcmp(modify->fix[i]->style,"bond/create") == 0) count++; + if (strcmp(modify->fix[i]->style,"bond/break") == 0) count++; + } + if (count > 1 && me == 0) + error->warning(FLERR,"Fix bond/create is used multiple times " + " or with fix bond/break - may not work as expected"); + // enable angle/dihedral/improper creation if atype/dtype/itype // option was used and a force field has been specified From cb8313d947a367c50279d9c48a260e4b4b69fed5 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 11 Jan 2020 16:08:37 -0500 Subject: [PATCH 17/51] document added warning for fix bond/create --- doc/src/Errors_warnings.rst | 6 ++++++ doc/txt/Errors_warnings.txt | 7 +++++++ src/MC/fix_bond_create.h | 7 +++++++ 3 files changed, 20 insertions(+) diff --git a/doc/src/Errors_warnings.rst b/doc/src/Errors_warnings.rst index ad5323c6ad..4a944eeb18 100644 --- a/doc/src/Errors_warnings.rst +++ b/doc/src/Errors_warnings.rst @@ -195,6 +195,12 @@ Doc page with :doc:`ERROR messages ` *Fix SRD walls overlap but fix srd overlap not set* You likely want to set this in your input script. +* Fix bond/create is used multiple times or with fix bond/break - may not work as expected* + When using fix bond/create multiple times or in combination with + fix bond/break, the individual fix instances do not share information + about changes they made at the same time step and thus it may result + in unexpected behavior. + *Fix bond/swap will ignore defined angles* See the doc page for fix bond/swap for more info on this restriction. diff --git a/doc/txt/Errors_warnings.txt b/doc/txt/Errors_warnings.txt index 06474e1bb3..cb22b7ad0c 100644 --- a/doc/txt/Errors_warnings.txt +++ b/doc/txt/Errors_warnings.txt @@ -239,6 +239,13 @@ will be truncated to attempt to prevent the bond from blowing up. :dd You likely want to set this in your input script. :dd +{ Fix bond/create is used multiple times or with fix bond/break - may not work as expected} :dt + +When using fix bond/create multiple times or in combination with +fix bond/break, the individual fix instances do not share information +about changes they made at the same time step and thus it may result +in unexpected behavior. :dd + {Fix bond/swap will ignore defined angles} :dt See the doc page for fix bond/swap for more info on this diff --git a/src/MC/fix_bond_create.h b/src/MC/fix_bond_create.h index 403b1ae340..1e4b9a11c1 100644 --- a/src/MC/fix_bond_create.h +++ b/src/MC/fix_bond_create.h @@ -170,4 +170,11 @@ See the read_data command for info on setting the "extra special per atom" header value to allow for additional special values to be stored. +W: Fix bond/create is used multiple times or with fix bond/break - may not work as expected + +When using fix bond/create multiple times or in combination with +fix bond/break, the individual fix instances do not share information +about changes they made at the same time step and thus it may result +in unexpected behavior. + */ From 67b9fd10cc2ee43e6e0f162c061d26b60207d721 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 11 Jan 2020 16:12:58 -0500 Subject: [PATCH 18/51] rename output files to correctly match the used version --- .../rerun/{log.20Jan20.first.g++.4 => log.09Jan20.first.g++.4} | 0 .../{log.20Jan20.rdf.first.g++.4 => log.09Jan20.rdf.first.g++.4} | 0 .../{log.20Jan20.rdf.rerun.g++.4 => log.09Jan20.rdf.rerun.g++.4} | 0 .../{log.20Jan20.read_dump.g++.4 => log.09Jan20.read_dump.g++.4} | 0 .../rerun/{log.20Jan20.rerun.g++.4 => log.09Jan20.rerun.g++.4} | 0 .../rerun/{rdf.20Jan20.first.g++.4 => rdf.09Jan20.first.g++.4} | 0 .../rerun/{rdf.20Jan20.rerun.g++.4 => rdf.09Jan20.rerun.g++.4} | 0 7 files changed, 0 insertions(+), 0 deletions(-) rename examples/rerun/{log.20Jan20.first.g++.4 => log.09Jan20.first.g++.4} (100%) rename examples/rerun/{log.20Jan20.rdf.first.g++.4 => log.09Jan20.rdf.first.g++.4} (100%) rename examples/rerun/{log.20Jan20.rdf.rerun.g++.4 => log.09Jan20.rdf.rerun.g++.4} (100%) rename examples/rerun/{log.20Jan20.read_dump.g++.4 => log.09Jan20.read_dump.g++.4} (100%) rename examples/rerun/{log.20Jan20.rerun.g++.4 => log.09Jan20.rerun.g++.4} (100%) rename examples/rerun/{rdf.20Jan20.first.g++.4 => rdf.09Jan20.first.g++.4} (100%) rename examples/rerun/{rdf.20Jan20.rerun.g++.4 => rdf.09Jan20.rerun.g++.4} (100%) diff --git a/examples/rerun/log.20Jan20.first.g++.4 b/examples/rerun/log.09Jan20.first.g++.4 similarity index 100% rename from examples/rerun/log.20Jan20.first.g++.4 rename to examples/rerun/log.09Jan20.first.g++.4 diff --git a/examples/rerun/log.20Jan20.rdf.first.g++.4 b/examples/rerun/log.09Jan20.rdf.first.g++.4 similarity index 100% rename from examples/rerun/log.20Jan20.rdf.first.g++.4 rename to examples/rerun/log.09Jan20.rdf.first.g++.4 diff --git a/examples/rerun/log.20Jan20.rdf.rerun.g++.4 b/examples/rerun/log.09Jan20.rdf.rerun.g++.4 similarity index 100% rename from examples/rerun/log.20Jan20.rdf.rerun.g++.4 rename to examples/rerun/log.09Jan20.rdf.rerun.g++.4 diff --git a/examples/rerun/log.20Jan20.read_dump.g++.4 b/examples/rerun/log.09Jan20.read_dump.g++.4 similarity index 100% rename from examples/rerun/log.20Jan20.read_dump.g++.4 rename to examples/rerun/log.09Jan20.read_dump.g++.4 diff --git a/examples/rerun/log.20Jan20.rerun.g++.4 b/examples/rerun/log.09Jan20.rerun.g++.4 similarity index 100% rename from examples/rerun/log.20Jan20.rerun.g++.4 rename to examples/rerun/log.09Jan20.rerun.g++.4 diff --git a/examples/rerun/rdf.20Jan20.first.g++.4 b/examples/rerun/rdf.09Jan20.first.g++.4 similarity index 100% rename from examples/rerun/rdf.20Jan20.first.g++.4 rename to examples/rerun/rdf.09Jan20.first.g++.4 diff --git a/examples/rerun/rdf.20Jan20.rerun.g++.4 b/examples/rerun/rdf.09Jan20.rerun.g++.4 similarity index 100% rename from examples/rerun/rdf.20Jan20.rerun.g++.4 rename to examples/rerun/rdf.09Jan20.rerun.g++.4 From 4f35682828e533489ce567d8c9714aab1ba0c901 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 11 Jan 2020 16:15:49 -0500 Subject: [PATCH 19/51] list added example folder in manual --- doc/src/Examples.rst | 2 ++ doc/txt/Examples.txt | 1 + 2 files changed, 3 insertions(+) diff --git a/doc/src/Examples.rst b/doc/src/Examples.rst index a223939d5a..993090baf1 100644 --- a/doc/src/Examples.rst +++ b/doc/src/Examples.rst @@ -133,6 +133,8 @@ Lowercase directories +-------------+------------------------------------------------------------------+ | reax | RDX and TATB models using the ReaxFF | +-------------+------------------------------------------------------------------+ +| rerun | use of rerun and read\_dump commands | ++-------------+------------------------------------------------------------------+ | rigid | rigid bodies modeled as independent or coupled | +-------------+------------------------------------------------------------------+ | shear | sideways shear applied to 2d solid, with and without a void | diff --git a/doc/txt/Examples.txt b/doc/txt/Examples.txt index 86617e13df..04c211cb1d 100644 --- a/doc/txt/Examples.txt +++ b/doc/txt/Examples.txt @@ -94,6 +94,7 @@ python: using embedded Python in a LAMMPS input script qeq: use of the QEQ package for charge equilibration rdf-adf: computing radial and angle distribution functions for water reax: RDX and TATB models using the ReaxFF +rerun: use of rerun and read_dump commands rigid: rigid bodies modeled as independent or coupled shear: sideways shear applied to 2d solid, with and without a void snap: NVE dynamics for BCC tantalum crystal using SNAP potential From 9c207bb751d3de378ae2d40e66b856ea4b26ba02 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 11 Jan 2020 16:20:13 -0500 Subject: [PATCH 20/51] remove outdated .txt file for pair style meam/c --- doc/txt/pair_meamc.txt | 402 ----------------------------------------- 1 file changed, 402 deletions(-) delete mode 100644 doc/txt/pair_meamc.txt diff --git a/doc/txt/pair_meamc.txt b/doc/txt/pair_meamc.txt deleted file mode 100644 index 2831600e08..0000000000 --- a/doc/txt/pair_meamc.txt +++ /dev/null @@ -1,402 +0,0 @@ -"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c - -:link(lws,http://lammps.sandia.gov) -:link(ld,Manual.html) -:link(lc,Commands_all.html) - -:line - -pair_style meam/c command :h3 - -[Syntax:] - -pair_style style :pre - -style = {meam/c} - -[Examples:] - -pair_style meam/c -pair_coeff * * ../potentials/library.meam Si ../potentials/si.meam Si -pair_coeff * * ../potentials/library.meam Ni Al NULL Ni Al Ni Ni :pre - -[Description:] - -NOTE: The behavior of the MEAM potential for alloy systems has changed -as of November 2010; see description below of the mixture_ref_t -parameter - -Style {meam/c} computes pairwise interactions for a variety of materials -using modified embedded-atom method (MEAM) potentials -"(Baskes)"_#Baskes. Conceptually, it is an extension to the original -"EAM potentials"_pair_eam.html which adds angular forces. It is -thus suitable for modeling metals and alloys with fcc, bcc, hcp and -diamond cubic structures, as well as covalently bonded materials like -silicon and carbon. Style {meam/c} is a translation of the (now obsolete) -{meam} code from Fortran to C++. It is functionally equivalent to {meam} -but more efficient, and thus {meam} has been removed from LAMMPS after -the 12 December 2018 release. - -In the MEAM formulation, the total energy E of a system of atoms is -given by: - -:c,image(Eqs/pair_meam.jpg) - -where F is the embedding energy which is a function of the atomic -electron density rho, and phi is a pair potential interaction. The -pair interaction is summed over all neighbors J of atom I within the -cutoff distance. As with EAM, the multi-body nature of the MEAM -potential is a result of the embedding energy term. Details of the -computation of the embedding and pair energies, as implemented in -LAMMPS, are given in "(Gullet)"_#Gullet and references therein. - -The various parameters in the MEAM formulas are listed in two files -which are specified by the "pair_coeff"_pair_coeff.html command. -These are ASCII text files in a format consistent with other MD codes -that implement MEAM potentials, such as the serial DYNAMO code and -Warp. Several MEAM potential files with parameters for different -materials are included in the "potentials" directory of the LAMMPS -distribution with a ".meam" suffix. All of these are parameterized in -terms of LAMMPS "metal units"_units.html. - -Note that unlike for other potentials, cutoffs for MEAM potentials are -not set in the pair_style or pair_coeff command; they are specified in -the MEAM potential files themselves. - -Only a single pair_coeff command is used with the {meam} style which -specifies two MEAM files and the element(s) to extract information -for. The MEAM elements are mapped to LAMMPS atom types by specifying -N additional arguments after the 2nd filename in the pair_coeff -command, where N is the number of LAMMPS atom types: - -MEAM library file -Elem1, Elem2, ... -MEAM parameter file -N element names = mapping of MEAM elements to atom types :ul - -See the "pair_coeff"_pair_coeff.html doc page for alternate ways -to specify the path for the potential files. - -As an example, the potentials/library.meam file has generic MEAM -settings for a variety of elements. The potentials/SiC.meam file has -specific parameter settings for a Si and C alloy system. If your -LAMMPS simulation has 4 atoms types and you want the 1st 3 to be Si, -and the 4th to be C, you would use the following pair_coeff command: - -pair_coeff * * library.meam Si C sic.meam Si Si Si C :pre - -The 1st 2 arguments must be * * so as to span all LAMMPS atom types. -The two filenames are for the library and parameter file respectively. -The Si and C arguments (between the file names) are the two elements -for which info will be extracted from the library file. The first -three trailing Si arguments map LAMMPS atom types 1,2,3 to the MEAM Si -element. The final C argument maps LAMMPS atom type 4 to the MEAM C -element. - -If the 2nd filename is specified as NULL, no parameter file is read, -which simply means the generic parameters in the library file are -used. Use of the NULL specification for the parameter file is -discouraged for systems with more than a single element type -(e.g. alloys), since the parameter file is expected to set element -interaction terms that are not captured by the information in the -library file. - -If a mapping value is specified as NULL, the mapping is not performed. -This can be used when a {meam} potential is used as part of the -{hybrid} pair style. The NULL values are placeholders for atom types -that will be used with other potentials. - -NOTE: If the 2nd filename is NULL, the element names between the two -filenames can appear in any order, e.g. "Si C" or "C Si" in the -example above. However, if the 2nd filename is not NULL (as in the -example above), it contains settings that are Fortran-indexed for the -elements that preceed it. Thus you need to insure you list the -elements between the filenames in an order consistent with how the -values in the 2nd filename are indexed. See details below on the -syntax for settings in the 2nd file. - -The MEAM library file provided with LAMMPS has the name -potentials/library.meam. It is the "meamf" file used by other MD -codes. Aside from blank and comment lines (start with #) which can -appear anywhere, it is formatted as a series of entries, each of which -has 19 parameters and can span multiple lines: - -elt, lat, z, ielement, atwt, alpha, b0, b1, b2, b3, alat, esub, asub, -t0, t1, t2, t3, rozero, ibar - -The "elt" and "lat" parameters are text strings, such as elt = Si or -Cu and lat = dia or fcc. Because the library file is used by Fortran -MD codes, these strings may be enclosed in single quotes, but this is -not required. The other numeric parameters match values in the -formulas above. The value of the "elt" string is what is used in the -pair_coeff command to identify which settings from the library file -you wish to read in. There can be multiple entries in the library -file with the same "elt" value; LAMMPS reads the 1st matching entry it -finds and ignores the rest. - -Other parameters in the MEAM library file correspond to single-element -potential parameters: - -lat = lattice structure of reference configuration -z = number of nearest neighbors in the reference structure - This field is only read for compatibility, the correct - value is inferred from the lattice structure -ielement = atomic number -atwt = atomic weight -alat = lattice constant of reference structure -esub = energy per atom (eV) in the reference structure at equilibrium -asub = "A" parameter for MEAM (see e.g. "(Baskes)"_#Baskes) :pre - -The alpha, b0, b1, b2, b3, t0, t1, t2, t3 parameters correspond to the -standard MEAM parameters in the literature "(Baskes)"_#Baskes (the b -parameters are the standard beta parameters). Note that only parameters -normalized to t0 = 1.0 are supported. The rozero parameter is -an element-dependent density scaling that weights the reference -background density (see e.g. equation 4.5 in "(Gullet)"_#Gullet) and -is typically 1.0 for single-element systems. The ibar parameter -selects the form of the function G(Gamma) used to compute the electron -density; options are - - 0 => G = sqrt(1+Gamma) - 1 => G = exp(Gamma/2) - 2 => not implemented - 3 => G = 2/(1+exp(-Gamma)) - 4 => G = sqrt(1+Gamma) - -5 => G = +-sqrt(abs(1+Gamma)) :pre - -If used, the MEAM parameter file contains settings that override or -complement the library file settings. Examples of such parameter -files are in the potentials directory with a ".meam" suffix. Their -format is the same as is read by other Fortran MD codes. Aside from -blank and comment lines (start with #) which can appear anywhere, each -line has one of the following forms. Each line can also have a -trailing comment (starting with #) which is ignored. - -keyword = value -keyword(I) = value -keyword(I,J) = value -keyword(I,J,K) = value :pre - -The indices I, J, K correspond to the elements selected from the -MEAM library file numbered in the order of how those elements were -selected starting from 1. Thus for the example given below - -pair_coeff * * library.meam Si C sic.meam Si Si Si C :pre - -an index of 1 would refer to Si and an index of 2 to C. - -The recognized keywords for the parameter file are as follows: - -Ec, alpha, rho0, delta, lattce, attrac, repuls, nn2, Cmin, Cmax, rc, delr, -augt1, gsmooth_factor, re - -where - -rc = cutoff radius for cutoff function; default = 4.0 -delr = length of smoothing distance for cutoff function; default = 0.1 -rho0(I) = relative density for element I (overwrites value - read from meamf file) -Ec(I,J) = cohesive energy of reference structure for I-J mixture -delta(I,J) = heat of formation for I-J alloy; if Ec_IJ is input as - zero, then LAMMPS sets Ec_IJ = (Ec_II + Ec_JJ)/2 - delta_IJ -alpha(I,J) = alpha parameter for pair potential between I and J (can - be computed from bulk modulus of reference structure -re(I,J) = equilibrium distance between I and J in the reference - structure -Cmax(I,J,K) = Cmax screening parameter when I-J pair is screened - by K (I<=J); default = 2.8 -Cmin(I,J,K) = Cmin screening parameter when I-J pair is screened - by K (I<=J); default = 2.0 -lattce(I,J) = lattice structure of I-J reference structure: - dia = diamond (interlaced fcc for alloy) - fcc = face centered cubic - bcc = body centered cubic - dim = dimer - b1 = rock salt (NaCl structure) - hcp = hexagonal close-packed - c11 = MoSi2 structure - l12 = Cu3Au structure (lower case L, followed by 12) - b2 = CsCl structure (interpenetrating simple cubic) -nn2(I,J) = turn on second-nearest neighbor MEAM formulation for - I-J pair (see for example "(Lee)"_#Lee). - 0 = second-nearest neighbor formulation off - 1 = second-nearest neighbor formulation on - default = 0 -attrac(I,J) = additional cubic attraction term in Rose energy I-J pair potential - default = 0 -repuls(I,J) = additional cubic repulsive term in Rose energy I-J pair potential - default = 0 -zbl(I,J) = blend the MEAM I-J pair potential with the ZBL potential for small - atom separations "(ZBL)"_#ZBL - default = 1 -gsmooth_factor = factor determining the length of the G-function smoothing - region; only significant for ibar=0 or ibar=4. - 99.0 = short smoothing region, sharp step - 0.5 = long smoothing region, smooth step - default = 99.0 -augt1 = integer flag for whether to augment t1 parameter by - 3/5*t3 to account for old vs. new meam formulations; - 0 = don't augment t1 - 1 = augment t1 - default = 1 -ialloy = integer flag to use alternative averaging rule for t parameters, - for comparison with the DYNAMO MEAM code - 0 = standard averaging (matches ialloy=0 in DYNAMO) - 1 = alternative averaging (matches ialloy=1 in DYNAMO) - 2 = no averaging of t (use single-element values) - default = 0 -mixture_ref_t = integer flag to use mixture average of t to compute the background - reference density for alloys, instead of the single-element values - (see description and warning elsewhere in this doc page) - 0 = do not use mixture averaging for t in the reference density - 1 = use mixture averaging for t in the reference density - default = 0 -erose_form = integer value to select the form of the Rose energy function - (see description below). - default = 0 -emb_lin_neg = integer value to select embedding function for negative densities - 0 = F(rho)=0 - 1 = F(rho) = -asub*esub*rho (linear in rho, matches DYNAMO) - default = 0 -bkgd_dyn = integer value to select background density formula - 0 = rho_bkgd = rho_ref_meam(a) (as in the reference structure) - 1 = rho_bkgd = rho0_meam(a)*Z_meam(a) (matches DYNAMO) - default = 0 :pre - -Rc, delr, re are in distance units (Angstroms in the case of metal -units). Ec and delta are in energy units (eV in the case of metal -units). - -Each keyword represents a quantity which is either a scalar, vector, -2d array, or 3d array and must be specified with the correct -corresponding array syntax. The indices I,J,K each run from 1 to N -where N is the number of MEAM elements being used. - -Thus these lines - -rho0(2) = 2.25 -alpha(1,2) = 4.37 :pre - -set rho0 for the 2nd element to the value 2.25 and set alpha for the -alloy interaction between elements 1 and 2 to 4.37. - -The augt1 parameter is related to modifications in the MEAM -formulation of the partial electron density function. In recent -literature, an extra term is included in the expression for the -third-order density in order to make the densities orthogonal (see for -example "(Wang)"_#Wang2, equation 3d); this term is included in the -MEAM implementation in lammps. However, in earlier published work -this term was not included when deriving parameters, including most of -those provided in the library.meam file included with lammps, and to -account for this difference the parameter t1 must be augmented by -3/5*t3. If augt1=1, the default, this augmentation is done -automatically. When parameter values are fit using the modified -density function, as in more recent literature, augt1 should be set to -0. - -The mixture_ref_t parameter is available to match results with those -of previous versions of lammps (before January 2011). Newer versions -of lammps, by default, use the single-element values of the t -parameters to compute the background reference density. This is the -proper way to compute these parameters. Earlier versions of lammps -used an alloy mixture averaged value of t to compute the background -reference density. Setting mixture_ref_t=1 gives the old behavior. -WARNING: using mixture_ref_t=1 will give results that are demonstrably -incorrect for second-neighbor MEAM, and non-standard for -first-neighbor MEAM; this option is included only for matching with -previous versions of lammps and should be avoided if possible. - -The parameters attrac and repuls, along with the integer selection -parameter erose_form, can be used to modify the Rose energy function -used to compute the pair potential. This function gives the energy of -the reference state as a function of interatomic spacing. The form of -this function is: - -astar = alpha * (r/re - 1.d0) -if erose_form = 0: erose = -Ec*(1+astar+a3*(astar**3)/(r/re))*exp(-astar) -if erose_form = 1: erose = -Ec*(1+astar+(-attrac+repuls/r)*(astar**3))*exp(-astar) -if erose_form = 2: erose = -Ec*(1 +astar + a3*(astar**3))*exp(-astar) -a3 = repuls, astar < 0 -a3 = attrac, astar >= 0 :pre - -Most published MEAM parameter sets use the default values attrac=repulse=0. -Setting repuls=attrac=delta corresponds to the form used in several -recent published MEAM parameter sets, such as "(Valone)"_#Valone - -NOTE: The default form of the erose expression in LAMMPS was corrected -in March 2009. The current version is correct, but may show different -behavior compared with earlier versions of lammps with the attrac -and/or repuls parameters are non-zero. To obtain the previous default -form, use erose_form = 1 (this form does not seem to appear in the -literature). An alternative form (see e.g. "(Lee2)"_#Lee2) is -available using erose_form = 2. - -:line - -[Mixing, shift, table, tail correction, restart, rRESPA info]: - -For atom type pairs I,J and I != J, where types I and J correspond to -two different element types, mixing is performed by LAMMPS with -user-specifiable parameters as described above. You never need to -specify a pair_coeff command with I != J arguments for this style. - -This pair style does not support the "pair_modify"_pair_modify.html -shift, table, and tail options. - -This pair style does not write its information to "binary restart -files"_restart.html, since it is stored in potential files. Thus, you -need to re-specify the pair_style and pair_coeff commands in an input -script that reads a restart file. - -This pair style can only be used via the {pair} keyword of the -"run_style respa"_run_style.html command. It does not support the -{inner}, {middle}, {outer} keywords. - -:line - -[Restrictions:] - -The {meam/c} style is provided in the USER-MEAMC package. It is -only enabled if LAMMPS was built with that package. -See the "Build package"_Build_package.html doc page for more info. - -The maximum number of elements, that can be read from the MEAM -library file, is determined at compile time. The default is 5. -If you need support for more elements, you have to change the -define for the constant 'maxelt' at the beginning of the file -src/USER-MEAMC/meam.h and update/recompile LAMMPS. There is no -limit on the number of atoms types. - -[Related commands:] - -"pair_coeff"_pair_coeff.html, "pair_style eam"_pair_eam.html, -"pair_style meam/spline"_pair_meam_spline.html - -[Default:] none - -:line - -:link(Baskes) -[(Baskes)] Baskes, Phys Rev B, 46, 2727-2742 (1992). - -:link(Gullet) -[(Gullet)] Gullet, Wagner, Slepoy, SANDIA Report 2003-8782 (2003). -This report may be accessed on-line via "this link"_sandreport. - -:link(sandreport,http://infoserve.sandia.gov/sand_doc/2003/038782.pdf) - -:link(Lee) -[(Lee)] Lee, Baskes, Phys. Rev. B, 62, 8564-8567 (2000). - -:link(Lee2) -[(Lee2)] Lee, Baskes, Kim, Cho. Phys. Rev. B, 64, 184102 (2001). - -:link(Valone) -[(Valone)] Valone, Baskes, Martin, Phys. Rev. B, 73, 214209 (2006). - -:link(Wang2) -[(Wang)] Wang, Van Hove, Ross, Baskes, J. Chem. Phys., 121, 5410 (2004). - -:link(ZBL) -[(ZBL)] J.F. Ziegler, J.P. Biersack, U. Littmark, "Stopping and Ranges -of Ions in Matter", Vol 1, 1985, Pergamon Press. From e1849232b85122eb702f79cc42d6fa6d237b0426 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 11 Jan 2020 16:21:42 -0500 Subject: [PATCH 21/51] remove redundant lj/cut/tip4p/long/gpu entry and correct underline length --- doc/src/Build_extras.rst | 2 +- doc/src/pair_lj.rst | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/doc/src/Build_extras.rst b/doc/src/Build_extras.rst index c02b24641e..2cba59bde0 100644 --- a/doc/src/Build_extras.rst +++ b/doc/src/Build_extras.rst @@ -203,7 +203,7 @@ inside the CMake build directory. If the KIM library is already on your system (in a location CMake cannot find it), set the PKG\_CONFIG\_PATH environment variable so that libkim-api can be found. -For using KIM web queries. +For using OpenKIM web queries in LAMMPS. If LMP\_DEBUG\_CURL is set, the libcurl verbose mode will be on, and any libcurl calls within the KIM web query display a lot of information about diff --git a/doc/src/pair_lj.rst b/doc/src/pair_lj.rst index 2b75c96a89..7a46f0a0db 100644 --- a/doc/src/pair_lj.rst +++ b/doc/src/pair_lj.rst @@ -91,7 +91,7 @@ pair\_style lj/cut/tip4p/cut command ==================================== pair\_style lj/cut/tip4p/cut/gpu command -==================================== +======================================== pair\_style lj/cut/tip4p/cut/omp command ======================================== @@ -105,9 +105,6 @@ pair\_style lj/cut/tip4p/long/omp command pair\_style lj/cut/tip4p/long/opt command ========================================= -pair\_style lj/cut/tip4p/long/gpu command -===================================== - Syntax """""" From d7d1d571705e6a4451bdb7b79494b3b0ba653f9f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 11 Jan 2020 16:35:27 -0500 Subject: [PATCH 22/51] remove outdated txt files --- doc/txt/fix_nve_dot.txt | 63 ------------- doc/txt/fix_nve_dotc_langevin.txt | 143 ------------------------------ doc/txt/pair_oxdna.txt | 112 ----------------------- doc/txt/pair_oxdna2.txt | 121 ------------------------- 4 files changed, 439 deletions(-) delete mode 100644 doc/txt/fix_nve_dot.txt delete mode 100644 doc/txt/fix_nve_dotc_langevin.txt delete mode 100644 doc/txt/pair_oxdna.txt delete mode 100644 doc/txt/pair_oxdna2.txt diff --git a/doc/txt/fix_nve_dot.txt b/doc/txt/fix_nve_dot.txt deleted file mode 100644 index fcd8926c13..0000000000 --- a/doc/txt/fix_nve_dot.txt +++ /dev/null @@ -1,63 +0,0 @@ -"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c - -:link(lws,http://lammps.sandia.gov) -:link(ld,Manual.html) -:link(lc,Commands_all.html) - -:line - -fix nve/dot command :h3 - -[Syntax:] - -fix ID group-ID nve/dot :pre - -ID, group-ID are documented in "fix"_fix.html command :ulb,l -nve/dot = style name of this fix command :l -:ule - -[Examples:] - -fix 1 all nve/dot :pre - -[Description:] - -Apply a rigid-body integrator as described in "(Davidchack)"_#Davidchack1 -to a group of atoms, but without Langevin dynamics. -This command performs Molecular dynamics (MD) -via a velocity-Verlet algorithm and an evolution operator that rotates -the quaternion degrees of freedom, similar to the scheme outlined in "(Miller)"_#Miller1. - -This command is the equivalent of the "fix nve/dotc/langevin"_fix_nve_dotc_langevin.html -without damping and noise and can be used to determine the stability range -in a NVE ensemble prior to using the Langevin-type DOTC-integrator -(see also "fix nve/dotc/langevin"_fix_nve_dotc_langevin.html). -The command is equivalent to the "fix nve"_fix_nve.html. -The particles are always considered to have a finite size. - -An example input file can be found in /examples/USER/cgdna/examples/duplex1/. -Further details of the implementation and stability of the integrator are contained in "(Henrich)"_#Henrich3. -The preprint version of the article can be found "here"_PDF/USER-CGDNA.pdf. - -:line - -[Restrictions:] - -These pair styles can only be used if LAMMPS was built with the -"USER-CGDNA"_Package_details.html#PKG-USER-CGDNA package and the MOLECULE and ASPHERE package. -See the "Build package"_Build_package.html doc page for more info. - -[Related commands:] - -"fix nve/dotc/langevin"_fix_nve_dotc_langevin.html, "fix nve"_fix_nve.html - -[Default:] none - -:line - -:link(Davidchack1) -[(Davidchack)] R.L Davidchack, T.E. Ouldridge, and M.V. Tretyakov. J. Chem. Phys. 142, 144114 (2015). -:link(Miller1) -[(Miller)] T. F. Miller III, M. Eleftheriou, P. Pattnaik, A. Ndirango, G. J. Martyna, J. Chem. Phys., 116, 8649-8659 (2002). -:link(Henrich3) -[(Henrich)] O. Henrich, Y. A. Gutierrez-Fosado, T. Curk, T. E. Ouldridge, Eur. Phys. J. E 41, 57 (2018). diff --git a/doc/txt/fix_nve_dotc_langevin.txt b/doc/txt/fix_nve_dotc_langevin.txt deleted file mode 100644 index 898ca5132b..0000000000 --- a/doc/txt/fix_nve_dotc_langevin.txt +++ /dev/null @@ -1,143 +0,0 @@ -"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c - -:link(lws,http://lammps.sandia.gov) -:link(ld,Manual.html) -:link(lc,Commands_all.html) - -:line - -fix nve/dotc/langevin command :h3 - -[Syntax:] - -fix ID group-ID nve/dotc/langevin Tstart Tstop damp seed keyword value :pre - -ID, group-ID are documented in "fix"_fix.html command :ulb,l -nve/dotc/langevin = style name of this fix command :l -Tstart,Tstop = desired temperature at start/end of run (temperature units) :l -damp = damping parameter (time units) :l -seed = random number seed to use for white noise (positive integer) :l -keyword = {angmom} :l - {angmom} value = factor - factor = do thermostat rotational degrees of freedom via the angular momentum and apply numeric scale factor as discussed below :pre -:ule - -[Examples:] - -fix 1 all nve/dotc/langevin 1.0 1.0 0.03 457145 angmom 10 -fix 1 all nve/dotc/langevin 0.1 0.1 78.9375 457145 angmom 10 :pre - -[Description:] - -Apply a rigid-body Langevin-type integrator of the kind "Langevin C" -as described in "(Davidchack)"_#Davidchack2 -to a group of atoms, which models an interaction with an implicit background -solvent. This command performs Brownian dynamics (BD) -via a technique that splits the integration into a deterministic Hamiltonian -part and the Ornstein-Uhlenbeck process for noise and damping. -The quaternion degrees of freedom are updated though an evolution -operator which performs a rotation in quaternion space, preserves -the quaternion norm and is akin to "(Miller)"_#Miller2. - -In terms of syntax this command has been closely modelled on the -"fix langevin"_fix_langevin.html and its {angmom} option. But it combines -the "fix nve"_fix_nve.html and the "fix langevin"_fix_langevin.html in -one single command. The main feature is improved stability -over the standard integrator, permitting slightly larger timestep sizes. - -NOTE: Unlike the "fix langevin"_fix_langevin.html this command performs -also time integration of the translational and quaternion degrees of freedom. - -The total force on each atom will have the form: - -F = Fc + Ff + Fr -Ff = - (m / damp) v -Fr is proportional to sqrt(Kb T m / (dt damp)) :pre - -Fc is the conservative force computed via the usual inter-particle -interactions ("pair_style"_pair_style.html, -"bond_style"_bond_style.html, etc). - -The Ff and Fr terms are implicitly taken into account by this fix -on a per-particle basis. - -Ff is a frictional drag or viscous damping term proportional to the -particle's velocity. The proportionality constant for each atom is -computed as m/damp, where m is the mass of the particle and damp is -the damping factor specified by the user. - -Fr is a force due to solvent atoms at a temperature T randomly bumping -into the particle. As derived from the fluctuation/dissipation -theorem, its magnitude as shown above is proportional to sqrt(Kb T m / -dt damp), where Kb is the Boltzmann constant, T is the desired -temperature, m is the mass of the particle, dt is the timestep size, -and damp is the damping factor. Random numbers are used to randomize -the direction and magnitude of this force as described in -"(Dunweg)"_#Dunweg3, where a uniform random number is used (instead of -a Gaussian random number) for speed. - -:line - -{Tstart} and {Tstop} have to be constant values, i.e. they cannot -be variables. If used together with the oxDNA force field for -coarse-grained simulation of DNA please note that T = 0.1 in oxDNA units -corresponds to T = 300 K. - -The {damp} parameter is specified in time units and determines how -rapidly the temperature is relaxed. For example, a value of 0.03 -means to relax the temperature in a timespan of (roughly) 0.03 time -units tau (see the "units"_units.html command). -The damp factor can be thought of as inversely related to the -viscosity of the solvent, i.e. a small relaxation time implies a -hi-viscosity solvent and vice versa. See the discussion about gamma -and viscosity in the documentation for the "fix -viscous"_fix_viscous.html command for more details. -Note that the value 78.9375 in the second example above corresponds -to a diffusion constant, which is about an order of magnitude larger -than realistic ones. This has been used to sample configurations faster -in Brownian dynamics simulations. - -The random # {seed} must be a positive integer. A Marsaglia random -number generator is used. Each processor uses the input seed to -generate its own unique seed and its own stream of random numbers. -Thus the dynamics of the system will not be identical on two runs on -different numbers of processors. - -The keyword/value option has to be used in the following way: - -This fix has to be used together with the {angmom} keyword. The -particles are always considered to have a finite size. -The keyword {angmom} enables thermostatting of the rotational degrees of -freedom in addition to the usual translational degrees of freedom. - -The scale factor after the {angmom} keyword gives the ratio of the rotational to -the translational friction coefficient. - -An example input file can be found in /examples/USER/cgdna/examples/duplex2/. -Further details of the implementation and stability of the integrators are contained in "(Henrich)"_#Henrich4. -The preprint version of the article can be found "here"_PDF/USER-CGDNA.pdf. - -:line - -[Restrictions:] - -These pair styles can only be used if LAMMPS was built with the -"USER-CGDNA"_Package_details.html#PKG-USER-CGDNA package and the MOLECULE and ASPHERE package. -See the "Build package"_Build_package.html doc page for more info. - -[Related commands:] - -"fix nve"_fix_nve.html, "fix langevin"_fix_langevin.html, "fix nve/dot"_fix_nve_dot.html, "bond_style oxdna/fene"_bond_oxdna.html, "bond_style oxdna2/fene"_bond_oxdna.html, "pair_style oxdna/excv"_pair_oxdna.html, "pair_style oxdna2/excv"_pair_oxdna2.html - -[Default:] none - -:line - -:link(Davidchack2) -[(Davidchack)] R.L Davidchack, T.E. Ouldridge, M.V. Tretyakov. J. Chem. Phys. 142, 144114 (2015). -:link(Miller2) -[(Miller)] T. F. Miller III, M. Eleftheriou, P. Pattnaik, A. Ndirango, G. J. Martyna, J. Chem. Phys., 116, 8649-8659 (2002). -:link(Dunweg3) -[(Dunweg)] B. Dunweg, W. Paul, Int. J. Mod. Phys. C, 2, 817-27 (1991). -:link(Henrich4) -[(Henrich)] O. Henrich, Y. A. Gutierrez-Fosado, T. Curk, T. E. Ouldridge, Eur. Phys. J. E 41, 57 (2018). diff --git a/doc/txt/pair_oxdna.txt b/doc/txt/pair_oxdna.txt deleted file mode 100644 index 8f3f9933e6..0000000000 --- a/doc/txt/pair_oxdna.txt +++ /dev/null @@ -1,112 +0,0 @@ -"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c - -:link(lws,http://lammps.sandia.gov) -:link(ld,Manual.html) -:link(lc,Commands_all.html) - -:line - -pair_style oxdna/excv command :h3 -pair_style oxdna/stk command :h3 -pair_style oxdna/hbond command :h3 -pair_style oxdna/xstk command :h3 -pair_style oxdna/coaxstk command :h3 - -[Syntax:] - -pair_style style1 :pre - -pair_coeff * * style2 args :pre - -style1 = {hybrid/overlay oxdna/excv oxdna/stk oxdna/hbond oxdna/xstk oxdna/coaxstk} :ul - -style2 = {oxdna/excv} or {oxdna/stk} or {oxdna/hbond} or {oxdna/xstk} or {oxdna/coaxstk} -args = list of arguments for these particular styles :ul - - {oxdna/stk} args = seq T xi kappa 6.0 0.4 0.9 0.32 0.75 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65 - seq = seqav (for average sequence stacking strength) or seqdep (for sequence-dependent stacking strength) - T = temperature (oxDNA units, 0.1 = 300 K) - xi = temperature-independent coefficient in stacking strength - kappa = coefficient of linear temperature dependence in stacking strength - {oxdna/hbond} args = seq eps 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 - seq = seqav (for average sequence base-pairing strength) or seqdep (for sequence-dependent base-pairing strength) - eps = 1.077 (between base pairs A-T and C-G) or 0 (all other pairs) :pre - -[Examples:] - -pair_style hybrid/overlay oxdna/excv oxdna/stk oxdna/hbond oxdna/xstk oxdna/coaxstk -pair_coeff * * oxdna/excv 2.0 0.7 0.675 2.0 0.515 0.5 2.0 0.33 0.32 -pair_coeff * * oxdna/stk seqdep 0.1 1.3448 2.6568 6.0 0.4 0.9 0.32 0.75 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65 -pair_coeff * * oxdna/hbond seqdep 0.0 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 -pair_coeff 1 4 oxdna/hbond seqdep 1.077 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 -pair_coeff 2 3 oxdna/hbond seqdep 1.077 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 -pair_coeff * * oxdna/xstk 47.5 0.575 0.675 0.495 0.655 2.25 0.791592653589793 0.58 1.7 1.0 0.68 1.7 1.0 0.68 1.5 0 0.65 1.7 0.875 0.68 1.7 0.875 0.68 -pair_coeff * * oxdna/coaxstk 46.0 0.4 0.6 0.22 0.58 2.0 2.541592653589793 0.65 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 -0.65 2.0 -0.65 :pre - -[Description:] - -The {oxdna} pair styles compute the pairwise-additive parts of the oxDNA force field -for coarse-grained modelling of DNA. The effective interaction between the nucleotides consists of potentials for the -excluded volume interaction {oxdna/excv}, the stacking {oxdna/stk}, cross-stacking {oxdna/xstk} -and coaxial stacking interaction {oxdna/coaxstk} as well -as the hydrogen-bonding interaction {oxdna/hbond} between complementary pairs of nucleotides on -opposite strands. Average sequence or sequence-dependent stacking and base-pairing strengths -are supported "(Sulc)"_#Sulc1. Quasi-unique base-pairing between nucleotides can be achieved by using -more complementary pairs of atom types like 5-8 and 6-7, 9-12 and 10-11, 13-16 and 14-15, etc. -This prevents the hybridization of in principle complementary bases within Ntypes/4 bases -up and down along the backbone. - -The exact functional form of the pair styles is rather complex. -The individual potentials consist of products of modulation factors, -which themselves are constructed from a number of more basic potentials -(Morse, Lennard-Jones, harmonic angle and distance) as well as quadratic smoothing and modulation terms. -We refer to "(Ouldridge-DPhil)"_#Ouldridge-DPhil1 and "(Ouldridge)"_#Ouldridge1 -for a detailed description of the oxDNA force field. - -NOTE: These pair styles have to be used together with the related oxDNA bond style -{oxdna/fene} for the connectivity of the phosphate backbone (see also documentation of -"bond_style oxdna/fene"_bond_oxdna.html). Most of the coefficients -in the above example have to be kept fixed and cannot be changed without reparameterizing the entire model. -Exceptions are the first four coefficients after {oxdna/stk} (seq=seqdep, T=0.1, xi=1.3448 and kappa=2.6568 in the above example) -and the first coefficient after {oxdna/hbond} (seq=seqdep in the above example). -When using a Langevin thermostat, e.g. through "fix langevin"_fix_langevin.html -or "fix nve/dotc/langevin"_fix_nve_dotc_langevin.html -the temperature coefficients have to be matched to the one used in the fix. - -Example input and data files for DNA duplexes can be found in examples/USER/cgdna/examples/oxDNA/ and /oxDNA2/. -A simple python setup tool which creates single straight or helical DNA strands, -DNA duplexes or arrays of DNA duplexes can be found in examples/USER/cgdna/util/. - -Please cite "(Henrich)"_#Henrich1 and the relevant oxDNA articles in any publication that uses this implementation. -The article contains more information on the model, the structure of the input file, the setup tool -and the performance of the LAMMPS-implementation of oxDNA. -The preprint version of the article can be found "here"_PDF/USER-CGDNA.pdf. - -:line - -[Restrictions:] - -These pair styles can only be used if LAMMPS was built with the -USER-CGDNA package and the MOLECULE and ASPHERE package. See the -"Build package"_Build_package.html doc page for more info. - -[Related commands:] - -"bond_style oxdna/fene"_bond_oxdna.html, "fix nve/dotc/langevin"_fix_nve_dotc_langevin.html, "pair_coeff"_pair_coeff.html, -"bond_style oxdna2/fene"_bond_oxdna.html, "pair_style oxdna2/excv"_pair_oxdna2.html - -[Default:] none - -:line - -:link(Henrich1) -[(Henrich)] O. Henrich, Y. A. Gutierrez-Fosado, T. Curk, T. E. Ouldridge, Eur. Phys. J. E 41, 57 (2018). - -:link(Sulc1) -[(Sulc)] P. Sulc, F. Romano, T.E. Ouldridge, L. Rovigatti, J.P.K. Doye, A.A. Louis, J. Chem. Phys. 137, 135101 (2012). - -:link(Ouldridge-DPhil1) -[(Ouldrigde-DPhil)] T.E. Ouldridge, Coarse-grained modelling of DNA and DNA self-assembly, DPhil. University of Oxford (2011). - -:link(Ouldridge1) -[(Ouldridge)] T.E. Ouldridge, A.A. Louis, J.P.K. Doye, J. Chem. Phys. 134, 085101 (2011). diff --git a/doc/txt/pair_oxdna2.txt b/doc/txt/pair_oxdna2.txt deleted file mode 100644 index 64a686d5d9..0000000000 --- a/doc/txt/pair_oxdna2.txt +++ /dev/null @@ -1,121 +0,0 @@ -"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c - -:link(lws,http://lammps.sandia.gov) -:link(ld,Manual.html) -:link(lc,Commands_all.html) - -:line - -pair_style oxdna2/excv command :h3 -pair_style oxdna2/stk command :h3 -pair_style oxdna2/hbond command :h3 -pair_style oxdna2/xstk command :h3 -pair_style oxdna2/coaxstk command :h3 -pair_style oxdna2/dh command :h3 - -[Syntax:] - -pair_style style1 :pre - -pair_coeff * * style2 args :pre - -style1 = {hybrid/overlay oxdna2/excv oxdna2/stk oxdna2/hbond oxdna2/xstk oxdna2/coaxstk oxdna2/dh} :ul - -style2 = {oxdna2/excv} or {oxdna2/stk} or {oxdna2/hbond} or {oxdna2/xstk} or {oxdna2/coaxstk} or {oxdna2/dh} -args = list of arguments for these particular styles :ul - - {oxdna2/stk} args = seq T xi kappa 6.0 0.4 0.9 0.32 0.75 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65 - seq = seqav (for average sequence stacking strength) or seqdep (for sequence-dependent stacking strength) - T = temperature (oxDNA units, 0.1 = 300 K) - xi = temperature-independent coefficient in stacking strength - kappa = coefficient of linear temperature dependence in stacking strength - {oxdna2/hbond} args = seq eps 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 - seq = seqav (for average sequence base-pairing strength) or seqdep (for sequence-dependent base-pairing strength) - eps = 1.0678 (between base pairs A-T and C-G) or 0 (all other pairs) - {oxdna2/dh} args = T rhos qeff - T = temperature (oxDNA units, 0.1 = 300 K) - rhos = salt concentration (mole per litre) - qeff = effective charge (elementary charges) :pre - -[Examples:] - -pair_style hybrid/overlay oxdna2/excv oxdna2/stk oxdna2/hbond oxdna2/xstk oxdna2/coaxstk oxdna2/dh -pair_coeff * * oxdna2/excv 2.0 0.7 0.675 2.0 0.515 0.5 2.0 0.33 0.32 -pair_coeff * * oxdna2/stk seqdep 0.1 1.3523 2.6717 6.0 0.4 0.9 0.32 0.75 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65 -pair_coeff * * oxdna2/hbond seqdep 0.0 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 -pair_coeff 1 4 oxdna2/hbond seqdep 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 -pair_coeff 2 3 oxdna2/hbond seqdep 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45 -pair_coeff * * oxdna2/xstk 47.5 0.575 0.675 0.495 0.655 2.25 0.791592653589793 0.58 1.7 1.0 0.68 1.7 1.0 0.68 1.5 0 0.65 1.7 0.875 0.68 1.7 0.875 0.68 -pair_coeff * * oxdna2/coaxstk 58.5 0.4 0.6 0.22 0.58 2.0 2.891592653589793 0.65 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 40.0 3.116592653589793 -pair_coeff * * oxdna2/dh 0.1 1.0 0.815 :pre - -[Description:] - -The {oxdna2} pair styles compute the pairwise-additive parts of the oxDNA force field -for coarse-grained modelling of DNA. The effective interaction between the nucleotides consists of potentials for the -excluded volume interaction {oxdna2/excv}, the stacking {oxdna2/stk}, cross-stacking {oxdna2/xstk} -and coaxial stacking interaction {oxdna2/coaxstk}, electrostatic Debye-Hueckel interaction {oxdna2/dh} -as well as the hydrogen-bonding interaction {oxdna2/hbond} between complementary pairs of nucleotides on -opposite strands. Average sequence or sequence-dependent stacking and base-pairing strengths -are supported "(Sulc)"_#Sulc2. Quasi-unique base-pairing between nucleotides can be achieved by using -more complementary pairs of atom types like 5-8 and 6-7, 9-12 and 10-11, 13-16 and 14-15, etc. -This prevents the hybridization of in principle complementary bases within Ntypes/4 bases -up and down along the backbone. - -The exact functional form of the pair styles is rather complex. -The individual potentials consist of products of modulation factors, -which themselves are constructed from a number of more basic potentials -(Morse, Lennard-Jones, harmonic angle and distance) as well as quadratic smoothing and modulation terms. -We refer to "(Snodin)"_#Snodin and the original oxDNA publications "(Ouldridge-DPhil)"_#Ouldridge-DPhil2 -and "(Ouldridge)"_#Ouldridge2 for a detailed description of the oxDNA2 force field. - -NOTE: These pair styles have to be used together with the related oxDNA2 bond style -{oxdna2/fene} for the connectivity of the phosphate backbone (see also documentation of -"bond_style oxdna2/fene"_bond_oxdna.html). Most of the coefficients -in the above example have to be kept fixed and cannot be changed without reparameterizing the entire model. -Exceptions are the first four coefficients after {oxdna2/stk} (seq=seqdep, T=0.1, xi=1.3523 and kappa=2.6717 in the above example), -the first coefficient after {oxdna2/hbond} (seq=seqdep in the above example) and the three coefficients -after {oxdna2/dh} (T=0.1, rhos=1.0, qeff=0.815 in the above example). When using a Langevin thermostat -e.g. through "fix langevin"_fix_langevin.html or "fix nve/dotc/langevin"_fix_nve_dotc_langevin.html -the temperature coefficients have to be matched to the one used in the fix. - -Example input and data files for DNA duplexes can be found in examples/USER/cgdna/examples/oxDNA/ and /oxDNA2/. -A simple python setup tool which creates single straight or helical DNA strands, -DNA duplexes or arrays of DNA duplexes can be found in examples/USER/cgdna/util/. - -Please cite "(Henrich)"_#Henrich and the relevant oxDNA articles in any publication that uses this implementation. -The article contains more information on the model, the structure of the input file, the setup tool -and the performance of the LAMMPS-implementation of oxDNA. -The preprint version of the article can be found "here"_PDF/USER-CGDNA.pdf. - -:line - -[Restrictions:] - -These pair styles can only be used if LAMMPS was built with the -USER-CGDNA package and the MOLECULE and ASPHERE package. See the -"Build package"_Build_package.html doc page for more info. - -[Related commands:] - -"bond_style oxdna2/fene"_bond_oxdna.html, "fix nve/dotc/langevin"_fix_nve_dotc_langevin.html, "pair_coeff"_pair_coeff.html, -"bond_style oxdna/fene"_bond_oxdna.html, "pair_style oxdna/excv"_pair_oxdna.html - -[Default:] none - -:line - -:link(Henrich) -[(Henrich)] O. Henrich, Y. A. Gutierrez-Fosado, T. Curk, T. E. Ouldridge, Eur. Phys. J. E 41, 57 (2018). - -:link(Sulc2) -[(Sulc)] P. Sulc, F. Romano, T.E. Ouldridge, L. Rovigatti, J.P.K. Doye, A.A. Louis, J. Chem. Phys. 137, 135101 (2012). - -:link(Snodin) -[(Snodin)] B.E. Snodin, F. Randisi, M. Mosayebi, et al., J. Chem. Phys. 142, 234901 (2015). - -:link(Ouldridge-DPhil2) -[(Ouldrigde-DPhil)] T.E. Ouldridge, Coarse-grained modelling of DNA and DNA self-assembly, DPhil. University of Oxford (2011). - -:link(Ouldridge2) -[(Ouldridge)] T.E. Ouldridge, A.A. Louis, J.P.K. Doye, J. Chem. Phys. 134, 085101 (2011). From a38cf075db29b32807880847a13565e6bde6ec10 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 11 Jan 2020 18:53:09 -0500 Subject: [PATCH 23/51] add checks for global commands, pair and bonded styles --- doc/utils/check-styles.py | 130 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 125 insertions(+), 5 deletions(-) diff --git a/doc/utils/check-styles.py b/doc/utils/check-styles.py index 3acd2aa0a9..ffa827e10c 100755 --- a/doc/utils/check-styles.py +++ b/doc/utils/check-styles.py @@ -2,10 +2,39 @@ from __future__ import print_function from glob import glob -import os, re +from argparse import ArgumentParser +import os, re, sys -headers = glob(os.path.join('..', '..', 'src', '*', '*.h')) -headers += glob(os.path.join('..', '..', 'src', '*.h')) +parser = ArgumentParser(prog='check-styles.py', + description="Check style table completeness") + +parser.add_argument("-v", "--verbose", + action='store_const', + const=True, default=False, + help="Enable verbose output") + +parser.add_argument("-d", "--doc", + help="Path to LAMMPS documentation sources") +parser.add_argument("-s", "--src", + help="Path to LAMMPS sources") + +args = parser.parse_args() +verbose = args.verbose +src = args.src +doc = args.doc + +if not args.src or not args.doc: + parser.print_help() + sys.exit(1) + +if not os.path.isdir(src): + sys.exit("LAMMPS source path %s does not exist" % src) + +if not os.path.isdir(doc): + sys.exit("LAMMPS documentation source path %s does not exist" % doc) + +headers = glob(os.path.join(src, '*', '*.h')) +headers += glob(os.path.join(src, '*.h')) angle = {} atom = {} @@ -44,10 +73,28 @@ def register_style(list,style,info): else: list[style] = info +def add_suffix(list,style): + suffix = "" + if list[style]['gpu']: + suffix += 'g' + if list[style]['intel']: + suffix += 'i' + if list[style]['kokkos']: + suffix += 'k' + if list[style]['omp']: + suffix += 'o' + if list[style]['opt']: + suffix += 't' + if suffix: + return style + ' (' + suffix + ')' + else: + return style + for h in headers: - # print("Checking ", h) + if verbose: print("Checking ", h) fp = open(h) text = fp.read() + fp.close() matches = re.findall("(.+)Style\((.+),(.+)\)",text,re.MULTILINE) for m in matches: @@ -121,5 +168,78 @@ for h in headers: register_style(region,style,info) else: print("Skipping over: ",m) -fp.close() + + +if verbose: + print(""" +Parsed styles from %s: + Angle styles: %3d + Atom styles: %3d + Body styles: %3d + Bond styles: %3d + Command styles: %3d + Compute styles: %3d + Dihedral styles: %3d + Dump styles: %3d + Fix styles: %3d + Improper styles: %3d + Integrate styles: %3d + Kspace styles: %3d + Minimize styles: %3d + Pair styles: %3d + Reader styles: %3d + Region styles: %3d +""" % (src, len(angle), len(atom), len(body), len(bond), \ + len(command), len(compute), len(dihedral), len(dump), \ + len(fix), len(improper), len(integrate), len(kspace), \ + len(minimize), len(pair), len(reader), len(region))) + + +# check main commands lists +f = os.path.join(doc, 'Commands_all.rst') +fp = open(f) +text = fp.read() +fp.close() +matches = re.findall(":doc:`(.+) <.+>`",text,re.MULTILINE) +for c in command.keys(): + if not c in matches: + print("Command %s is missing in Commands_all.rst" % c) + + +f = os.path.join(doc, 'Commands_pair.rst') +fp = open(f) +text = fp.read() +fp.close() +matches = re.findall(":doc:`(.+) `",text,re.MULTILINE) +for c in pair.keys(): + # known undocumented aliases we need to skip + if c in ('meam','lj/sf'): continue + if not add_suffix(pair,c) in matches: + if not pair[c]['removed']: + print("Pair style entry %s is missing or" % c, + "incomplete in Commands_pair.rst") + +f = os.path.join(doc, 'Commands_bond.rst') +fp = open(f) +text = fp.read() +fp.close() +matches = re.findall(":doc:`(.+) `",text,re.MULTILINE) +for c in bond.keys(): + if not add_suffix(bond,c) in matches: + print("Bond style entry %s is missing or incomplete in Commands_bond.rst" % c) + +matches = re.findall(":doc:`(.+) `",text,re.MULTILINE) +for c in angle.keys(): + if not add_suffix(angle,c) in matches: + print("Angle style entry %s is missing or incomplete in Commands_bond.rst" % c) + +matches = re.findall(":doc:`(.+) `",text,re.MULTILINE) +for c in dihedral.keys(): + if not add_suffix(dihedral,c) in matches: + print("Dihedral style entry %s is missing or incomplete in Commands_bond.rst" % c) + +matches = re.findall(":doc:`(.+) `",text,re.MULTILINE) +for c in improper.keys(): + if not add_suffix(improper,c) in matches: + print("Improper style entry %s is missing or incomplete in Commands_bond.rst" % c) From 297d31ab8f44166a0f07723a3ca52fd985b61ba0 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 11 Jan 2020 19:02:49 -0500 Subject: [PATCH 24/51] clean up and update general command overview --- doc/src/Commands_all.rst | 96 +++++++++++++++++++++------------------- 1 file changed, 51 insertions(+), 45 deletions(-) diff --git a/doc/src/Commands_all.rst b/doc/src/Commands_all.rst index d47c3299d0..5ad8fff44c 100644 --- a/doc/src/Commands_all.rst +++ b/doc/src/Commands_all.rst @@ -25,26 +25,26 @@ An alphabetic list of all general LAMMPS commands. * :doc:`atom_style ` * :doc:`balance ` * :doc:`bond_coeff ` - * :doc:`bond\_style ` - * :doc:`bond\_write ` + * :doc:`bond_style ` + * :doc:`bond_write ` * :doc:`boundary ` * :doc:`box ` - * :doc:`change\_box ` + * :doc:`change_box ` * :doc:`clear ` - * :doc:`comm\_modify ` - * :doc:`comm\_style ` + * :doc:`comm_modify ` + * :doc:`comm_style ` * :doc:`compute ` - * :doc:`compute\_modify ` - * :doc:`create\_atoms ` - * :doc:`create\_bonds ` - * :doc:`create\_box ` - * :doc:`delete\_atoms ` - * :doc:`delete\_bonds ` + * :doc:`compute_modify ` + * :doc:`create_atoms ` + * :doc:`create_bonds ` + * :doc:`create_box ` + * :doc:`delete_atoms ` + * :doc:`delete_bonds ` * :doc:`dielectric ` - * :doc:`dihedral\_coeff ` - * :doc:`dihedral\_style ` + * :doc:`dihedral_coeff ` + * :doc:`dihedral_style ` * :doc:`dimension ` - * :doc:`displace\_atoms ` + * :doc:`displace_atoms ` * :doc:`dump ` * :doc:`dump adios ` * :doc:`dump image ` @@ -52,75 +52,77 @@ An alphabetic list of all general LAMMPS commands. * :doc:`dump netcdf ` * :doc:`dump netcdf/mpiio ` * :doc:`dump vtk ` - * :doc:`dump\_modify ` - * :doc:`dynamical\_matrix ` + * :doc:`dump_modify ` + * :doc:`dynamical_matrix ` * :doc:`echo ` * :doc:`fix ` - * :doc:`fix\_modify ` + * :doc:`fix_modify ` * :doc:`group ` * :doc:`group2ndx ` * :doc:`hyper ` * :doc:`if ` - * :doc:`improper\_coeff ` - * :doc:`improper\_style ` + * :doc:`improper_coeff ` + * :doc:`improper_style ` * :doc:`include ` + * :doc:`info ` * :doc:`jump ` - * :doc:`kim\_init ` - * :doc:`kim\_interactions ` - * :doc:`kim\_query ` - * :doc:`kspace\_modify ` - * :doc:`kspace\_style ` + * :doc:`kim_init ` + * :doc:`kim_interactions ` + * :doc:`kim_param ` + * :doc:`kim_query ` + * :doc:`kspace_modify ` + * :doc:`kspace_style ` * :doc:`label