diff -Naur lammps-7Apr08/doc/Section_howto.html lammps-8Apr08/doc/Section_howto.html --- lammps-7Apr08/doc/Section_howto.html 2008-04-04 16:13:20.000000000 -0600 +++ lammps-8Apr08/doc/Section_howto.html 2008-04-04 16:28:20.000000000 -0600 @@ -1035,10 +1035,10 @@ the two is the particle's total velocity, but the latter is often what is wanted to compute a temperature.
-LAMMPS has several options for computing temperatures and for using -them in thermostatting and barostatting. -
-These compute commands calculate temperature. +
LAMMPS has several options for computing temperatures, any of which +can be used in thermostatting and barostatting. These compute +commands calculate temperature, and the compute +pressure command calculates pressure.
Barostatting in LAMMPS is also performed by fixes. Two barosttating methods are currently available: Nose-Hoover (npt and diff -Naur lammps-7Apr08/doc/Section_howto.txt lammps-8Apr08/doc/Section_howto.txt --- lammps-7Apr08/doc/Section_howto.txt 2008-04-04 16:13:20.000000000 -0600 +++ lammps-8Apr08/doc/Section_howto.txt 2008-04-04 16:28:20.000000000 -0600 @@ -1026,10 +1026,10 @@ the two is the particle's total velocity, but the latter is often what is wanted to compute a temperature. -LAMMPS has several options for computing temperatures and for using -them in thermostatting and barostatting. - -These "compute commands"_compute.html calculate temperature. +LAMMPS has several options for computing temperatures, any of which +can be used in thermostatting and barostatting. These "compute +commands"_compute.html calculate temperature, and the "compute +pressure"_compute_pressure.html command calculates pressure. "compute temp"_compute_temp.html "compute temp/sphere"_compute_temp_sphere.html @@ -1087,7 +1087,7 @@ "fix nve"_fix_nve.html "fix nve/sphere"_fix_nve_sphere.html -"fix nve/asphere"_doc_fix_nve_asphere.html :ul +"fix nve/asphere"_fix_nve_asphere.html :ul Barostatting in LAMMPS is also performed by "fixes"_fix.html. Two barosttating methods are currently available: Nose-Hoover (npt and diff -Naur lammps-7Apr08/src/POEMS/fix_poems.cpp lammps-8Apr08/src/POEMS/fix_poems.cpp --- lammps-7Apr08/src/POEMS/fix_poems.cpp 2008-01-17 10:01:57.000000000 -0700 +++ lammps-8Apr08/src/POEMS/fix_poems.cpp 2008-04-04 17:15:33.000000000 -0600 @@ -55,6 +55,7 @@ { int i,j,ibody; + time_integrate = 1; rigid_flag = 1; virial_flag = 1; diff -Naur lammps-7Apr08/src/fix.cpp lammps-8Apr08/src/fix.cpp --- lammps-7Apr08/src/fix.cpp 2008-01-09 14:56:57.000000000 -0700 +++ lammps-8Apr08/src/fix.cpp 2008-04-04 17:18:14.000000000 -0600 @@ -52,6 +52,7 @@ rigid_flag = 0; virial_flag = 0; no_change_box = 0; + time_integrate = 0; scalar_flag = vector_flag = peratom_flag = 0; diff -Naur lammps-7Apr08/src/fix.h lammps-8Apr08/src/fix.h --- lammps-7Apr08/src/fix.h 2008-03-11 11:15:30.000000000 -0600 +++ lammps-8Apr08/src/fix.h 2008-04-04 17:18:14.000000000 -0600 @@ -33,6 +33,7 @@ int rigid_flag; // 1 if Fix integrates rigid bodies, 0 if not int virial_flag; // 1 if Fix contributes to virial, 0 if not int no_change_box; // 1 if cannot swap ortho <-> triclinic + int time_integrate; // 1 if fix performs time integration, 0 if no int scalar_flag; // 0/1 if compute_scalar() function exists int vector_flag; // 0/1 if compute_vector() function exists diff -Naur lammps-7Apr08/src/fix_nph.cpp lammps-8Apr08/src/fix_nph.cpp --- lammps-7Apr08/src/fix_nph.cpp 2008-03-17 17:37:19.000000000 -0600 +++ lammps-8Apr08/src/fix_nph.cpp 2008-04-04 17:18:14.000000000 -0600 @@ -46,6 +46,7 @@ restart_global = 1; box_change = 1; + time_integrate = 1; scalar_flag = 1; scalar_vector_freq = 1; extscalar = 1; diff -Naur lammps-7Apr08/src/fix_npt.cpp lammps-8Apr08/src/fix_npt.cpp --- lammps-7Apr08/src/fix_npt.cpp 2008-03-20 09:32:33.000000000 -0600 +++ lammps-8Apr08/src/fix_npt.cpp 2008-04-04 17:18:14.000000000 -0600 @@ -47,6 +47,7 @@ restart_global = 1; box_change = 1; + time_integrate = 1; scalar_flag = 1; scalar_vector_freq = 1; extscalar = 1; diff -Naur lammps-7Apr08/src/fix_nve.cpp lammps-8Apr08/src/fix_nve.cpp --- lammps-7Apr08/src/fix_nve.cpp 2008-03-11 11:15:30.000000000 -0600 +++ lammps-8Apr08/src/fix_nve.cpp 2008-04-04 17:18:14.000000000 -0600 @@ -28,6 +28,8 @@ Fix(lmp, narg, arg) { if (narg != 3) error->all("Illegal fix nve command"); + + time_integrate = 1; } /* ---------------------------------------------------------------------- */ diff -Naur lammps-7Apr08/src/fix_nve_limit.cpp lammps-8Apr08/src/fix_nve_limit.cpp --- lammps-7Apr08/src/fix_nve_limit.cpp 2008-02-15 12:06:53.000000000 -0700 +++ lammps-8Apr08/src/fix_nve_limit.cpp 2008-04-04 17:18:14.000000000 -0600 @@ -31,6 +31,7 @@ { if (narg != 4) error->all("Illegal fix nve/limit command"); + time_integrate = 1; scalar_flag = 1; scalar_vector_freq = 1; extscalar = 1; diff -Naur lammps-7Apr08/src/fix_nve_noforce.cpp lammps-8Apr08/src/fix_nve_noforce.cpp --- lammps-7Apr08/src/fix_nve_noforce.cpp 2008-02-15 12:06:53.000000000 -0700 +++ lammps-8Apr08/src/fix_nve_noforce.cpp 2008-04-04 17:17:45.000000000 -0600 @@ -27,6 +27,8 @@ Fix(lmp, narg, arg) { if (narg != 3) error->all("Illegal fix nve/noforce command"); + + time_integrate = 1; } /* ---------------------------------------------------------------------- */ diff -Naur lammps-7Apr08/src/fix_nve_sphere.cpp lammps-8Apr08/src/fix_nve_sphere.cpp --- lammps-7Apr08/src/fix_nve_sphere.cpp 2008-03-17 17:37:19.000000000 -0600 +++ lammps-8Apr08/src/fix_nve_sphere.cpp 2008-04-04 17:17:45.000000000 -0600 @@ -35,6 +35,8 @@ { if (narg < 3) error->all("Illegal fix nve/sphere command"); + time_integrate = 1; + // process extra keywords extra = NONE; diff -Naur lammps-7Apr08/src/fix_nvt.cpp lammps-8Apr08/src/fix_nvt.cpp --- lammps-7Apr08/src/fix_nvt.cpp 2008-03-20 09:32:33.000000000 -0600 +++ lammps-8Apr08/src/fix_nvt.cpp 2008-04-04 17:18:14.000000000 -0600 @@ -41,6 +41,7 @@ if (narg < 6) error->all("Illegal fix nvt command"); restart_global = 1; + time_integrate = 1; scalar_flag = 1; scalar_vector_freq = 1; extscalar = 1; diff -Naur lammps-7Apr08/src/fix_rigid.cpp lammps-8Apr08/src/fix_rigid.cpp --- lammps-7Apr08/src/fix_rigid.cpp 2008-01-17 10:01:57.000000000 -0700 +++ lammps-8Apr08/src/fix_rigid.cpp 2008-04-04 17:18:14.000000000 -0600 @@ -43,6 +43,7 @@ { int i,ibody; + time_integrate = 1; rigid_flag = 1; virial_flag = 1; diff -Naur lammps-7Apr08/src/group.h lammps-8Apr08/src/group.h --- lammps-7Apr08/src/group.h 2007-10-03 10:22:30.000000000 -0600 +++ lammps-8Apr08/src/group.h 2008-04-04 17:17:17.000000000 -0600 @@ -31,7 +31,7 @@ ~Group(); void assign(int, char **); // assign atoms to a group void create(char *, int *); // add flagged atoms to a group - int find(const char *); // lookup name in list of groups + int find(const char *); // lookup name in list of groups void write_restart(FILE *); void read_restart(FILE *); diff -Naur lammps-7Apr08/src/modify.cpp lammps-8Apr08/src/modify.cpp --- lammps-7Apr08/src/modify.cpp 2008-01-09 14:56:57.000000000 -0700 +++ lammps-8Apr08/src/modify.cpp 2008-04-04 17:17:45.000000000 -0600 @@ -125,7 +125,7 @@ void Modify::init() { - int i; + int i,j; // delete storage of restart info since it is not valid after 1st run @@ -165,6 +165,33 @@ for (i = 0; i < ncompute; i++) compute[i]->init(); modify->addstep_compute_all(update->ntimestep); + + // warn if any particle is time integrated more than once + + int nlocal = atom->nlocal; + int *mask = atom->mask; + + int *flag = new int[nlocal]; + for (i = 0; i < nlocal; i++) flag[i] = 0; + + int groupbit; + for (i = 0; i < nfix; i++) { + if (fix[i]->time_integrate == 0) continue; + groupbit = fix[i]->groupbit; + for (j = 0; j < nlocal; j++) + if (mask[j] & groupbit) flag[j]++; + } + + int check = 0; + for (i = 0; i < nlocal; i++) + if (flag[i] > 1) check = 1; + + delete [] flag; + + int checkall; + MPI_Allreduce(&check,&checkall,1,MPI_INT,MPI_SUM,world); + if (comm->me == 0 && checkall) + error->warning("One or more atoms are time integrated more than once"); } /* ----------------------------------------------------------------------