From f028a9a9678d0fbfb28a88d248dd5789f5d9652e Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 26 Oct 2016 15:04:18 -0400 Subject: [PATCH 01/10] region cylinder is compatible with open_faces[2], so do not disallow it. --- src/region_cylinder.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/region_cylinder.cpp b/src/region_cylinder.cpp index 5e666e472f..3d5590b59e 100644 --- a/src/region_cylinder.cpp +++ b/src/region_cylinder.cpp @@ -36,8 +36,7 @@ RegCylinder::RegCylinder(LAMMPS *lmp, int narg, char **arg) : // check open face settings - if (openflag && (open_faces[2] || open_faces[3] || - open_faces[4] || open_faces[5])) + if (openflag && (open_faces[3] || open_faces[4] || open_faces[5])) error->all(FLERR,"Invalid region cylinder open setting"); if (strcmp(arg[2],"x") && strcmp(arg[2],"y") && strcmp(arg[2],"z")) From 93d393aa691a959d6e995f57145d7dd66f68db36 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 28 Oct 2016 10:48:35 -0400 Subject: [PATCH 02/10] permission cleanup in tools folder --- tools/pymol_asphere/src/cartesian.cpp | 0 tools/pymol_asphere/src/cartesian.h | 0 tools/pymol_asphere/src/colors.cpp | 0 tools/pymol_asphere/src/colors.h | 0 tools/pymol_asphere/src/commandline.cpp | 0 tools/pymol_asphere/src/commandline.h | 0 tools/pymol_asphere/src/error.cpp | 0 tools/pymol_asphere/src/error.h | 0 tools/pymol_asphere/src/glsurface.cpp | 0 tools/pymol_asphere/src/glsurface.h | 0 tools/pymol_asphere/src/m_constants.h | 0 tools/pymol_asphere/src/misc.cpp | 0 tools/pymol_asphere/src/misc.h | 0 tools/pymol_asphere/src/miscm.cpp | 0 tools/pymol_asphere/src/miscm.h | 0 tools/pymol_asphere/src/spherical.cpp | 0 tools/pymol_asphere/src/spherical.h | 0 tools/xmovie/control.c | 0 tools/xmovie/dummy.c | 0 tools/xmovie/hpsort.c | 0 tools/xmovie/read.c | 0 tools/xmovie/resource.h | 0 tools/xmovie/scene.c | 0 tools/xmovie/toascii.c | 0 tools/xmovie/tobinary.c | 0 tools/xmovie/version.c | 0 tools/xmovie/xmovie.c | 0 tools/xmovie/xmovie.h | 0 28 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 tools/pymol_asphere/src/cartesian.cpp mode change 100755 => 100644 tools/pymol_asphere/src/cartesian.h mode change 100755 => 100644 tools/pymol_asphere/src/colors.cpp mode change 100755 => 100644 tools/pymol_asphere/src/colors.h mode change 100755 => 100644 tools/pymol_asphere/src/commandline.cpp mode change 100755 => 100644 tools/pymol_asphere/src/commandline.h mode change 100755 => 100644 tools/pymol_asphere/src/error.cpp mode change 100755 => 100644 tools/pymol_asphere/src/error.h mode change 100755 => 100644 tools/pymol_asphere/src/glsurface.cpp mode change 100755 => 100644 tools/pymol_asphere/src/glsurface.h mode change 100755 => 100644 tools/pymol_asphere/src/m_constants.h mode change 100755 => 100644 tools/pymol_asphere/src/misc.cpp mode change 100755 => 100644 tools/pymol_asphere/src/misc.h mode change 100755 => 100644 tools/pymol_asphere/src/miscm.cpp mode change 100755 => 100644 tools/pymol_asphere/src/miscm.h mode change 100755 => 100644 tools/pymol_asphere/src/spherical.cpp mode change 100755 => 100644 tools/pymol_asphere/src/spherical.h mode change 100755 => 100644 tools/xmovie/control.c mode change 100755 => 100644 tools/xmovie/dummy.c mode change 100755 => 100644 tools/xmovie/hpsort.c mode change 100755 => 100644 tools/xmovie/read.c mode change 100755 => 100644 tools/xmovie/resource.h mode change 100755 => 100644 tools/xmovie/scene.c mode change 100755 => 100644 tools/xmovie/toascii.c mode change 100755 => 100644 tools/xmovie/tobinary.c mode change 100755 => 100644 tools/xmovie/version.c mode change 100755 => 100644 tools/xmovie/xmovie.c mode change 100755 => 100644 tools/xmovie/xmovie.h diff --git a/tools/pymol_asphere/src/cartesian.cpp b/tools/pymol_asphere/src/cartesian.cpp old mode 100755 new mode 100644 diff --git a/tools/pymol_asphere/src/cartesian.h b/tools/pymol_asphere/src/cartesian.h old mode 100755 new mode 100644 diff --git a/tools/pymol_asphere/src/colors.cpp b/tools/pymol_asphere/src/colors.cpp old mode 100755 new mode 100644 diff --git a/tools/pymol_asphere/src/colors.h b/tools/pymol_asphere/src/colors.h old mode 100755 new mode 100644 diff --git a/tools/pymol_asphere/src/commandline.cpp b/tools/pymol_asphere/src/commandline.cpp old mode 100755 new mode 100644 diff --git a/tools/pymol_asphere/src/commandline.h b/tools/pymol_asphere/src/commandline.h old mode 100755 new mode 100644 diff --git a/tools/pymol_asphere/src/error.cpp b/tools/pymol_asphere/src/error.cpp old mode 100755 new mode 100644 diff --git a/tools/pymol_asphere/src/error.h b/tools/pymol_asphere/src/error.h old mode 100755 new mode 100644 diff --git a/tools/pymol_asphere/src/glsurface.cpp b/tools/pymol_asphere/src/glsurface.cpp old mode 100755 new mode 100644 diff --git a/tools/pymol_asphere/src/glsurface.h b/tools/pymol_asphere/src/glsurface.h old mode 100755 new mode 100644 diff --git a/tools/pymol_asphere/src/m_constants.h b/tools/pymol_asphere/src/m_constants.h old mode 100755 new mode 100644 diff --git a/tools/pymol_asphere/src/misc.cpp b/tools/pymol_asphere/src/misc.cpp old mode 100755 new mode 100644 diff --git a/tools/pymol_asphere/src/misc.h b/tools/pymol_asphere/src/misc.h old mode 100755 new mode 100644 diff --git a/tools/pymol_asphere/src/miscm.cpp b/tools/pymol_asphere/src/miscm.cpp old mode 100755 new mode 100644 diff --git a/tools/pymol_asphere/src/miscm.h b/tools/pymol_asphere/src/miscm.h old mode 100755 new mode 100644 diff --git a/tools/pymol_asphere/src/spherical.cpp b/tools/pymol_asphere/src/spherical.cpp old mode 100755 new mode 100644 diff --git a/tools/pymol_asphere/src/spherical.h b/tools/pymol_asphere/src/spherical.h old mode 100755 new mode 100644 diff --git a/tools/xmovie/control.c b/tools/xmovie/control.c old mode 100755 new mode 100644 diff --git a/tools/xmovie/dummy.c b/tools/xmovie/dummy.c old mode 100755 new mode 100644 diff --git a/tools/xmovie/hpsort.c b/tools/xmovie/hpsort.c old mode 100755 new mode 100644 diff --git a/tools/xmovie/read.c b/tools/xmovie/read.c old mode 100755 new mode 100644 diff --git a/tools/xmovie/resource.h b/tools/xmovie/resource.h old mode 100755 new mode 100644 diff --git a/tools/xmovie/scene.c b/tools/xmovie/scene.c old mode 100755 new mode 100644 diff --git a/tools/xmovie/toascii.c b/tools/xmovie/toascii.c old mode 100755 new mode 100644 diff --git a/tools/xmovie/tobinary.c b/tools/xmovie/tobinary.c old mode 100755 new mode 100644 diff --git a/tools/xmovie/version.c b/tools/xmovie/version.c old mode 100755 new mode 100644 diff --git a/tools/xmovie/xmovie.c b/tools/xmovie/xmovie.c old mode 100755 new mode 100644 diff --git a/tools/xmovie/xmovie.h b/tools/xmovie/xmovie.h old mode 100755 new mode 100644 From 2e0d304c7eebf076877f6c602e7ac4df7b8a351b Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 1 Nov 2016 11:36:11 -0400 Subject: [PATCH 03/10] remove word repetitions for 'a' --- doc/src/Section_howto.txt | 2 +- doc/src/Section_start.txt | 2 +- doc/src/compute_centro_atom.txt | 2 +- doc/src/compute_stress_atom.txt | 2 +- doc/src/dump_modify.txt | 2 +- doc/src/fix_lb_fluid.txt | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/src/Section_howto.txt b/doc/src/Section_howto.txt index 33cbfa9586..5e21f8eb80 100644 --- a/doc/src/Section_howto.txt +++ b/doc/src/Section_howto.txt @@ -2729,7 +2729,7 @@ production runs and is only required during equilibration. This way one is consistent with literature (based on the code packages DL_POLY or GULP for instance). -The mentioned energy transfer will typically lead to a a small drift +The mentioned energy transfer will typically lead to a small drift in total energy over time. This internal energy can be monitored using the "compute chunk/atom"_compute_chunk_atom.html and "compute temp/chunk"_compute_temp_chunk.html commands. The internal kinetic diff --git a/doc/src/Section_start.txt b/doc/src/Section_start.txt index a0cc792455..ee122e0a72 100644 --- a/doc/src/Section_start.txt +++ b/doc/src/Section_start.txt @@ -706,7 +706,7 @@ future changes to LAMMPS. User packages, such as user-atc or user-omp, have been contributed by users, and always begin with the user prefix. If they are a single command (single file), they are typically in the user-misc package. -Otherwise, they are a a set of files grouped together which add a +Otherwise, they are a set of files grouped together which add a specific functionality to the code. User packages don't necessarily meet the requirements of the standard diff --git a/doc/src/compute_centro_atom.txt b/doc/src/compute_centro_atom.txt index 2a3ae15aaf..0a48ccb5be 100644 --- a/doc/src/compute_centro_atom.txt +++ b/doc/src/compute_centro_atom.txt @@ -114,7 +114,7 @@ local defects surrounding the central atom, as described above. For the {axes yes} case, the vector components are also unitless, since they represent spatial directions. -Here are typical centro-symmetry values, from a a nanoindentation +Here are typical centro-symmetry values, from a nanoindentation simulation into gold (FCC). These were provided by Jon Zimmerman (Sandia): diff --git a/doc/src/compute_stress_atom.txt b/doc/src/compute_stress_atom.txt index dcfdee9f85..3dc642da32 100644 --- a/doc/src/compute_stress_atom.txt +++ b/doc/src/compute_stress_atom.txt @@ -60,7 +60,7 @@ produced by a small set of atoms (e.g. 4 atoms in a dihedral or 3 atoms in a Tersoff 3-body interaction) is assigned in equal portions to each atom in the set. E.g. 1/4 of the dihedral virial to each of the 4 atoms, or 1/3 of the fix virial due to SHAKE constraints applied -to atoms in a a water molecule via the "fix shake"_fix_shake.html +to atoms in a water molecule via the "fix shake"_fix_shake.html command. If no extra keywords are listed, all of the terms in this formula are diff --git a/doc/src/dump_modify.txt b/doc/src/dump_modify.txt index e2f5f1eb8d..e70feedcf0 100644 --- a/doc/src/dump_modify.txt +++ b/doc/src/dump_modify.txt @@ -574,7 +574,7 @@ e.g. its x-component of velocity if the atom-attribute "vx" was specified. The basic idea of a color map is that the atom-attribute will be -within a range of values, and that range is associated with a a series +within a range of values, and that range is associated with a series of colors (e.g. red, blue, green). An atom's specific value (vx = -3.2) can then mapped to the series of colors (e.g. halfway between red and blue), and a specific color is determined via an interpolation diff --git a/doc/src/fix_lb_fluid.txt b/doc/src/fix_lb_fluid.txt index b4447b65c2..62265a3bc1 100644 --- a/doc/src/fix_lb_fluid.txt +++ b/doc/src/fix_lb_fluid.txt @@ -233,7 +233,7 @@ present, the speed of sound squared is set equal to (1/3)*(dx/dt)^2. Setting a0 > (dx/dt)^2 is not allowed, as this may lead to instabilities. -If the {noise} keyword is used, followed by a a positive temperature +If the {noise} keyword is used, followed by a positive temperature value, and a positive integer random number seed, a thermal lattice-Boltzmann algorithm is used. If {LBtype} is set equal to 1 (i.e. the standard LB integrator is chosen), the thermal LB algorithm From 7fdd6e280771fa9e770d43cebfcfaf6eb747de12 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 1 Nov 2016 11:40:07 -0400 Subject: [PATCH 04/10] remove work repetitions for 'the' --- doc/src/Section_howto.txt | 2 +- doc/src/compute_chunk_atom.txt | 2 +- doc/src/dihedral_table.txt | 2 +- doc/src/dump_modify.txt | 2 +- doc/src/fix_deform.txt | 2 +- doc/src/fix_langevin.txt | 2 +- doc/src/fix_rx.txt | 2 +- doc/src/fix_smd_adjust_dt.txt | 2 +- doc/src/fix_srd.txt | 2 +- doc/src/fix_ttm.txt | 2 +- doc/src/improper_style.txt | 2 +- doc/src/neb.txt | 2 +- doc/src/next.txt | 2 +- doc/src/pair_srp.txt | 2 +- doc/src/prd.txt | 4 ++-- doc/src/python.txt | 2 +- doc/src/read_dump.txt | 4 ++-- doc/src/tad.txt | 2 +- doc/src/tutorial_drude.txt | 2 +- 19 files changed, 21 insertions(+), 21 deletions(-) diff --git a/doc/src/Section_howto.txt b/doc/src/Section_howto.txt index 5e21f8eb80..33bba562ed 100644 --- a/doc/src/Section_howto.txt +++ b/doc/src/Section_howto.txt @@ -2830,7 +2830,7 @@ temp/drude"_compute_temp_drude.html. This requires also to use the command {comm_modify vel yes}. Short-range damping of the induced dipole interactions can be achieved -using Thole functions through the the "pair style +using Thole functions through the "pair style thole"_pair_thole.html in "pair_style hybrid/overlay"_pair_hybrid.html with a Coulomb pair style. It may be useful to use {coul/long/cs} or similar from the CORESHELL package if the core and Drude particle come diff --git a/doc/src/compute_chunk_atom.txt b/doc/src/compute_chunk_atom.txt index 2778be4f6b..60516fe421 100644 --- a/doc/src/compute_chunk_atom.txt +++ b/doc/src/compute_chunk_atom.txt @@ -536,7 +536,7 @@ For the {bin/cylinder} style the details are as follows. If {discard} is set to {yes}, an out-of-domain atom will have its chunk ID set to 0. If {discard} is set to {no}, the atom will have its chunk ID set to the first or last bin in both the radial and axis dimensions. If -{discard} is set to {mixed}, which is the default, the the radial +{discard} is set to {mixed}, which is the default, the radial dimension is treated the same as for {discard} = no. But for the axis dimensinon, it will only have its chunk ID set to the first or last bin if bins extend to the simulation box boundary in the axis diff --git a/doc/src/dihedral_table.txt b/doc/src/dihedral_table.txt index f34b22f435..0b88f26a61 100644 --- a/doc/src/dihedral_table.txt +++ b/doc/src/dihedral_table.txt @@ -154,7 +154,7 @@ radians instead of degrees. (Note: This changes the way the forces are scaled in the 4th column of the data file.) The optional "CHECKU" keyword is followed by a filename. This allows -the user to save all of the the {Ntable} different entries in the +the user to save all of the {Ntable} different entries in the interpolated energy table to a file to make sure that the interpolated function agrees with the user's expectations. (Note: You can temporarily increase the {Ntable} parameter to a high value for this diff --git a/doc/src/dump_modify.txt b/doc/src/dump_modify.txt index e70feedcf0..0cf30e3c92 100644 --- a/doc/src/dump_modify.txt +++ b/doc/src/dump_modify.txt @@ -165,7 +165,7 @@ extra buffering. :line -The {element} keyword applies only to the the dump {cfg}, {xyz}, and +The {element} keyword applies only to the dump {cfg}, {xyz}, and {image} styles. It associates element names (e.g. H, C, Fe) with LAMMPS atom types. See the list of element names at the bottom of this page. diff --git a/doc/src/fix_deform.txt b/doc/src/fix_deform.txt index ffda84bf18..1478d47df1 100644 --- a/doc/src/fix_deform.txt +++ b/doc/src/fix_deform.txt @@ -150,7 +150,7 @@ initial box length is 100 Angstroms, and V is 10 Angstroms/psec, then after 10 psec, the box length will have doubled. After 20 psec, it will have tripled. -The {erate} style changes a dimension of the the box at a "constant +The {erate} style changes a dimension of the box at a "constant engineering strain rate". The units of the specified strain rate are 1/time. See the "units"_units.html command for the time units associated with different choices of simulation units, diff --git a/doc/src/fix_langevin.txt b/doc/src/fix_langevin.txt index 9dba4da375..b387117d83 100644 --- a/doc/src/fix_langevin.txt +++ b/doc/src/fix_langevin.txt @@ -237,7 +237,7 @@ described in the papers cited below, the purpose of this method is to enable longer timesteps to be used (up to the numerical stability limit of the integrator), while still producing the correct Boltzmann distribution of atom positions. It is implemented within LAMMPS, by -changing how the the random force is applied so that it is composed of +changing how the random force is applied so that it is composed of the average of two random forces representing half-contributions from the previous and current time intervals. diff --git a/doc/src/fix_rx.txt b/doc/src/fix_rx.txt index 4e26274b35..c0deedfa63 100644 --- a/doc/src/fix_rx.txt +++ b/doc/src/fix_rx.txt @@ -87,7 +87,7 @@ end of each run. A positive value N means that the diagnostics are reported once per N time-steps. The diagnostics report the average # of integrator steps and RHS function evaluations -and run-time per ODE as well as the the average/RMS/min/max per process. If the +and run-time per ODE as well as the average/RMS/min/max per process. If the reporting frequency is 1, the RMS/min/max per ODE are also reported. The per ODE statistics can be used to adjust the tolerance and min/max step parameters. The statistics per MPI process can be useful to examine any load imbalance caused by the diff --git a/doc/src/fix_smd_adjust_dt.txt b/doc/src/fix_smd_adjust_dt.txt index 6567c2c151..04a0a7becd 100644 --- a/doc/src/fix_smd_adjust_dt.txt +++ b/doc/src/fix_smd_adjust_dt.txt @@ -28,7 +28,7 @@ fix 1 all smd/adjust_dt 0.1 :pre The fix calculates a new stable time increment for use with the SMD time integrators. The stable time increment is based on multiple conditions. For the SPH pair styles, a -CFL criterion (Courant, Friedrichs & Lewy, 1928) is evaluated, which determines the the speed of +CFL criterion (Courant, Friedrichs & Lewy, 1928) is evaluated, which determines the speed of sound cannot propagate further than a typical spacing between particles within a single time step to ensure no information is lost. For the contact pair styles, a linear analysis of the pair potential determines a stable maximum time step. diff --git a/doc/src/fix_srd.txt b/doc/src/fix_srd.txt index e76871dfe1..13519ecfad 100644 --- a/doc/src/fix_srd.txt +++ b/doc/src/fix_srd.txt @@ -101,7 +101,7 @@ particles move in the normal way via a time integration "fix"_fix.html with a short timestep dt. SRD particles advect with a large timestep dt_SRD >= dt. -If the {lamda} keyword is not specified, the the SRD temperature +If the {lamda} keyword is not specified, the SRD temperature {Tsrd} is used in the above formula to compute lamda. If the {lamda} keyword is specified, then the {Tsrd} setting is ignored and the above equation is used to compute the SRD temperature. diff --git a/doc/src/fix_ttm.txt b/doc/src/fix_ttm.txt index 586a06d525..2e7318da14 100644 --- a/doc/src/fix_ttm.txt +++ b/doc/src/fix_ttm.txt @@ -107,7 +107,7 @@ specified as parameters to the fix. The other quantities are derived. The form of the heat diffusion equation used here is almost the same as that in equation 6 of "(Duffy)"_#Duffy, with the exception that the electronic density is explicitly reprensented, rather than being part -of the the specific heat parameter. +of the specific heat parameter. Currently, fix ttm assumes that none of the user-supplied parameters will vary with temperature. Note that "(Duffy)"_#Duffy used a tanh() diff --git a/doc/src/improper_style.txt b/doc/src/improper_style.txt index 0bd1c10b58..861701590f 100644 --- a/doc/src/improper_style.txt +++ b/doc/src/improper_style.txt @@ -27,7 +27,7 @@ between quadruplets of atoms, which remain in force for the duration of the simulation. The list of improper quadruplets is read in by a "read_data"_read_data.html or "read_restart"_read_restart.html command from a data or restart file. Note that the ordering of the 4 atoms in -an improper quadruplet determines the the definition of the improper +an improper quadruplet determines the definition of the improper angle used in the formula for each style. See the doc pages of individual styles for details. diff --git a/doc/src/neb.txt b/doc/src/neb.txt index 17bd8544b7..649e521eee 100644 --- a/doc/src/neb.txt +++ b/doc/src/neb.txt @@ -284,7 +284,7 @@ ID2 x2 y2 z2 ... IDN xN yN zN :pre -The fields are the the atom ID, followed by the x,y,z coordinates. +The fields are the atom ID, followed by the x,y,z coordinates. The lines can be listed in any order. Additional trailing information on the line is OK, such as a comment. diff --git a/doc/src/next.txt b/doc/src/next.txt index 69bffe8bbf..fe9dc97542 100644 --- a/doc/src/next.txt +++ b/doc/src/next.txt @@ -44,7 +44,7 @@ one value from their respective list of values. A {file}-style variable reads the next line from its associated file. An {atomfile}-style variable reads the next set of lines (one per atom) from its associated file. {String-} or {atom}- or {equal}- or -{world}-style variables cannot be used with the the next command, +{world}-style variables cannot be used with the next command, since they only store a single value. When any of the variables in the next command has no more values, a diff --git a/doc/src/pair_srp.txt b/doc/src/pair_srp.txt index f2b6e6e769..a951cccbc3 100644 --- a/doc/src/pair_srp.txt +++ b/doc/src/pair_srp.txt @@ -99,7 +99,7 @@ The optional {exclude} keyword determines if forces are computed between first neighbor (directly connected) bonds. For a setting of {no}, first neighbor forces are computed; for {yes} they are not computed. A setting of {no} cannot be used with the {min} option for -distance calculation because the the minimum distance between directly +distance calculation because the minimum distance between directly connected bonds is zero. Pair style {srp} turns off normalization of thermodynamic properties diff --git a/doc/src/prd.txt b/doc/src/prd.txt index 832239de98..1ad66ee441 100644 --- a/doc/src/prd.txt +++ b/doc/src/prd.txt @@ -214,7 +214,7 @@ when a correlated event occurs during the third stage of the loop listed above, i.e. when only one replica is running dynamics. When more than one replica detects an event at the end of the same -event check (every {t_event} steps) during the the second stage, then +event check (every {t_event} steps) during the second stage, then one of them is chosen at random. The number of coincident events is the number of replicas that detected an event. Normally, this value should be 1. If it is often greater than 1, then either the number of @@ -241,7 +241,7 @@ time was spent in each stage (dephasing, dynamics, quenching, etc). Any "dump files"_dump.html defined in the input script, will be written to during a PRD run at timesteps corresponding to both -uncorrelated and correlated events. This means the the requested dump +uncorrelated and correlated events. This means the requested dump frequency in the "dump"_dump.html command is ignored. There will be one dump file (per dump command) created for all partitions. diff --git a/doc/src/python.txt b/doc/src/python.txt index 9d6dbdcb69..773992bddd 100644 --- a/doc/src/python.txt +++ b/doc/src/python.txt @@ -188,7 +188,7 @@ is assumed to have been previously loaded by another python command. Note that the Python code that is loaded and run must contain a function with the specified {func} name. To operate properly when -later invoked, the the function code must match the {input} and +later invoked, the function code must match the {input} and {return} and {format} keywords specified by the python command. Otherwise Python will generate an error. diff --git a/doc/src/read_dump.txt b/doc/src/read_dump.txt index f6424f6529..531e78aca5 100644 --- a/doc/src/read_dump.txt +++ b/doc/src/read_dump.txt @@ -185,7 +185,7 @@ For dump files in {xyz} format, only the {x}, {y}, and {z} fields are supported. The dump file does not store atom IDs, so these are assigned consecutively to the atoms as they appear in the dump file, starting from 1. Thus you should insure that order of atoms is -consistent from snapshot to snapshot in the the XYZ dump file. See +consistent from snapshot to snapshot in the XYZ dump file. See the "dump_modify sort"_dump_modify.html command if the XYZ dump file was written by LAMMPS. @@ -195,7 +195,7 @@ velocities, or their respective plugins may not support reading of velocities. The molfile dump files do not store atom IDs, so these are assigned consecutively to the atoms as they appear in the dump file, starting from 1. Thus you should insure that order of atoms are -consistent from snapshot to snapshot in the the molfile dump file. +consistent from snapshot to snapshot in the molfile dump file. See the "dump_modify sort"_dump_modify.html command if the dump file was written by LAMMPS. diff --git a/doc/src/tad.txt b/doc/src/tad.txt index 056ab73e56..5b0f5a006c 100644 --- a/doc/src/tad.txt +++ b/doc/src/tad.txt @@ -231,7 +231,7 @@ time was spent in each stage (NEB, dynamics, quenching, etc). Any "dump files"_dump.html defined in the input script will be written to during a TAD run at timesteps when an event is executed. This -means the the requested dump frequency in the "dump"_dump.html command +means the requested dump frequency in the "dump"_dump.html command is ignored. There will be one dump file (per dump command) created for all partitions. The atom coordinates of the dump snapshot are those of the minimum energy configuration resulting from quenching diff --git a/doc/src/tutorial_drude.txt b/doc/src/tutorial_drude.txt index 58a3fae5c5..c2f4a16207 100644 --- a/doc/src/tutorial_drude.txt +++ b/doc/src/tutorial_drude.txt @@ -33,7 +33,7 @@ created by the surrounding particles. Drude oscillators represent these dipoles by two fixed charges: the core (DC) and the Drude particle (DP) bound by a harmonic potential. The Drude particle can be thought of as the electron cloud whose center can be displaced from -the position of the the corresponding nucleus. +the position of the corresponding nucleus. The sum of the masses of a core-Drude pair should be the mass of the initial (unsplit) atom, \(m_C + m_D = m\). The sum of their charges From e81ae21dbd3a37db1ae8631b34301647ec8210df Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 1 Nov 2016 14:54:16 -0400 Subject: [PATCH 05/10] do not access uninitialized data for ewald/disp and pppm/disp --- src/KSPACE/ewald_disp.cpp | 7 +++++-- src/KSPACE/pppm_disp.cpp | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/KSPACE/ewald_disp.cpp b/src/KSPACE/ewald_disp.cpp index 49b7cde12e..b9af258ab6 100644 --- a/src/KSPACE/ewald_disp.cpp +++ b/src/KSPACE/ewald_disp.cpp @@ -489,8 +489,9 @@ void EwaldDisp::init_coeffs() double **b = (double **) force->pair->extract("B",tmp); delete [] B; B = new double[n+1]; + B[0] = 0.0; bytes += (n+1)*sizeof(double); - for (int i=0; i<=n; ++i) B[i] = sqrt(fabs(b[i][i])); + for (int i=1; i<=n; ++i) B[i] = sqrt(fabs(b[i][i])); } if (function[2]) { // arithmetic 1/r^6 double **epsilon = (double **) force->pair->extract("epsilon",tmp); @@ -502,7 +503,9 @@ void EwaldDisp::init_coeffs() if (!(epsilon&&sigma)) error->all( FLERR,"Epsilon or sigma reference not set by pair style in ewald/n"); - for (int i=0; i<=n; ++i) { + for (int j=0; j<7; ++j) + *(bi++) = 0.0; + for (int i=1; i<=n; ++i) { eps_i = sqrt(epsilon[i][i]); sigma_i = sigma[i][i]; sigma_n = 1.0; diff --git a/src/KSPACE/pppm_disp.cpp b/src/KSPACE/pppm_disp.cpp index b7ec188150..6bdf8a2d07 100644 --- a/src/KSPACE/pppm_disp.cpp +++ b/src/KSPACE/pppm_disp.cpp @@ -1357,7 +1357,8 @@ void PPPMDisp::init_coeffs() // local pair coeffs if (function[1]) { // geometric 1/r^6 double **b = (double **) force->pair->extract("B",tmp); B = new double[n+1]; - for (int i=0; i<=n; ++i) B[i] = sqrt(fabs(b[i][i])); + B[0] = 0.0; + for (int i=1; i<=n; ++i) B[i] = sqrt(fabs(b[i][i])); } if (function[2]) { // arithmetic 1/r^6 //cannot use epsilon, because this has not been set yet From 782a3280807e02f3d00276959d3d628087da2a5b Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 1 Nov 2016 14:55:13 -0400 Subject: [PATCH 06/10] avoid memory leaks when using kspace solvers for lennard-jones --- src/KSPACE/pair_buck_long_coul_long.cpp | 7 +++---- src/KSPACE/pair_lj_long_coul_long.cpp | 5 +++-- src/pair.cpp | 2 ++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/KSPACE/pair_buck_long_coul_long.cpp b/src/KSPACE/pair_buck_long_coul_long.cpp index 52d250fbe1..63c0cb08f2 100644 --- a/src/KSPACE/pair_buck_long_coul_long.cpp +++ b/src/KSPACE/pair_buck_long_coul_long.cpp @@ -51,8 +51,6 @@ PairBuckLongCoulLong::PairBuckLongCoulLong(LAMMPS *lmp) : Pair(lmp) dispersionflag = ewaldflag = pppmflag = 1; respa_enable = 1; writedata = 1; - ftable = NULL; - fdisptable = NULL; } /* ---------------------------------------------------------------------- @@ -134,6 +132,7 @@ PairBuckLongCoulLong::~PairBuckLongCoulLong() memory->destroy(offset); } if (ftable) free_tables(); + if (fdisptable) free_disp_tables(); } /* ---------------------------------------------------------------------- @@ -288,8 +287,8 @@ void PairBuckLongCoulLong::init_style() if (ewald_order&(1<<6)) g_ewald_6 = force->kspace->g_ewald_6; // setup force tables - if (ncoultablebits) init_tables(cut_coul,cut_respa); - if (ndisptablebits) init_tables_disp(cut_buck_global); + if (ncoultablebits && (ewald_order&(1<<1))) init_tables(cut_coul,cut_respa); + if (ndisptablebits && (ewald_order&(1<<6))) init_tables_disp(cut_buck_global); } /* ---------------------------------------------------------------------- diff --git a/src/KSPACE/pair_lj_long_coul_long.cpp b/src/KSPACE/pair_lj_long_coul_long.cpp index 3675ea76dc..8197d16f7e 100644 --- a/src/KSPACE/pair_lj_long_coul_long.cpp +++ b/src/KSPACE/pair_lj_long_coul_long.cpp @@ -130,6 +130,7 @@ PairLJLongCoulLong::~PairLJLongCoulLong() memory->destroy(offset); } if (ftable) free_tables(); + if (fdisptable) free_disp_tables(); } /* ---------------------------------------------------------------------- @@ -282,8 +283,8 @@ void PairLJLongCoulLong::init_style() // setup force tables - if (ncoultablebits) init_tables(cut_coul,cut_respa); - if (ndisptablebits) init_tables_disp(cut_lj_global); + if (ncoultablebits && (ewald_order&(1<<1))) init_tables(cut_coul,cut_respa); + if (ndisptablebits && (ewald_order&(1<<6))) init_tables_disp(cut_lj_global); } diff --git a/src/pair.cpp b/src/pair.cpp index 651cabed60..5d73a592e8 100644 --- a/src/pair.cpp +++ b/src/pair.cpp @@ -87,6 +87,8 @@ Pair::Pair(LAMMPS *lmp) : Pointers(lmp) ndisptablebits = 12; tabinner = sqrt(2.0); tabinner_disp = sqrt(2.0); + ftable = NULL; + fdisptable = NULL; allocated = 0; suffix_flag = Suffix::NONE; From e13e4031cfd458cd31db650adc45eab2aa1b09a8 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 1 Nov 2016 16:48:00 -0400 Subject: [PATCH 07/10] avoid memory leak in pppm/disp/omp --- src/USER-OMP/pppm_disp_omp.cpp | 7 +++++++ src/USER-OMP/pppm_disp_omp.h | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/USER-OMP/pppm_disp_omp.cpp b/src/USER-OMP/pppm_disp_omp.cpp index cdf4b3bce5..277da9d4b3 100644 --- a/src/USER-OMP/pppm_disp_omp.cpp +++ b/src/USER-OMP/pppm_disp_omp.cpp @@ -50,6 +50,13 @@ PPPMDispOMP::PPPMDispOMP(LAMMPS *lmp, int narg, char **arg) : suffix_flag |= Suffix::OMP; } +/* ---------------------------------------------------------------------- */ + +PPPMDispOMP::~PPPMDispOMP() +{ + deallocate(); +} + /* ---------------------------------------------------------------------- allocate memory that depends on # of K-vectors and order ------------------------------------------------------------------------- */ diff --git a/src/USER-OMP/pppm_disp_omp.h b/src/USER-OMP/pppm_disp_omp.h index 060f269471..86c213282a 100644 --- a/src/USER-OMP/pppm_disp_omp.h +++ b/src/USER-OMP/pppm_disp_omp.h @@ -28,7 +28,7 @@ namespace LAMMPS_NS { class PPPMDispOMP : public PPPMDisp, public ThrOMP { public: PPPMDispOMP(class LAMMPS *, int, char **); - virtual ~PPPMDispOMP () {}; + virtual ~PPPMDispOMP (); virtual void compute(int, int); protected: From c8f4b55588ac299f3dc28b9a60f9810bd445fee2 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 1 Nov 2016 16:48:30 -0400 Subject: [PATCH 08/10] avoid uninitialized data for using ewald/disp with lj only --- src/KSPACE/ewald_disp.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/KSPACE/ewald_disp.cpp b/src/KSPACE/ewald_disp.cpp index b9af258ab6..2a4cc4b70c 100644 --- a/src/KSPACE/ewald_disp.cpp +++ b/src/KSPACE/ewald_disp.cpp @@ -141,6 +141,7 @@ void EwaldDisp::init() init_coeffs(); init_coeff_sums(); if (function[0]) qsum_qsq(); + else qsqsum = qsum = 0.0; natoms_original = atom->natoms; // turn off coulombic if no charge @@ -152,6 +153,7 @@ void EwaldDisp::init() } double bsbsum = 0.0; + M2 = 0.0; if (function[1]) bsbsum = sum[1].x2; if (function[2]) bsbsum = sum[2].x2; @@ -526,6 +528,7 @@ void EwaldDisp::init_coeff_sums() Sum sum_local[EWALD_MAX_NSUMS]; memset(sum_local, 0, EWALD_MAX_NSUMS*sizeof(Sum)); + memset(sum, 0, EWALD_MAX_NSUMS*sizeof(Sum)); // now perform qsum and qsq via parent qsum_qsq() From 5d787f7f16c9c2644585c8c8d608e03d359ff9ab Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 1 Nov 2016 21:39:12 -0400 Subject: [PATCH 09/10] avoid tiny memory leak, when the restart command is specified multiple times --- src/output.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/output.cpp b/src/output.cpp index df7c33e101..89e5c8d9cb 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -749,6 +749,7 @@ void Output::create_restart(int narg, char **arg) } else restart_every_single = every; int n = strlen(arg[1]) + 3; + delete [] restart1; restart1 = new char[n]; strcpy(restart1,arg[1]); if (strchr(restart1,'*') == NULL) strcat(restart1,".*"); @@ -765,6 +766,8 @@ void Output::create_restart(int narg, char **arg) restart_every_double = 0; } else restart_every_double = every; + delete [] restart2a; + delete [] restart2b; restart_toggle = 0; int n = strlen(arg[1]) + 3; restart2a = new char[n]; From 7d23a0737ef5a51d53ff92578c0ddcd3c568ea96 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 4 Nov 2016 00:42:23 -0400 Subject: [PATCH 10/10] add thorough checking for valid arguments to -partition or -p --- src/universe.cpp | 54 ++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 43 insertions(+), 11 deletions(-) diff --git a/src/universe.cpp b/src/universe.cpp index a856555de4..b5d33ac9a2 100644 --- a/src/universe.cpp +++ b/src/universe.cpp @@ -163,17 +163,49 @@ void Universe::add_world(char *str) int n,nper; char *ptr; - if (str == NULL) { - n = 1; - nper = nprocs; - } else if ((ptr = strchr(str,'x')) != NULL) { - *ptr = '\0'; - n = atoi(str); - nper = atoi(ptr+1); - } else { - n = 1; - nper = atoi(str); - } + n = 1; + if (str != NULL) { + + // check for valid partition argument + + bool valid = true; + + // str may not be empty and may only consist of digits or 'x' + + int len = strlen(str); + if (len < 1) valid = false; + for (int i=0; i < len; ++i) + if (isdigit(str[i]) || str[i] == 'x') continue; + else valid = false; + + if (valid) { + if ((ptr = strchr(str,'x')) != NULL) { + + // 'x' may not be the first or last character + + if (ptr == str) { + valid = false; + } else if (strlen(str) == len-1) { + valid = false; + } else { + *ptr = '\0'; + n = atoi(str); + nper = atoi(ptr+1); + *ptr = 'x'; + } + } else nper = atoi(str); + } + + // require minimum of 1 partition with 1 processor + + if (n < 1 || nper < 1) valid = false; + + if (!valid) { + char msg[128]; + sprintf(msg,"Invalid partition string '%s'",str); + error->universe_all(FLERR,msg); + } + } else nper = nprocs; memory->grow(procs_per_world,nworlds+n,"universe:procs_per_world"); memory->grow(root_proc,(nworlds+n),"universe:root_proc");