diff -Naur lammps-2Nov09/doc/fix_box_relax.html lammps-3Nov09/doc/fix_box_relax.html --- lammps-2Nov09/doc/fix_box_relax.html 2009-03-05 14:17:05.000000000 -0700 +++ lammps-3Nov09/doc/fix_box_relax.html 2009-10-30 14:07:50.000000000 -0600 @@ -41,7 +41,7 @@

Description:

-

Apply a pressure to the simulation box during an energy +

Apply an external pressure to the simulation box during an energy minimization. This allows the box dimensions to vary during the iterations of the minimizer so that the final configuration will be both an energy minimum for the potential energy of the atoms diff -Naur lammps-2Nov09/doc/fix_box_relax.txt lammps-3Nov09/doc/fix_box_relax.txt --- lammps-2Nov09/doc/fix_box_relax.txt 2009-03-05 14:17:05.000000000 -0700 +++ lammps-3Nov09/doc/fix_box_relax.txt 2009-10-30 14:07:50.000000000 -0600 @@ -32,7 +32,7 @@ [Description:] -Apply a pressure to the simulation box during an "energy +Apply an external pressure to the simulation box during an "energy minimization"_minimize.html. This allows the box dimensions to vary during the iterations of the minimizer so that the final configuration will be both an energy minimum for the potential energy of the atoms diff -Naur lammps-2Nov09/doc/minimize.html lammps-3Nov09/doc/minimize.html --- lammps-2Nov09/doc/minimize.html 2009-08-27 12:51:09.000000000 -0600 +++ lammps-3Nov09/doc/minimize.html 2009-10-30 14:07:50.000000000 -0600 @@ -172,8 +172,12 @@

If a soft potential (pair_style soft) is used the Astop value is used for the prefactor (no time dependence).

-

Only some fixes (typically those that apply force constraints) are -invoked during minimization. See the doc pages for individual +

The fix box/relax command can be used to apply an +external pressure to the simulation box and allow it to shrink/expand +during the minimization. +

+

Only a few other fixes (typically those that apply force constraints) +are invoked during minimization. See the doc pages for individual fix commands to see which ones are relevant.

IMPORTANT NOTE: Some fixes which are invoked during minimization have @@ -205,12 +209,6 @@ contribute to the potential energy which is probably not what is desired.

-

The volume of the simulation domain is not allowed to change during a -minimization. Ideally we would allow a fix such as npt to impose an -external pressure that would be included in the minimization -(i.e. allow the box dimensions to change), but this has not yet been -implemented. -

