diff --git a/examples/USER/misc/grem/lj-6rep/405/in.gREM b/examples/USER/misc/grem/lj-6rep/405/in.gREM deleted file mode 100644 index 13eff937b2..0000000000 --- a/examples/USER/misc/grem/lj-6rep/405/in.gREM +++ /dev/null @@ -1,22 +0,0 @@ -# LJ particles -variable T0 equal 300.0 -variable press equal 0.0 - -units real -atom_style full -pair_style lj/cut 5.0 - -read_data "restart_file" - -thermo 10 -thermo_style custom step temp pe etotal press vol - -velocity all create ${T0} 12427 -timestep 1.0 - -fix fxnvt all npt temp ${T0} ${T0} 1000.0 iso ${press} ${press} 10000.0 -fix fxgREM all grem 405 -.01 -30000 fxnvt -thermo_modify press fxgREM_press -run 10000 - -write_data final_restart_file diff --git a/examples/USER/misc/grem/lj-6rep/410/in.gREM b/examples/USER/misc/grem/lj-6rep/410/in.gREM deleted file mode 100644 index 346b138d77..0000000000 --- a/examples/USER/misc/grem/lj-6rep/410/in.gREM +++ /dev/null @@ -1,22 +0,0 @@ -# LJ particles -variable T0 equal 300.0 -variable press equal 0.0 - -units real -atom_style full -pair_style lj/cut 5.0 - -read_data "restart_file" - -thermo 10 -thermo_style custom step temp pe etotal press vol - -velocity all create ${T0} 12427 -timestep 1.0 - -fix fxnvt all npt temp ${T0} ${T0} 1000.0 iso ${press} ${press} 10000.0 -fix fxgREM all grem 410 -.01 -30000 fxnvt -thermo_modify press fxgREM_press -run 10000 - -write_data final_restart_file diff --git a/examples/USER/misc/grem/lj-6rep/415/in.gREM b/examples/USER/misc/grem/lj-6rep/415/in.gREM deleted file mode 100644 index a6ef6b115a..0000000000 --- a/examples/USER/misc/grem/lj-6rep/415/in.gREM +++ /dev/null @@ -1,22 +0,0 @@ -# LJ particles -variable T0 equal 300.0 -variable press equal 0.0 - -units real -atom_style full -pair_style lj/cut 5.0 - -read_data "restart_file" - -thermo 10 -thermo_style custom step temp pe etotal press vol - -velocity all create ${T0} 12427 -timestep 1.0 - -fix fxnvt all npt temp ${T0} ${T0} 1000.0 iso ${press} ${press} 10000.0 -fix fxgREM all grem 415 -.01 -30000 fxnvt -thermo_modify press fxgREM_press -run 10000 - -write_data final_restart_file diff --git a/examples/USER/misc/grem/lj-6rep/420/in.gREM b/examples/USER/misc/grem/lj-6rep/420/in.gREM deleted file mode 100644 index 97e81c41b8..0000000000 --- a/examples/USER/misc/grem/lj-6rep/420/in.gREM +++ /dev/null @@ -1,22 +0,0 @@ -# LJ particles -variable T0 equal 300.0 -variable press equal 0.0 - -units real -atom_style full -pair_style lj/cut 5.0 - -read_data "restart_file" - -thermo 10 -thermo_style custom step temp pe etotal press vol - -velocity all create ${T0} 12427 -timestep 1.0 - -fix fxnvt all npt temp ${T0} ${T0} 1000.0 iso ${press} ${press} 10000.0 -fix fxgREM all grem 420 -.01 -30000 fxnvt -thermo_modify press fxgREM_press -run 10000 - -write_data final_restart_file diff --git a/examples/USER/misc/grem/lj-6rep/425/in.gREM b/examples/USER/misc/grem/lj-6rep/425/in.gREM deleted file mode 100644 index fb30af84ff..0000000000 --- a/examples/USER/misc/grem/lj-6rep/425/in.gREM +++ /dev/null @@ -1,22 +0,0 @@ -# LJ particles -variable T0 equal 300.0 -variable press equal 0.0 - -units real -atom_style full -pair_style lj/cut 5.0 - -read_data "restart_file" - -thermo 10 -thermo_style custom step temp pe etotal press vol - -velocity all create ${T0} 12427 -timestep 1.0 - -fix fxnvt all npt temp ${T0} ${T0} 1000.0 iso ${press} ${press} 10000.0 -fix fxgREM all grem 425 -.01 -30000 fxnvt -thermo_modify press fxgREM_press -run 10000 - -write_data final_restart_file diff --git a/examples/USER/misc/grem/lj-6rep/double-re-short.py b/examples/USER/misc/grem/lj-6rep/double-re-short.py index dd085b30c6..f04636c8fb 100755 --- a/examples/USER/misc/grem/lj-6rep/double-re-short.py +++ b/examples/USER/misc/grem/lj-6rep/double-re-short.py @@ -51,9 +51,9 @@ for exchange in arange(starting_ex,max_exchange): os.chdir(path+"/%s" % lambdas[l]) #os.system("cp restart_file restart_file%d" % exchange) if (nproc > 1): - os.system("mpirun -np %d " + lmp + " -in " + inp + " > output" % nproc) + os.system("mpirun -np %d " + lmp + " -in ../" + inp + " -var lambda %g -var eta %g -var enthalpy %g > output" % (nproc, lambdas[l], eta, H)) if (nproc == 1): - os.system(lmp + " -in " + inp + " > output") + os.system(lmp + " -in ../" + inp + " -var lambda %g -var eta %g -var enthalpy %g > output" % (lambdas[l], eta, H)) os.system("grep -v '[a-zA-Z]' output | awk '{if(NF==6 && NR>19)print $0}' | awk '{print $3}' >ent") enthalpy[l] = os.popen("tail -n 1 ent").read() ee = loadtxt("ent") diff --git a/examples/USER/misc/grem/lj-6rep/400/in.gREM b/examples/USER/misc/grem/lj-6rep/in.gREM similarity index 64% rename from examples/USER/misc/grem/lj-6rep/400/in.gREM rename to examples/USER/misc/grem/lj-6rep/in.gREM index 023de91f33..6a75c45991 100644 --- a/examples/USER/misc/grem/lj-6rep/400/in.gREM +++ b/examples/USER/misc/grem/lj-6rep/in.gREM @@ -1,6 +1,9 @@ # LJ particles -variable T0 equal 300.0 -variable press equal 0.0 +variable T0 index 300.0 +variable press index 0.0 +variable lambda index 400.0 +variable eta index -0.01 +variable enthalpy index -30000.0 units real atom_style full @@ -15,7 +18,7 @@ velocity all create ${T0} 12427 timestep 1.0 fix fxnvt all npt temp ${T0} ${T0} 1000.0 iso ${press} ${press} 10000.0 -fix fxgREM all grem 400 -.01 -30000 fxnvt +fix fxgREM all grem ${lambda} ${eta} ${enthalpy} fxnvt thermo_modify press fxgREM_press run 10000 diff --git a/examples/USER/misc/grem/lj-single/log.gREM.9Nov16.g++.1 b/examples/USER/misc/grem/lj-single/log.gREM.9Nov16.g++.1 index 35746c8f84..71fda5f3cb 100644 --- a/examples/USER/misc/grem/lj-single/log.gREM.9Nov16.g++.1 +++ b/examples/USER/misc/grem/lj-single/log.gREM.9Nov16.g++.1 @@ -1,5 +1,4 @@ LAMMPS (9 Nov 2016) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) using 1 OpenMP thread(s) per MPI task # LJ particles variable T0 equal 300.0 @@ -26,16 +25,13 @@ thermo_style custom step temp pe etotal press vol timestep 1.0 -fix fxgREM all grem 400 -.01 -30000 ${T0} ${press} -fix fxgREM all grem 400 -.01 -30000 300 ${press} -fix fxgREM all grem 400 -.01 -30000 300 0 fix fxnvt all npt temp ${T0} ${T0} 1000.0 iso ${press} ${press} 10000.0 fix fxnvt all npt temp 300 ${T0} 1000.0 iso ${press} ${press} 10000.0 fix fxnvt all npt temp 300 300 1000.0 iso ${press} ${press} 10000.0 fix fxnvt all npt temp 300 300 1000.0 iso 0 ${press} 10000.0 fix fxnvt all npt temp 300 300 1000.0 iso 0 0 10000.0 +fix fxgREM all grem 400 -.01 -30000 fxnvt thermo_modify press fxgREM_press -fix_modify fxnvt press fxgREM_press run 1000 Neighbor list info ... 1 neighbor list requests @@ -147,21 +143,21 @@ Step Temp PotEng TotEng Press Volume 980 303.93331 -3178.9891 -2726.9114 -88.434034 11953.723 990 307.36223 -3180.7316 -2723.5535 -145.46208 11953.849 1000 310.09574 -3181.101 -2719.8571 -180.39125 11953.972 -Loop time of 0.248474 on 1 procs for 1000 steps with 500 atoms +Loop time of 0.303645 on 1 procs for 1000 steps with 500 atoms -Performance: 347.722 ns/day, 0.069 hours/ns, 4024.566 timesteps/s -99.6% CPU use with 1 MPI tasks x 1 OpenMP threads +Performance: 284.542 ns/day, 0.084 hours/ns, 3293.315 timesteps/s +99.9% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 0.20529 | 0.20529 | 0.20529 | 0.0 | 82.62 -Bond | 8.4e-05 | 8.4e-05 | 8.4e-05 | 0.0 | 0.03 -Neigh | 0.004163 | 0.004163 | 0.004163 | 0.0 | 1.68 -Comm | 0.007817 | 0.007817 | 0.007817 | 0.0 | 3.15 -Output | 0.001142 | 0.001142 | 0.001142 | 0.0 | 0.46 -Modify | 0.026383 | 0.026383 | 0.026383 | 0.0 | 10.62 -Other | | 0.003598 | | | 1.45 +Pair | 0.25029 | 0.25029 | 0.25029 | 0.0 | 82.43 +Bond | 7.0572e-05 | 7.0572e-05 | 7.0572e-05 | 0.0 | 0.02 +Neigh | 0.0042012 | 0.0042012 | 0.0042012 | 0.0 | 1.38 +Comm | 0.010247 | 0.010247 | 0.010247 | 0.0 | 3.37 +Output | 0.0013516 | 0.0013516 | 0.0013516 | 0.0 | 0.45 +Modify | 0.033518 | 0.033518 | 0.033518 | 0.0 | 11.04 +Other | | 0.003969 | | | 1.31 Nlocal: 500 ave 500 max 500 min Histogram: 1 0 0 0 0 0 0 0 0 0 diff --git a/examples/USER/misc/grem/lj-single/log.gREM.9Nov16.g++.4 b/examples/USER/misc/grem/lj-single/log.gREM.9Nov16.g++.4 index 580e7a77e8..c1f015da8f 100644 --- a/examples/USER/misc/grem/lj-single/log.gREM.9Nov16.g++.4 +++ b/examples/USER/misc/grem/lj-single/log.gREM.9Nov16.g++.4 @@ -1,5 +1,4 @@ LAMMPS (9 Nov 2016) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) using 1 OpenMP thread(s) per MPI task # LJ particles variable T0 equal 300.0 @@ -26,16 +25,13 @@ thermo_style custom step temp pe etotal press vol timestep 1.0 -fix fxgREM all grem 400 -.01 -30000 ${T0} ${press} -fix fxgREM all grem 400 -.01 -30000 300 ${press} -fix fxgREM all grem 400 -.01 -30000 300 0 fix fxnvt all npt temp ${T0} ${T0} 1000.0 iso ${press} ${press} 10000.0 fix fxnvt all npt temp 300 ${T0} 1000.0 iso ${press} ${press} 10000.0 fix fxnvt all npt temp 300 300 1000.0 iso ${press} ${press} 10000.0 fix fxnvt all npt temp 300 300 1000.0 iso 0 ${press} 10000.0 fix fxnvt all npt temp 300 300 1000.0 iso 0 0 10000.0 +fix fxgREM all grem 400 -.01 -30000 fxnvt thermo_modify press fxgREM_press -fix_modify fxnvt press fxgREM_press run 1000 Neighbor list info ... 1 neighbor list requests @@ -147,21 +143,21 @@ Step Temp PotEng TotEng Press Volume 980 303.93331 -3178.9891 -2726.9114 -88.434034 11953.723 990 307.36223 -3180.7316 -2723.5535 -145.46208 11953.849 1000 310.09574 -3181.101 -2719.8571 -180.39125 11953.972 -Loop time of 0.203733 on 4 procs for 1000 steps with 500 atoms +Loop time of 0.143976 on 4 procs for 1000 steps with 500 atoms -Performance: 424.084 ns/day, 0.057 hours/ns, 4908.379 timesteps/s -84.1% CPU use with 4 MPI tasks x 1 OpenMP threads +Performance: 600.102 ns/day, 0.040 hours/ns, 6945.623 timesteps/s +97.3% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 0.09278 | 0.097682 | 0.10458 | 1.4 | 47.95 -Bond | 8.1e-05 | 0.00010075 | 0.000116 | 0.1 | 0.05 -Neigh | 0.001528 | 0.001553 | 0.00159 | 0.1 | 0.76 -Comm | 0.03798 | 0.045863 | 0.050976 | 2.4 | 22.51 -Output | 0.001655 | 0.0066915 | 0.021705 | 10.6 | 3.28 -Modify | 0.033916 | 0.047091 | 0.053775 | 3.7 | 23.11 -Other | | 0.004751 | | | 2.33 +Pair | 0.068275 | 0.070354 | 0.073701 | 0.8 | 48.87 +Bond | 5.2452e-05 | 7.9632e-05 | 0.00014615 | 0.4 | 0.06 +Neigh | 0.0011015 | 0.0011383 | 0.0011773 | 0.1 | 0.79 +Comm | 0.031418 | 0.034908 | 0.037399 | 1.2 | 24.25 +Output | 0.0017476 | 0.00189 | 0.0022433 | 0.5 | 1.31 +Modify | 0.029245 | 0.029931 | 0.030481 | 0.3 | 20.79 +Other | | 0.005674 | | | 3.94 Nlocal: 125 ave 127 max 123 min Histogram: 1 0 1 0 0 0 0 1 0 1 diff --git a/src/USER-MISC/fix_grem.cpp b/src/USER-MISC/fix_grem.cpp index 2118576ee9..339b41c616 100644 --- a/src/USER-MISC/fix_grem.cpp +++ b/src/USER-MISC/fix_grem.cpp @@ -199,6 +199,7 @@ void FixGrem::init() if (ifix < 0) error->all(FLERR,"Fix id for npt fix does not exist"); Fix *npt = modify->fix[ifix]; + double *t_start = (double *)npt->extract("t_start",ifix); double *t_stop = (double *)npt->extract("t_stop",ifix); if ((t_start != NULL) && (t_stop != NULL) && (ifix == 0)) {