LAMMPS (5 Oct 2016) # 3d Lennard-Jones melt with Python functions added units lj atom_style atomic lattice fcc 0.8442 Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 region box block 0 10 0 10 0 10 create_box 1 box Created orthogonal box = (0 0 0) to (16.796 16.796 16.796) 1 by 1 by 1 MPI processor grid create_atoms 1 box Created 4000 atoms mass 1 1.0 velocity all create 1.44 87287 loop geom pair_style lj/cut 2.5 pair_coeff 1 1 1.0 1.0 2.5 neighbor 0.3 bin neigh_modify delay 0 every 1 check yes fix 1 all nve run 10 Neighbor list info ... 1 neighbor list requests update every 1 steps, delay 0 steps, check yes max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 2.8 ghost atom cutoff = 2.8 binsize = 1.4 -> bins = 12 12 12 Memory usage per processor = 2.69271 Mbytes Step Temp E_pair E_mol TotEng Press 0 1.44 -6.7733681 0 -4.6139081 -5.0199732 10 1.1259767 -6.3010653 0 -4.6125225 -2.5704638 Loop time of 0.0323398 on 1 procs for 10 steps with 4000 atoms Performance: 133581.484 tau/day, 309.216 timesteps/s 102.0% CPU use with 1 MPI tasks x no OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- Pair | 0.024638 | 0.024638 | 0.024638 | 0.0 | 76.18 Neigh | 0.0063899 | 0.0063899 | 0.0063899 | 0.0 | 19.76 Comm | 0.00049949 | 0.00049949 | 0.00049949 | 0.0 | 1.54 Output | 1.7881e-05 | 1.7881e-05 | 1.7881e-05 | 0.0 | 0.06 Modify | 0.00050044 | 0.00050044 | 0.00050044 | 0.0 | 1.55 Other | | 0.0002944 | | | 0.91 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 5841 ave 5841 max 5841 min Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 155984 ave 155984 max 155984 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 155984 Ave neighs/atom = 38.996 Neighbor list builds = 1 Dangerous builds = 0 # 1st Python function # example of catching a syntax error python simple here """ def simple(): import exceptions print "Inside simple function" try: foo += 1 except Exception, e: print "FOO error:",e """ python simple invoke # 2nd Python function # example of returning the function value to a python-style variable # invoke it twice variable fact python factorial python factorial input 1 v_n return v_fact format ii here """ def factorial(n): if n == 1: return 1 return n*factorial(n-1) """ variable n string 10 python factorial invoke print "Factorial of $n = ${fact}" Factorial of 10 = 3628800 variable n string 20 python factorial invoke print "Factorial of $n = ${fact}" Factorial of 20 = 2432902008176640000 # 3rd Python function # example of calling back to LAMMPS and writing a run loop in Python variable cut string 0.0 python loop input 4 10 1.0 -4.0 SELF format iffp file funcs.py python loop invoke pair_style lj/cut ${cut} pair_style lj/cut 1.0 pair_coeff * * 1.0 1.0 run 10 Neighbor list info ... 1 neighbor list requests update every 1 steps, delay 0 steps, check yes max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 1.3 ghost atom cutoff = 1.3 binsize = 0.65 -> bins = 26 26 26 Memory usage per processor = 2.78761 Mbytes Step Temp E_pair E_mol TotEng Press 10 1.1259767 0.016557378 0 1.7051002 1.2784679 20 0.87608998 0.39300382 0 1.7068103 6.0488236 Loop time of 0.0046258 on 1 procs for 10 steps with 4000 atoms Performance: 933893.067 tau/day, 2161.790 timesteps/s 86.4% CPU use with 1 MPI tasks x no OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- Pair | 0.001574 | 0.001574 | 0.001574 | 0.0 | 34.03 Neigh | 0.0020421 | 0.0020421 | 0.0020421 | 0.0 | 44.14 Comm | 0.00025463 | 0.00025463 | 0.00025463 | 0.0 | 5.50 Output | 1.7881e-05 | 1.7881e-05 | 1.7881e-05 | 0.0 | 0.39 Modify | 0.00049615 | 0.00049615 | 0.00049615 | 0.0 | 10.73 Other | | 0.000241 | | | 5.21 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 2083 ave 2083 max 2083 min Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 17727 ave 17727 max 17727 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 17727 Ave neighs/atom = 4.43175 Neighbor list builds = 1 Dangerous builds = 0 pair_style lj/cut ${cut} pair_style lj/cut 1.1 pair_coeff * * 1.0 1.0 run 10 Neighbor list info ... 1 neighbor list requests update every 1 steps, delay 0 steps, check yes max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 1.4 ghost atom cutoff = 1.4 binsize = 0.7 -> bins = 24 24 24 Memory usage per processor = 2.78761 Mbytes Step Temp E_pair E_mol TotEng Press 20 0.87608998 -0.33042884 0 0.9833776 8.5817494 30 1.0155079 -0.83166219 0 0.69121891 7.9905553 Loop time of 0.00619817 on 1 procs for 10 steps with 4000 atoms Performance: 696980.162 tau/day, 1613.380 timesteps/s 96.8% CPU use with 1 MPI tasks x no OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- Pair | 0.0029786 | 0.0029786 | 0.0029786 | 0.0 | 48.06 Neigh | 0.002203 | 0.002203 | 0.002203 | 0.0 | 35.54 Comm | 0.00025678 | 0.00025678 | 0.00025678 | 0.0 | 4.14 Output | 1.7881e-05 | 1.7881e-05 | 1.7881e-05 | 0.0 | 0.29 Modify | 0.00049472 | 0.00049472 | 0.00049472 | 0.0 | 7.98 Other | | 0.0002472 | | | 3.99 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 2087 ave 2087 max 2087 min Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 21036 ave 21036 max 21036 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 21036 Ave neighs/atom = 5.259 Neighbor list builds = 1 Dangerous builds = 0 pair_style lj/cut ${cut} pair_style lj/cut 1.2 pair_coeff * * 1.0 1.0 run 10 Neighbor list info ... 1 neighbor list requests update every 1 steps, delay 0 steps, check yes max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 1.5 ghost atom cutoff = 1.5 binsize = 0.75 -> bins = 23 23 23 Memory usage per processor = 2.78761 Mbytes Step Temp E_pair E_mol TotEng Press 30 1.0155079 -2.0616558 0 -0.53877467 7.6238572 40 1.0490928 -2.1868324 0 -0.61358669 7.2084131 Loop time of 0.00750899 on 1 procs for 10 steps with 4000 atoms Performance: 575310.153 tau/day, 1331.736 timesteps/s 93.2% CPU use with 1 MPI tasks x no OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- Pair | 0.004189 | 0.004189 | 0.004189 | 0.0 | 55.79 Neigh | 0.0022991 | 0.0022991 | 0.0022991 | 0.0 | 30.62 Comm | 0.0002594 | 0.0002594 | 0.0002594 | 0.0 | 3.45 Output | 1.7881e-05 | 1.7881e-05 | 1.7881e-05 | 0.0 | 0.24 Modify | 0.00049615 | 0.00049615 | 0.00049615 | 0.0 | 6.61 Other | | 0.0002475 | | | 3.30 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 2250 ave 2250 max 2250 min Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 24095 ave 24095 max 24095 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 24095 Ave neighs/atom = 6.02375 Neighbor list builds = 1 Dangerous builds = 0 pair_style lj/cut ${cut} pair_style lj/cut 1.3 pair_coeff * * 1.0 1.0 run 10 Neighbor list info ... 1 neighbor list requests update every 1 steps, delay 0 steps, check yes max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 1.6 ghost atom cutoff = 1.6 binsize = 0.8 -> bins = 21 21 21 Memory usage per processor = 2.78761 Mbytes Step Temp E_pair E_mol TotEng Press 40 1.0490928 -3.0667608 0 -1.493515 6.2796311 50 1.0764484 -3.1173704 0 -1.5031014 6.0850409 Loop time of 0.00869107 on 1 procs for 10 steps with 4000 atoms Performance: 497061.786 tau/day, 1150.606 timesteps/s 103.5% CPU use with 1 MPI tasks x no OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- Pair | 0.0049038 | 0.0049038 | 0.0049038 | 0.0 | 56.42 Neigh | 0.0027289 | 0.0027289 | 0.0027289 | 0.0 | 31.40 Comm | 0.00028753 | 0.00028753 | 0.00028753 | 0.0 | 3.31 Output | 2.0027e-05 | 2.0027e-05 | 2.0027e-05 | 0.0 | 0.23 Modify | 0.00049758 | 0.00049758 | 0.00049758 | 0.0 | 5.73 Other | | 0.0002532 | | | 2.91 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 2572 ave 2572 max 2572 min Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 27137 ave 27137 max 27137 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 27137 Ave neighs/atom = 6.78425 Neighbor list builds = 1 Dangerous builds = 0 pair_style lj/cut ${cut} pair_style lj/cut 1.4 pair_coeff * * 1.0 1.0 run 10 Neighbor list info ... 1 neighbor list requests update every 1 steps, delay 0 steps, check yes max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 1.7 ghost atom cutoff = 1.7 binsize = 0.85 -> bins = 20 20 20 Memory usage per processor = 2.78761 Mbytes Step Temp E_pair E_mol TotEng Press 50 1.0764484 -3.6112241 0 -1.9969552 5.4223348 60 1.1101013 -3.6616014 0 -1.9968657 5.2348251 Loop time of 0.00934482 on 1 procs for 10 steps with 4000 atoms Performance: 462288.386 tau/day, 1070.112 timesteps/s 96.3% CPU use with 1 MPI tasks x no OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- Pair | 0.0055761 | 0.0055761 | 0.0055761 | 0.0 | 59.67 Neigh | 0.002676 | 0.002676 | 0.002676 | 0.0 | 28.64 Comm | 0.00032163 | 0.00032163 | 0.00032163 | 0.0 | 3.44 Output | 1.7881e-05 | 1.7881e-05 | 1.7881e-05 | 0.0 | 0.19 Modify | 0.00049901 | 0.00049901 | 0.00049901 | 0.0 | 5.34 Other | | 0.0002542 | | | 2.72 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 3013 ave 3013 max 3013 min Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 30887 ave 30887 max 30887 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 30887 Ave neighs/atom = 7.72175 Neighbor list builds = 1 Dangerous builds = 0 pair_style lj/cut ${cut} pair_style lj/cut 1.5 pair_coeff * * 1.0 1.0 run 10 Neighbor list info ... 1 neighbor list requests update every 1 steps, delay 0 steps, check yes max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 1.8 ghost atom cutoff = 1.8 binsize = 0.9 -> bins = 19 19 19 Memory usage per processor = 2.78761 Mbytes Step Temp E_pair E_mol TotEng Press 60 1.1101013 -3.9655053 0 -2.3007696 4.7849008 70 1.1122144 -3.9657095 0 -2.297805 4.8014106 Loop time of 0.0103869 on 1 procs for 10 steps with 4000 atoms Performance: 415906.746 tau/day, 962.747 timesteps/s 96.3% CPU use with 1 MPI tasks x no OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- Pair | 0.0063703 | 0.0063703 | 0.0063703 | 0.0 | 61.33 Neigh | 0.002893 | 0.002893 | 0.002893 | 0.0 | 27.85 Comm | 0.00034499 | 0.00034499 | 0.00034499 | 0.0 | 3.32 Output | 1.7881e-05 | 1.7881e-05 | 1.7881e-05 | 0.0 | 0.17 Modify | 0.00050139 | 0.00050139 | 0.00050139 | 0.0 | 4.83 Other | | 0.0002594 | | | 2.50 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 3388 ave 3388 max 3388 min Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 35959 ave 35959 max 35959 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 35959 Ave neighs/atom = 8.98975 Neighbor list builds = 1 Dangerous builds = 0 pair_style lj/cut ${cut} pair_style lj/cut 1.6 pair_coeff * * 1.0 1.0 run 10 Neighbor list info ... 1 neighbor list requests update every 1 steps, delay 0 steps, check yes max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 1.9 ghost atom cutoff = 1.9 binsize = 0.95 -> bins = 18 18 18 Memory usage per processor = 2.78761 Mbytes Step Temp E_pair E_mol TotEng Press 70 1.1122144 -4.1752688 0 -2.5073643 4.4755409 80 1.117224 -4.1831357 0 -2.5077187 4.446079 Loop time of 0.0116282 on 1 procs for 10 steps with 4000 atoms Performance: 371512.205 tau/day, 859.982 timesteps/s 103.2% CPU use with 1 MPI tasks x no OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- Pair | 0.0074186 | 0.0074186 | 0.0074186 | 0.0 | 63.80 Neigh | 0.0030658 | 0.0030658 | 0.0030658 | 0.0 | 26.37 Comm | 0.00036025 | 0.00036025 | 0.00036025 | 0.0 | 3.10 Output | 1.7166e-05 | 1.7166e-05 | 1.7166e-05 | 0.0 | 0.15 Modify | 0.0005033 | 0.0005033 | 0.0005033 | 0.0 | 4.33 Other | | 0.000263 | | | 2.26 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 3612 ave 3612 max 3612 min Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 43239 ave 43239 max 43239 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 43239 Ave neighs/atom = 10.8097 Neighbor list builds = 1 Dangerous builds = 0 Total wall time: 0:00:00