diff --git a/examples/data_management.py b/examples/data_management.py new file mode 100644 index 0000000..769db88 --- /dev/null +++ b/examples/data_management.py @@ -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") \ No newline at end of file