File: log.27Nov18.fix_python_invoke.g%2B%2B.1

package info (click to toggle)
lammps 20251210%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 465,808 kB
  • sloc: cpp: 1,031,565; python: 26,771; ansic: 8,808; f90: 7,302; sh: 5,316; perl: 4,171; fortran: 2,442; xml: 1,613; makefile: 1,119; objc: 238; lisp: 188; yacc: 58; csh: 16; awk: 14; tcl: 6; javascript: 2
file content (100 lines) | stat: -rw-r--r-- 3,347 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
LAMMPS (27 Nov 2018)
  using 1 OpenMP thread(s) per MPI task
# 3d Lennard-Jones melt

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
  Time spent = 0.000678539 secs
mass		1 1.0

velocity	all create 3.0 87287

pair_style	lj/cut 2.5
pair_coeff	1 1 1.0 1.0 2.5

neighbor	0.3 bin
neigh_modify	every 20 delay 0 check no

python         end_of_step_callback here """
from __future__ import print_function
from lammps import lammps
def end_of_step_callback(lmp):
  L = lammps(ptr=lmp)
  t = L.extract_global("ntimestep", 0)
  print("### END OF STEP ###", t)
def post_force_callback(lmp, v):
  L = lammps(ptr=lmp)
  t = L.extract_global("ntimestep", 0)
  print("### POST_FORCE ###", t)
"""

fix		1 all nve
fix     2 all python/invoke 50 end_of_step end_of_step_callback
fix     3 all python/invoke 50 post_force post_force_callback

#dump		id all atom 50 dump.melt

#dump		2 all image 25 image.*.jpg type type #		axes yes 0.8 0.02 view 60 -30
#dump_modify	2 pad 3

#dump		3 all movie 25 movie.mpg type type #		axes yes 0.8 0.02 view 60 -30
#dump_modify	3 pad 3

thermo		50
run		250
Neighbor list info ...
  update every 20 steps, delay 0 steps, check no
  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
  1 neighbor lists, perpetual/occasional/extra = 1 0 0
  (1) pair lj/cut, perpetual
      attributes: half, newton on
      pair build: half/bin/atomonly/newton
      stencil: half/bin/3d/newton
      bin: standard
Per MPI rank memory allocation (min/avg/max) = 3.221 | 3.221 | 3.221 Mbytes
Step Temp E_pair E_mol TotEng Press 
       0            3   -6.7733681            0   -2.2744931   -3.7033504 
      50    1.6758903   -4.7955425            0   -2.2823355     5.670064 
     100    1.6458363   -4.7492704            0   -2.2811332    5.8691042 
     150    1.6324555   -4.7286791            0    -2.280608    5.9589514 
     200    1.6630725   -4.7750988            0   -2.2811136    5.7364886 
     250    1.6275257   -4.7224992            0    -2.281821    5.9567365 
Loop time of 0.732007 on 1 procs for 250 steps with 4000 atoms

Performance: 147539.519 tau/day, 341.527 timesteps/s
99.8% 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.60651    | 0.60651    | 0.60651    |   0.0 | 82.86
Neigh   | 0.092702   | 0.092702   | 0.092702   |   0.0 | 12.66
Comm    | 0.013686   | 0.013686   | 0.013686   |   0.0 |  1.87
Output  | 0.00016069 | 0.00016069 | 0.00016069 |   0.0 |  0.02
Modify  | 0.016055   | 0.016055   | 0.016055   |   0.0 |  2.19
Other   |            | 0.00289    |            |       |  0.39

Nlocal:    4000 ave 4000 max 4000 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost:    5499 ave 5499 max 5499 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs:    151513 ave 151513 max 151513 min
Histogram: 1 0 0 0 0 0 0 0 0 0

Total # of neighbors = 151513
Ave neighs/atom = 37.8783
Neighbor list builds = 12
Dangerous builds not checked
Total wall time: 0:00:00