Started example for data management calculations
This commit is contained in:
parent
d91f797495
commit
e0a40bae01
15
examples/data_management.py
Normal file
15
examples/data_management.py
Normal file
@ -0,0 +1,15 @@
|
||||
DATA_DIR = "/data/skloth/results/workshop_data"
|
||||
np.save(f"{DATA_DIR}/msd.npy", result_msd_nojump)
|
||||
print(np.load(f"{DATA_DIR}/msd.npy"))
|
||||
|
||||
import pandas as pd
|
||||
msd_df = pd.DataFrame({"t": result_msd[0], "msd_water": result_msd[1]})
|
||||
print(msd_df)
|
||||
msd_df["T"] = 300
|
||||
msd_df["cation"] = "C4mim"
|
||||
msd_df["anion"] = "DCA"
|
||||
print(msd_df)
|
||||
msd_df.to_hdf(f"{DATA_DIR}/result.h5", key="msd")
|
||||
msd_df = pd.read_hdf(f"{DATA_DIR}/result.h5", key="msd")
|
||||
print(msd_df.info())
|
||||
md.utils.cleanup_h5(f"{DATA_DIR}/result.h5")
|
Loading…
Reference in New Issue
Block a user