Working multi-element example

This commit is contained in:
rohskopf
2022-09-29 10:07:22 -06:00
parent b4eab5e9b0
commit 85da521642
4 changed files with 41 additions and 16 deletions

View File

@ -19,6 +19,8 @@ def run_struct(f):
cmds = ["-screen", "none", "-log", "none"]
lmp = lammps(cmdargs = cmds)
print("Made LAMMPS instance")
def run_lammps(dgradflag):
# simulation settings
@ -68,8 +70,9 @@ def run_struct(f):
nd = 91
dgradflag = 0
run_lammps(dgradflag)
lmp_pace = lmp.numpy.extract_compute("pace", LMP_STYLE_GLOBAL, LMP_TYPE_ARRAY)
print ('global shape',np.shape(lmp_pace))
np.save('%s_chi_i.npy' % file_prefix,lmp_pace)
@ -77,7 +80,6 @@ def run_struct(f):
del lmp
return None
import glob
for f in sorted(glob.glob('*.xyz')):
print ('running %s' % f)