Added compute snap descriptor gradient example.
This commit is contained in:
25
python/examples/in.lj
Normal file
25
python/examples/in.lj
Normal file
@ -0,0 +1,25 @@
|
||||
# 3d Lennard-Jones melt
|
||||
|
||||
units lj
|
||||
atom_style atomic
|
||||
atom_modify map array
|
||||
|
||||
lattice fcc 0.8442
|
||||
region box block 0 4 0 4 0 4
|
||||
create_box 1 box
|
||||
create_atoms 1 box
|
||||
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 fx atom fx
|
||||
|
||||
run 10
|
||||
@ -5,10 +5,10 @@
|
||||
# Purpose: mimic operation of examples/COUPLE/simple/simple.cpp via Python
|
||||
|
||||
# Serial syntax: simple.py in.lammps
|
||||
# in.lammps = LAMMPS input script
|
||||
# in.simple = LAMMPS input script
|
||||
|
||||
# Parallel syntax: mpirun -np 4 simple.py in.lammps
|
||||
# in.lammps = LAMMPS input script
|
||||
# Parallel syntax: mpirun -np 4 python simple.py in.simple
|
||||
# in.simple = LAMMPS input script
|
||||
# also need to uncomment mpi4py sections below
|
||||
|
||||
from __future__ import print_function
|
||||
@ -27,9 +27,9 @@ infile = sys.argv[1]
|
||||
me = 0
|
||||
|
||||
# uncomment this if running in parallel via mpi4py
|
||||
#from mpi4py import MPI
|
||||
#me = MPI.COMM_WORLD.Get_rank()
|
||||
#nprocs = MPI.COMM_WORLD.Get_size()
|
||||
from mpi4py import MPI
|
||||
me = MPI.COMM_WORLD.Get_rank()
|
||||
nprocs = MPI.COMM_WORLD.Get_size()
|
||||
|
||||
from lammps import lammps
|
||||
lmp = lammps()
|
||||
@ -122,10 +122,10 @@ if me == 0: print("Gather post scatter subset:",
|
||||
boxlo,boxhi,xy,yz,xz,periodicity,box_change = lmp.extract_box()
|
||||
if me == 0: print("Box info",boxlo,boxhi,xy,yz,xz,periodicity,box_change)
|
||||
|
||||
lmp.reset_box([0,0,0],[10,10,8],0,0,0)
|
||||
#lmp.reset_box([0,0,0],[10,10,8],0,0,0)
|
||||
|
||||
boxlo,boxhi,xy,yz,xz,periodicity,box_change = lmp.extract_box()
|
||||
if me == 0: print("Box info",boxlo,boxhi,xy,yz,xz,periodicity,box_change)
|
||||
#boxlo,boxhi,xy,yz,xz,periodicity,box_change = lmp.extract_box()
|
||||
#if me == 0: print("Box info",boxlo,boxhi,xy,yz,xz,periodicity,box_change)
|
||||
|
||||
# uncomment if running in parallel via mpi4py
|
||||
#print("Proc %d out of %d procs has" % (me,nprocs), lmp)
|
||||
print("Proc %d out of %d procs has" % (me,nprocs), lmp)
|
||||
|
||||
Reference in New Issue
Block a user