Files
lammps/examples/python/log.1May25.python.wrap.g++.4
2025-05-19 14:34:22 -06:00

100 lines
3.5 KiB
Groff

LAMMPS (2 Apr 2025 - Development - patch_2Apr2025-266-gebfb94a717-modified)
# 3d Lennard-Jones melt with equal- and atom-style variables which
# use a Python function wrapper in their formulas
variable x index 5
variable y index 5
variable z index 5
units lj
atom_style atomic
lattice fcc 0.8442
Lattice spacing in x,y,z = 1.6795962 1.6795962 1.6795962
region box block 0 $x 0 $y 0 $z
region box block 0 5 0 $y 0 $z
region box block 0 5 0 5 0 $z
region box block 0 5 0 5 0 5
create_box 1 box
Created orthogonal box = (0 0 0) to (8.397981 8.397981 8.397981)
1 by 2 by 2 MPI processor grid
create_atoms 1 box
Created 500 atoms
using lattice units in orthogonal box = (0 0 0) to (8.397981 8.397981 8.397981)
create_atoms CPU = 0.000 seconds
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 20 check no
fix 1 all nve
variable foo python truncate
python truncate return v_foo input 1 iv_arg format fi here """
def truncate(x):
return int(x)
"""
variable scalar equal py_foo(4.5)
print "TRUNCATE ${scalar}"
TRUNCATE 4
variable xtrunc atom py_foo(x)
variable ytrunc atom py_foo(y)
variable ztrunc atom py_foo(z)
# examine dump file to see truncated xyz coords of each atom
dump 1 all custom 100 tmp.dump id x y z v_xtrunc v_ytrunc v_ztrunc
run 100
Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
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 = 6 6 6
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
bin: standard
Per MPI rank memory allocation (min/avg/max) = 2.609 | 2.609 | 2.609 Mbytes
Step Temp E_pair E_mol TotEng Press
0 1.44 -6.7733681 0 -4.6176881 -5.0221006
100 0.75627408 -5.7580082 0 -4.6258659 0.21870071
Loop time of 0.0062374 on 4 procs for 100 steps with 500 atoms
Performance: 6925957.189 tau/day, 16032.308 timesteps/s, 8.016 Matom-step/s
74.7% CPU use with 4 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.0027648 | 0.0028431 | 0.0029465 | 0.1 | 45.58
Neigh | 0.00084567 | 0.00086563 | 0.00088168 | 0.0 | 13.88
Comm | 0.0020822 | 0.0021609 | 0.0022418 | 0.1 | 34.64
Output | 0.00021567 | 0.00022125 | 0.00022624 | 0.0 | 3.55
Modify | 6.2567e-05 | 6.4105e-05 | 6.63e-05 | 0.0 | 1.03
Other | | 8.241e-05 | | | 1.32
Nlocal: 125 ave 126 max 123 min
Histogram: 1 0 0 0 0 0 1 0 0 2
Nghost: 1085.75 ave 1090 max 1082 min
Histogram: 1 0 1 0 0 0 1 0 0 1
Neighs: 4691.5 ave 4969 max 4368 min
Histogram: 1 0 0 0 1 0 0 1 0 1
Total # of neighbors = 18766
Ave neighs/atom = 37.532
Neighbor list builds = 5
Dangerous builds not checked
Total wall time: 0:00:00