dump2rotorang.pyをargpase対応にした
This commit is contained in:
+15
-10
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env python
|
||||
import argparse
|
||||
import numpy as np
|
||||
import io
|
||||
import re
|
||||
@@ -86,13 +87,17 @@ def run(trjfile):
|
||||
dset[temp]["orientation"] = df
|
||||
|
||||
|
||||
for k in ["D3d-o", "D3d-p"]:
|
||||
dset = {}
|
||||
files = sorted(glob.glob(f"{k}_*K.lammpstrj"))
|
||||
for f in files:
|
||||
print(f)
|
||||
run(f)
|
||||
outfile = f"{k}.pkl"
|
||||
with open(outfile, "wb") as f:
|
||||
pickle.dump(dset, f)
|
||||
print(f"{outfile} was created.")
|
||||
par = argparse.ArgumentParser(description="test")
|
||||
par.add_argument('-f', '--files')
|
||||
args = par.parse_args()
|
||||
|
||||
# for k in ["D3d-o", "D3d-p"]:
|
||||
# dset = {}
|
||||
# files = sorted(glob.glob(f"{k}_*K.lammpstrj"))
|
||||
# for f in files:
|
||||
# print(f)
|
||||
# run(f)
|
||||
# outfile = f"{k}.pkl"
|
||||
# with open(outfile, "wb") as f:
|
||||
# pickle.dump(dset, f)
|
||||
# print(f"{outfile} was created.")
|
||||
|
||||
Reference in New Issue
Block a user