More cleaning up.

This commit is contained in:
rohskopf
2022-06-23 12:32:40 -06:00
parent 2bc50791aa
commit 8e3a1e84a6
2 changed files with 10 additions and 11 deletions

View File

@ -5,10 +5,10 @@
# Purpose: mimic operation of examples/COUPLE/simple/simple.cpp via Python
# Serial syntax: simple.py in.lammps
# in.simple = LAMMPS input script
# in.lammps = LAMMPS input script
# Parallel syntax: mpirun -np 4 python simple.py in.simple
# in.simple = LAMMPS input script
# Parallel syntax: mpirun -np 4 simple.py in.lammps
# in.lammps = 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)

View File

@ -35,7 +35,6 @@ class ComputeSnap : public Compute {
double memory_usage() override;
private:
FILE * fh_d;
int natoms, nmax, size_peratom, lastcol;
int ncoeff, nperdim, yoffset, zoffset;
int ndims_peratom, ndims_force, ndims_virial;