Pair potentials that produce torque on a particle (e.g. granular potentials or the GayBerne potential for ellipsoidal particles) are not diff -Naur lammps-2Nov09/doc/minimize.txt lammps-3Nov09/doc/minimize.txt --- lammps-2Nov09/doc/minimize.txt 2009-08-27 12:51:09.000000000 -0600 +++ lammps-3Nov09/doc/minimize.txt 2009-10-30 14:07:50.000000000 -0600 @@ -169,8 +169,12 @@ If a soft potential ("pair_style soft"_pair_soft.html) is used the Astop value is used for the prefactor (no time dependence). -Only some fixes (typically those that apply force constraints) are -invoked during minimization. See the doc pages for individual +The "fix box/relax"_fix_box_relax.html command can be used to apply an +external pressure to the simulation box and allow it to shrink/expand +during the minimization. + +Only a few other fixes (typically those that apply force constraints) +are invoked during minimization. See the doc pages for individual "fix"_fix.html commands to see which ones are relevant. IMPORTANT NOTE: Some fixes which are invoked during minimization have @@ -202,12 +206,6 @@ contribute to the potential energy which is probably not what is desired. -The volume of the simulation domain is not allowed to change during a -minimization. Ideally we would allow a fix such as {npt} to impose an -external pressure that would be included in the minimization -(i.e. allow the box dimensions to change), but this has not yet been -implemented. - Pair potentials that produce torque on a particle (e.g. "granular potentials"_pair_gran.html or the "GayBerne potential"_pair_gayberne.html for ellipsoidal particles) are not diff -Naur lammps-2Nov09/src/neigh_list.h lammps-3Nov09/src/neigh_list.h --- lammps-2Nov09/src/neigh_list.h 2008-01-09 09:17:21.000000000 -0700 +++ lammps-3Nov09/src/neigh_list.h 2009-10-30 16:49:22.000000000 -0600 @@ -44,8 +44,8 @@ // atom types to skip when building list // iskip,ijskip are just ptrs to corresponding request - int *iskip; // iskip[i] if atoms of type I are not in list - int **ijskip; // ijskip[i][j] if pairs of type I,J are not in list + int *iskip; // iskip[i] = 1 if atoms of type I are not in list + int **ijskip; // ijskip[i][j] =1 if pairs of type I,J are not in list // settings and pointers for related neighbor lists and fixes diff -Naur lammps-2Nov09/src/pair_hybrid.cpp lammps-3Nov09/src/pair_hybrid.cpp --- lammps-2Nov09/src/pair_hybrid.cpp 2009-08-12 10:46:29.000000000 -0600 +++ lammps-3Nov09/src/pair_hybrid.cpp 2009-10-30 16:49:22.000000000 -0600 @@ -364,7 +364,7 @@ for (i = 0; i < neighbor->nrequest; i++) { if (!neighbor->requests[i]->pair) continue; - // find associated sub-style + // istyle = associated sub-style for (istyle = 0; istyle < nstyles; istyle++) if (styles[istyle] == neighbor->requests[i]->requestor) break; @@ -373,7 +373,8 @@ // initialize so as to skip all pair types // set ijskip = 0 if type pair matches any entry in sub-style map // set ijskip = 0 if mixing will assign type pair to this sub-style - // will occur if both I,I and J,J are assigned to single sub-style + // will occur if type pair is currently unassigned + // and both I,I and J,J are assigned to single sub-style // and sub-style for both I,I and J,J match istyle // set iskip = 1 only if all ijskip for itype are 1 @@ -390,7 +391,8 @@ for (m = 0; m < nmap[itype][jtype]; m++) if (map[itype][jtype][m] == istyle) ijskip[itype][jtype] = ijskip[jtype][itype] = 0; - if (nmap[itype][itype] == 1 && map[itype][itype][0] == istyle && + if (nmap[itype][jtype] == 0 && + nmap[itype][itype] == 1 && map[itype][itype][0] == istyle && nmap[jtype][jtype] == 1 && map[jtype][jtype][0] == istyle) ijskip[itype][jtype] = ijskip[jtype][itype] = 0; } @@ -433,7 +435,7 @@ { // if I,J is not set explicitly: // perform mixing only if I,I sub-style = J,J sub-style - // also require I,I and J,J both are assigned to single sub-style + // also require I,I and J,J are both assigned to single sub-style if (setflag[i][j] == 0) { if (nmap[i][i] != 1 || nmap[j][j] != 1 || map[i][i][0] != map[j][j][0]) diff -Naur lammps-2Nov09/src/respa.cpp lammps-3Nov09/src/respa.cpp --- lammps-2Nov09/src/respa.cpp 2009-08-21 13:05:42.000000000 -0600 +++ lammps-3Nov09/src/respa.cpp 2009-10-30 15:57:04.000000000 -0600 @@ -246,7 +246,7 @@ { // warn if no fixes - if (modify->nfix == 0) + if (modify->nfix == 0 && comm->me == 0) error->warning("No fixes defined, atoms won't move"); // create fix needed for storing atom-based respa level forces diff -Naur lammps-2Nov09/src/verlet.cpp lammps-3Nov09/src/verlet.cpp --- lammps-2Nov09/src/verlet.cpp 2009-08-21 13:05:42.000000000 -0600 +++ lammps-3Nov09/src/verlet.cpp 2009-10-30 15:57:04.000000000 -0600 @@ -48,7 +48,7 @@ { // warn if no fixes - if (modify->nfix == 0) + if (modify->nfix == 0 && comm->me == 0) error->warning("No fixes defined, atoms won't move"); // virial_style: