From bbb9f5d88e2c26bf9801b514c305f66e1bf9b718 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Fri, 18 Jan 2013 16:03:05 +0000 Subject: [PATCH 01/12] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@9293 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- doc/Section_tools.html | 12 ++++++++++++ doc/Section_tools.txt | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/doc/Section_tools.html b/doc/Section_tools.html index cb60dcc14c..991a536ad3 100644 --- a/doc/Section_tools.html +++ b/doc/Section_tools.html @@ -54,6 +54,7 @@ own sub-directories with their own Makefiles.
  • eff
  • emacs
  • ipp +
  • kate
  • lmp2arc
  • lmp2cfg
  • lmp2vmd @@ -224,6 +225,17 @@ tools/createatoms tool's input file.


    +

    kate tool +

    +

    The file in the tools/kate directory is an add-on to the Kate editor +in the KDE suite that allow syntax highlighting of LAMMPS input +scripts. See the README.txt file for details. +

    +

    The file was provided by Alessandro Luigi Sellerio +(alessandro.sellerio at ieni.cnr.it). +

    +
    +

    lmp2arc tool

    The lmp2arc sub-directory contains a tool for converting LAMMPS output diff --git a/doc/Section_tools.txt b/doc/Section_tools.txt index 2d1a1d3fd5..ff9e807613 100644 --- a/doc/Section_tools.txt +++ b/doc/Section_tools.txt @@ -50,6 +50,7 @@ own sub-directories with their own Makefiles. "eff"_#eff "emacs"_#emacs "ipp"_#ipp +"kate"_#kate "lmp2arc"_#arc "lmp2cfg"_#cfg "lmp2vmd"_#vmd @@ -220,6 +221,17 @@ tools/createatoms tool's input file. :line +kate tool :h4,link(kate) + +The file in the tools/kate directory is an add-on to the Kate editor +in the KDE suite that allow syntax highlighting of LAMMPS input +scripts. See the README.txt file for details. + +The file was provided by Alessandro Luigi Sellerio +(alessandro.sellerio at ieni.cnr.it). + +:line + lmp2arc tool :h4,link(arc) The lmp2arc sub-directory contains a tool for converting LAMMPS output From 43e422a6833f1214136258719951f30ff3b6d67b Mon Sep 17 00:00:00 2001 From: sjplimp Date: Fri, 18 Jan 2013 16:04:11 +0000 Subject: [PATCH 02/12] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@9294 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- tools/kate/README.txt | 6 + tools/kate/lammps.xml | 878 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 884 insertions(+) create mode 100644 tools/kate/README.txt create mode 100644 tools/kate/lammps.xml diff --git a/tools/kate/README.txt b/tools/kate/README.txt new file mode 100644 index 0000000000..7e35f46b57 --- /dev/null +++ b/tools/kate/README.txt @@ -0,0 +1,6 @@ +The lammps.xml file in this dir is for use with the Kate editor +in the KDE suite, to do syntax highlighting for LAMMPS input +scripts. + +The author is Alessandro Luigi Sellerio . +Please contact him with questions. diff --git a/tools/kate/lammps.xml b/tools/kate/lammps.xml new file mode 100644 index 0000000000..0d8ba0fda4 --- /dev/null +++ b/tools/kate/lammps.xml @@ -0,0 +1,878 @@ + + + + +]> + + + + + + angle_coeff + angle_style + atom_modify + atom_style + balance + bond_coeff + bond_style + boundary + box + change_box + clear + communicate + compute + compute_modify + create_atoms + create_box + delete_atoms + delete_bonds + dielectric + dihedral_coeff + dihedral_style + dimension + displace_atoms + dump + dump_image + dump_modify + echo + fix + fix_modify + group + if + improper_coeff + improper_style + include + jump + kspace_modify + kspace_style + label + lattice + log + mass + minimize + min_modify + min_style + neb + neigh_modify + neighbor + newton + next + package + pair_coeff + pair_modify + pair_style + pair_write + partition + prd + print + processors + quit + read_data + read_dump + read_restart + region + replicate + rerun + reset_timestep + restart + run + run_style + set + shell + special_bonds + suffix + tad + temper + thermo + thermo_modify + thermo_style + timestep + uncompute + undump + unfix + units + variable + velocity + write_restart + + + adapt + addforce + append/atoms + aveforce + ave/atom + ave/correlate + ave/histo + ave/spatial + ave/time + balance + bond/break + bond/create + bond/swap + box/relax + deform + deposit + drag + dt/reset + efield + enforce2d + evaporate + external + freeze + gcmc + gravity + heat + indent + langevin + lineforce + momentum + move + msst + neb + nph + nphug + nph/asphere + nph/sphere + npt + npt/asphere + npt/sphere + nve + nve/asphere + nve/asphere/noforce + nve/limit + nve/line + nve/noforce + nve/sphere + nve/tri + nvt + nvt/asphere + nvt/sllod + nvt/sphere + orient/fcc + planeforce + poems + pour + press/berendsen + print + qeq/comb + reax/bonds + recenter + restrain + rigid + rigid/nph + rigid/npt + rigid/nve + rigid/nvt + setforce + shake + spring + spring/rg + spring/self + srd + store/force + store/state + temp/berendsen + temp/rescale + thermal/conductivity + tmd + ttm + viscosity + viscous + wall/colloid + wall/gran + wall/harmonic + wall/lj126 + wall/lj93 + wall/piston + wall/reflect + wall/region + wall/srd + + + addtorque + atc + colvars + imd + langevin/eff + meso + meso/stationary + nph/eff + npt/eff + nve/eff + nvt/eff + nvt/sllod/eff + qeq/reax + reax/c/bonds + smd + temp/rescale/eff + + + freeze/cuda + addforce/cuda + aveforce/cuda + enforce2d/cuda + gravity/cuda + gravity/omp + npt/cuda + nve/cuda + nve/sphere/omp + nvt/cuda + qeq/comb/omp + setforce/cuda + shake/cuda + temp/berendsen/cuda + temp/rescale/cuda + temp/rescale/limit/cuda + viscous/cuda + + + angle/local + atom/molecule + bond/local + centro/atom + cluster/atom + cna/atom + com + com/molecule + contact/atom + coord/atom + damage/atom + dihedral/local + displace/atom + erotate/asphere + erotate/sphere + erotate/sphere/atom + event/displace + group/group + gyration + gyration/molecule + heat/flux + improper/local + ke + ke/atom + msd + msd/molecule + pair + pair/local + pe + pe/atom + pressure + property/atom + property/local + property/molecule + rdf + reduce + reduce/region + slice + stress/atom + temp + temp/asphere + temp/com + temp/deform + temp/partial + temp/profile + temp/ramp + temp/region + temp/sphere + + + ackland/atom + ke/eff + ke/atom/eff + meso_e/atom + meso_rho/atom + meso_t/atom + temp/eff + temp/deform/eff + temp/region/eff + temp/rotate + + + pe/cuda + pressure/cuda + temp/cuda + temp/partial/cuda + + + none + hybrid + hybrid/overlay + adp + airebo + beck + bop + born + born/coul/long + born/coul/wolf + brownian + brownian/poly + buck + buck/coul/cut + buck/coul/long + buck/long/coul/long + colloid + comb + coul/cut + coul/debye + coul/dsf + coul/long + coul/wolf + dipole/cut + dpd + dpd/tstat + dsmc + eam + eam/alloy + eam/fs + eim + gauss + gayberne + gran/hertz/history + gran/hooke + gran/hooke/history + hbond/dreiding/lj + hbond/dreiding/morse + kim + lcbop + line/lj + lj/charmm/coul/charmm + lj/charmm/coul/charmm/implicit + lj/charmm/coul/long + lj/class2 + lj/class2/coul/cut + lj/class2/coul/long + lj/cut + lj/cut/coul/cut + lj/cut/coul/debye + lj/cut/coul/dsf + lj/cut/coul/long + lj/long/coul/long + lj/cut/tip4p/long + lj/long/tip4p/long + lj/expand + lj/gromacs + lj/gromacs/coul/gromacs + lj/smooth + lj/smooth/linear + lj96/cut + lubricate + lubricate/poly + lubricateU + lubricateU/poly + meam + morse + peri/lps + peri/pmb + reax + rebo + resquared + soft + sw + table + tersoff + tersoff/zbl + tri/lj + yukawa + yukawa/colloid + + + awpmd/cut + coul/diel + dipole/sf + eam/cd + edip + eff/cut + gauss/cut + lj/sdk + lj/sdk/coul/long + lj/sf + meam/spline + meam/sw/spline + reax/c + sph/heatconduction + sph/idealgas + sph/lj + sph/rhosum + sph/taitwater + sph/taitwater/morris + tersoff/table + + + adp/omp + airebo/omp + beck/omp + born/coul/long/cuda + born/coul/long/gpu + born/coul/long/omp + born/coul/wolf/gpu + born/coul/wolf/omp + born/gpu + born/omp + brownian/omp + brownian/poly/omp + buck/coul/cut/cuda + buck/coul/cut/gpu + buck/coul/cut/omp + buck/coul/long/cuda + buck/coul/long/gpu + buck/coul/long/omp + buck/cuda + buck/long/coul/long/omp + buck/gpu + buck/omp + colloid/gpu + colloid/omp + comb/omp + coul/cut/omp + coul/debye/omp + coul/dsf/gpu + coul/long/gpu + coul/long/omp + coul/wolf + dipole/cut/gpu + dipole/cut/omp + dipole/sf/gpu + dipole/sf/omp + dpd/omp + dpd/tstat/omp + eam/alloy/cuda + eam/alloy/gpu + eam/alloy/omp + eam/alloy/opt + eam/cd/omp + eam/cuda + eam/fs/cuda + eam/fs/gpu + eam/fs/omp + eam/fs/opt + eam/gpu + eam/omp + eam/opt + edip/omp + eim/omp + gauss/gpu + gauss/omp + gayberne/gpu + gayberne/omp + gran/hertz/history/omp + gran/hooke/cuda + gran/hooke/history/omp + gran/hooke/omp + hbond/dreiding/lj/omp + hbond/dreiding/morse/omp + line/lj/omp + lj/charmm/coul/charmm/cuda + lj/charmm/coul/charmm/omp + lj/charmm/coul/charmm/implicit/cuda + lj/charmm/coul/charmm/implicit/omp + lj/charmm/coul/long/cuda + lj/charmm/coul/long/gpu + lj/charmm/coul/long/omp + lj/charmm/coul/long/opt + lj/charmm/coul/pppm/omp + lj/class2/coul/cut/cuda + lj/class2/coul/cut/omp + lj/class2/coul/long/cuda + lj/class2/coul/long/gpu + lj/class2/coul/pppm/omp + lj/class2/coul/long/omp + lj/class2/cuda + lj/class2/gpu + lj/class2/omp + lj/long/coul/long/omp + lj/cut/coul/cut/cuda + lj/cut/coul/cut/gpu + lj/cut/coul/cut/omp + lj/cut/coul/debye/cuda + lj/cut/coul/debye/gpu + lj/cut/coul/debye/omp + lj/cut/coul/dsf/gpu + lj/cut/coul/long/cuda + lj/cut/coul/long/gpu + lj/cut/coul/long/omp + lj/cut/coul/long/opt + lj/cut/coul/pppm/omp + lj/cut/cuda + lj/cut/experimental/cuda + lj/cut/gpu + lj/cut/omp + lj/cut/opt + lj/cut/tip4p/long/omp + lj/cut/tip4p/long/opt + lj/expand/cuda + lj/expand/gpu + lj/expand/omp + lj/gromacs/coul/gromacs/cuda + lj/gromacs/coul/gromacs/omp + lj/gromacs/cuda + lj/gromacs/omp + lj/sdk/gpu + lj/sdk/omp + lj/sdk/coul/long/gpu + lj/sdk/coul/long/omp + lj/sf/omp + lj/smooth/cuda + lj/smooth/omp + lj/smooth/linear/omp + lj96/cut/cuda + lj96/cut/gpu + lj96/cut/omp + lubricate/omp + lubricate/poly/omp + meam/spline/omp + morse/cuda + morse/gpu + morse/omp + morse/opt + peri/lps/omp + peri/pmb/omp + rebo/omp + resquared/gpu + resquared/omp + soft/omp + sw/cuda + sw/omp + table/gpu + table/omp + tersoff/cuda + tersoff/omp + tersoff/table/omp + tersoff/zbl/omp + tri/lj/omp + yukawa/gpu + yukawa/omp + yukawa/colloid/gpu + yukawa/colloid/omp + + + none + hybrid + class2 + fene + fene/expand + harmonic + morse + nonlinear + quartic + table + + + harmonic/shift + harmonic/shift/cut + + + class2/omp + fene/omp + fene/expand/omp + harmonic/omp + harmonic/shift/omp + harmonic/shift/cut/omp + morse/omp + nonlinear/omp + quartic/omp + table/omp + + + none + hybrid + charmm + class2 + cosine + cosine/delta + cosine/periodic + cosine/squared + harmonic + table + + + sdk + cosine/shift + cosine/shift/exp + dipole + fourier + fourier/simple + quartic + + + charmm/omp + class2/omp + cosine/omp + cosine/delta/omp + cosine/periodic/omp + cosine/shift/omp + cosine/shift/exp/omp + cosine/squared/omp + dipole/ompharmonic/omp + table/omp + + + none + hybrid + charmm + class2 + harmonic + helix + multi/harmonic + opls + + + cosine/shift/exp + fourier + nharmonic + quadratic + table + + + charmm/omp + class2/omp + cosine/shift/exp/omp + harmonic/omp + helix/omp + multi/harmonic/omp + opls/omptable/omp + + + none + hybrid + class2 + cvff + harmonic + umbrella + cossq + ring + class2/omp + cossq/omp + cvff/omp + fourier + harmonic/omp + ring/omp + umbrella/omp + + + ewald + ewald/disp + msm + pppm + pppm/cg + pppm/disp + pppm/disp/tip4p + pppm/tip4p + ewald/omp + pppm/cuda + pppm/gpu + pppm/omp + pppm/cg/omp + pppm/tip4p/omp + + + equal + add + sub + mult + div + + + NULL + EDGE + & + + + if + then + elif + else + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 7866cd6a293b744c7c83379743e465be2a33c32d Mon Sep 17 00:00:00 2001 From: sjplimp Date: Fri, 18 Jan 2013 16:53:13 +0000 Subject: [PATCH 03/12] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@9295 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/FLD/pair_brownian.cpp | 12 ++-- src/FLD/pair_brownian_poly.cpp | 10 +-- src/FLD/pair_lubricate.cpp | 12 ++-- src/FLD/pair_lubricateU.cpp | 20 +++--- src/FLD/pair_lubricateU_poly.cpp | 16 ++--- src/FLD/pair_lubricate_poly.cpp | 12 ++-- src/fix_wall.cpp | 106 +++++++++++++++++++++++-------- src/fix_wall.h | 23 ++++--- 8 files changed, 133 insertions(+), 78 deletions(-) diff --git a/src/FLD/pair_brownian.cpp b/src/FLD/pair_brownian.cpp index b4966dca52..1ff6dc2308 100755 --- a/src/FLD/pair_brownian.cpp +++ b/src/FLD/pair_brownian.cpp @@ -115,8 +115,8 @@ void PairBrownian::compute(int eflag, int vflag) for (int m = 0; m < wallfix->nwall; m++){ int dim = wallfix->wallwhich[m] / 2; int side = wallfix->wallwhich[m] % 2; - if (wallfix->wallstyle[m] == VARIABLE){ - wallcoord = input->variable->compute_equal(wallfix->varindex[m]); + if (wallfix->xstyle[m] == VARIABLE){ + wallcoord = input->variable->compute_equal(wallfix->xindex[m]); } else wallcoord = wallfix->coord0[m]; if (side == 0) walllo[dim] = wallcoord; @@ -503,7 +503,7 @@ void PairBrownian::init_style() flagdeform = 1; else if (strstr(modify->fix[i]->style,"wall") != NULL){ flagwall = 1; // Walls exist - if (((FixWall *) modify->fix[i])->varflag ) { + if (((FixWall *) modify->fix[i])->xflag ) { flagwall = 2; // Moving walls exist wallfix = (FixWall *) modify->fix[i]; } @@ -523,10 +523,10 @@ void PairBrownian::init_style() for (int m = 0; m < wallfix->nwall; m++){ int dim = wallfix->wallwhich[m] / 2; int side = wallfix->wallwhich[m] % 2; - if (wallfix->wallstyle[m] == VARIABLE){ - wallfix->varindex[m] = input->variable->find(wallfix->varstr[m]); + if (wallfix->xstyle[m] == VARIABLE){ + wallfix->xindex[m] = input->variable->find(wallfix->xstr[m]); // Since fix->wall->init happens after pair->init_style - wallcoord = input->variable->compute_equal(wallfix->varindex[m]); + wallcoord = input->variable->compute_equal(wallfix->xindex[m]); } else wallcoord = wallfix->coord0[m]; diff --git a/src/FLD/pair_brownian_poly.cpp b/src/FLD/pair_brownian_poly.cpp index 379f2a7ce9..444ccd7442 100644 --- a/src/FLD/pair_brownian_poly.cpp +++ b/src/FLD/pair_brownian_poly.cpp @@ -101,8 +101,8 @@ void PairBrownianPoly::compute(int eflag, int vflag) for (int m = 0; m < wallfix->nwall; m++){ int dim = wallfix->wallwhich[m] / 2; int side = wallfix->wallwhich[m] % 2; - if (wallfix->wallstyle[m] == VARIABLE){ - wallcoord = input->variable->compute_equal(wallfix->varindex[m]); + if (wallfix->xstyle[m] == VARIABLE){ + wallcoord = input->variable->compute_equal(wallfix->xindex[m]); } else wallcoord = wallfix->coord0[m]; if (side == 0) walllo[dim] = wallcoord; @@ -363,10 +363,10 @@ void PairBrownianPoly::init_style() for (int m = 0; m < wallfix->nwall; m++){ int dim = wallfix->wallwhich[m] / 2; int side = wallfix->wallwhich[m] % 2; - if (wallfix->wallstyle[m] == VARIABLE){ - wallfix->varindex[m] = input->variable->find(wallfix->varstr[m]); + if (wallfix->xstyle[m] == VARIABLE){ + wallfix->xindex[m] = input->variable->find(wallfix->xstr[m]); // Since fix->wall->init happens after pair->init_style - wallcoord = input->variable->compute_equal(wallfix->varindex[m]); + wallcoord = input->variable->compute_equal(wallfix->xindex[m]); } else wallcoord = wallfix->coord0[m]; diff --git a/src/FLD/pair_lubricate.cpp b/src/FLD/pair_lubricate.cpp index 570f6b4eed..0c473e470c 100755 --- a/src/FLD/pair_lubricate.cpp +++ b/src/FLD/pair_lubricate.cpp @@ -181,8 +181,8 @@ void PairLubricate::compute(int eflag, int vflag) for (int m = 0; m < wallfix->nwall; m++){ int dim = wallfix->wallwhich[m] / 2; int side = wallfix->wallwhich[m] % 2; - if (wallfix->wallstyle[m] == VARIABLE){ - wallcoord = input->variable->compute_equal(wallfix->varindex[m]); + if (wallfix->xstyle[m] == VARIABLE){ + wallcoord = input->variable->compute_equal(wallfix->xindex[m]); } else wallcoord = wallfix->coord0[m]; if (side == 0) walllo[dim] = wallcoord; @@ -597,7 +597,7 @@ void PairLubricate::init_style() } if (strstr(modify->fix[i]->style,"wall") != NULL){ flagwall = 1; // Walls exist - if (((FixWall *) modify->fix[i])->varflag ) { + if (((FixWall *) modify->fix[i])->xflag ) { flagwall = 2; // Moving walls exist wallfix = (FixWall *) modify->fix[i]; } @@ -619,10 +619,10 @@ void PairLubricate::init_style() for (int m = 0; m < wallfix->nwall; m++){ int dim = wallfix->wallwhich[m] / 2; int side = wallfix->wallwhich[m] % 2; - if (wallfix->wallstyle[m] == VARIABLE){ - wallfix->varindex[m] = input->variable->find(wallfix->varstr[m]); + if (wallfix->xstyle[m] == VARIABLE){ + wallfix->xindex[m] = input->variable->find(wallfix->xstr[m]); //Since fix->wall->init happens after pair->init_style - wallcoord = input->variable->compute_equal(wallfix->varindex[m]); + wallcoord = input->variable->compute_equal(wallfix->xindex[m]); } else wallcoord = wallfix->coord0[m]; diff --git a/src/FLD/pair_lubricateU.cpp b/src/FLD/pair_lubricateU.cpp index 67c1aeac8b..eb3772451a 100644 --- a/src/FLD/pair_lubricateU.cpp +++ b/src/FLD/pair_lubricateU.cpp @@ -627,8 +627,8 @@ void PairLubricateU::compute_Fh(double **x) for (int m = 0; m < wallfix->nwall; m++){ int dim = wallfix->wallwhich[m] / 2; int side = wallfix->wallwhich[m] % 2; - if (wallfix->wallstyle[m] == VARIABLE){ - wallcoord = input->variable->compute_equal(wallfix->varindex[m]); + if (wallfix->xstyle[m] == VARIABLE){ + wallcoord = input->variable->compute_equal(wallfix->xindex[m]); } else wallcoord = wallfix->coord0[m]; if (side == 0) walllo[dim] = wallcoord; @@ -866,8 +866,8 @@ void PairLubricateU::compute_RU() for (int m = 0; m < wallfix->nwall; m++){ int dim = wallfix->wallwhich[m] / 2; int side = wallfix->wallwhich[m] % 2; - if (wallfix->wallstyle[m] == VARIABLE){ - wallcoord = input->variable->compute_equal(wallfix->varindex[m]); + if (wallfix->xstyle[m] == VARIABLE){ + wallcoord = input->variable->compute_equal(wallfix->xindex[m]); } else wallcoord = wallfix->coord0[m]; if (side == 0) walllo[dim] = wallcoord; @@ -1143,8 +1143,8 @@ void PairLubricateU::compute_RU(double **x) for (int m = 0; m < wallfix->nwall; m++){ int dim = wallfix->wallwhich[m] / 2; int side = wallfix->wallwhich[m] % 2; - if (wallfix->wallstyle[m] == VARIABLE){ - wallcoord = input->variable->compute_equal(wallfix->varindex[m]); + if (wallfix->xstyle[m] == VARIABLE){ + wallcoord = input->variable->compute_equal(wallfix->xindex[m]); } else wallcoord = wallfix->coord0[m]; if (side == 0) walllo[dim] = wallcoord; @@ -1879,7 +1879,7 @@ void PairLubricateU::init_style() flagdeform = 1; else if (strstr(modify->fix[i]->style,"wall") != NULL){ flagwall = 1; // Walls exist - if (((FixWall *) modify->fix[i])->varflag ) { + if (((FixWall *) modify->fix[i])->xflag ) { flagwall = 2; // Moving walls exist wallfix = (FixWall *) modify->fix[i]; } @@ -1899,10 +1899,10 @@ void PairLubricateU::init_style() for (int m = 0; m < wallfix->nwall; m++){ int dim = wallfix->wallwhich[m] / 2; int side = wallfix->wallwhich[m] % 2; - if (wallfix->wallstyle[m] == VARIABLE){ - wallfix->varindex[m] = input->variable->find(wallfix->varstr[m]); + if (wallfix->xstyle[m] == VARIABLE){ + wallfix->xindex[m] = input->variable->find(wallfix->xstr[m]); //Since fix->wall->init happens after pair->init_style - wallcoord = input->variable->compute_equal(wallfix->varindex[m]); + wallcoord = input->variable->compute_equal(wallfix->xindex[m]); } else wallcoord = wallfix->coord0[m]; diff --git a/src/FLD/pair_lubricateU_poly.cpp b/src/FLD/pair_lubricateU_poly.cpp index 19b4ae818c..2a451b3652 100644 --- a/src/FLD/pair_lubricateU_poly.cpp +++ b/src/FLD/pair_lubricateU_poly.cpp @@ -379,8 +379,8 @@ void PairLubricateUPoly::compute_Fh(double **x) for (int m = 0; m < wallfix->nwall; m++){ int dim = wallfix->wallwhich[m] / 2; int side = wallfix->wallwhich[m] % 2; - if (wallfix->wallstyle[m] == VARIABLE){ - wallcoord = input->variable->compute_equal(wallfix->varindex[m]); + if (wallfix->xstyle[m] == VARIABLE){ + wallcoord = input->variable->compute_equal(wallfix->xindex[m]); } else wallcoord = wallfix->coord0[m]; if (side == 0) walllo[dim] = wallcoord; @@ -660,8 +660,8 @@ void PairLubricateUPoly::compute_RU(double **x) for (int m = 0; m < wallfix->nwall; m++){ int dim = wallfix->wallwhich[m] / 2; int side = wallfix->wallwhich[m] % 2; - if (wallfix->wallstyle[m] == VARIABLE){ - wallcoord = input->variable->compute_equal(wallfix->varindex[m]); + if (wallfix->xstyle[m] == VARIABLE){ + wallcoord = input->variable->compute_equal(wallfix->xindex[m]); } else wallcoord = wallfix->coord0[m]; if (side == 0) walllo[dim] = wallcoord; @@ -1212,7 +1212,7 @@ void PairLubricateUPoly::init_style() flagdeform = 1; else if (strstr(modify->fix[i]->style,"wall") != NULL){ flagwall = 1; // Walls exist - if (((FixWall *) modify->fix[i])->varflag ) { + if (((FixWall *) modify->fix[i])->xflag ) { flagwall = 2; // Moving walls exist wallfix = (FixWall *) modify->fix[i]; } @@ -1233,10 +1233,10 @@ void PairLubricateUPoly::init_style() for (int m = 0; m < wallfix->nwall; m++){ int dim = wallfix->wallwhich[m] / 2; int side = wallfix->wallwhich[m] % 2; - if (wallfix->wallstyle[m] == VARIABLE){ - wallfix->varindex[m] = input->variable->find(wallfix->varstr[m]); + if (wallfix->xstyle[m] == VARIABLE){ + wallfix->xindex[m] = input->variable->find(wallfix->xstr[m]); //Since fix->wall->init happens after pair->init_style - wallcoord = input->variable->compute_equal(wallfix->varindex[m]); + wallcoord = input->variable->compute_equal(wallfix->xindex[m]); } else wallcoord = wallfix->coord0[m]; diff --git a/src/FLD/pair_lubricate_poly.cpp b/src/FLD/pair_lubricate_poly.cpp index 47909db667..f2aad523e0 100644 --- a/src/FLD/pair_lubricate_poly.cpp +++ b/src/FLD/pair_lubricate_poly.cpp @@ -165,8 +165,8 @@ void PairLubricatePoly::compute(int eflag, int vflag) for (int m = 0; m < wallfix->nwall; m++){ int dim = wallfix->wallwhich[m] / 2; int side = wallfix->wallwhich[m] % 2; - if (wallfix->wallstyle[m] == VARIABLE){ - wallcoord = input->variable->compute_equal(wallfix->varindex[m]); + if (wallfix->xstyle[m] == VARIABLE){ + wallcoord = input->variable->compute_equal(wallfix->xindex[m]); } else wallcoord = wallfix->coord0[m]; if (side == 0) walllo[dim] = wallcoord; @@ -492,7 +492,7 @@ void PairLubricatePoly::init_style() } if (strstr(modify->fix[i]->style,"wall") != NULL){ flagwall = 1; // Walls exist - if (((FixWall *) modify->fix[i])->varflag ) { + if (((FixWall *) modify->fix[i])->xflag ) { flagwall = 2; // Moving walls exist wallfix = (FixWall *) modify->fix[i]; } @@ -511,10 +511,10 @@ void PairLubricatePoly::init_style() for (int m = 0; m < wallfix->nwall; m++){ int dim = wallfix->wallwhich[m] / 2; int side = wallfix->wallwhich[m] % 2; - if (wallfix->wallstyle[m] == VARIABLE){ - wallfix->varindex[m] = input->variable->find(wallfix->varstr[m]); + if (wallfix->xstyle[m] == VARIABLE){ + wallfix->xindex[m] = input->variable->find(wallfix->xstr[m]); //Since fix->wall->init happens after pair->init_style - wallcoord = input->variable->compute_equal(wallfix->varindex[m]); + wallcoord = input->variable->compute_equal(wallfix->xindex[m]); } else wallcoord = wallfix->coord0[m]; diff --git a/src/fix_wall.cpp b/src/fix_wall.cpp index 4181c2c897..70fcbbea2c 100644 --- a/src/fix_wall.cpp +++ b/src/fix_wall.cpp @@ -49,6 +49,8 @@ FixWall::FixWall(LAMMPS *lmp, int narg, char **arg) : fldflag = 0; int pbcflag = 0; + for (int i = 0; i < 6; i++) xstr[i] = estr[i] = sstr[i] = NULL; + int iarg = 3; while (iarg < narg) { if ((strcmp(arg[iarg],"xlo") == 0) || (strcmp(arg[iarg],"xhi") == 0) || @@ -70,23 +72,41 @@ FixWall::FixWall(LAMMPS *lmp, int narg, char **arg) : wallwhich[nwall] = newwall; if (strcmp(arg[iarg+1],"EDGE") == 0) { - wallstyle[nwall] = EDGE; + xstyle[nwall] = EDGE; int dim = wallwhich[nwall] / 2; int side = wallwhich[nwall] % 2; if (side == 0) coord0[nwall] = domain->boxlo[dim]; else coord0[nwall] = domain->boxhi[dim]; } else if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) { - wallstyle[nwall] = VARIABLE; + xstyle[nwall] = VARIABLE; int n = strlen(&arg[iarg+1][2]) + 1; - varstr[nwall] = new char[n]; - strcpy(varstr[nwall],&arg[iarg+1][2]); + xstr[nwall] = new char[n]; + strcpy(xstr[nwall],&arg[iarg+1][2]); } else { - wallstyle[nwall] = CONSTANT; + xstyle[nwall] = CONSTANT; coord0[nwall] = atof(arg[iarg+1]); } - epsilon[nwall] = atof(arg[iarg+2]); - sigma[nwall] = atof(arg[iarg+3]); + if (strstr(arg[iarg+2],"v_") == arg[iarg+2]) { + int n = strlen(&arg[iarg+2][2]) + 1; + estr[nwall] = new char[n]; + strcpy(estr[nwall],&arg[iarg+2][2]); + estyle[nwall] = VARIABLE; + } else { + epsilon[nwall] = atof(arg[iarg+2]); + estyle[nwall] = CONSTANT; + } + + if (strstr(arg[iarg+3],"v_") == arg[iarg+3]) { + int n = strlen(&arg[iarg+3][2]) + 1; + sstr[nwall] = new char[n]; + strcpy(sstr[nwall],&arg[iarg+3][2]); + sstyle[nwall] = VARIABLE; + } else { + sigma[nwall] = atof(arg[iarg+3]); + sstyle[nwall] = CONSTANT; + } + cutoff[nwall] = atof(arg[iarg+4]); nwall++; iarg += 5; @@ -136,11 +156,11 @@ FixWall::FixWall(LAMMPS *lmp, int narg, char **arg) : } } - // scale factors for CONSTANT and VARIABLE walls + // scale factors for wall position for CONSTANT and VARIABLE walls int flag = 0; for (int m = 0; m < nwall; m++) - if (wallstyle[m] != EDGE) flag = 1; + if (xstyle[m] != EDGE) flag = 1; if (flag) { if (scaleflag && domain->lattice == NULL) @@ -154,18 +174,24 @@ FixWall::FixWall(LAMMPS *lmp, int narg, char **arg) : else xscale = yscale = zscale = 1.0; for (int m = 0; m < nwall; m++) { - if (wallstyle[m] != CONSTANT) continue; + if (xstyle[m] != CONSTANT) continue; if (wallwhich[m] < YLO) coord0[m] *= xscale; else if (wallwhich[m] < ZLO) coord0[m] *= yscale; else coord0[m] *= zscale; } } - // set varflag if any wall positions are variable + // set xflag if any wall positions are variable + // set vflag if any wall positions are variable + // set wstyle to VARIABLE if either epsilon or sigma is a variable - varflag = 0; - for (int m = 0; m < nwall; m++) - if (wallstyle[m] == VARIABLE) varflag = 1; + vflag = xflag = 0; + for (int m = 0; m < nwall; m++) { + if (xstyle[m] == VARIABLE) xflag = 1; + if (xflag || estyle[m] == VARIABLE || sstyle[m] == VARIABLE) vflag = 1; + if (estyle[m] == VARIABLE || sstyle[m] == VARIABLE) wstyle[m] = VARIABLE; + else wstyle[m] = CONSTANT; + } eflag = 0; for (int m = 0; m <= nwall; m++) ewall[m] = 0.0; @@ -175,8 +201,11 @@ FixWall::FixWall(LAMMPS *lmp, int narg, char **arg) : FixWall::~FixWall() { - for (int m = 0; m < nwall; m++) - if (wallstyle[m] == VARIABLE) delete [] varstr[m]; + for (int m = 0; m < nwall; m++) { + delete [] xstr[m]; + delete [] estr[m]; + delete [] sstr[m]; + } } /* ---------------------------------------------------------------------- */ @@ -203,12 +232,27 @@ void FixWall::init() dt = update->dt; for (int m = 0; m < nwall; m++) { - if (wallstyle[m] != VARIABLE) continue; - varindex[m] = input->variable->find(varstr[m]); - if (varindex[m] < 0) - error->all(FLERR,"Variable name for fix wall does not exist"); - if (!input->variable->equalstyle(varindex[m])) - error->all(FLERR,"Variable for fix wall is invalid style"); + if (xstyle[m] == VARIABLE) { + xindex[m] = input->variable->find(xstr[m]); + if (xindex[m] < 0) + error->all(FLERR,"Variable name for fix wall does not exist"); + if (!input->variable->equalstyle(xindex[m])) + error->all(FLERR,"Variable for fix wall is invalid style"); + } + if (estyle[m] == VARIABLE) { + eindex[m] = input->variable->find(estr[m]); + if (eindex[m] < 0) + error->all(FLERR,"Variable name for fix wall does not exist"); + if (!input->variable->equalstyle(eindex[m])) + error->all(FLERR,"Variable for fix wall is invalid style"); + } + if (sstyle[m] == VARIABLE) { + sindex[m] = input->variable->find(sstr[m]); + if (sindex[m] < 0) + error->all(FLERR,"Variable name for fix wall does not exist"); + if (!input->variable->equalstyle(sindex[m])) + error->all(FLERR,"Variable for fix wall is invalid style"); + } } // setup coefficients @@ -256,23 +300,31 @@ void FixWall::post_force(int vflag) for (int m = 0; m <= nwall; m++) ewall[m] = 0.0; // coord = current position of wall - // evaluate variable if necessary, wrap with clear/add + // evaluate variables if necessary, wrap with clear/add + // for epsilon/sigma variables need to re-invoke precompute() - if (varflag) modify->clearstep_compute(); + if (vflag) modify->clearstep_compute(); double coord; for (int m = 0; m < nwall; m++) { - if (wallstyle[m] == VARIABLE) { - coord = input->variable->compute_equal(varindex[m]); + if (xstyle[m] == VARIABLE) { + coord = input->variable->compute_equal(xindex[m]); if (wallwhich[m] < YLO) coord *= xscale; else if (wallwhich[m] < ZLO) coord *= yscale; else coord *= zscale; } else coord = coord0[m]; + if (wstyle[m] == VARIABLE) { + if (estyle[m] == VARIABLE) + epsilon[m] = input->variable->compute_equal(eindex[m]); + if (sstyle[m] == VARIABLE) + sigma[m] = input->variable->compute_equal(sindex[m]); + precompute(m); + } wall_particle(m,wallwhich[m],coord); } - if (varflag) modify->addstep_compute(update->ntimestep + 1); + if (vflag) modify->addstep_compute(update->ntimestep + 1); } /* ---------------------------------------------------------------------- */ diff --git a/src/fix_wall.h b/src/fix_wall.h index 84f824b6e8..eee3cf6025 100644 --- a/src/fix_wall.h +++ b/src/fix_wall.h @@ -20,6 +20,14 @@ namespace LAMMPS_NS { class FixWall : public Fix { public: + int nwall; + int wallwhich[6]; + double coord0[6]; + int xflag; // 1 if any wall position is a variable + int xstyle[6]; + int xindex[6]; + char *xstr[6]; + FixWall(class LAMMPS *, int, char **); virtual ~FixWall(); int setmask(); @@ -36,20 +44,15 @@ class FixWall : public Fix { virtual void precompute(int) = 0; virtual void wall_particle(int, int, double) = 0; - int nwall; - int wallwhich[6]; - double coord0[6]; - int varflag; - int wallstyle[6]; - int varindex[6]; - char *varstr[6]; - - protected: double epsilon[6],sigma[6],cutoff[6]; double ewall[7],ewall_all[7]; double xscale,yscale,zscale; - int eflag; + int estyle[6],sstyle[6],wstyle[6]; + int eindex[6],sindex[6]; + char *estr[6],*sstr[6]; + int vflag; // 1 if any wall position,epsilon,sigma is a var + int eflag; // per-wall flag for energy summation int nlevels_respa; double dt; int fldflag; From 580cecfd0971b7a5e38cbe4e573e73f42d4521ba Mon Sep 17 00:00:00 2001 From: sjplimp Date: Fri, 18 Jan 2013 16:58:14 +0000 Subject: [PATCH 04/12] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@9296 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- doc/fix_adapt.html | 11 +++++++---- doc/fix_adapt.txt | 8 ++++++-- doc/fix_wall.html | 28 +++++++++++++++++++++------- doc/fix_wall.txt | 17 +++++++++++++++-- 4 files changed, 49 insertions(+), 15 deletions(-) diff --git a/doc/fix_adapt.html b/doc/fix_adapt.html index cfbf36373b..28b0d9cb40 100644 --- a/doc/fix_adapt.html +++ b/doc/fix_adapt.html @@ -42,9 +42,8 @@

      scale value = no or yes
         no = the variable value is the new setting
    -    yes = the variable value multiplies the original setting 
    -
    -
      reset value = no or yes
    +    yes = the variable value multiplies the original setting
    +  reset value = no or yes
         no = values will remain altered at the end of a run
         yes = reset altered values to their original values at the end of a run 
     
    @@ -65,7 +64,11 @@ attributes which can be varied by this fix are discussed below. Many other fixes can also be used to time-vary simulation parameters, e.g. the "fix deform" command will change the simulation box size/shape and the "fix move" command will change atom positions and -velocities in a prescribed manner. +velocities in a prescribed manner. Also note that many commands allow +variables as arguments for specific parameters, if described in that +manner on their doc pages. An equal-style variable can calculate a +time-dependent quantity, so this is another way to vary a simulation +parameter over time.

    If N is specified as 0, the specified attributes are only changed once, before the simulation begins. This is all that is needed if the diff --git a/doc/fix_adapt.txt b/doc/fix_adapt.txt index 6c7b6ef356..bd9bc5a9a7 100644 --- a/doc/fix_adapt.txt +++ b/doc/fix_adapt.txt @@ -31,7 +31,7 @@ zero or more keyword/value pairs may be appended :l keyword = {scale} or {reset} :l {scale} value = {no} or {yes} {no} = the variable value is the new setting - {yes} = the variable value multiplies the original setting :pre + {yes} = the variable value multiplies the original setting {reset} value = {no} or {yes} {no} = values will remain altered at the end of a run {yes} = reset altered values to their original values at the end of a run :pre @@ -52,7 +52,11 @@ attributes which can be varied by this fix are discussed below. Many other fixes can also be used to time-vary simulation parameters, e.g. the "fix deform" command will change the simulation box size/shape and the "fix move" command will change atom positions and -velocities in a prescribed manner. +velocities in a prescribed manner. Also note that many commands allow +variables as arguments for specific parameters, if described in that +manner on their doc pages. An equal-style variable can calculate a +time-dependent quantity, so this is another way to vary a simulation +parameter over time. If {N} is specified as 0, the specified attributes are only changed once, before the simulation begins. This is all that is needed if the diff --git a/doc/fix_wall.html b/doc/fix_wall.html index 5e8f1546d9..281d36a005 100644 --- a/doc/fix_wall.html +++ b/doc/fix_wall.html @@ -29,14 +29,18 @@

  • face = xlo or xhi or ylo or yhi or zlo or zhi -
      args = coord epsilon sigma cutoff
    +
  • args = coord epsilon sigma cutoff coord = position of wall = EDGE or constant or variable EDGE = current lo or hi edge of simulation box constant = number like 0.0 or -30.0 (distance units) variable = equal-style variable like v_x or v_wiggle epsilon = strength factor for wall-particle interaction (energy or energy/distance^2 units) - sigma = size factor for wall-particle interaction (distance units) - cutoff = distance from wall at which wall-particle interaction is cut off (distance units) + epsilon can be a variable (see below) + +
  • sigma = size factor for wall-particle interaction (distance units) + sigma can be a variable (see below) + +
        cutoff = distance from wall at which wall-particle interaction is cut off (distance units) 
     
  • zero or more keyword/value pairs may be appended @@ -47,9 +51,8 @@ box = the wall position is defined in simulation box units fld value = yes or no yes = invoke the wall constraint to be compatible with implicit FLD - no = invoke the wall constraint in the normal way -
  • -
      pbc value = yes or no
    +    no = invoke the wall constraint in the normal way
    +  pbc value = yes or no
         yes = allow periodic boundary in a wall dimension
         no = require non-perioidic boundaries in any wall dimension 
     
    @@ -144,6 +147,16 @@ constant K, and has units (energy/distance^2). The input parameter spring is at the cutoff. This is a repulsive-only spring since the interaction is truncated at the cutoff

    +

    For any wall, the epsilon and/or sigma parameter can be specified +as an equal-style variable, in which case it should be +specified as v_name, where name is the variable name. As with a +variable wall position, the variable is evaluated each timestep and +the result becomes the current epsilon or sigma of the wall. +Equal-style variables can specify formulas with various mathematical +functions, and include thermo_style command +keywords for the simulation box parameters and timestep and elapsed +time. Thus it is easy to specify a time-dependent wall interaction. +

    IMPORTANT NOTE: For all of the styles, you must insure that r is always > 0 for all particles in the group, or LAMMPS will generate an error. This means you cannot start your simulation with particles at @@ -194,7 +207,8 @@ want.

    Here are examples of variable definitions that move the wall position in a time-dependent fashion using equal-style -variables. +variables. The wall interaction parameters (epsilon, +sigma) could be varied with additional variable definitions.

    variable ramp equal ramp(0,10)
     fix 1 all wall xlo v_ramp 1.0 1.0 2.5 
    diff --git a/doc/fix_wall.txt b/doc/fix_wall.txt
    index 3874587bd0..803aff618e 100644
    --- a/doc/fix_wall.txt
    +++ b/doc/fix_wall.txt
    @@ -25,7 +25,9 @@ face = {xlo} or {xhi} or {ylo} or {yhi} or {zlo} or {zhi} :l
           constant = number like 0.0 or -30.0 (distance units)
           variable = "equal-style variable"_variable.html like v_x or v_wiggle
         epsilon = strength factor for wall-particle interaction (energy or energy/distance^2 units)
    +      epsilon can be a variable (see below) :l
         sigma = size factor for wall-particle interaction (distance units)
    +      sigma can be a variable (see below) :l
         cutoff = distance from wall at which wall-particle interaction is cut off (distance units) :pre
     zero or more keyword/value pairs may be appended :l
     keyword = {units} or {fld} :l
    @@ -34,7 +36,7 @@ keyword = {units} or {fld} :l
         {box} = the wall position is defined in simulation box units
       {fld} value = {yes} or {no}
         {yes} = invoke the wall constraint to be compatible with implicit FLD
    -    {no} = invoke the wall constraint in the normal way :pre
    +    {no} = invoke the wall constraint in the normal way
       {pbc} value = {yes} or {no}
         {yes} = allow periodic boundary in a wall dimension
         {no} = require non-perioidic boundaries in any wall dimension :pre
    @@ -129,6 +131,16 @@ constant K, and has units (energy/distance^2).  The input parameter
     spring is at the {cutoff}.  This is a repulsive-only spring since the
     interaction is truncated at the {cutoff}
     
    +For any wall, the {epsilon} and/or {sigma} parameter can be specified
    +as an "equal-style variable"_variable.html, in which case it should be
    +specified as v_name, where name is the variable name.  As with a
    +variable wall position, the variable is evaluated each timestep and
    +the result becomes the current epsilon or sigma of the wall.
    +Equal-style variables can specify formulas with various mathematical
    +functions, and include "thermo_style"_thermo_style.html command
    +keywords for the simulation box parameters and timestep and elapsed
    +time.  Thus it is easy to specify a time-dependent wall interaction.
    +
     IMPORTANT NOTE: For all of the styles, you must insure that r is
     always > 0 for all particles in the group, or LAMMPS will generate an
     error.  This means you cannot start your simulation with particles at
    @@ -179,7 +191,8 @@ want.
     
     Here are examples of variable definitions that move the wall position
     in a time-dependent fashion using equal-style
    -"variables"_variable.html.
    +"variables"_variable.html.  The wall interaction parameters (epsilon,
    +sigma) could be varied with additional variable definitions.
     
     variable ramp equal ramp(0,10)
     fix 1 all wall xlo v_ramp 1.0 1.0 2.5 :pre
    
    From aa62e9b389830676c409d376848dec6a59d58f9f Mon Sep 17 00:00:00 2001
    From: sjplimp 
    Date: Fri, 18 Jan 2013 16:59:43 +0000
    Subject: [PATCH 05/12] git-svn-id:
     svn://svn.icms.temple.edu/lammps-ro/trunk@9297
     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 840d95c190..06f5372acb 100644
    --- a/src/version.h
    +++ b/src/version.h
    @@ -1 +1 @@
    -#define LAMMPS_VERSION "19 Jan 2013"
    +#define LAMMPS_VERSION "20 Jan 2013"
    
    From 2d6d2de507ff921827d4a23f168a819f0abe2a60 Mon Sep 17 00:00:00 2001
    From: sjplimp 
    Date: Fri, 18 Jan 2013 20:39:12 +0000
    Subject: [PATCH 06/12] git-svn-id:
     svn://svn.icms.temple.edu/lammps-ro/trunk@9299
     f3b2605a-c512-4ea7-a41b-209d697bcdaa
    
    ---
     src/fix_wall.cpp         | 10 ++++++--
     src/region.cpp           | 34 ++++++++++++++++++++-------
     src/region.h             | 17 ++++++++++----
     src/region_intersect.cpp |  3 ++-
     src/region_sphere.cpp    | 50 +++++++++++++++++++++++++++++++++++++---
     src/region_sphere.h      |  6 +++++
     src/variable.cpp         | 12 +++++-----
     7 files changed, 108 insertions(+), 24 deletions(-)
    
    diff --git a/src/fix_wall.cpp b/src/fix_wall.cpp
    index 70fcbbea2c..297f22741c 100644
    --- a/src/fix_wall.cpp
    +++ b/src/fix_wall.cpp
    @@ -314,10 +314,16 @@ void FixWall::post_force(int vflag)
           else coord *= zscale;
         } else coord = coord0[m];
         if (wstyle[m] == VARIABLE) {
    -      if (estyle[m] == VARIABLE)
    +      if (estyle[m] == VARIABLE) {
             epsilon[m] = input->variable->compute_equal(eindex[m]);
    -      if (sstyle[m] == VARIABLE)
    +        if (epsilon[m] < 0.0)
    +          error->all(FLERR,"Variable evaluation in fix wall gave bad value");
    +      }
    +      if (sstyle[m] == VARIABLE) {
             sigma[m] = input->variable->compute_equal(sindex[m]);
    +        if (sigma[m] < 0.0) 
    +          error->all(FLERR,"Variable evaluation in fix wall gave bad value");
    +      }
           precompute(m);
         }
     
    diff --git a/src/region.cpp b/src/region.cpp
    index a9d27e1a38..14f7155e4a 100644
    --- a/src/region.cpp
    +++ b/src/region.cpp
    @@ -36,9 +36,10 @@ Region::Region(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
       style = new char[n];
       strcpy(style,arg[1]);
     
    +  varshape = 0;
       xstr = ystr = zstr = tstr = NULL;
       dx = dy = dz = 0.0;
    -  laststep = -1;
    +  lastshape = lastdynamic = -1;
     }
     
     /* ---------------------------------------------------------------------- */
    @@ -100,23 +101,35 @@ int Region::dynamic_check()
        XOR computes 0 if 2 args are the same, 1 if different
        note that inside() returns 1 for points on surface of region
        thus point on surface of exterior region will not match
    +   if region has variable shape, invoke shape_update() once per timestep
        if region is dynamic, apply inverse transform to x,y,z
          unmove first, then unrotate, so don't have to change rotation point
    +   caller is responsible for wrapping this call with
    +     modify->clearstep_compute() and modify->addstep_compute() if needed
     ------------------------------------------------------------------------- */
     
     int Region::match(double x, double y, double z)
     {
    -  if (dynamic) inverse_transform(x,y,z);
    +  if (varshape && update->ntimestep != lastshape) {
    +    shape_update();
    +    lastshape = update->ntimestep;
    +  }
    +
    +  if (dynamic && update->ntimestep) inverse_transform(x,y,z);
    +
       return !(inside(x,y,z) ^ interior);
     }
     
     /* ----------------------------------------------------------------------
        generate list of contact points for interior or exterior regions
    +   if region has variable shape, invoke shape_update() once per timestep
        if region is dynamic:
          before: inverse transform x,y,z (unmove, then unrotate)
          after: forward transform contact point xs,yx,zs (rotate, then move),
                 then reset contact delx,dely,delz based on new contact point
                 no need to do this if no rotation since delxyz doesn't change
    +   caller is responsible for wrapping this call with
    +     modify->clearstep_compute() and modify->addstep_compute() if needed
     ------------------------------------------------------------------------- */
     
     int Region::surface(double x, double y, double z, double cutoff)
    @@ -125,6 +138,11 @@ int Region::surface(double x, double y, double z, double cutoff)
       double xs,ys,zs;
       double xnear[3],xorig[3];
     
    +  if (varshape && update->ntimestep != lastshape) {
    +    shape_update();
    +    lastshape = update->ntimestep;
    +  }
    +
       if (dynamic) {
         xorig[0] = x;
         xorig[1] = y;
    @@ -179,13 +197,13 @@ void Region::add_contact(int n, double *x, double xp, double yp, double zp)
     void Region::forward_transform(double &x, double &y, double &z)
     {
       if (rotateflag) {
    -    if (update->ntimestep != laststep)
    +    if (update->ntimestep != lastdynamic)
           theta = input->variable->compute_equal(tvar);
         rotate(x,y,z,theta);
       }
     
       if (moveflag) {
    -    if (update->ntimestep != laststep) {
    +    if (update->ntimestep != lastdynamic) {
           if (xstr) dx = input->variable->compute_equal(xvar);
           if (ystr) dy = input->variable->compute_equal(yvar);
           if (zstr) dz = input->variable->compute_equal(zvar);
    @@ -195,7 +213,7 @@ void Region::forward_transform(double &x, double &y, double &z)
         z += dz;
       }
     
    -  laststep = update->ntimestep;
    +  lastdynamic = update->ntimestep;
     }
     
     /* ----------------------------------------------------------------------
    @@ -206,7 +224,7 @@ void Region::forward_transform(double &x, double &y, double &z)
     void Region::inverse_transform(double &x, double &y, double &z)
     {
       if (moveflag) {
    -    if (update->ntimestep != laststep) {
    +    if (update->ntimestep != lastdynamic) {
           if (xstr) dx = input->variable->compute_equal(xvar);
           if (ystr) dy = input->variable->compute_equal(yvar);
           if (zstr) dz = input->variable->compute_equal(zvar);
    @@ -217,12 +235,12 @@ void Region::inverse_transform(double &x, double &y, double &z)
       }
     
       if (rotateflag) {
    -    if (update->ntimestep != laststep)
    +    if (update->ntimestep != lastdynamic)
           theta = input->variable->compute_equal(tvar);
         rotate(x,y,z,-theta);
       }
     
    -  laststep = update->ntimestep;
    +  lastdynamic = update->ntimestep;
     }
     
     /* ----------------------------------------------------------------------
    diff --git a/src/region.h b/src/region.h
    index 2406dc186f..8f79590258 100644
    --- a/src/region.h
    +++ b/src/region.h
    @@ -40,27 +40,36 @@ class Region : protected Pointers {
     
       Region(class LAMMPS *, int, char **);
       virtual ~Region();
    -  void init();
    +  virtual void init();
       virtual int dynamic_check();
    +
    +  // called by other classes to check point versus region
    +
       int match(double, double, double);
       int surface(double, double, double, double);
     
    +  // implemented by each region, not called by other classes
    +
       virtual int inside(double, double, double) = 0;
       virtual int surface_interior(double *, double) = 0;
       virtual int surface_exterior(double *, double) = 0;
    +  virtual void shape_update() {}
     
      protected:
    +  int varshape;       // 1 if region shape changes over time
    +
       void add_contact(int, double *, double, double, double);
       void options(int, char **);
     
      private:
    -  int dynamic;                      // 1 if region changes over time
    -  int moveflag,rotateflag;
    +  int dynamic;        // 1 if region position/orientation changes over time
    +  int moveflag,rotateflag;   // 1 if position/orientation changes
    +
       double point[3],axis[3],runit[3];
       char *xstr,*ystr,*zstr,*tstr;
       int xvar,yvar,zvar,tvar;
       double dx,dy,dz,theta;
    -  bigint laststep;
    +  bigint lastshape,lastdynamic;
     
       void forward_transform(double &, double &, double &);
       void inverse_transform(double &, double &, double &);
    diff --git a/src/region_intersect.cpp b/src/region_intersect.cpp
    index 1d3d78d186..736ec3c6e1 100644
    --- a/src/region_intersect.cpp
    +++ b/src/region_intersect.cpp
    @@ -37,7 +37,8 @@ RegIntersect::RegIntersect(LAMMPS *lmp, int narg, char **arg) :
       int iregion;
       for (int iarg = 0; iarg < n; iarg++) {
         iregion = domain->find_region(arg[iarg+3]);
    -    if (iregion == -1) error->all(FLERR,"Region intersect region ID does not exist");
    +    if (iregion == -1) 
    +      error->all(FLERR,"Region intersect region ID does not exist");
         list[nregion++] = iregion;
       }
     
    diff --git a/src/region_sphere.cpp b/src/region_sphere.cpp
    index e90704dd74..773fc4cb16 100644
    --- a/src/region_sphere.cpp
    +++ b/src/region_sphere.cpp
    @@ -15,10 +15,15 @@
     #include "stdlib.h"
     #include "string.h"
     #include "region_sphere.h"
    +#include "input.h"
    +#include "variable.h"
    +#include "update.h"
     #include "error.h"
     
     using namespace LAMMPS_NS;
     
    +enum{CONSTANT,VARIABLE};
    +
     /* ---------------------------------------------------------------------- */
     
     RegSphere::RegSphere(LAMMPS *lmp, int narg, char **arg) :
    @@ -29,13 +34,23 @@ RegSphere::RegSphere(LAMMPS *lmp, int narg, char **arg) :
       xc = xscale*atof(arg[2]);
       yc = yscale*atof(arg[3]);
       zc = zscale*atof(arg[4]);
    -  radius = xscale*atof(arg[5]);
     
    -  // error check
    +  rstr = NULL;
    +  if (strstr(arg[5],"v_") == arg[5]) {
    +    int n = strlen(&arg[5][2]) + 1;
    +    rstr = new char[n];
    +    strcpy(rstr,&arg[5][2]);
    +    radius = 0.0;
    +    rstyle = VARIABLE;
    +    varshape = 1;
    +  } else {
    +    radius = xscale*atof(arg[5]);
    +    rstyle = CONSTANT;
    +  }
     
       if (radius < 0.0) error->all(FLERR,"Illegal region sphere command");
     
    -  // extent of sphere
    +  // extent of sphere, will be 0.0 for variable radius
     
       if (interior) {
         bboxflag = 1;
    @@ -55,9 +70,27 @@ RegSphere::RegSphere(LAMMPS *lmp, int narg, char **arg) :
     
     RegSphere::~RegSphere()
     {
    +  delete [] rstr;
       delete [] contact;
     }
     
    +/* ---------------------------------------------------------------------- */
    +
    +void RegSphere::init()
    +{
    +  Region::init();
    +
    +  // check variable
    +
    +  if (rstr) {
    +    rvar = input->variable->find(rstr);
    +    if (rvar < 0)
    +      error->all(FLERR,"Variable name for region sphere does not exist");
    +    if (!input->variable->equalstyle(rvar))
    +      error->all(FLERR,"Variable for region sphere is invalid style");
    +  }
    +}
    +
     /* ----------------------------------------------------------------------
        inside = 1 if x,y,z is inside or on surface
        inside = 0 if x,y,z is outside and not on surface
    @@ -124,3 +157,14 @@ int RegSphere::surface_exterior(double *x, double cutoff)
       }
       return 0;
     }
    +
    +/* ----------------------------------------------------------------------
    +   change region shape via variable evaluation
    +------------------------------------------------------------------------- */
    +
    +void RegSphere::shape_update()
    +{
    +  radius = xscale * input->variable->compute_equal(rvar);
    +  if (radius < 0.0)
    +    error->one(FLERR,"Variable evaluation in region gave bad value");
    +}
    diff --git a/src/region_sphere.h b/src/region_sphere.h
    index 73556d07c3..ed34369221 100644
    --- a/src/region_sphere.h
    +++ b/src/region_sphere.h
    @@ -28,13 +28,19 @@ class RegSphere : public Region {
      public:
       RegSphere(class LAMMPS *, int, char **);
       ~RegSphere();
    +  void init();
       int inside(double, double, double);
       int surface_interior(double *, double);
       int surface_exterior(double *, double);
    +  void shape_update();
     
      private:
       double xc,yc,zc;
       double radius;
    +  int rstyle,rvar;
    +  char *rstr;
    +
    +  void variable_check();
     };
     
     }
    diff --git a/src/variable.cpp b/src/variable.cpp
    index 5b9402a731..d60acccc58 100644
    --- a/src/variable.cpp
    +++ b/src/variable.cpp
    @@ -2159,17 +2159,17 @@ double Variable::eval_tree(Tree *tree, int i)
       }
     
       if (tree->type == RMASK) {
    -    if (domain->regions[tree->ivalue1]->inside(atom->x[i][0],
    -                                               atom->x[i][1],
    -                                               atom->x[i][2])) return 1.0;
    +    if (domain->regions[tree->ivalue1]->match(atom->x[i][0],
    +                                              atom->x[i][1],
    +                                              atom->x[i][2])) return 1.0;
         else return 0.0;
       }
     
       if (tree->type == GRMASK) {
         if ((atom->mask[i] & tree->ivalue1) &&
    -        (domain->regions[tree->ivalue2]->inside(atom->x[i][0],
    -                                                atom->x[i][1],
    -                                                atom->x[i][2]))) return 1.0;
    +        (domain->regions[tree->ivalue2]->match(atom->x[i][0],
    +                                               atom->x[i][1],
    +                                               atom->x[i][2]))) return 1.0;
         else return 0.0;
       }
     
    
    From 746deead15bf42ebc6e89009cc7b56381d986c55 Mon Sep 17 00:00:00 2001
    From: sjplimp 
    Date: Fri, 18 Jan 2013 20:46:51 +0000
    Subject: [PATCH 07/12] git-svn-id:
     svn://svn.icms.temple.edu/lammps-ro/trunk@9300
     f3b2605a-c512-4ea7-a41b-209d697bcdaa
    
    ---
     src/region_cylinder.cpp | 60 ++++++++++++++++++++++++++++++++++++++---
     src/region_cylinder.h   |  7 +++++
     src/region_sphere.cpp   | 33 ++++++++++++++---------
     3 files changed, 85 insertions(+), 15 deletions(-)
    
    diff --git a/src/region_cylinder.cpp b/src/region_cylinder.cpp
    index d6d71ba9b9..b806ea07ea 100644
    --- a/src/region_cylinder.cpp
    +++ b/src/region_cylinder.cpp
    @@ -15,12 +15,16 @@
     #include "stdlib.h"
     #include "string.h"
     #include "region_cylinder.h"
    +#include "update.h"
     #include "domain.h"
    +#include "input.h"
    +#include "variable.h"
     #include "error.h"
     
     using namespace LAMMPS_NS;
     
     #define BIG 1.0e20
    +enum{CONSTANT,VARIABLE};
     
     /* ---------------------------------------------------------------------- */
     
    @@ -36,15 +40,29 @@ RegCylinder::RegCylinder(LAMMPS *lmp, int narg, char **arg) :
       if (axis == 'x') {
         c1 = yscale*atof(arg[3]);
         c2 = zscale*atof(arg[4]);
    -    radius = yscale*atof(arg[5]);
       } else if (axis == 'y') {
         c1 = xscale*atof(arg[3]);
         c2 = zscale*atof(arg[4]);
    -    radius = xscale*atof(arg[5]);
       } else if (axis == 'z') {
         c1 = xscale*atof(arg[3]);
         c2 = yscale*atof(arg[4]);
    -    radius = xscale*atof(arg[5]);
    +  }
    +
    +  rstr = NULL;
    +  if (strstr(arg[5],"v_") == arg[5]) {
    +    int n = strlen(&arg[5][2]) + 1;
    +    rstr = new char[n];
    +    strcpy(rstr,&arg[5][2]);
    +    radius = 0.0;
    +    rstyle = VARIABLE;
    +    varshape = 1;
    +    variable_check();
    +    shape_update();
    +  } else {
    +    radius = atof(arg[5]);
    +    if (axis == 'x') radius *= xscale;
    +    else radius *= xscale;
    +    rstyle = CONSTANT;
       }
     
       if (strcmp(arg[6],"INF") == 0 || strcmp(arg[6],"EDGE") == 0) {
    @@ -100,6 +118,7 @@ RegCylinder::RegCylinder(LAMMPS *lmp, int narg, char **arg) :
       if (radius <= 0.0) error->all(FLERR,"Illegal region cylinder command");
     
       // extent of cylinder
    +  // for variable radius, uses initial radius
     
       if (interior) {
         bboxflag = 1;
    @@ -139,9 +158,18 @@ RegCylinder::RegCylinder(LAMMPS *lmp, int narg, char **arg) :
     
     RegCylinder::~RegCylinder()
     {
    +  delete [] rstr;
       delete [] contact;
     }
     
    +/* ---------------------------------------------------------------------- */
    +
    +void RegCylinder::init()
    +{
    +  Region::init();
    +  if (rstr) variable_check();
    +}
    +
     /* ----------------------------------------------------------------------
        inside = 1 if x,y,z is inside or on surface
        inside = 0 if x,y,z is outside and not on surface
    @@ -400,3 +428,29 @@ int RegCylinder::surface_exterior(double *x, double cutoff)
         return 0;
       }
     }
    +
    +/* ----------------------------------------------------------------------
    +   change region shape via variable evaluation
    +------------------------------------------------------------------------- */
    +
    +void RegCylinder::shape_update()
    +{
    +  radius = input->variable->compute_equal(rvar);
    +  if (radius < 0.0)
    +    error->one(FLERR,"Variable evaluation in region gave bad value");
    +  if (axis == 'x') radius *= xscale;
    +  else radius *= xscale;
    +}
    +
    +/* ----------------------------------------------------------------------
    +   error check on existence of variable
    +------------------------------------------------------------------------- */
    +
    +void RegCylinder::variable_check()
    +{
    +  rvar = input->variable->find(rstr);
    +  if (rvar < 0)
    +    error->all(FLERR,"Variable name for region cylinder does not exist");
    +  if (!input->variable->equalstyle(rvar))
    +    error->all(FLERR,"Variable for region cylinder is invalid style");
    +}
    diff --git a/src/region_cylinder.h b/src/region_cylinder.h
    index 93bb74aaff..07c26ca065 100644
    --- a/src/region_cylinder.h
    +++ b/src/region_cylinder.h
    @@ -30,15 +30,22 @@ class RegCylinder : public Region {
      public:
       RegCylinder(class LAMMPS *, int, char **);
       ~RegCylinder();
    +  void init();
       int inside(double, double, double);
       int surface_interior(double *, double);
       int surface_exterior(double *, double);
    +  void shape_update();
     
      private:
       char axis;
       double c1,c2;
       double radius;
       double lo,hi;
    +  int rstyle,rvar;
    +  char *rstr;
    +
    +  void variable_check();
    +
     };
     
     }
    diff --git a/src/region_sphere.cpp b/src/region_sphere.cpp
    index 773fc4cb16..28436cc171 100644
    --- a/src/region_sphere.cpp
    +++ b/src/region_sphere.cpp
    @@ -15,9 +15,9 @@
     #include "stdlib.h"
     #include "string.h"
     #include "region_sphere.h"
    +#include "update.h"
     #include "input.h"
     #include "variable.h"
    -#include "update.h"
     #include "error.h"
     
     using namespace LAMMPS_NS;
    @@ -43,14 +43,19 @@ RegSphere::RegSphere(LAMMPS *lmp, int narg, char **arg) :
         radius = 0.0;
         rstyle = VARIABLE;
         varshape = 1;
    +    variable_check();
    +    shape_update();
       } else {
         radius = xscale*atof(arg[5]);
         rstyle = CONSTANT;
       }
     
    +  // error check
    +
       if (radius < 0.0) error->all(FLERR,"Illegal region sphere command");
     
    -  // extent of sphere, will be 0.0 for variable radius
    +  // extent of sphere
    +  // for variable radius, uses initial radius
     
       if (interior) {
         bboxflag = 1;
    @@ -79,16 +84,7 @@ RegSphere::~RegSphere()
     void RegSphere::init()
     {
       Region::init();
    -
    -  // check variable
    -
    -  if (rstr) {
    -    rvar = input->variable->find(rstr);
    -    if (rvar < 0)
    -      error->all(FLERR,"Variable name for region sphere does not exist");
    -    if (!input->variable->equalstyle(rvar))
    -      error->all(FLERR,"Variable for region sphere is invalid style");
    -  }
    +  if (rstr) variable_check();
     }
     
     /* ----------------------------------------------------------------------
    @@ -168,3 +164,16 @@ void RegSphere::shape_update()
       if (radius < 0.0)
         error->one(FLERR,"Variable evaluation in region gave bad value");
     }
    +
    +/* ----------------------------------------------------------------------
    +   error check on existence of variable
    +------------------------------------------------------------------------- */
    +
    +void RegSphere::variable_check()
    +{
    +  rvar = input->variable->find(rstr);
    +  if (rvar < 0)
    +    error->all(FLERR,"Variable name for region sphere does not exist");
    +  if (!input->variable->equalstyle(rvar))
    +    error->all(FLERR,"Variable for region sphere is invalid style");
    +}
    
    From 35769609d95cc2fa70abb0f68f8c8087129de46e Mon Sep 17 00:00:00 2001
    From: sjplimp 
    Date: Fri, 18 Jan 2013 20:55:26 +0000
    Subject: [PATCH 08/12] git-svn-id:
     svn://svn.icms.temple.edu/lammps-ro/trunk@9301
     f3b2605a-c512-4ea7-a41b-209d697bcdaa
    
    ---
     src/region.h             |  3 +--
     src/region_intersect.cpp | 29 +++++++++++++++++++++++++++--
     src/region_intersect.h   |  2 ++
     src/region_union.cpp     | 32 +++++++++++++++++++++++++++++---
     src/region_union.h       |  2 ++
     5 files changed, 61 insertions(+), 7 deletions(-)
    
    diff --git a/src/region.h b/src/region.h
    index 8f79590258..0a1d888a98 100644
    --- a/src/region.h
    +++ b/src/region.h
    @@ -28,6 +28,7 @@ class Region : protected Pointers {
       double extent_ylo,extent_yhi;
       double extent_zlo,extent_zhi;
       int bboxflag;                     // 1 if bounding box is computable
    +  int varshape;                     // 1 if region shape changes over time
     
       // contact = particle near region surface
     
    @@ -56,8 +57,6 @@ class Region : protected Pointers {
       virtual void shape_update() {}
     
      protected:
    -  int varshape;       // 1 if region shape changes over time
    -
       void add_contact(int, double *, double, double, double);
       void options(int, char **);
     
    diff --git a/src/region_intersect.cpp b/src/region_intersect.cpp
    index 736ec3c6e1..bae73952d3 100644
    --- a/src/region_intersect.cpp
    +++ b/src/region_intersect.cpp
    @@ -42,10 +42,14 @@ RegIntersect::RegIntersect(LAMMPS *lmp, int narg, char **arg) :
         list[nregion++] = iregion;
       }
     
    -  // extent of intersection of regions
    -  // has bounding box if interior and any sub-region has bounding box
    +  // this region is variable shape if any of sub-regions are
     
       Region **regions = domain->regions;
    +  for (int ilist = 0; ilist < nregion; ilist++)
    +    if (regions[list[ilist]]->varshape) varshape = 1;
    +
    +  // extent of intersection of regions
    +  // has bounding box if interior and any sub-region has bounding box
     
       bboxflag = 0;
       for (int ilist = 0; ilist < nregion; ilist++)
    @@ -91,6 +95,16 @@ RegIntersect::~RegIntersect()
       delete [] contact;
     }
     
    +/* ---------------------------------------------------------------------- */
    +
    +void RegIntersect::init()
    +{
    +  Region::init();
    +  Region **regions = domain->regions;
    +  for (int ilist = 0; ilist < nregion; ilist++)
    +    regions[list[ilist]]->init();
    +}
    +
     /* ----------------------------------------------------------------------
        return 1 if region is dynamic, 0 if static
        dynamic if any sub-region is dynamic, else static
    @@ -206,3 +220,14 @@ int RegIntersect::surface_exterior(double *x, double cutoff)
     
       return n;
     }
    +
    +/* ----------------------------------------------------------------------
    +   change region shape of all sub-regions
    +------------------------------------------------------------------------- */
    +
    +void RegIntersect::shape_update()
    +{
    +  Region **regions = domain->regions;
    +  for (int ilist = 0; ilist < nregion; ilist++)
    +    regions[list[ilist]]->shape_update();
    +}
    diff --git a/src/region_intersect.h b/src/region_intersect.h
    index a8bd460f34..62946a65c0 100644
    --- a/src/region_intersect.h
    +++ b/src/region_intersect.h
    @@ -28,10 +28,12 @@ class RegIntersect : public Region {
      public:
       RegIntersect(class LAMMPS *, int, char **);
       ~RegIntersect();
    +  void init();
       int dynamic_check();
       int inside(double, double, double);
       int surface_interior(double *, double);
       int surface_exterior(double *, double);
    +  void shape_update();
     
      private:
       int nregion;
    diff --git a/src/region_union.cpp b/src/region_union.cpp
    index ca1e693f37..3741e8fdd1 100644
    --- a/src/region_union.cpp
    +++ b/src/region_union.cpp
    @@ -38,14 +38,19 @@ RegUnion::RegUnion(LAMMPS *lmp, int narg, char **arg) : Region(lmp, narg, arg)
       int iregion;
       for (int iarg = 0; iarg < n; iarg++) {
         iregion = domain->find_region(arg[iarg+3]);
    -    if (iregion == -1) error->all(FLERR,"Region union region ID does not exist");
    +    if (iregion == -1) 
    +      error->all(FLERR,"Region union region ID does not exist");
         list[nregion++] = iregion;
       }
     
    -  // extent of union of regions
    -  // has bounding box if interior and all sub-regions have bounding box
    +  // this region is variable shape if any of sub-regions are
     
       Region **regions = domain->regions;
    +  for (int ilist = 0; ilist < nregion; ilist++)
    +    if (regions[list[ilist]]->varshape) varshape = 1;
    +
    +  // extent of union of regions
    +  // has bounding box if interior and all sub-regions have bounding box
     
       bboxflag = 1;
       for (int ilist = 0; ilist < nregion; ilist++)
    @@ -82,6 +87,16 @@ RegUnion::~RegUnion()
       delete [] contact;
     }
     
    +/* ---------------------------------------------------------------------- */
    +
    +void RegUnion::init()
    +{
    +  Region::init();
    +  Region **regions = domain->regions;
    +  for (int ilist = 0; ilist < nregion; ilist++)
    +    regions[list[ilist]]->init();
    +}
    +
     /* ----------------------------------------------------------------------
        return 1 if region is dynamic, 0 if static
        dynamic if any sub-region is dynamic, else static
    @@ -197,3 +212,14 @@ int RegUnion::surface_exterior(double *x, double cutoff)
     
       return n;
     }
    +
    +/* ----------------------------------------------------------------------
    +   change region shape of all sub-regions
    +------------------------------------------------------------------------- */
    +
    +void RegUnion::shape_update()
    +{
    +  Region **regions = domain->regions;
    +  for (int ilist = 0; ilist < nregion; ilist++)
    +    regions[list[ilist]]->shape_update();
    +}
    diff --git a/src/region_union.h b/src/region_union.h
    index 44d99375c9..6d0ec063cf 100644
    --- a/src/region_union.h
    +++ b/src/region_union.h
    @@ -28,10 +28,12 @@ class RegUnion : public Region {
      public:
       RegUnion(class LAMMPS *, int, char **);
       ~RegUnion();
    +  void init();
       int dynamic_check();
       int inside(double, double, double);
       int surface_interior(double *, double);
       int surface_exterior(double *, double);
    +  void shape_update();
     
      private:
       int nregion;
    
    From 6efc2340659c29ed9cba28b2337e9f4af0478721 Mon Sep 17 00:00:00 2001
    From: sjplimp 
    Date: Fri, 18 Jan 2013 21:00:07 +0000
    Subject: [PATCH 09/12] git-svn-id:
     svn://svn.icms.temple.edu/lammps-ro/trunk@9302
     f3b2605a-c512-4ea7-a41b-209d697bcdaa
    
    ---
     doc/region.html | 13 +++++++++++++
     doc/region.txt  | 13 +++++++++++++
     2 files changed, 26 insertions(+)
    
    diff --git a/doc/region.html b/doc/region.html
    index 58832093d3..1bd4b5392d 100644
    --- a/doc/region.html
    +++ b/doc/region.html
    @@ -31,6 +31,7 @@
         dim = x or y or z = axis of cylinder
         c1,c2 = coords of cylinder axis in other 2 dimensions (distance units)
         radius = cylinder radius (distance units)
    +      radius can be a variable (see below)
         lo,hi = bounds of cylinder in dim (distance units)
       plane args = px py pz nx ny nz
         px,py,pz = point on the plane (distance units)
    @@ -43,6 +44,7 @@
       sphere args = x y z radius
         x,y,z = center of sphere (distance units)
         radius = radius of sphere (distance units)
    +      radius can be a variable (see below)
       union args = N reg-ID1 reg-ID2 ...
         N = # of regions to follow, must be 2 or greater
         reg-ID1,reg-ID2, ... = IDs of regions to join together
    @@ -175,6 +177,17 @@ since if the maximum tilt factor is 5 (as in this example), then
     configurations with tilt = ..., -15, -5, 5, 15, 25, ... are all
     geometrically equivalent.
     

    +

    The radius value for style sphere and cylinder can be specified +as an equal-style variable. If the value is a +variable, it should be specified as v_name, where name is the variable +name. In this case, the variable will be evaluated each timestep, and +its value used to determine the radius of the region. +

    +

    Equal-style variables can specify formulas with various mathematical +functions, and include thermo_style command +keywords for the simulation box parameters and timestep and elapsed +time. Thus it is easy to specify a time-dependent radius. +

    See Section_howto 12 of the doc pages for a geometric description of triclinic boxes, as defined by LAMMPS, and how to transform these parameters to and from other commonly used diff --git a/doc/region.txt b/doc/region.txt index 74744ab501..ff79470846 100644 --- a/doc/region.txt +++ b/doc/region.txt @@ -26,6 +26,7 @@ style = {delete} or {block} or {cone} or {cylinder} or {plane} or {prism} or {sp dim = {x} or {y} or {z} = axis of cylinder c1,c2 = coords of cylinder axis in other 2 dimensions (distance units) radius = cylinder radius (distance units) + radius can be a variable (see below) lo,hi = bounds of cylinder in dim (distance units) {plane} args = px py pz nx ny nz px,py,pz = point on the plane (distance units) @@ -38,6 +39,7 @@ style = {delete} or {block} or {cone} or {cylinder} or {plane} or {prism} or {sp {sphere} args = x y z radius x,y,z = center of sphere (distance units) radius = radius of sphere (distance units) + radius can be a variable (see below) {union} args = N reg-ID1 reg-ID2 ... N = # of regions to follow, must be 2 or greater reg-ID1,reg-ID2, ... = IDs of regions to join together @@ -166,6 +168,17 @@ since if the maximum tilt factor is 5 (as in this example), then configurations with tilt = ..., -15, -5, 5, 15, 25, ... are all geometrically equivalent. +The {radius} value for style {sphere} and {cylinder} can be specified +as an equal-style "variable"_variable.html. If the value is a +variable, it should be specified as v_name, where name is the variable +name. In this case, the variable will be evaluated each timestep, and +its value used to determine the radius of the region. + +Equal-style variables can specify formulas with various mathematical +functions, and include "thermo_style"_thermo_style.html command +keywords for the simulation box parameters and timestep and elapsed +time. Thus it is easy to specify a time-dependent radius. + See "Section_howto 12"_Section_howto.html#howto_12 of the doc pages for a geometric description of triclinic boxes, as defined by LAMMPS, and how to transform these parameters to and from other commonly used From fd75622da330831ff6b488764b5475eb7578de95 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Fri, 18 Jan 2013 21:02:02 +0000 Subject: [PATCH 10/12] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@9303 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 06f5372acb..7d81684e82 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define LAMMPS_VERSION "20 Jan 2013" +#define LAMMPS_VERSION "21 Jan 2013" From 5b1fe9d76389d7a710104a2cc2cbf9e626bf13fd Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 21 Jan 2013 03:28:22 -0500 Subject: [PATCH 11/12] update /omp versions of brownian and lubricate pair styles for changes in upstream serial variants --- src/USER-OMP/pair_brownian_omp.cpp | 4 ++-- src/USER-OMP/pair_brownian_poly_omp.cpp | 4 ++-- src/USER-OMP/pair_lubricate_omp.cpp | 4 ++-- src/USER-OMP/pair_lubricate_poly_omp.cpp | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/USER-OMP/pair_brownian_omp.cpp b/src/USER-OMP/pair_brownian_omp.cpp index 561c82abf5..20cc068809 100644 --- a/src/USER-OMP/pair_brownian_omp.cpp +++ b/src/USER-OMP/pair_brownian_omp.cpp @@ -91,8 +91,8 @@ void PairBrownianOMP::compute(int eflag, int vflag) for (int m = 0; m < wallfix->nwall; m++){ int dim = wallfix->wallwhich[m] / 2; int side = wallfix->wallwhich[m] % 2; - if (wallfix->wallstyle[m] == VARIABLE){ - wallcoord = input->variable->compute_equal(wallfix->varindex[m]); + if (wallfix->xstyle[m] == VARIABLE){ + wallcoord = input->variable->compute_equal(wallfix->xindex[m]); } else wallcoord = wallfix->coord0[m]; if (side == 0) walllo[dim] = wallcoord; diff --git a/src/USER-OMP/pair_brownian_poly_omp.cpp b/src/USER-OMP/pair_brownian_poly_omp.cpp index 6affbf96cf..0378989fbc 100644 --- a/src/USER-OMP/pair_brownian_poly_omp.cpp +++ b/src/USER-OMP/pair_brownian_poly_omp.cpp @@ -91,8 +91,8 @@ void PairBrownianPolyOMP::compute(int eflag, int vflag) for (int m = 0; m < wallfix->nwall; m++){ int dim = wallfix->wallwhich[m] / 2; int side = wallfix->wallwhich[m] % 2; - if (wallfix->wallstyle[m] == VARIABLE){ - wallcoord = input->variable->compute_equal(wallfix->varindex[m]); + if (wallfix->xstyle[m] == VARIABLE){ + wallcoord = input->variable->compute_equal(wallfix->xindex[m]); } else wallcoord = wallfix->coord0[m]; if (side == 0) walllo[dim] = wallcoord; diff --git a/src/USER-OMP/pair_lubricate_omp.cpp b/src/USER-OMP/pair_lubricate_omp.cpp index 22090b2978..877be4bed2 100644 --- a/src/USER-OMP/pair_lubricate_omp.cpp +++ b/src/USER-OMP/pair_lubricate_omp.cpp @@ -85,8 +85,8 @@ void PairLubricateOMP::compute(int eflag, int vflag) for (int m = 0; m < wallfix->nwall; m++){ int dim = wallfix->wallwhich[m] / 2; int side = wallfix->wallwhich[m] % 2; - if (wallfix->wallstyle[m] == VARIABLE){ - wallcoord = input->variable->compute_equal(wallfix->varindex[m]); + if (wallfix->xstyle[m] == VARIABLE){ + wallcoord = input->variable->compute_equal(wallfix->xindex[m]); } else wallcoord = wallfix->coord0[m]; if (side == 0) walllo[dim] = wallcoord; diff --git a/src/USER-OMP/pair_lubricate_poly_omp.cpp b/src/USER-OMP/pair_lubricate_poly_omp.cpp index 26339b7749..a9161805b6 100644 --- a/src/USER-OMP/pair_lubricate_poly_omp.cpp +++ b/src/USER-OMP/pair_lubricate_poly_omp.cpp @@ -86,8 +86,8 @@ void PairLubricatePolyOMP::compute(int eflag, int vflag) for (int m = 0; m < wallfix->nwall; m++){ int dim = wallfix->wallwhich[m] / 2; int side = wallfix->wallwhich[m] % 2; - if (wallfix->wallstyle[m] == VARIABLE){ - wallcoord = input->variable->compute_equal(wallfix->varindex[m]); + if (wallfix->xstyle[m] == VARIABLE){ + wallcoord = input->variable->compute_equal(wallfix->xindex[m]); } else wallcoord = wallfix->coord0[m]; if (side == 0) walllo[dim] = wallcoord; From 7930d8b34f8d547adad3602ee63cd877e89ad730 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Mon, 21 Jan 2013 16:35:54 +0000 Subject: [PATCH 12/12] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@9306 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- doc/Section_commands.html | 111 +++++++++++++++++++------------------- doc/Section_commands.txt | 14 +++-- doc/kspace_style.html | 4 +- doc/kspace_style.txt | 4 +- doc/pair_born.html | 43 +++++++++------ doc/pair_born.txt | 41 ++++++++------ doc/pair_buck.html | 36 ++++++++----- doc/pair_buck.txt | 34 +++++++----- doc/pair_charmm.html | 28 +++++++--- doc/pair_charmm.txt | 26 ++++++--- doc/pair_coul.html | 28 ++++++---- doc/pair_coul.txt | 26 +++++---- doc/pair_lj.html | 37 ++++++++----- doc/pair_lj.txt | 35 +++++++----- 14 files changed, 289 insertions(+), 178 deletions(-) diff --git a/doc/Section_commands.html b/doc/Section_commands.html index c78886303c..4a8ea4e525 100644 --- a/doc/Section_commands.html +++ b/doc/Section_commands.html @@ -419,25 +419,26 @@ potentials. Click on the style itself for a full description:

    - - - - - - - - - + + + + + + + + + + - - - - - - - - + + + + + + +
    nonehybridhybrid/overlayadp
    airebobeckbopborn
    born/coul/longborn/coul/wolfbrownianbrownian/poly
    buckbuck/coul/cutbuck/coul/longbuck/long/coul/long
    colloidcombcoul/cutcoul/debye
    coul/dsfcoul/longcoul/wolfdipole/cut
    dpddpd/tstatdsmceam
    eam/alloyeam/fseimgauss
    gaybernegran/hertz/historygran/hookegran/hooke/history
    hbond/dreiding/ljhbond/dreiding/morsekimlcbop
    line/ljlj/charmm/coul/charmmlj/charmm/coul/charmm/implicitlj/charmm/coul/long
    born/coul/longborn/coul/msmborn/coul/wolfbrownian
    brownian/polybuckbuck/coul/cutbuck/coul/long
    buck/coul/msmbuck/long/coul/longcolloidcomb
    coul/cutcoul/debyecoul/dsfcoul/long
    coul/msmcoul/wolfdipole/cutdpd
    dpd/tstatdsmceameam/alloy
    eam/fseimgaussgayberne
    gran/hertz/historygran/hookegran/hooke/historyhbond/dreiding/lj
    hbond/dreiding/morsekimlcbopline/lj
    lj/charmm/coul/charmmlj/charmm/coul/charmm/implicitlj/charmm/coul/longlj/charmm/coul/msm
    lj/class2lj/class2/coul/cutlj/class2/coul/longlj/cut
    lj/cut/coul/cutlj/cut/coul/debyelj/cut/coul/dsflj/cut/coul/long
    lj/long/coul/longlj/cut/tip4p/longlj/long/tip4p/longlj/expand
    lj/gromacslj/gromacs/coul/gromacslj/smoothlj/smooth/linear
    lj96/cutlubricatelubricate/polylubricateU
    lubricateU/polymeammie/cutmorse
    peri/lpsperi/pmbreaxrebo
    resquaredsoftswtable
    tersofftersoff/zbltri/ljyukawa
    yukawa/colloid +
    lj/cut/coul/msmlj/long/coul/longlj/cut/tip4p/longlj/long/tip4p/long
    lj/expandlj/gromacslj/gromacs/coul/gromacslj/smooth
    lj/smooth/linearlj96/cutlubricatelubricate/poly
    lubricateUlubricateU/polymeammie/cut
    morseperi/lpsperi/pmbreax
    reboresquaredsoftsw
    tabletersofftersoff/zbltri/lj
    yukawayukawa/colloid

    These are pair styles contributed by users, which can be used if @@ -458,42 +459,42 @@ package.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    adp/ompairebo/ompbeck/ompborn/coul/long/cuda
    born/coul/long/gpuborn/coul/long/ompborn/coul/wolf/gpuborn/coul/wolf/omp
    born/gpuborn/ompbrownian/ompbrownian/poly/omp
    buck/coul/cut/cudabuck/coul/cut/gpubuck/coul/cut/ompbuck/coul/long/cuda
    buck/coul/long/gpubuck/coul/long/ompbuck/cudabuck/long/coul/long/omp
    buck/gpubuck/ompcolloid/gpucolloid/omp
    comb/ompcoul/cut/ompcoul/debye/ompcoul/dsf/gpu
    coul/long/gpucoul/long/ompcoul/wolfdipole/cut/gpu
    dipole/cut/ompdipole/sf/gpudipole/sf/ompdpd/omp
    dpd/tstat/ompeam/alloy/cudaeam/alloy/gpueam/alloy/omp
    eam/alloy/opteam/cd/ompeam/cudaeam/fs/cuda
    eam/fs/gpueam/fs/ompeam/fs/opteam/gpu
    eam/ompeam/optedip/ompeim/omp
    gauss/gpugauss/ompgayberne/gpugayberne/omp
    gran/hertz/history/ompgran/hooke/cudagran/hooke/history/ompgran/hooke/omp
    hbond/dreiding/lj/omphbond/dreiding/morse/ompline/lj/omplj/charmm/coul/charmm/cuda
    lj/charmm/coul/charmm/omplj/charmm/coul/charmm/implicit/cudalj/charmm/coul/charmm/implicit/omplj/charmm/coul/long/cuda
    lj/charmm/coul/long/gpulj/charmm/coul/long/omplj/charmm/coul/long/optlj/charmm/coul/pppm/omp
    lj/class2/coul/cut/cudalj/class2/coul/cut/omplj/class2/coul/long/cudalj/class2/coul/long/gpu
    lj/class2/coul/pppm/omplj/class2/coul/long/omplj/class2/cudalj/class2/gpu
    lj/class2/omplj/long/coul/long/omplj/cut/coul/cut/cudalj/cut/coul/cut/gpu
    lj/cut/coul/cut/omplj/cut/coul/debye/cudalj/cut/coul/debye/gpulj/cut/coul/debye/omp
    lj/cut/coul/dsf/gpulj/cut/coul/long/cudalj/cut/coul/long/gpulj/cut/coul/long/omp
    lj/cut/coul/long/optlj/cut/coul/pppm/omplj/cut/cudalj/cut/experimental/cuda
    lj/cut/gpulj/cut/omplj/cut/optlj/cut/tip4p/long/omp
    lj/cut/tip4p/long/optlj/expand/cudalj/expand/gpulj/expand/omp
    lj/gromacs/coul/gromacs/cudalj/gromacs/coul/gromacs/omplj/gromacs/cudalj/gromacs/omp
    lj/sdk/gpulj/sdk/omplj/sdk/coul/long/gpulj/sdk/coul/long/omp
    lj/sf/omplj/smooth/cudalj/smooth/omplj/smooth/linear/omp
    lj96/cut/cudalj96/cut/gpulj96/cut/omplubricate/omp
    lubricate/poly/ompmeam/spline/ompmorse/cudamorse/gpu
    morse/ompmorse/optperi/lps/ompperi/pmb/omp
    rebo/ompresquared/gpuresquared/ompsoft/omp
    sw/cudasw/omptable/gputable/omp
    tersoff/cudatersoff/omptersoff/table/omptersoff/zbl/omp
    tri/lj/ompyukawa/gpuyukawa/ompyukawa/colloid/gpu
    yukawa/colloid/omp +
    born/coul/long/gpuborn/coul/long/ompborn/coul/msm/ompborn/coul/wolf/gpu
    born/coul/wolf/ompborn/gpuborn/ompbrownian/omp
    brownian/poly/ompbuck/coul/cut/cudabuck/coul/cut/gpubuck/coul/cut/omp
    buck/coul/long/cudabuck/coul/long/gpubuck/coul/long/ompbuck/coul/msm/omp
    buck/cudabuck/long/coul/long/ompbuck/gpubuck/omp
    colloid/gpucolloid/ompcomb/ompcoul/cut/omp
    coul/debye/ompcoul/dsf/gpucoul/long/gpucoul/long/omp
    coul/msm/ompcoul/wolfdipole/cut/gpudipole/cut/omp
    dipole/sf/gpudipole/sf/ompdpd/ompdpd/tstat/omp
    eam/alloy/cudaeam/alloy/gpueam/alloy/ompeam/alloy/opt
    eam/cd/ompeam/cudaeam/fs/cudaeam/fs/gpu
    eam/fs/ompeam/fs/opteam/gpueam/omp
    eam/optedip/ompeim/ompgauss/gpu
    gauss/ompgayberne/gpugayberne/ompgran/hertz/history/omp
    gran/hooke/cudagran/hooke/history/ompgran/hooke/omphbond/dreiding/lj/omp
    hbond/dreiding/morse/ompline/lj/omplj/charmm/coul/charmm/cudalj/charmm/coul/charmm/omp
    lj/charmm/coul/charmm/implicit/cudalj/charmm/coul/charmm/implicit/omplj/charmm/coul/long/cudalj/charmm/coul/long/gpu
    lj/charmm/coul/long/omplj/charmm/coul/long/optlj/class2/coul/cut/cudalj/class2/coul/cut/omp
    lj/class2/coul/long/cudalj/class2/coul/long/gpulj/class2/coul/long/omplj/class2/coul/msm/omp
    lj/class2/cudalj/class2/gpulj/class2/omplj/long/coul/long/omp
    lj/cut/coul/cut/cudalj/cut/coul/cut/gpulj/cut/coul/cut/omplj/cut/coul/debye/cuda
    lj/cut/coul/debye/gpulj/cut/coul/debye/omplj/cut/coul/dsf/gpulj/cut/coul/long/cuda
    lj/cut/coul/long/gpulj/cut/coul/long/omplj/cut/coul/long/optlj/cut/coul/msm/opt
    lj/cut/cudalj/cut/experimental/cudalj/cut/gpulj/cut/omp
    lj/cut/optlj/cut/tip4p/long/omplj/cut/tip4p/long/optlj/expand/cuda
    lj/expand/gpulj/expand/omplj/gromacs/coul/gromacs/cudalj/gromacs/coul/gromacs/omp
    lj/gromacs/cudalj/gromacs/omplj/sdk/gpulj/sdk/omp
    lj/sdk/coul/long/gpulj/sdk/coul/long/omplj/sf/omplj/smooth/cuda
    lj/smooth/omplj/smooth/linear/omplj96/cut/cudalj96/cut/gpu
    lj96/cut/omplubricate/omplubricate/poly/ompmeam/spline/omp
    morse/cudamorse/gpumorse/ompmorse/opt
    peri/lps/ompperi/pmb/omprebo/ompresquared/gpu
    resquared/ompsoft/ompsw/cudasw/omp
    table/gputable/omptersoff/cudatersoff/omp
    tersoff/table/omptersoff/zbl/omptri/lj/ompyukawa/gpu
    yukawa/ompyukawa/colloid/gpuyukawa/colloid/omp

    @@ -637,8 +638,8 @@ built with the appropriate accelerated package.

    diff --git a/doc/Section_commands.txt b/doc/Section_commands.txt index 22b70d6d6b..ceb459d4cc 100644 --- a/doc/Section_commands.txt +++ b/doc/Section_commands.txt @@ -636,12 +636,14 @@ potentials. Click on the style itself for a full description: "bop"_pair_bop.html, "born"_pair_born.html, "born/coul/long"_pair_born.html, +"born/coul/msm"_pair_born.html, "born/coul/wolf"_pair_born.html, "brownian"_pair_brownian.html, "brownian/poly"_pair_brownian.html, "buck"_pair_buck.html, "buck/coul/cut"_pair_buck.html, "buck/coul/long"_pair_buck.html, +"buck/coul/msm"_pair_buck.html, "buck/long/coul/long"_pair_buck_long.html, "colloid"_pair_colloid.html, "comb"_pair_comb.html, @@ -649,6 +651,7 @@ potentials. Click on the style itself for a full description: "coul/debye"_pair_coul.html, "coul/dsf"_pair_coul.html, "coul/long"_pair_coul.html, +"coul/msm"_pair_coul.html, "coul/wolf"_pair_coul.html, "dipole/cut"_pair_dipole.html, "dpd"_pair_dpd.html, @@ -671,6 +674,7 @@ potentials. Click on the style itself for a full description: "lj/charmm/coul/charmm"_pair_charmm.html, "lj/charmm/coul/charmm/implicit"_pair_charmm.html, "lj/charmm/coul/long"_pair_charmm.html, +"lj/charmm/coul/msm"_pair_charmm.html, "lj/class2"_pair_class2.html, "lj/class2/coul/cut"_pair_class2.html, "lj/class2/coul/long"_pair_class2.html, @@ -679,6 +683,7 @@ potentials. Click on the style itself for a full description: "lj/cut/coul/debye"_pair_lj.html, "lj/cut/coul/dsf"_pair_lj.html, "lj/cut/coul/long"_pair_lj.html, +"lj/cut/coul/msm"_pair_lj.html, "lj/long/coul/long"_pair_lj_long.html, "lj/cut/tip4p/long"_pair_lj.html, "lj/long/tip4p/long"_pair_lj_long.html, @@ -744,6 +749,7 @@ package"_Section_accelerate.html. "born/coul/long/cuda"_pair_born.html, "born/coul/long/gpu"_pair_born.html, "born/coul/long/omp"_pair_born.html, +"born/coul/msm/omp"_pair_born.html, "born/coul/wolf/gpu"_pair_born.html, "born/coul/wolf/omp"_pair_born.html, "born/gpu"_pair_born.html, @@ -756,6 +762,7 @@ package"_Section_accelerate.html. "buck/coul/long/cuda"_pair_buck.html, "buck/coul/long/gpu"_pair_buck.html, "buck/coul/long/omp"_pair_buck.html, +"buck/coul/msm/omp"_pair_buck.html, "buck/cuda"_pair_buck.html, "buck/long/coul/long/omp"_pair_buck_long.html, "buck/gpu"_pair_buck.html, @@ -768,6 +775,7 @@ package"_Section_accelerate.html. "coul/dsf/gpu"_pair_coul.html, "coul/long/gpu"_pair_coul.html, "coul/long/omp"_pair_coul.html, +"coul/msm/omp"_pair_coul.html, "coul/wolf"_pair_coul.html, "dipole/cut/gpu"_pair_dipole.html, "dipole/cut/omp"_pair_dipole.html, @@ -809,13 +817,12 @@ package"_Section_accelerate.html. "lj/charmm/coul/long/gpu"_pair_charmm.html, "lj/charmm/coul/long/omp"_pair_charmm.html, "lj/charmm/coul/long/opt"_pair_charmm.html, -"lj/charmm/coul/pppm/omp"_pair_charmm.html, "lj/class2/coul/cut/cuda"_pair_class2.html, "lj/class2/coul/cut/omp"_pair_class2.html, "lj/class2/coul/long/cuda"_pair_class2.html, "lj/class2/coul/long/gpu"_pair_class2.html, -"lj/class2/coul/pppm/omp"_pair_class2.html, "lj/class2/coul/long/omp"_pair_class2.html, +"lj/class2/coul/msm/omp"_pair_class2.html, "lj/class2/cuda"_pair_class2.html, "lj/class2/gpu"_pair_class2.html, "lj/class2/omp"_pair_class2.html, @@ -831,7 +838,7 @@ package"_Section_accelerate.html. "lj/cut/coul/long/gpu"_pair_lj.html, "lj/cut/coul/long/omp"_pair_lj.html, "lj/cut/coul/long/opt"_pair_lj.html, -"lj/cut/coul/pppm/omp"_pair_lj.html, +"lj/cut/coul/msm/opt"_pair_lj.html, "lj/cut/cuda"_pair_lj.html, "lj/cut/experimental/cuda"_pair_lj.html, "lj/cut/gpu"_pair_lj.html, @@ -1065,6 +1072,7 @@ built with the "appropriate accelerated package"_Section_accelerate.html. "ewald/omp"_kspace_style.html, +"msm/omp"_kspace_style.html, "pppm/cuda"_kspace_style.html, "pppm/gpu"_kspace_style.html, "pppm/omp"_kspace_style.html, diff --git a/doc/kspace_style.html b/doc/kspace_style.html index c1f33d20c1..0042ff4e95 100644 --- a/doc/kspace_style.html +++ b/doc/kspace_style.html @@ -15,7 +15,7 @@

    kspace_style style value 
     
    -
    • style = none or ewald or ewald/disp or ewald/omp or pppm or pppm/cg or pppm/disp or pppm/tip4p or pppm/disp/tip4p or pppm/gpu or pppm/omp or pppm/cg/omp or pppm/tip4p/omp or msm +
      • style = none or ewald or ewald/disp or ewald/omp or pppm or pppm/cg or pppm/disp or pppm/tip4p or pppm/disp/tip4p or pppm/gpu or pppm/omp or pppm/cg/omp or pppm/tip4p/omp or msm or msm/omp
          none value = none
           ewald value = accuracy
        @@ -44,6 +44,8 @@
           pppm/tip4p/omp value = accuracy
             accuracy = desired relative error in forces
           msm value = accuracy
        +    accuracy = desired relative error in forces
        +  msm/omp value = accuracy
             accuracy = desired relative error in forces 
         
        diff --git a/doc/kspace_style.txt b/doc/kspace_style.txt index 5f0bed56ed..863d412a0e 100644 --- a/doc/kspace_style.txt +++ b/doc/kspace_style.txt @@ -12,7 +12,7 @@ kspace_style command :h3 kspace_style style value :pre -style = {none} or {ewald} or {ewald/disp} or {ewald/omp} or {pppm} or {pppm/cg} or {pppm/disp} or {pppm/tip4p} or {pppm/disp/tip4p} or {pppm/gpu} or {pppm/omp} or {pppm/cg/omp} or {pppm/tip4p/omp} or {msm} :ulb,l +style = {none} or {ewald} or {ewald/disp} or {ewald/omp} or {pppm} or {pppm/cg} or {pppm/disp} or {pppm/tip4p} or {pppm/disp/tip4p} or {pppm/gpu} or {pppm/omp} or {pppm/cg/omp} or {pppm/tip4p/omp} or {msm} or {msm/omp} :ulb,l {none} value = none {ewald} value = accuracy accuracy = desired relative error in forces @@ -40,6 +40,8 @@ style = {none} or {ewald} or {ewald/disp} or {ewald/omp} or {pppm} or {pppm/cg} {pppm/tip4p/omp} value = accuracy accuracy = desired relative error in forces {msm} value = accuracy + accuracy = desired relative error in forces + {msm/omp} value = accuracy accuracy = desired relative error in forces :pre :ule diff --git a/doc/pair_born.html b/doc/pair_born.html index bd0f492ce8..c30a7093eb 100644 --- a/doc/pair_born.html +++ b/doc/pair_born.html @@ -23,6 +23,10 @@

        pair_style born/coul/long/omp command

        +

        pair_style born/coul/msm command +

        +

        pair_style born/coul/msm/omp command +

        pair_style born/coul/wolf command

        pair_style born/coul/wolf/gpu command @@ -33,7 +37,7 @@

        pair_style style args 
         
        -
        • style = born or born/coul/long or born/coul/wolf +
          • style = born or born/coul/long or born/coul/msm or born/coul/wolf
          • args = list of arguments for a particular style
            born args = cutoff
          @@ -41,6 +45,9 @@
             born/coul/long args = cutoff (cutoff2)
               cutoff = global cutoff for non-Coulombic (and Coulombic if only 1 arg) (distance units)
               cutoff2 = global cutoff for Coulombic (optional) (distance units)
          +  born/coul/msm args = cutoff (cutoff2)
          +    cutoff = global cutoff for non-Coulombic (and Coulombic if only 1 arg) (distance units)
          +    cutoff2 = global cutoff for Coulombic (optional) (distance units)
             born/coul/wolf args = alpha cutoff (cutoff2)
               alpha = damping parameter (inverse distance units)
               cutoff = global cutoff for non-Coulombic (and Coulombic if only 1 arg) (distance units)
          @@ -57,6 +64,11 @@ pair_style born/coul/long 10.0 8.0
           pair_coeff * * 6.08 0.317 2.340 24.18 11.51
           pair_coeff 1 1 6.08 0.317 2.340 24.18 11.51 
           
          +
          pair_style born/coul/msm 10.0
          +pair_style born/coul/msm 10.0 8.0
          +pair_coeff * * 6.08 0.317 2.340 24.18 11.51
          +pair_coeff 1 1 6.08 0.317 2.340 24.18 11.51 
          +
          pair_style born/coul/wolf 0.25 10.0
           pair_style born/coul/wolf 0.25 10.0 9.0
           pair_coeff * * 6.08 0.317 2.340 24.18 11.51
          @@ -72,27 +84,24 @@ potential described in (Fumi and Tosi), given by
           

          where sigma is an interaction-dependent length parameter, rho is an ionic-pair dependent length parameter, and Rc is the cutoff.

          -

          The born/coul/long style adds a Coulombic term as described for the -coul/long pair style. An additional damping factor -is applied to the Coulombic term so it can be used in conjunction with -the kspace_style command and its ewald or pppm -option. The Coulombic cutoff specified for this style means that -pairwise interactions within this distance are computed directly; -interactions outside that distance are computed in reciprocal space. +

          The styles with coul/long or coul/msm add a Coulombic term as +described for the lj/cut pair styles. An additional +damping factor is applied to the Coulombic term so it can be used in +conjunction with the kspace_style command and its +ewald or pppm of msm option. The Coulombic cutoff specified for +this style means that pairwise interactions within this distance are +computed directly; interactions outside that distance are computed in +reciprocal space.

          -

          If one cutoff is specified for the born/coul/long style, it is used -for both the A,C,D and Coulombic terms. If two cutoffs are specified, -the first is used as the cutoff for the A,C,D terms, and the second is -the cutoff for the Coulombic term. +

          If one cutoff is specified for the born/coul/long and +born/coul/msm style, it is used for both the A,C,D and Coulombic +terms. If two cutoffs are specified, the first is used as the cutoff +for the A,C,D terms, and the second is the cutoff for the Coulombic +term.

          The born/coul/wolf style adds a Coulombic term as described for the Wolf potential in the coul/wolf pair style.

          -

          If one cutoff is specified for the born/coulk/long style, it is used -for both the A,C,D and Coulombic terms. If two cutoffs are specified, -the first is used as the cutoff for the A,C,D terms, and the second is -the cutoff for the Coulombic term. -

          Note that these potentials are related to the Buckingham potential.

          diff --git a/doc/pair_born.txt b/doc/pair_born.txt index 57fb3471c1..e8cbbb4437 100644 --- a/doc/pair_born.txt +++ b/doc/pair_born.txt @@ -14,6 +14,8 @@ pair_style born/coul/long command :h3 pair_style born/coul/long/cuda command :h3 pair_style born/coul/long/gpu command :h3 pair_style born/coul/long/omp command :h3 +pair_style born/coul/msm command :h3 +pair_style born/coul/msm/omp command :h3 pair_style born/coul/wolf command :h3 pair_style born/coul/wolf/gpu command :h3 pair_style born/coul/wolf/omp command :h3 @@ -22,13 +24,16 @@ pair_style born/coul/wolf/omp command :h3 pair_style style args :pre -style = {born} or {born/coul/long} or {born/coul/wolf} +style = {born} or {born/coul/long} or {born/coul/msm} or {born/coul/wolf} args = list of arguments for a particular style :ul {born} args = cutoff cutoff = global cutoff for non-Coulombic interactions (distance units) {born/coul/long} args = cutoff (cutoff2) cutoff = global cutoff for non-Coulombic (and Coulombic if only 1 arg) (distance units) cutoff2 = global cutoff for Coulombic (optional) (distance units) + {born/coul/msm} args = cutoff (cutoff2) + cutoff = global cutoff for non-Coulombic (and Coulombic if only 1 arg) (distance units) + cutoff2 = global cutoff for Coulombic (optional) (distance units) {born/coul/wolf} args = alpha cutoff (cutoff2) alpha = damping parameter (inverse distance units) cutoff = global cutoff for non-Coulombic (and Coulombic if only 1 arg) (distance units) @@ -45,6 +50,11 @@ pair_style born/coul/long 10.0 8.0 pair_coeff * * 6.08 0.317 2.340 24.18 11.51 pair_coeff 1 1 6.08 0.317 2.340 24.18 11.51 :pre +pair_style born/coul/msm 10.0 +pair_style born/coul/msm 10.0 8.0 +pair_coeff * * 6.08 0.317 2.340 24.18 11.51 +pair_coeff 1 1 6.08 0.317 2.340 24.18 11.51 :pre + pair_style born/coul/wolf 0.25 10.0 pair_style born/coul/wolf 0.25 10.0 9.0 pair_coeff * * 6.08 0.317 2.340 24.18 11.51 @@ -60,27 +70,24 @@ potential described in "(Fumi and Tosi)"_#FumiTosi, given by where sigma is an interaction-dependent length parameter, rho is an ionic-pair dependent length parameter, and Rc is the cutoff. -The {born/coul/long} style adds a Coulombic term as described for the -"coul/long"_pair_coul.html pair style. An additional damping factor -is applied to the Coulombic term so it can be used in conjunction with -the "kspace_style"_kspace_style.html command and its {ewald} or {pppm} -option. The Coulombic cutoff specified for this style means that -pairwise interactions within this distance are computed directly; -interactions outside that distance are computed in reciprocal space. +The styles with {coul/long} or {coul/msm} add a Coulombic term as +described for the "lj/cut"_pair_lj.html pair styles. An additional +damping factor is applied to the Coulombic term so it can be used in +conjunction with the "kspace_style"_kspace_style.html command and its +{ewald} or {pppm} of {msm} option. The Coulombic cutoff specified for +this style means that pairwise interactions within this distance are +computed directly; interactions outside that distance are computed in +reciprocal space. -If one cutoff is specified for the {born/coul/long} style, it is used -for both the A,C,D and Coulombic terms. If two cutoffs are specified, -the first is used as the cutoff for the A,C,D terms, and the second is -the cutoff for the Coulombic term. +If one cutoff is specified for the {born/coul/long} and +{born/coul/msm} style, it is used for both the A,C,D and Coulombic +terms. If two cutoffs are specified, the first is used as the cutoff +for the A,C,D terms, and the second is the cutoff for the Coulombic +term. The {born/coul/wolf} style adds a Coulombic term as described for the Wolf potential in the "coul/wolf"_pair_coul.html pair style. -If one cutoff is specified for the {born/coulk/long} style, it is used -for both the A,C,D and Coulombic terms. If two cutoffs are specified, -the first is used as the cutoff for the A,C,D terms, and the second is -the cutoff for the Coulombic term. - Note that these potentials are related to the "Buckingham potential"_pair_born.html. diff --git a/doc/pair_buck.html b/doc/pair_buck.html index f3f9737380..84a9ea5813 100644 --- a/doc/pair_buck.html +++ b/doc/pair_buck.html @@ -33,11 +33,15 @@

        pair_style buck/coul/long/omp command

        +

        pair_style buck/coul/msm command +

        +

        pair_style buck/coul/msm/omp command +

        Syntax:

        pair_style style args 
         
        -
        • style = buck or buck/coul/cut or buck/coul/long +
          • style = buck or buck/coul/cut or buck/coul/long or buck/coul/msm
          • args = list of arguments for a particular style
            buck args = cutoff
          @@ -46,6 +50,9 @@
               cutoff = global cutoff for Buckingham (and Coulombic if only 1 arg) (distance units)
               cutoff2 = global cutoff for Coulombic (optional) (distance units)
             buck/coul/long args = cutoff (cutoff2)
          +    cutoff = global cutoff for Buckingham (and Coulombic if only 1 arg) (distance units)
          +    cutoff2 = global cutoff for Coulombic (optional) (distance units)
          +  buck/coul/msm args = cutoff (cutoff2)
               cutoff = global cutoff for Buckingham (and Coulombic if only 1 arg) (distance units)
               cutoff2 = global cutoff for Coulombic (optional) (distance units) 
           
          @@ -66,6 +73,11 @@ pair_style buck/coul/long 10.0 8.0 pair_coeff * * 100.0 1.5 200.0 pair_coeff 1 1 100.0 1.5 200.0 9.0
    +
    pair_style buck/coul/msm 10.0
    +pair_style buck/coul/msm 10.0 8.0
    +pair_coeff * * 100.0 1.5 200.0
    +pair_coeff 1 1 100.0 1.5 200.0 9.0 
    +

    Description:

    The buck style computes a Buckingham potential (exp/6 instead of @@ -76,20 +88,20 @@ Lennard-Jones 12/6) given by

    where rho is an ionic-pair dependent length parameter, and Rc is the cutoff.

    -

    The buck/coul/cut and buck/coul/long styles add a Coulombic term -as described for the lj/cut pair styles. For -buck/coul/long, an additional damping factor is applied to the -Coulombic term so it can be used in conjunction with the -kspace_style command and its ewald or pppm -option. The Coulombic cutoff specified for this style means that -pairwise interactions within this distance are computed directly; +

    The styles with coul/cut or coul/long or coul/msm add a +Coulombic term as described for the lj/cut pair styles. +For buck/coul/long and buc/coul/msm, an additional damping factor +is applied to the Coulombic term so it can be used in conjunction with +the kspace_style command and its ewald or pppm +or msm option. The Coulombic cutoff specified for this style means +that pairwise interactions within this distance are computed directly; interactions outside that distance are computed in reciprocal space.

    If one cutoff is specified for the born/coul/cut and -born/coulk/long styles, it is used for both the A,C and Coulombic -terms. If two cutoffs are specified, the first is used as the cutoff -for the A,C terms, and the second is the cutoff for the Coulombic -term. +born/coul/long and born/coul/msm styles, it is used for both the +A,C and Coulombic terms. If two cutoffs are specified, the first is +used as the cutoff for the A,C terms, and the second is the cutoff for +the Coulombic term.

    Note that these potentials are related to the Born-Mayer-Huggins potential. diff --git a/doc/pair_buck.txt b/doc/pair_buck.txt index f2d2b22650..1b8c02789d 100644 --- a/doc/pair_buck.txt +++ b/doc/pair_buck.txt @@ -18,12 +18,14 @@ pair_style buck/coul/long command :h3 pair_style buck/coul/long/cuda command :h3 pair_style buck/coul/long/gpu command :h3 pair_style buck/coul/long/omp command :h3 +pair_style buck/coul/msm command :h3 +pair_style buck/coul/msm/omp command :h3 [Syntax:] pair_style style args :pre -style = {buck} or {buck/coul/cut} or {buck/coul/long} +style = {buck} or {buck/coul/cut} or {buck/coul/long} or {buck/coul/msm} args = list of arguments for a particular style :ul {buck} args = cutoff cutoff = global cutoff for Buckingham interactions (distance units) @@ -31,6 +33,9 @@ args = list of arguments for a particular style :ul cutoff = global cutoff for Buckingham (and Coulombic if only 1 arg) (distance units) cutoff2 = global cutoff for Coulombic (optional) (distance units) {buck/coul/long} args = cutoff (cutoff2) + cutoff = global cutoff for Buckingham (and Coulombic if only 1 arg) (distance units) + cutoff2 = global cutoff for Coulombic (optional) (distance units) + {buck/coul/msm} args = cutoff (cutoff2) cutoff = global cutoff for Buckingham (and Coulombic if only 1 arg) (distance units) cutoff2 = global cutoff for Coulombic (optional) (distance units) :pre @@ -51,6 +56,11 @@ pair_style buck/coul/long 10.0 8.0 pair_coeff * * 100.0 1.5 200.0 pair_coeff 1 1 100.0 1.5 200.0 9.0 :pre +pair_style buck/coul/msm 10.0 +pair_style buck/coul/msm 10.0 8.0 +pair_coeff * * 100.0 1.5 200.0 +pair_coeff 1 1 100.0 1.5 200.0 9.0 :pre + [Description:] The {buck} style computes a Buckingham potential (exp/6 instead of @@ -61,20 +71,20 @@ Lennard-Jones 12/6) given by where rho is an ionic-pair dependent length parameter, and Rc is the cutoff. -The {buck/coul/cut} and {buck/coul/long} styles add a Coulombic term -as described for the "lj/cut"_pair_lj.html pair styles. For -{buck/coul/long}, an additional damping factor is applied to the -Coulombic term so it can be used in conjunction with the -"kspace_style"_kspace_style.html command and its {ewald} or {pppm} -option. The Coulombic cutoff specified for this style means that -pairwise interactions within this distance are computed directly; +The styles with {coul/cut} or {coul/long} or {coul/msm} add a +Coulombic term as described for the "lj/cut"_pair_lj.html pair styles. +For {buck/coul/long} and {buc/coul/msm}, an additional damping factor +is applied to the Coulombic term so it can be used in conjunction with +the "kspace_style"_kspace_style.html command and its {ewald} or {pppm} +or {msm} option. The Coulombic cutoff specified for this style means +that pairwise interactions within this distance are computed directly; interactions outside that distance are computed in reciprocal space. If one cutoff is specified for the {born/coul/cut} and -{born/coulk/long} styles, it is used for both the A,C and Coulombic -terms. If two cutoffs are specified, the first is used as the cutoff -for the A,C terms, and the second is the cutoff for the Coulombic -term. +{born/coul/long} and {born/coul/msm} styles, it is used for both the +A,C and Coulombic terms. If two cutoffs are specified, the first is +used as the cutoff for the A,C terms, and the second is the cutoff for +the Coulombic term. Note that these potentials are related to the "Born-Mayer-Huggins potential"_pair_born.html. diff --git a/doc/pair_charmm.html b/doc/pair_charmm.html index 76a844a12d..76081e24c3 100644 --- a/doc/pair_charmm.html +++ b/doc/pair_charmm.html @@ -31,11 +31,15 @@

    pair_style lj/charmm/coul/long/omp command

    +

    pair_style lj/charmm/coul/msm command +

    +

    pair_style lj/charmm/coul/msm/omp command +

    Syntax:

    pair_style style args 
     
    -