From 3593159f19f8b87f5a8dc3204410f307e448a7b5 Mon Sep 17 00:00:00 2001
From: sjplimp
Date: Fri, 5 Dec 2014 21:46:04 +0000
Subject: [PATCH 001/479] git-svn-id:
svn://svn.icms.temple.edu/lammps-ro/trunk@12816
f3b2605a-c512-4ea7-a41b-209d697bcdaa
---
bench/in.chute | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bench/in.chute b/bench/in.chute
index cf43fd7ff8..9f7c28ada3 100644
--- a/bench/in.chute
+++ b/bench/in.chute
@@ -5,7 +5,7 @@ units lj
atom_style sphere
boundary p p fs
newton off
-communicate single vel yes
+comm_modify vel yes
read_data data.chute
--
GitLab
From 473353997b85fafbb3d186a9d2ba8886a71c0107 Mon Sep 17 00:00:00 2001
From: sjplimp
Date: Fri, 5 Dec 2014 22:00:45 +0000
Subject: [PATCH 002/479] git-svn-id:
svn://svn.icms.temple.edu/lammps-ro/trunk@12817
f3b2605a-c512-4ea7-a41b-209d697bcdaa
---
src/USER-CUDA/verlet_cuda.cpp | 36 +++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/src/USER-CUDA/verlet_cuda.cpp b/src/USER-CUDA/verlet_cuda.cpp
index eba4a0b09c..7d4a0c4114 100644
--- a/src/USER-CUDA/verlet_cuda.cpp
+++ b/src/USER-CUDA/verlet_cuda.cpp
@@ -679,7 +679,7 @@ void VerletCuda::run(int n)
my_gettime(CLOCK_REALTIME, &starttime);
timer->stamp();
comm->forward_comm(1);
- timer->stamp(Timer::COMM);
+ timer->stamp(TIME_COMM);
my_gettime(CLOCK_REALTIME, &endtime);
cuda->shared_data.cuda_timings.comm_forward_total +=
endtime.tv_sec - starttime.tv_sec + 1.0 * (endtime.tv_nsec - starttime.tv_nsec) / 1000000000;
@@ -699,7 +699,7 @@ void VerletCuda::run(int n)
//start force calculation asynchronus
cuda->shared_data.comm.comm_phase = 1;
force->pair->compute(eflag, vflag);
- timer->stamp(Timer::PAIR);
+ timer->stamp(TIME_PAIR);
//CudaWrapper_Sync();
//download comm buffers from GPU, perform MPI communication and upload buffers again
@@ -708,11 +708,11 @@ void VerletCuda::run(int n)
my_gettime(CLOCK_REALTIME, &endtime);
cuda->shared_data.cuda_timings.comm_forward_total +=
endtime.tv_sec - starttime.tv_sec + 1.0 * (endtime.tv_nsec - starttime.tv_nsec) / 1000000000;
- timer->stamp(Timer::COMM);
+ timer->stamp(TIME_COMM);
//wait for force calculation
CudaWrapper_Sync();
- timer->stamp(Timer::PAIR);
+ timer->stamp(TIME_PAIR);
//unpack communication buffers
my_gettime(CLOCK_REALTIME, &starttime);
@@ -721,7 +721,7 @@ void VerletCuda::run(int n)
cuda->shared_data.cuda_timings.comm_forward_total +=
endtime.tv_sec - starttime.tv_sec + 1.0 * (endtime.tv_nsec - starttime.tv_nsec) / 1000000000;
- timer->stamp(Timer::COMM);
+ timer->stamp(TIME_COMM);
MYDBG(printf("# CUDA VerletCuda::iterate: communicate done\n");)
cuda->shared_data.cuda_timings.test1 +=
endtotal.tv_sec - starttotal.tv_sec + 1.0 * (endtotal.tv_nsec - starttotal.tv_nsec) / 1000000000;
@@ -732,7 +732,7 @@ void VerletCuda::run(int n)
my_gettime(CLOCK_REALTIME, &endtime);
cuda->shared_data.cuda_timings.comm_forward_total +=
endtime.tv_sec - starttime.tv_sec + 1.0 * (endtime.tv_nsec - starttime.tv_nsec) / 1000000000;
- timer->stamp(Timer::COMM);
+ timer->stamp(TIME_COMM);
MYDBG(printf("# CUDA VerletCuda::iterate: communicate done\n");)
}
} else {
@@ -822,7 +822,7 @@ void VerletCuda::run(int n)
cuda->shared_data.buffer_new = 2;
MYDBG(printf("# CUDA VerletCuda::iterate: neighbor build\n");)
- timer->stamp(Timer::COMM);
+ timer->stamp(TIME_COMM);
my_gettime(CLOCK_REALTIME, &endtime);
cuda->shared_data.cuda_timings.test2 +=
endtime.tv_sec - starttime.tv_sec + 1.0 * (endtime.tv_nsec - starttime.tv_nsec) / 1000000000;
@@ -830,7 +830,7 @@ void VerletCuda::run(int n)
//rebuild neighbor list
test_atom(testatom, "Pre Neighbor");
neighbor->build(0);
- timer->stamp(Timer::NEIGH);
+ timer->stamp(TIME_NEIGHBOR);
MYDBG(printf("# CUDA VerletCuda::iterate: neighbor done\n");)
//if bonded interactions are used (in this case collect_forces_later is true), transfer data which only changes upon exchange/border routines from GPU to CPU
if(cuda->shared_data.pair.collect_forces_later) {
@@ -917,7 +917,7 @@ void VerletCuda::run(int n)
if(not cuda->shared_data.pair.collect_forces_later)
CudaWrapper_Sync();
- timer->stamp(Timer::PAIR);
+ timer->stamp(TIME_PAIR);
}
//calculate bonded interactions
@@ -927,11 +927,11 @@ void VerletCuda::run(int n)
if(n_pre_force == 0) Verlet::force_clear();
else cuda->cu_f->downloadAsync(2);
- timer->stamp(Timer::PAIR);
+ timer->stamp(TIME_PAIR);
if(neighbor->lastcall == update->ntimestep) {
neighbor->build_topology();
- timer->stamp(Timer::NEIGH);
+ timer->stamp(TIME_NEIGHBOR);
}
test_atom(testatom, "pre bond force");
@@ -944,7 +944,7 @@ void VerletCuda::run(int n)
if(force->improper) force->improper->compute(eflag, vflag);
- timer->stamp(Timer::BOND);
+ timer->stamp(TIME_BOND);
}
//collect forces in case pair force and bonded interactions were overlapped, and either no KSPACE or a GPU KSPACE style is used
@@ -969,7 +969,7 @@ void VerletCuda::run(int n)
if(vflag) cuda->cu_virial->download();
- timer->stamp(Timer::PAIR);
+ timer->stamp(TIME_PAIR);
my_gettime(CLOCK_REALTIME, &endtime);
cuda->shared_data.cuda_timings.pair_force_collection +=
@@ -987,7 +987,7 @@ void VerletCuda::run(int n)
if(n_pre_force == 0) Verlet::force_clear();
else cuda->cu_f->downloadAsync(2);
- timer->stamp(Timer::PAIR);
+ timer->stamp(TIME_PAIR);
}
force->kspace->compute(eflag, vflag);
@@ -995,7 +995,7 @@ void VerletCuda::run(int n)
if((not cuda->shared_data.pppm.cudable_force) && (not cuda->shared_data.pair.collect_forces_later))
cuda->uploadAll();
- timer->stamp(Timer::KSPACE);
+ timer->stamp(TIME_KSPACE);
}
//collect forces in case pair forces and kspace was overlaped
@@ -1018,7 +1018,7 @@ void VerletCuda::run(int n)
if(vflag) cuda->cu_virial->download();
- timer->stamp(Timer::PAIR);
+ timer->stamp(TIME_PAIR);
my_gettime(CLOCK_REALTIME, &endtime);
cuda->shared_data.cuda_timings.pair_force_collection +=
@@ -1028,7 +1028,7 @@ void VerletCuda::run(int n)
//send forces on ghost atoms back to other GPU: THIS SHOULD NEVER HAPPEN
if(force->newton) {
comm->reverse_comm();
- timer->stamp(Timer::COMM);
+ timer->stamp(TIME_COMM);
}
test_atom(testatom, "post force");
@@ -1054,7 +1054,7 @@ void VerletCuda::run(int n)
timer->stamp();
output->write(ntimestep);
- timer->stamp(Timer::OUTPUT);
+ timer->stamp(TIME_OUTPUT);
}
--
GitLab
From 2f2f9abcd2d9ae4be0446a8ce71f4aba3ef709c9 Mon Sep 17 00:00:00 2001
From: sjplimp
Date: Fri, 5 Dec 2014 22:05:01 +0000
Subject: [PATCH 003/479] git-svn-id:
svn://svn.icms.temple.edu/lammps-ro/trunk@12818
f3b2605a-c512-4ea7-a41b-209d697bcdaa
---
doc/fix_gle.html | 16 +++++++++++++++-
doc/fix_gle.txt | 16 +++++++++++++++-
2 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/doc/fix_gle.html b/doc/fix_gle.html
index e82902a973..5ae0c8783d 100644
--- a/doc/fix_gle.html
+++ b/doc/fix_gle.html
@@ -50,7 +50,8 @@ vibrational modes in the system to inexpensive (approximate)
modelling of nuclear quantum effects. Contrary to
fix langevin, this fix performs both
thermostatting and evolution of the Hamiltonian equations of motion, so it
-does not need to be used together with fix nve.
+should not be used together with fix nve -- at least not
+on the same atom groups.
Each degree of freedom in the thermostatted group is supplemented
with Ns additional degrees of freedom s, and the equations of motion
@@ -93,6 +94,14 @@ 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.
+Note also that the Generalized Langevin Dynamics scheme that is
+implemented by the fix gld scheme is closely related
+to the present one. In fact, it should be always possible to cast the
+Prony series form of the memory kernel used by GLD into an appropriate
+input matrix for fix_gle. While the GLE scheme is more
+general, the form used by fix gld can be more directly
+related to the representation of an implicit solvent environment.
+
Restart, fix_modify, output, run start/stop, minimize info:
The instantaneous values of the extended variables are written to
@@ -127,6 +136,11 @@ with rigid bodies, SHAKE or RATTLE. It is expected that all the
thermostatted degrees of freedom are fully flexible, and the sampled
ensemble will not be correct otherwise.
+In order to perform constant-pressure simulations please use
+fix press/berendsen, rather than
+fix_npt, to avoid duplicate integration of the
+equations of motion.
+
This fix is part of the USER-MISC package. It is only enabled if LAMMPS
was built with that package. See the Making
LAMMPS section for more info.
diff --git a/doc/fix_gle.txt b/doc/fix_gle.txt
index 08ff64777c..8ce2a2b6fd 100644
--- a/doc/fix_gle.txt
+++ b/doc/fix_gle.txt
@@ -40,7 +40,8 @@ vibrational modes in the system to inexpensive (approximate)
modelling of nuclear quantum effects. Contrary to
"fix langevin"_fix_langevin.html, this fix performs both
thermostatting and evolution of the Hamiltonian equations of motion, so it
-does not need to be used together with "fix nve"_fix_nve.html.
+should not be used together with "fix nve"_fix_nve.html -- at least not
+on the same atom groups.
Each degree of freedom in the thermostatted group is supplemented
with Ns additional degrees of freedom s, and the equations of motion
@@ -83,6 +84,14 @@ 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.
+Note also that the Generalized Langevin Dynamics scheme that is
+implemented by the "fix gld"_fix_gld.html scheme is closely related
+to the present one. In fact, it should be always possible to cast the
+Prony series form of the memory kernel used by GLD into an appropriate
+input matrix for "fix_gle"_fix_gle.html. While the GLE scheme is more
+general, the form used by "fix gld"_fix_gld.html can be more directly
+related to the representation of an implicit solvent environment.
+
[Restart, fix_modify, output, run start/stop, minimize info:]
The instantaneous values of the extended variables are written to
@@ -117,6 +126,11 @@ with rigid bodies, SHAKE or RATTLE. It is expected that all the
thermostatted degrees of freedom are fully flexible, and the sampled
ensemble will not be correct otherwise.
+In order to perform constant-pressure simulations please use
+"fix press/berendsen"_fix_press_berendsen.html, rather than
+"fix_npt"_fix_npt.html, to avoid duplicate integration of the
+equations of motion.
+
This fix is part of the USER-MISC package. It is only enabled if LAMMPS
was built with that package. See the "Making
LAMMPS"_Section_start.html#start_3 section for more info.
--
GitLab
From ced125c2b4e73e5bcc03b870d4091b623e36a95b Mon Sep 17 00:00:00 2001
From: sjplimp
Date: Fri, 5 Dec 2014 22:05:02 +0000
Subject: [PATCH 004/479] git-svn-id:
svn://svn.icms.temple.edu/lammps-ro/trunk@12819
f3b2605a-c512-4ea7-a41b-209d697bcdaa
---
src/USER-MISC/fix_gle.cpp | 8 +++++++-
src/USER-MISC/fix_ipi.cpp | 14 ++++++--------
2 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/src/USER-MISC/fix_gle.cpp b/src/USER-MISC/fix_gle.cpp
index 5f28dea37b..95f868f95f 100644
--- a/src/USER-MISC/fix_gle.cpp
+++ b/src/USER-MISC/fix_gle.cpp
@@ -82,7 +82,13 @@ void StabCholesky(int n, const double* MMt, double* M)
for (k=0; k0.?sqrt(D[i]):0.);
+ for(i=0; i0.?sqrt(D[i]):0.);
+ }
for(i=0; iboxlo;
double posconv;
posconv=0.52917721*force->angstrom;
- boxlo[0] = 0;
- boxlo[1] = 0;
- boxlo[2] = 0;
- boxhi[0] = cellh[0]*posconv;
- boxhi[1] = cellh[4]*posconv;
- boxhi[2] = cellh[8]*posconv;
+ boxlo[0] = -0.5*cellh[0]*posconv;
+ boxlo[1] = -0.5*cellh[4]*posconv;
+ boxlo[2] = -0.5*cellh[8]*posconv;
+ boxhi[0] = -boxlo[0];
+ boxhi[1] = -boxlo[1];
+ boxhi[2] = -boxlo[2];
domain->xy = cellh[1]*posconv;
domain->xz = cellh[2]*posconv;
domain->yz = cellh[5]*posconv;
@@ -421,7 +421,6 @@ void FixIPI::final_integrate()
error->one(FLERR, "Got EXIT message from i-PI. Now leaving!");
if (strcmp(header,"GETFORCE ") == 0 ) {
-
writebuffer(ipisock,"FORCEREADY ",MSGLEN, error);
writebuffer(ipisock,(char*) &pot,8, error);
writebuffer(ipisock,(char*) &nat,4, error);
@@ -432,7 +431,6 @@ void FixIPI::final_integrate()
}
else
error->one(FLERR, "Wrapper did not ask for forces, I will now die!");
-
}
hasdata=0;
--
GitLab
From 792d174d10e83bd46f2aaee6084978b2e04f2c16 Mon Sep 17 00:00:00 2001
From: sjplimp
Date: Tue, 9 Dec 2014 19:37:05 +0000
Subject: [PATCH 005/479] git-svn-id:
svn://svn.icms.temple.edu/lammps-ro/trunk@12820
f3b2605a-c512-4ea7-a41b-209d697bcdaa
---
src/compute.cpp | 5 +++++
src/compute_atom_molecule.cpp | 9 ++++-----
src/fix_gravity.cpp | 1 +
3 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/src/compute.cpp b/src/compute.cpp
index 5f41cbf837..f3b24f7bbc 100644
--- a/src/compute.cpp
+++ b/src/compute.cpp
@@ -93,6 +93,11 @@ Compute::Compute(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
datamask = ALL_MASK;
datamask_ext = ALL_MASK;
+
+ // force init to zero in case these are used as logicals
+
+ vector = vector_atom = vector_local = NULL;
+ array = array_atom = array_local = NULL;
}
/* ---------------------------------------------------------------------- */
diff --git a/src/compute_atom_molecule.cpp b/src/compute_atom_molecule.cpp
index 4442a72255..8b0d413c23 100644
--- a/src/compute_atom_molecule.cpp
+++ b/src/compute_atom_molecule.cpp
@@ -106,7 +106,7 @@ ComputeAtomMolecule(LAMMPS *lmp, int narg, char **arg) :
int ifix = modify->find_fix(ids[i]);
if (ifix < 0)
error->all(FLERR,"Fix ID for compute atom/molecule does not exist");
- if (modify->fix[ifix]->peratom_flag)
+ if (modify->fix[ifix]->peratom_flag == 0)
error->all(FLERR,"Compute atom/molecule fix does not "
"calculate per-atom values");
if (argindex[i] == 0 &&
@@ -299,9 +299,8 @@ void ComputeAtomMolecule::compute_one(int m)
peratom = compute->vector_atom;
nstride = 1;
} else {
- if (compute->array_atom) peratom = &compute->array_atom[0][aidx-1];
- else peratom = NULL;
- nstride = compute->size_array_cols;
+ peratom = &compute->array_atom[0][aidx-1];
+ nstride = compute->size_peratom_cols;
}
// access fix fields, check if fix frequency is a match
@@ -317,7 +316,7 @@ void ComputeAtomMolecule::compute_one(int m)
nstride = 1;
} else {
peratom = &fix->array_atom[0][aidx-1];
- nstride = fix->size_array_cols;
+ nstride = fix->size_peratom_cols;
}
// evaluate atom-style variable
diff --git a/src/fix_gravity.cpp b/src/fix_gravity.cpp
index 24bc7b4b3c..2e9d6e40f4 100644
--- a/src/fix_gravity.cpp
+++ b/src/fix_gravity.cpp
@@ -41,6 +41,7 @@ FixGravity::FixGravity(LAMMPS *lmp, int narg, char **arg) :
{
if (narg < 5) error->all(FLERR,"Illegal fix gravity command");
+ dynamic_group_allow = 1;
scalar_flag = 1;
global_freq = 1;
extscalar = 1;
--
GitLab
From 793ab9aa55a52b29ca5e90f43c625850513a0ce4 Mon Sep 17 00:00:00 2001
From: sjplimp
Date: Tue, 9 Dec 2014 19:42:52 +0000
Subject: [PATCH 006/479] git-svn-id:
svn://svn.icms.temple.edu/lammps-ro/trunk@12821
f3b2605a-c512-4ea7-a41b-209d697bcdaa
---
doc/pair_modify.html | 8 ++++++++
doc/pair_modify.txt | 8 ++++++++
2 files changed, 16 insertions(+)
diff --git a/doc/pair_modify.html b/doc/pair_modify.html
index a5aa4a2025..91dc591f5b 100644
--- a/doc/pair_modify.html
+++ b/doc/pair_modify.html
@@ -162,6 +162,14 @@ checking the rdf. The rdf is not exactly unity beyond the cutoff for
each pair of interaction types, so the tail correction is necessarily
an approximation.
+The tail corrections are computed at the beginning of each simulation
+run. If the number of atoms changes during the run, e.g. due to atoms
+leaving the simulation domain, or use of the fix gcmc
+command, then the corrections are not updates to relect the changed
+atom count. If this is a large effect in your simulation, you should
+break the long run into several short runs, so that the correction
+factors are re-computed multiple times.
+
Thermophysical properties obtained from calculations with this option
enabled will not be thermodynamically consistent with the truncated
force-field that was used. In other words, atoms do not feel any LJ
diff --git a/doc/pair_modify.txt b/doc/pair_modify.txt
index af00c3a593..b2844fc938 100644
--- a/doc/pair_modify.txt
+++ b/doc/pair_modify.txt
@@ -156,6 +156,14 @@ checking the rdf. The rdf is not exactly unity beyond the cutoff for
each pair of interaction types, so the tail correction is necessarily
an approximation. :l
+The tail corrections are computed at the beginning of each simulation
+run. If the number of atoms changes during the run, e.g. due to atoms
+leaving the simulation domain, or use of the "fix gcmc"_fix_gcmc.html
+command, then the corrections are not updates to relect the changed
+atom count. If this is a large effect in your simulation, you should
+break the long run into several short runs, so that the correction
+factors are re-computed multiple times.
+
Thermophysical properties obtained from calculations with this option
enabled will not be thermodynamically consistent with the truncated
force-field that was used. In other words, atoms do not feel any LJ
--
GitLab
From 6e61c2a738c2b5f7945e624e725aca173c705a35 Mon Sep 17 00:00:00 2001
From: sjplimp
Date: Tue, 9 Dec 2014 19:42:56 +0000
Subject: [PATCH 007/479] git-svn-id:
svn://svn.icms.temple.edu/lammps-ro/trunk@12822
f3b2605a-c512-4ea7-a41b-209d697bcdaa
---
lib/kokkos/core/src/Threads/Kokkos_ThreadsExec.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/kokkos/core/src/Threads/Kokkos_ThreadsExec.cpp b/lib/kokkos/core/src/Threads/Kokkos_ThreadsExec.cpp
index f9d7a7f17d..4b819836ee 100644
--- a/lib/kokkos/core/src/Threads/Kokkos_ThreadsExec.cpp
+++ b/lib/kokkos/core/src/Threads/Kokkos_ThreadsExec.cpp
@@ -714,11 +714,14 @@ void ThreadsExec::finalize()
namespace Kokkos {
+// you cannot dereference a NULL pointer!
+#if 0
Threads & Threads::instance(int)
{
static Threads * const t = 0 ;
return *t ;
}
+#endif
int Threads::thread_pool_size( int depth )
{
--
GitLab
From 8fcc7570da71c35f3f1d98215ebe3a9f4f107019 Mon Sep 17 00:00:00 2001
From: sjplimp
Date: Tue, 9 Dec 2014 19:43:04 +0000
Subject: [PATCH 008/479] git-svn-id:
svn://svn.icms.temple.edu/lammps-ro/trunk@12823
f3b2605a-c512-4ea7-a41b-209d697bcdaa
---
src/version.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/version.h b/src/version.h
index f8c67d896d..2d811a0e11 100644
--- a/src/version.h
+++ b/src/version.h
@@ -1 +1 @@
-#define LAMMPS_VERSION "26 Nov 2014"
+#define LAMMPS_VERSION "9 Dec 2014"
--
GitLab
From bfb56a8918cb5690c5651aed62d5176544bd930a Mon Sep 17 00:00:00 2001
From: sjplimp
Date: Tue, 9 Dec 2014 19:43:05 +0000
Subject: [PATCH 009/479] git-svn-id:
svn://svn.icms.temple.edu/lammps-ro/trunk@12824
f3b2605a-c512-4ea7-a41b-209d697bcdaa
---
doc/Manual.html | 4 ++--
doc/Manual.txt | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/doc/Manual.html b/doc/Manual.html
index d997dee571..9f6167b913 100644
--- a/doc/Manual.html
+++ b/doc/Manual.html
@@ -1,7 +1,7 @@
LAMMPS Users Manual
-
+
@@ -22,7 +22,7 @@
LAMMPS Documentation
-26 Nov 2014 version
+9 Dec 2014 version
Version info:
diff --git a/doc/Manual.txt b/doc/Manual.txt
index 3c01cfb832..82c1e2f574 100644
--- a/doc/Manual.txt
+++ b/doc/Manual.txt
@@ -1,6 +1,6 @@
LAMMPS Users Manual
-
+
@@ -18,7 +18,7 @@
LAMMPS Documentation :c,h3
-26 Nov 2014 version :c,h4
+9 Dec 2014 version :c,h4
Version info: :h4
--
GitLab
From 11d54badb44d24592ace7c0538b87151c40fb1ff Mon Sep 17 00:00:00 2001
From: sjplimp
Date: Fri, 12 Dec 2014 00:20:06 +0000
Subject: [PATCH 010/479] git-svn-id:
svn://svn.icms.temple.edu/lammps-ro/trunk@12826
f3b2605a-c512-4ea7-a41b-209d697bcdaa
---
doc/dihedral_opls.html | 4 +++-
doc/dihedral_opls.txt | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/doc/dihedral_opls.html b/doc/dihedral_opls.html
index 0d820e649d..672ceacdfe 100644
--- a/doc/dihedral_opls.html
+++ b/doc/dihedral_opls.html
@@ -20,7 +20,9 @@
Examples:
dihedral_style opls
-dihedral_coeff 1 90.0 90.0 90.0 70.0
+dihedral_coeff 1 1.740 -0.157 0.279 0.00 # CT-CT-CT-CT
+dihedral_coeff 2 0.000 0.000 0.366 0.000 # CT-CT-CT-HC
+dihedral_coeff 3 0.000 0.000 0.318 0.000 # HC-CT-CT-HC
Description:
diff --git a/doc/dihedral_opls.txt b/doc/dihedral_opls.txt
index a507c0289c..aa8546685e 100644
--- a/doc/dihedral_opls.txt
+++ b/doc/dihedral_opls.txt
@@ -16,7 +16,9 @@ dihedral_style opls :pre
[Examples:]
dihedral_style opls
-dihedral_coeff 1 90.0 90.0 90.0 70.0 :pre
+dihedral_coeff 1 1.740 -0.157 0.279 0.00 # CT-CT-CT-CT
+dihedral_coeff 2 0.000 0.000 0.366 0.000 # CT-CT-CT-HC
+dihedral_coeff 3 0.000 0.000 0.318 0.000 # HC-CT-CT-HC :pre
[Description:]
--
GitLab
From 1af7b06052fdbf30ac4402716a887d11d27b1f0b Mon Sep 17 00:00:00 2001
From: sjplimp
Date: Fri, 12 Dec 2014 00:20:19 +0000
Subject: [PATCH 011/479] git-svn-id:
svn://svn.icms.temple.edu/lammps-ro/trunk@12827
f3b2605a-c512-4ea7-a41b-209d697bcdaa
---
src/atom.cpp | 2 +-
src/atom_vec_body.cpp | 2 +-
src/domain.cpp | 4 ++--
src/force.cpp | 12 ++++++------
src/modify.cpp | 4 ++--
src/output.cpp | 2 +-
src/read_dump.cpp | 2 +-
src/write_dump.cpp | 2 +-
8 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/src/atom.cpp b/src/atom.cpp
index 9d494b35db..42304c2b77 100644
--- a/src/atom.cpp
+++ b/src/atom.cpp
@@ -438,7 +438,7 @@ AtomVec *Atom::new_avec(const char *style, int trysuffix, int &sflag)
#include "style_atom.h"
#undef ATOM_CLASS
- else error->all(FLERR,"Invalid atom style");
+ else error->all(FLERR,"Unknown atom style");
return NULL;
}
diff --git a/src/atom_vec_body.cpp b/src/atom_vec_body.cpp
index d407d5e8c8..efe6bd1200 100644
--- a/src/atom_vec_body.cpp
+++ b/src/atom_vec_body.cpp
@@ -92,7 +92,7 @@ void AtomVecBody::process_args(int narg, char **arg)
#undef BodyStyle
#undef BODY_CLASS
- else error->all(FLERR,"Invalid body style");
+ else error->all(FLERR,"Unknown body style");
bptr->avec = this;
icp = bptr->icp;
diff --git a/src/domain.cpp b/src/domain.cpp
index 378a25264f..7df81f7e61 100644
--- a/src/domain.cpp
+++ b/src/domain.cpp
@@ -1424,7 +1424,7 @@ void Domain::add_region(int narg, char **arg)
// create the Region
- if (strcmp(arg[1],"none") == 0) error->all(FLERR,"Invalid region style");
+ if (strcmp(arg[1],"none") == 0) error->all(FLERR,"Unknown region style");
#define REGION_CLASS
#define RegionStyle(key,Class) \
@@ -1433,7 +1433,7 @@ void Domain::add_region(int narg, char **arg)
#include "style_region.h"
#undef REGION_CLASS
- else error->all(FLERR,"Invalid region style");
+ else error->all(FLERR,"Unknown region style");
// initialize any region variables via init()
// in case region is used between runs, e.g. to print a variable
diff --git a/src/force.cpp b/src/force.cpp
index dc0b1bad60..71eb0add9d 100644
--- a/src/force.cpp
+++ b/src/force.cpp
@@ -173,7 +173,7 @@ Pair *Force::new_pair(const char *style, int trysuffix, int &sflag)
return pair_creator(lmp);
}
- error->all(FLERR,"Invalid pair style");
+ error->all(FLERR,"Unknown pair style");
return NULL;
}
@@ -288,7 +288,7 @@ Bond *Force::new_bond(const char *style, int trysuffix, int &sflag)
#include "style_bond.h"
#undef BOND_CLASS
- else error->all(FLERR,"Invalid bond style");
+ else error->all(FLERR,"Unknown bond style");
return NULL;
}
@@ -368,7 +368,7 @@ Angle *Force::new_angle(const char *style, int trysuffix, int &sflag)
#include "style_angle.h"
#undef ANGLE_CLASS
- else error->all(FLERR,"Invalid angle style");
+ else error->all(FLERR,"Unknown angle style");
return NULL;
}
@@ -434,7 +434,7 @@ Dihedral *Force::new_dihedral(const char *style, int trysuffix, int &sflag)
#undef DihedralStyle
#undef DIHEDRAL_CLASS
- else error->all(FLERR,"Invalid dihedral style");
+ else error->all(FLERR,"Unknown dihedral style");
return NULL;
}
@@ -499,7 +499,7 @@ Improper *Force::new_improper(const char *style, int trysuffix, int &sflag)
#include "style_improper.h"
#undef IMPROPER_CLASS
- else error->all(FLERR,"Invalid improper style");
+ else error->all(FLERR,"Unknown improper style");
return NULL;
}
@@ -583,7 +583,7 @@ KSpace *Force::new_kspace(int narg, char **arg, int trysuffix, int &sflag)
#include "style_kspace.h"
#undef KSPACE_CLASS
- else error->all(FLERR,"Invalid kspace style");
+ else error->all(FLERR,"Unknown kspace style");
return NULL;
}
diff --git a/src/modify.cpp b/src/modify.cpp
index 865ff48e42..1562cac48b 100644
--- a/src/modify.cpp
+++ b/src/modify.cpp
@@ -759,7 +759,7 @@ void Modify::add_fix(int narg, char **arg, int trysuffix)
fix[ifix] = fix_creator(lmp,narg,arg);
}
- if (fix[ifix] == NULL) error->all(FLERR,"Invalid fix style");
+ if (fix[ifix] == NULL) error->all(FLERR,"Unknown fix style");
// check if Fix is in restart_global list
// if yes, pass state info to the Fix so it can reset itself
@@ -930,7 +930,7 @@ void Modify::add_compute(int narg, char **arg, int trysuffix)
compute[ncompute] = compute_creator(lmp,narg,arg);
}
- if (compute[ncompute] == NULL) error->all(FLERR,"Invalid compute style");
+ if (compute[ncompute] == NULL) error->all(FLERR,"Unknown compute style");
ncompute++;
}
diff --git a/src/output.cpp b/src/output.cpp
index 6a9223604e..ce561e3489 100644
--- a/src/output.cpp
+++ b/src/output.cpp
@@ -571,7 +571,7 @@ void Output::add_dump(int narg, char **arg)
#include "style_dump.h"
#undef DUMP_CLASS
- else error->all(FLERR,"Invalid dump style");
+ else error->all(FLERR,"Unknown dump style");
every_dump[ndump] = force->inumeric(FLERR,arg[3]);
if (every_dump[ndump] <= 0) error->all(FLERR,"Illegal dump command");
diff --git a/src/read_dump.cpp b/src/read_dump.cpp
index bbe1b4cd71..14b208e994 100644
--- a/src/read_dump.cpp
+++ b/src/read_dump.cpp
@@ -199,7 +199,7 @@ void ReadDump::setup_reader(int narg, char **arg)
// unrecognized style
- else error->all(FLERR,"Invalid dump reader style");
+ else error->all(FLERR,"Unknown dump reader style");
// pass any arguments to reader
diff --git a/src/write_dump.cpp b/src/write_dump.cpp
index c9b6db53ac..e4810cea12 100644
--- a/src/write_dump.cpp
+++ b/src/write_dump.cpp
@@ -62,7 +62,7 @@ void WriteDump::command(int narg, char **arg)
#include "style_dump.h"
#undef DUMP_CLASS
- else error->all(FLERR,"Invalid dump style");
+ else error->all(FLERR,"Unknown dump style");
if (modindex < narg) dump->modify_params(narg-modindex-1,&arg[modindex+1]);
--
GitLab
From d30ce3fe1fbc174838778a22e6d75524b43417b5 Mon Sep 17 00:00:00 2001
From: sjplimp
Date: Sat, 13 Dec 2014 00:42:32 +0000
Subject: [PATCH 012/479] git-svn-id:
svn://svn.icms.temple.edu/lammps-ro/trunk@12828
f3b2605a-c512-4ea7-a41b-209d697bcdaa
---
src/read_data.cpp | 5 +++++
src/read_dump.cpp | 5 +++++
src/thermo.cpp | 5 +++++
3 files changed, 15 insertions(+)
diff --git a/src/read_data.cpp b/src/read_data.cpp
index ed7acf22ac..7fe63f1cc1 100644
--- a/src/read_data.cpp
+++ b/src/read_data.cpp
@@ -11,6 +11,11 @@
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
+// lmptype.h must be first b/c this file uses MAXBIGINT and includes mpi.h
+// due to OpenMPI bug which sets INT64_MAX via its mpi.h
+// before lmptype.h can set flags to insure it is done correctly
+
+#include "lmptype.h"
#include "mpi.h"
#include "math.h"
#include "string.h"
diff --git a/src/read_dump.cpp b/src/read_dump.cpp
index 14b208e994..45ff1f81bf 100644
--- a/src/read_dump.cpp
+++ b/src/read_dump.cpp
@@ -15,6 +15,11 @@
Contributing author: Timothy Sirk (ARL)
------------------------------------------------------------------------- */
+// lmptype.h must be first b/c this file uses MAXBIGINT and includes mpi.h
+// due to OpenMPI bug which sets INT64_MAX via its mpi.h
+// before lmptype.h can set flags to insure it is done correctly
+
+#include "lmptype.h"
#include "mpi.h"
#include "string.h"
#include "stdlib.h"
diff --git a/src/thermo.cpp b/src/thermo.cpp
index 3656300f51..a1a42ed974 100644
--- a/src/thermo.cpp
+++ b/src/thermo.cpp
@@ -11,6 +11,11 @@
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
+// lmptype.h must be first b/c this file uses MAXBIGINT and includes mpi.h
+// due to OpenMPI bug which sets INT64_MAX via its mpi.h
+// before lmptype.h can set flags to insure it is done correctly
+
+#include "lmptype.h"
#include "mpi.h"
#include "math.h"
#include "stdlib.h"
--
GitLab
From 53d8975ee41af6f8c36b9fd74a26695eef823cc2 Mon Sep 17 00:00:00 2001
From: sjplimp
Date: Sat, 13 Dec 2014 00:42:42 +0000
Subject: [PATCH 013/479] git-svn-id:
svn://svn.icms.temple.edu/lammps-ro/trunk@12829
f3b2605a-c512-4ea7-a41b-209d697bcdaa
---
src/REPLICA/neb.cpp | 5 +++++
src/REPLICA/prd.cpp | 5 +++++
src/REPLICA/tad.cpp | 5 +++++
3 files changed, 15 insertions(+)
diff --git a/src/REPLICA/neb.cpp b/src/REPLICA/neb.cpp
index 17612caae7..4c34013bfa 100644
--- a/src/REPLICA/neb.cpp
+++ b/src/REPLICA/neb.cpp
@@ -11,6 +11,11 @@
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
+// lmptype.h must be first b/c this file uses MAXBIGINT and includes mpi.h
+// due to OpenMPI bug which sets INT64_MAX via its mpi.h
+// before lmptype.h can set flags to insure it is done correctly
+
+#include "lmptype.h"
#include "mpi.h"
#include "math.h"
#include "stdlib.h"
diff --git a/src/REPLICA/prd.cpp b/src/REPLICA/prd.cpp
index 950e806aec..4f03981295 100644
--- a/src/REPLICA/prd.cpp
+++ b/src/REPLICA/prd.cpp
@@ -15,6 +15,11 @@
Contributing author: Mike Brown (SNL)
------------------------------------------------------------------------- */
+// lmptype.h must be first b/c this file uses MAXBIGINT and includes mpi.h
+// due to OpenMPI bug which sets INT64_MAX via its mpi.h
+// before lmptype.h can set flags to insure it is done correctly
+
+#include "lmptype.h"
#include "mpi.h"
#include "math.h"
#include "stdlib.h"
diff --git a/src/REPLICA/tad.cpp b/src/REPLICA/tad.cpp
index eccb8a9499..7c858c754f 100644
--- a/src/REPLICA/tad.cpp
+++ b/src/REPLICA/tad.cpp
@@ -15,6 +15,11 @@
Contributing author: Aidan Thompson (SNL)
------------------------------------------------------------------------- */
+// lmptype.h must be first b/c this file uses MAXBIGINT and includes mpi.h
+// due to OpenMPI bug which sets INT64_MAX via its mpi.h
+// before lmptype.h can set flags to insure it is done correctly
+
+#include "lmptype.h"
#include "mpi.h"
#include "math.h"
#include "stdlib.h"
--
GitLab
From a58e9a481fade52a5413a6635eec12c61ea03f9b Mon Sep 17 00:00:00 2001
From: sjplimp
Date: Mon, 15 Dec 2014 15:35:22 +0000
Subject: [PATCH 014/479] git-svn-id:
svn://svn.icms.temple.edu/lammps-ro/trunk@12830
f3b2605a-c512-4ea7-a41b-209d697bcdaa
---
src/thermo.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/thermo.cpp b/src/thermo.cpp
index a1a42ed974..c4007f9478 100644
--- a/src/thermo.cpp
+++ b/src/thermo.cpp
@@ -915,7 +915,7 @@ void Thermo::parse_fields(char *str)
delete [] id;
- } else error->all(FLERR,"Invalid keyword in thermo_style custom command");
+ } else error->all(FLERR,"Unknown keyword in thermo_style custom command");
word = strtok(NULL," \0");
}
--
GitLab
From fad2b8a0733d0bd0db787e7058530a7555d8b0a9 Mon Sep 17 00:00:00 2001
From: sjplimp
Date: Mon, 15 Dec 2014 18:31:18 +0000
Subject: [PATCH 015/479] git-svn-id:
svn://svn.icms.temple.edu/lammps-ro/trunk@12831
f3b2605a-c512-4ea7-a41b-209d697bcdaa
---
doc/fix_gcmc.html | 15 +++++++++------
doc/fix_gcmc.txt | 15 +++++++++------
2 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/doc/fix_gcmc.html b/doc/fix_gcmc.html
index 5800e4452e..bb80bb0fef 100644
--- a/doc/fix_gcmc.html
+++ b/doc/fix_gcmc.html
@@ -83,12 +83,15 @@ translations are attempted 100% of the time. For MC exchanges of either
molecular or atomic gasses, deletions and insertions are each attempted
with 50% probability.
-If inserted particles are individual atoms, they are assigned the
-specified atom type. If they are molecules, the type of each atom in
-the inserted molecule is specified in the file read by the
-molecule command, and those values are added to the
-specified atom type. E.g. if type = 2, and the file specifies atom
-types 1,2,3, then the inserted molecule will have atom types 3,4,5.
+
All inserted particles are assigned to two groups: the default group
+"all" and the group specified in the fix gcmc command (which can also
+be "all"). If inserted particles are individual atoms, they are
+assigned the specified atom type. If they are molecules, the type of
+each atom in the inserted molecule is specified in the file read by
+the molecule command, and those values are added to
+the specified atom type. E.g. if type = 2, and the file specifies
+atom types 1,2,3, then the inserted molecule will have atom types
+3,4,5.
This fix cannot be used to perform MC insertions of gas atoms or
molecules other than the exchanged type, but MC deletions, translations,
diff --git a/doc/fix_gcmc.txt b/doc/fix_gcmc.txt
index 43b99034d1..7a0c4a54af 100644
--- a/doc/fix_gcmc.txt
+++ b/doc/fix_gcmc.txt
@@ -67,12 +67,15 @@ translations are attempted 100% of the time. For MC exchanges of either
molecular or atomic gasses, deletions and insertions are each attempted
with 50% probability.
-If inserted particles are individual atoms, they are assigned the
-specified atom type. If they are molecules, the type of each atom in
-the inserted molecule is specified in the file read by the
-"molecule"_molecule.html command, and those values are added to the
-specified atom type. E.g. if {type} = 2, and the file specifies atom
-types 1,2,3, then the inserted molecule will have atom types 3,4,5.
+All inserted particles are assigned to two groups: the default group
+"all" and the group specified in the fix gcmc command (which can also
+be "all"). If inserted particles are individual atoms, they are
+assigned the specified atom type. If they are molecules, the type of
+each atom in the inserted molecule is specified in the file read by
+the "molecule"_molecule.html command, and those values are added to
+the specified atom type. E.g. if {type} = 2, and the file specifies
+atom types 1,2,3, then the inserted molecule will have atom types
+3,4,5.
This fix cannot be used to perform MC insertions of gas atoms or
molecules other than the exchanged type, but MC deletions, translations,
--
GitLab
From 4ad3d5215226871e7782f796a8c384325ebef948 Mon Sep 17 00:00:00 2001
From: sjplimp
Date: Wed, 17 Dec 2014 15:51:50 +0000
Subject: [PATCH 016/479] git-svn-id:
svn://svn.icms.temple.edu/lammps-ro/trunk@12832
f3b2605a-c512-4ea7-a41b-209d697bcdaa
---
doc/variable.html | 6 +++++-
doc/variable.txt | 6 +++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/doc/variable.html b/doc/variable.html
index 666b971dd9..edd0202610 100644
--- a/doc/variable.html
+++ b/doc/variable.html
@@ -721,7 +721,7 @@ operates.
Atom Values and Vectors
-Atom values take an integer argument I from 1 to N, where I is the an
+
Atom values take an integer argument I from 1 to N, where I is the
atom-ID, e.g. x[243], which means use the x coordinate of the atom
with ID = 243. Or they can take a variable name, specified as v_name,
where name is the name of the variable, like x[v_myIndex]. The
@@ -733,6 +733,10 @@ the argument between the brackets, e.g. x[243+10] or
x[v_myIndex+1] are not allowed. To do this a single variable can be
defined that contains the needed formula.
+Note that the 0 < atom-ID <= N, where N is the largest atom ID
+in the system. If an ID is specified for an atom that does not
+currently exist, then the generated value is 0.0.
+
Atom vectors generate one value per atom, so that a reference like
"vx" means the x-component of each atom's velocity will be used when
evaluating the variable.
diff --git a/doc/variable.txt b/doc/variable.txt
index 868c0d70b3..6909908003 100644
--- a/doc/variable.txt
+++ b/doc/variable.txt
@@ -721,7 +721,7 @@ operates.
Atom Values and Vectors :h4
-Atom values take an integer argument I from 1 to N, where I is the an
+Atom values take an integer argument I from 1 to N, where I is the
atom-ID, e.g. x\[243\], which means use the x coordinate of the atom
with ID = 243. Or they can take a variable name, specified as v_name,
where name is the name of the variable, like x\[v_myIndex\]. The
@@ -733,6 +733,10 @@ the argument between the brackets, e.g. x\[243+10\] or
x\[v_myIndex+1\] are not allowed. To do this a single variable can be
defined that contains the needed formula.
+Note that the 0 < atom-ID <= N, where N is the largest atom ID
+in the system. If an ID is specified for an atom that does not
+currently exist, then the generated value is 0.0.
+
Atom vectors generate one value per atom, so that a reference like
"vx" means the x-component of each atom's velocity will be used when
evaluating the variable.
--
GitLab
From 3337a367c06aac116c771ca3e85e01199b931d55 Mon Sep 17 00:00:00 2001
From: sjplimp
Date: Wed, 17 Dec 2014 16:07:34 +0000
Subject: [PATCH 017/479] git-svn-id:
svn://svn.icms.temple.edu/lammps-ro/trunk@12833
f3b2605a-c512-4ea7-a41b-209d697bcdaa
---
src/pair_dpd.cpp | 3 ++-
src/thermo.cpp | 6 ++++--
src/variable.cpp | 48 ++++++++++++++++++++++++++++++------------------
src/variable.h | 4 ++--
4 files changed, 38 insertions(+), 23 deletions(-)
diff --git a/src/pair_dpd.cpp b/src/pair_dpd.cpp
index 875c5575be..c4da8efbe7 100644
--- a/src/pair_dpd.cpp
+++ b/src/pair_dpd.cpp
@@ -214,7 +214,8 @@ void PairDPD::settings(int narg, char **arg)
void PairDPD::coeff(int narg, char **arg)
{
- if (narg < 4 || narg > 5) error->all(FLERR,"Incorrect args for pair coefficients");
+ if (narg < 4 || narg > 5)
+ error->all(FLERR,"Incorrect args for pair coefficients");
if (!allocated) allocate();
int ilo,ihi,jlo,jhi;
diff --git a/src/thermo.cpp b/src/thermo.cpp
index c4007f9478..a3d14af479 100644
--- a/src/thermo.cpp
+++ b/src/thermo.cpp
@@ -842,10 +842,12 @@ void Thermo::parse_fields(char *str)
if (ptr == NULL) argindex1[nfield] = 0;
else {
*ptr = '\0';
- argindex1[nfield] = input->variable->int_between_brackets(ptr,0);
+ argindex1[nfield] =
+ (int) input->variable->int_between_brackets(ptr,0);
ptr++;
if (*ptr == '[') {
- argindex2[nfield] = input->variable->int_between_brackets(ptr,0);
+ argindex2[nfield] =
+ (int) input->variable->int_between_brackets(ptr,0);
ptr++;
} else argindex2[nfield] = 0;
}
diff --git a/src/variable.cpp b/src/variable.cpp
index 551acabd1f..c86135a11b 100644
--- a/src/variable.cpp
+++ b/src/variable.cpp
@@ -1024,9 +1024,10 @@ double Variable::evaluate(char *str, Tree **tree)
// parse zero or one or two trailing brackets
// point i beyond last bracket
// nbracket = # of bracket pairs
- // index1,index2 = int inside each bracket pair
+ // index1,index2 = int inside each bracket pair, possibly an atom ID
- int nbracket,index1,index2;
+ int nbracket;
+ tagint index1,index2;
if (str[i] != '[') nbracket = 0;
else {
nbracket = 1;
@@ -1243,9 +1244,10 @@ double Variable::evaluate(char *str, Tree **tree)
// parse zero or one or two trailing brackets
// point i beyond last bracket
// nbracket = # of bracket pairs
- // index1,index2 = int inside each bracket pair
+ // index1,index2 = int inside each bracket pair, possibly an atom ID
- int nbracket,index1,index2;
+ int nbracket;
+ tagint index1,index2;
if (str[i] != '[') nbracket = 0;
else {
nbracket = 1;
@@ -1420,9 +1422,10 @@ double Variable::evaluate(char *str, Tree **tree)
// parse zero or one trailing brackets
// point i beyond last bracket
// nbracket = # of bracket pairs
- // index = int inside bracket
+ // index = int inside bracket, possibly an atom ID
- int nbracket,index;
+ int nbracket;
+ tagint index;
if (str[i] != '[') nbracket = 0;
else {
nbracket = 1;
@@ -1535,7 +1538,7 @@ double Variable::evaluate(char *str, Tree **tree)
"Variable evaluation before simulation box is defined");
ptr = &str[i];
- int id = int_between_brackets(ptr,1);
+ tagint id = int_between_brackets(ptr,1);
i = ptr-str+1;
peratom2global(0,word,NULL,0,id,
@@ -2597,6 +2600,7 @@ int Variable::find_matching_paren(char *str, int i,char *&contents)
/* ----------------------------------------------------------------------
find int between brackets and return it
+ return a tagint, since value can be an atom ID
ptr initially points to left bracket
return it pointing to right bracket
error if no right bracket or brackets are empty or index = 0
@@ -2604,9 +2608,10 @@ int Variable::find_matching_paren(char *str, int i,char *&contents)
if varallow = 1: also allow for v_name, where name is variable name
------------------------------------------------------------------------- */
-int Variable::int_between_brackets(char *&ptr, int varallow)
+tagint Variable::int_between_brackets(char *&ptr, int varallow)
{
- int varflag,index;
+ int varflag;
+ tagint index;
char *start = ++ptr;
@@ -2633,7 +2638,7 @@ int Variable::int_between_brackets(char *&ptr, int varallow)
*ptr = '\0';
- // evaluate index as variable or as simple integer via atoi()
+ // evaluate index as floating point variable or as tagint via ATOTAGINT()
if (varflag) {
char *id = start+2;
@@ -2646,11 +2651,9 @@ int Variable::int_between_brackets(char *&ptr, int varallow)
char *var = retrieve(id);
if (var == NULL)
error->all(FLERR,"Invalid variable evaluation in variable formula");
- index = static_cast (atof(var));
+ index = static_cast (atof(var));
- } else {
- index = atoi(start);
- }
+ } else index = ATOTAGINT(start);
*ptr = ']';
@@ -3332,7 +3335,7 @@ int Variable::special_function(char *word, char *contents, Tree **tree,
ptr1 = strchr(args[0],'[');
if (ptr1) {
ptr2 = ptr1;
- index = int_between_brackets(ptr2,0);
+ index = (int) int_between_brackets(ptr2,0);
*ptr1 = '\0';
} else index = 0;
@@ -3371,7 +3374,7 @@ int Variable::special_function(char *word, char *contents, Tree **tree,
ptr1 = strchr(args[0],'[');
if (ptr1) {
ptr2 = ptr1;
- index = int_between_brackets(ptr2,0);
+ index = (int) int_between_brackets(ptr2,0);
*ptr1 = '\0';
} else index = 0;
@@ -3594,21 +3597,30 @@ int Variable::special_function(char *word, char *contents, Tree **tree,
extract a global value from a per-atom quantity in a formula
flag = 0 -> word is an atom vector
flag = 1 -> vector is a per-atom compute or fix quantity with nstride
- id = positive global ID of atom, converted to local index
+ id = global ID of atom, converted to local index
push result onto tree or arg stack
customize by adding an atom vector:
id,mass,type,mol,x,y,z,vx,vy,vz,fx,fy,fz,q
------------------------------------------------------------------------- */
void Variable::peratom2global(int flag, char *word,
- double *vector, int nstride, int id,
+ double *vector, int nstride, tagint id,
Tree **tree, Tree **treestack, int &ntreestack,
double *argstack, int &nargstack)
{
+ // error check for ID larger than any atom
+ // int_between_brackets() already checked for ID <= 0
+
if (atom->map_style == 0)
error->all(FLERR,
"Indexed per-atom vector in variable formula without atom map");
+ if (id > atom->map_tag_max)
+ error->all(FLERR,"Variable atom ID is too large");
+
+ // if ID does not exist, index will be -1 for all procs,
+ // and mine will be set to 0.0
+
int index = atom->map(id);
double mine;
diff --git a/src/variable.h b/src/variable.h
index 9b71e1601b..ae523cb4a7 100644
--- a/src/variable.h
+++ b/src/variable.h
@@ -33,7 +33,7 @@ class Variable : protected Pointers {
double compute_equal(int);
double compute_equal(char *);
void compute_atom(int, int, double *, int, int);
- int int_between_brackets(char *&, int);
+ tagint int_between_brackets(char *&, int);
double evaluate_boolean(char *);
void equal_save(int, char *&);
@@ -90,7 +90,7 @@ class Variable : protected Pointers {
int region_function(char *);
int special_function(char *, char *, Tree **, Tree **,
int &, double *, int &);
- void peratom2global(int, char *, double *, int, int,
+ void peratom2global(int, char *, double *, int, tagint,
Tree **, Tree **, int &, double *, int &);
int is_atom_vector(char *);
void atom_vector(char *, Tree **, Tree **, int &);
--
GitLab
From 2dedb4195207207809e924bc7561f81932f722fb Mon Sep 17 00:00:00 2001
From: sjplimp
Date: Wed, 17 Dec 2014 16:11:08 +0000
Subject: [PATCH 018/479] git-svn-id:
svn://svn.icms.temple.edu/lammps-ro/trunk@12834
f3b2605a-c512-4ea7-a41b-209d697bcdaa
---
doc/pair_dpd.html | 4 ++++
doc/pair_dpd.txt | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/doc/pair_dpd.html b/doc/pair_dpd.html
index 4fe2e5ab4f..91d610c71a 100644
--- a/doc/pair_dpd.html
+++ b/doc/pair_dpd.html
@@ -108,6 +108,10 @@ to use the pair_style srp command in conjuction wi
these pair styles. It is a soft segmental repulsive potential (SRP)
that can prevent DPD polymer chains from crossing each other.
+IMPORTANT NOTE: The virial calculation for pressure when using this
+pair style includes all the components of force listed above,
+including the random force.
+
Styles with a cuda, gpu, intel, kk, omp, or opt suffix are
diff --git a/doc/pair_dpd.txt b/doc/pair_dpd.txt
index 1ebffdea2a..445d3ebc58 100644
--- a/doc/pair_dpd.txt
+++ b/doc/pair_dpd.txt
@@ -100,6 +100,10 @@ to use the "pair_style srp"_pair_srp.html command in conjuction with
these pair styles. It is a soft segmental repulsive potential (SRP)
that can prevent DPD polymer chains from crossing each other.
+IMPORTANT NOTE: The virial calculation for pressure when using this
+pair style includes all the components of force listed above,
+including the random force.
+
:line
Styles with a {cuda}, {gpu}, {intel}, {kk}, {omp}, or {opt} suffix are
--
GitLab
From 0ab3bcff6b54d0169debc232ef5fa6680ff7b555 Mon Sep 17 00:00:00 2001
From: sjplimp
Date: Wed, 17 Dec 2014 16:11:25 +0000
Subject: [PATCH 019/479] git-svn-id:
svn://svn.icms.temple.edu/lammps-ro/trunk@12835
f3b2605a-c512-4ea7-a41b-209d697bcdaa
---
src/version.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/version.h b/src/version.h
index 2d811a0e11..1483eb3547 100644
--- a/src/version.h
+++ b/src/version.h
@@ -1 +1 @@
-#define LAMMPS_VERSION "9 Dec 2014"
+#define LAMMPS_VERSION "17 Dec 2014"
--
GitLab
From 7948ae9178d954622a6a6c6bd5bc3cf1244bda4a Mon Sep 17 00:00:00 2001
From: sjplimp
Date: Wed, 17 Dec 2014 16:11:28 +0000
Subject: [PATCH 020/479] git-svn-id:
svn://svn.icms.temple.edu/lammps-ro/trunk@12836
f3b2605a-c512-4ea7-a41b-209d697bcdaa
---
doc/Manual.html | 4 ++--
doc/Manual.txt | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/doc/Manual.html b/doc/Manual.html
index 9f6167b913..d9918cf343 100644
--- a/doc/Manual.html
+++ b/doc/Manual.html
@@ -1,7 +1,7 @@
LAMMPS Users Manual
-
+
@@ -22,7 +22,7 @@
LAMMPS Documentation
-