diff -Naur lammps-3Jan08/doc/compute_stress_atom.html lammps-4Jan08/doc/compute_stress_atom.html --- lammps-3Jan08/doc/compute_stress_atom.html 2007-11-30 16:39:04.000000000 -0700 +++ lammps-4Jan08/doc/compute_stress_atom.html 2008-01-03 12:03:15.000000000 -0700 @@ -81,13 +81,13 @@ system.
These lines in an input script should yield that result (assuming -there is no fix or long-range contribution to the stress): +there is no fix or long-range contribution to the stress). I.e. the +last 2 columns of thermo output will be the same:
-compute global all pressure thermo_temp -compute peratom all stress/atom -compute p all sum peratom -variable p equal div(add(add(c_p1,c_p2),c_p3),mult(3.0,vol)) -thermo_style custom step temp etotal c_global v_p +compute peratom all stress/atom +compute p all sum peratom1 peratom2 peratom3 +variable press equal -(c_p1+c_p2+c_p3)/(3*vol) +thermo_style custom step temp etotal press v_pressIMPORTANT NOTE: The per-atom stress does NOT include contributions due to fixes (e.g. SHAKE) or long-range Coulombic diff -Naur lammps-3Jan08/doc/compute_stress_atom.txt lammps-4Jan08/doc/compute_stress_atom.txt --- lammps-3Jan08/doc/compute_stress_atom.txt 2007-11-30 16:39:04.000000000 -0700 +++ lammps-4Jan08/doc/compute_stress_atom.txt 2008-01-03 12:03:15.000000000 -0700 @@ -77,13 +77,13 @@ system. These lines in an input script should yield that result (assuming -there is no fix or long-range contribution to the stress): +there is no fix or long-range contribution to the stress). I.e. the +last 2 columns of thermo output will be the same: -compute global all pressure thermo_temp compute peratom all stress/atom -compute p all sum peratom -variable p equal div(add(add(c_p[1],c_p[2]),c_p[3]),mult(3.0,vol)) -thermo_style custom step temp etotal c_global v_p :pre +compute p all sum peratom[1] peratom[2] peratom[3] +variable press equal -(c_p[1]+c_p[2]+c_p[3])/(3*vol) +thermo_style custom step temp etotal press v_press :pre IMPORTANT NOTE: The per-atom stress does NOT include contributions due to fixes (e.g. "SHAKE"_fix_shake.html) or long-range Coulombic diff -Naur lammps-3Jan08/src/input.cpp lammps-4Jan08/src/input.cpp --- lammps-3Jan08/src/input.cpp 2008-01-02 12:24:46.000000000 -0700 +++ lammps-4Jan08/src/input.cpp 2008-01-03 11:57:32.000000000 -0700 @@ -450,6 +450,7 @@ else if (!strcmp(command,"thermo_modify")) thermo_modify(); else if (!strcmp(command,"thermo_style")) thermo_style(); else if (!strcmp(command,"timestep")) timestep(); + else if (!strcmp(command,"uncompute")) uncompute(); else if (!strcmp(command,"undump")) undump(); else if (!strcmp(command,"unfix")) unfix(); else if (!strcmp(command,"units")) units(); @@ -1122,6 +1123,14 @@ /* ---------------------------------------------------------------------- */ +void Input::uncompute() +{ + if (narg != 1) error->all("Illegal uncompute command"); + modify->delete_compute(arg[0]); +} + +/* ---------------------------------------------------------------------- */ + void Input::undump() { if (narg != 1) error->all("Illegal undump command"); diff -Naur lammps-3Jan08/src/input.h lammps-4Jan08/src/input.h --- lammps-3Jan08/src/input.h 2007-06-20 07:17:59.000000000 -0600 +++ lammps-4Jan08/src/input.h 2008-01-03 11:57:32.000000000 -0700 @@ -107,6 +107,7 @@ void thermo_modify(); void thermo_style(); void timestep(); + void uncompute(); void undump(); void unfix(); void units(); diff -Naur lammps-3Jan08/src/modify.cpp lammps-4Jan08/src/modify.cpp --- lammps-3Jan08/src/modify.cpp 2008-01-02 12:24:46.000000000 -0700 +++ lammps-4Jan08/src/modify.cpp 2008-01-03 11:57:32.000000000 -0700 @@ -95,6 +95,11 @@ memory->sfree(fix); memory->sfree(fmask); + // delete all computes + + for (int i = 0; i < ncompute; i++) delete compute[i]; + memory->sfree(compute); + delete [] list_initial_integrate; delete [] list_pre_exchange; delete [] list_pre_neighbor; @@ -109,15 +114,9 @@ delete [] list_min_energy; delete [] end_of_step_every; - delete [] list_timeflag; restart_deallocate(); - - // delete all computes - - for (int i = 0; i < ncompute; i++) delete compute[i]; - memory->sfree(compute); } /* ----------------------------------------------------------------------