From b698d94df8664938070ac91b6b4db2f35117310d Mon Sep 17 00:00:00 2001 From: sjplimp Date: Fri, 9 Jan 2009 18:18:56 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@2362 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- README | 4 ++-- doc/Section_errors.txt | 38 ++++++++++++++++++++++++++++++++ src/fix_npt_sphere.cpp | 2 +- src/fix_thermal_conductivity.cpp | 11 +++++++++ src/fix_viscosity.cpp | 11 +++++++++ src/verlet.cpp | 19 +++++++++++----- tools/restart2data.cpp | 2 +- 7 files changed, 77 insertions(+), 10 deletions(-) diff --git a/README b/README index 5bb2d6cad2..4e709c8f9b 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -This is the LAMMPS (6 Jan 2009) software package. +This is the LAMMPS (9 Jan 2009) software package. LAMMPS stands for Large-scale Atomic/Molecular Massively Parallel Simulator. @@ -20,7 +20,7 @@ The primary author of the code is Steve Plimpton, who can be emailed at sjplimp@sandia.gov. The LAMMPS WWW Site at lammps.sandia.gov has more information about the code and its uses. -The LAMMPS (6 Jan 2009) distribution includes the following files +The LAMMPS (9 Jan 2009) distribution includes the following files and directories: README this file diff --git a/doc/Section_errors.txt b/doc/Section_errors.txt index 010fa71b56..36ea80188e 100644 --- a/doc/Section_errors.txt +++ b/doc/Section_errors.txt @@ -1801,14 +1801,26 @@ The time window for pressure relaxation must be > 0 :dd The time window for temperature or pressure relaxation must be > 0 :dd +{Fix npt/asphere requires atom attributes quat, angmom, torque, shape} :dt + +An atom style that specifies these quantities is needed. :dd + {Fix npt/sphere requires atom attribute shape} :dt An atom style that specifies atom shape is needed. :dd +{Fix npt/sphere requires atom attributes omega, torque} :dt + +An atom style that specifies these quantities is needed. :dd + {Fix npt/sphere requires spherical particle shapes} :dt Self-explanatory. :dd +{Fix nve/asphere requires atom attributes quat, angmom, torque, shape} :dt + +An atom style that specifies these quantities is needed. :dd + {Fix nve/sphere requires atom attribute mu} :dt An atom style with this attribute is needed. :dd @@ -1833,6 +1845,10 @@ Self-explanatory. :dd The time window for temperature relaxation must be > 0 :dd +{Fix nvt/asphere requires atom attributes quat, angmom, torque, shape} :dt + +An atom style that specifies these quantities is needed. :dd + {Fix nvt/sphere requires atom attribute shape} :dt An atom style with this attribute is needed. :dd @@ -3115,6 +3131,10 @@ Style in pair coeff must have been listed in pair_style command. :dd One or more pairwise cutoffs are too short to use with the specified rRESPA cutoffs. :dd +{Pair dipole/cut requires atom attributes q, mu, torque, dipole} :dt + +An atom style that specifies these quantities is needed. :dd + {Pair distance < table inner cutoff} :dt Two atoms are closer together than the pairwise table allows. :dd @@ -4039,6 +4059,24 @@ restriction. :dd Other fixes may change the position of the center-of-mass, so fix recenter should come last. :dd +{Fix thermal/conductivity comes before fix ave/spatial} :dt + +The order of these 2 fixes in your input script is such that fix +thermal/conductivity comes first. If you are using fix ave/spatial to +measure the temperature profile induced by fix viscosity, then this +may cause a glitch in the profile since you are averaging immediately +after swaps have occurred. Flipping the order of the 2 fixes +typically helps. :dd + +{Fix viscosity comes before fix ave/spatial} :dt + +The order of these 2 fixes in your input script is such that +fix viscosity comes first. If you are using fix ave/spatial +to measure the velocity profile induced by fix viscosity, then +this may cause a glitch in the profile since you are averaging +immediately after swaps have occurred. Flipping the order +of the 2 fixes typically helps. :dd + {Group for fix_modify temp != fix group} :dt The fix_modify command is specifying a temperature computation that diff --git a/src/fix_npt_sphere.cpp b/src/fix_npt_sphere.cpp index 7d1f231058..02cafd5179 100644 --- a/src/fix_npt_sphere.cpp +++ b/src/fix_npt_sphere.cpp @@ -36,7 +36,7 @@ FixNPTSphere::FixNPTSphere(LAMMPS *lmp, int narg, char **arg) : FixNPT(lmp, narg, arg) { if (!atom->omega_flag || !atom->torque_flag) - error->all("Fix nvt/sphere requires atom attributes omega, torque"); + error->all("Fix npt/sphere requires atom attributes omega, torque"); dttype = new double[atom->ntypes+1]; } diff --git a/src/fix_thermal_conductivity.cpp b/src/fix_thermal_conductivity.cpp index 91e567c80c..6bd2523fb2 100644 --- a/src/fix_thermal_conductivity.cpp +++ b/src/fix_thermal_conductivity.cpp @@ -19,6 +19,7 @@ #include "atom.h" #include "force.h" #include "domain.h" +#include "modify.h" #include "error.h" using namespace LAMMPS_NS; @@ -103,6 +104,16 @@ int FixThermalConductivity::setmask() void FixThermalConductivity::init() { + // warn if any fix ave/spatial comes after this fix + // can cause glitch in averaging since ave will happen after swap + + int foundme = 0; + for (int i = 0; i < modify->nfix; i++) { + if (modify->fix[i] == this) foundme = 1; + if (foundme && strcmp(modify->fix[i]->style,"ave/spatial") == 0 && me == 0) + error->warning("Fix thermal/conductivity comes before fix ave/spatial"); + } + // set bounds of 2 slabs in edim // only necessary for static box, else re-computed in end_of_step() // lo bin is always bottom bin diff --git a/src/fix_viscosity.cpp b/src/fix_viscosity.cpp index 39a8936fb5..81085eeb2c 100644 --- a/src/fix_viscosity.cpp +++ b/src/fix_viscosity.cpp @@ -18,6 +18,7 @@ #include "fix_viscosity.h" #include "atom.h" #include "domain.h" +#include "modify.h" #include "error.h" using namespace LAMMPS_NS; @@ -113,6 +114,16 @@ int FixViscosity::setmask() void FixViscosity::init() { + // warn if any fix ave/spatial comes after this fix + // can cause glitch in averaging since ave will happen after swap + + int foundme = 0; + for (int i = 0; i < modify->nfix; i++) { + if (modify->fix[i] == this) foundme = 1; + if (foundme && strcmp(modify->fix[i]->style,"ave/spatial") == 0 && me == 0) + error->warning("Fix viscosity comes before fix ave/spatial"); + } + // set bounds of 2 slabs in pdim // only necessary for static box, else re-computed in end_of_step() // lo bin is always bottom bin diff --git a/src/verlet.cpp b/src/verlet.cpp index c2f995ea0a..92beb1ce6e 100644 --- a/src/verlet.cpp +++ b/src/verlet.cpp @@ -129,6 +129,13 @@ void Verlet::iterate(int n) { int nflag,ntimestep; + int n_post_integrate = modify->n_post_integrate; + int n_pre_exchange = modify->n_pre_exchange; + int n_pre_neighbor = modify->n_pre_neighbor; + int n_pre_force = modify->n_pre_force; + int n_post_force = modify->n_post_force; + int n_end_of_step = modify->n_end_of_step; + for (int i = 0; i < n; i++) { ntimestep = ++update->ntimestep; @@ -137,7 +144,7 @@ void Verlet::iterate(int n) // initial time integration modify->initial_integrate(vflag); - if (modify->n_post_integrate) modify->post_integrate(); + if (n_post_integrate) modify->post_integrate(); // regular communication vs neighbor list rebuild @@ -148,7 +155,7 @@ void Verlet::iterate(int n) comm->communicate(); timer->stamp(TIME_COMM); } else { - if (modify->n_pre_exchange) modify->pre_exchange(); + if (n_pre_exchange) modify->pre_exchange(); if (triclinic) domain->x2lamda(atom->nlocal); domain->pbc(); if (domain->box_change) { @@ -161,7 +168,7 @@ void Verlet::iterate(int n) comm->borders(); if (triclinic) domain->lamda2x(atom->nlocal+atom->nghost); timer->stamp(TIME_COMM); - if (modify->n_pre_neighbor) modify->pre_neighbor(); + if (n_pre_neighbor) modify->pre_neighbor(); neighbor->build(); timer->stamp(TIME_NEIGHBOR); } @@ -169,7 +176,7 @@ void Verlet::iterate(int n) // force computations force_clear(); - if (modify->n_pre_force) modify->pre_force(vflag); + if (n_pre_force) modify->pre_force(vflag); timer->stamp(); @@ -200,9 +207,9 @@ void Verlet::iterate(int n) // force modifications, final time integration, diagnostics - if (modify->n_post_force) modify->post_force(vflag); + if (n_post_force) modify->post_force(vflag); modify->final_integrate(); - if (modify->n_end_of_step) modify->end_of_step(); + if (n_end_of_step) modify->end_of_step(); // all output diff --git a/tools/restart2data.cpp b/tools/restart2data.cpp index 0cd586ef2e..1f2c3e941d 100644 --- a/tools/restart2data.cpp +++ b/tools/restart2data.cpp @@ -416,7 +416,7 @@ int main (int argc, char **argv) void header(FILE *fp, Data &data) { - char *version = "21 May 2008"; + char *version = "9 Jan 2009"; data.triclinic = 0;