diff --git a/hoomd-blue/classic/butane/ann/butane_ANN.ipynb b/hoomd-blue/classic/butane/ann/butane_ANN.ipynb index 3470eb8..30c3e0d 100644 --- a/hoomd-blue/classic/butane/ann/butane_ANN.ipynb +++ b/hoomd-blue/classic/butane/ann/butane_ANN.ipynb @@ -662,7 +662,7 @@ } ], "source": [ - "run_result = pysages.run(method, generate_context, int(5e5))" + "raw_result = pysages.run(method, generate_context, int(5e5))" ] }, { @@ -694,11 +694,10 @@ }, "outputs": [], "source": [ - "result = pysages.analyze(run_result)\n", + "result = pysages.analyze(raw_result)\n", "\n", "mesh = result[\"mesh\"]\n", - "A = result[\"free_energy\"]\n", - "A = A.max() - A" + "A = result[\"free_energy\"]" ] }, { diff --git a/hoomd-blue/classic/butane/ann/butane_ANN.md b/hoomd-blue/classic/butane/ann/butane_ANN.md index 91d131f..ffb0db2 100644 --- a/hoomd-blue/classic/butane/ann/butane_ANN.md +++ b/hoomd-blue/classic/butane/ann/butane_ANN.md @@ -368,7 +368,7 @@ Make sure to run with GPU support, otherwise, it can take a very long time. ```python colab={"base_uri": "https://localhost:8080/"} id="K951m4BbpUar" outputId="f01ca7e3-69f4-4218-9eb5-cdc022f877b8" -run_result = pysages.run(method, generate_context, int(5e5)) +raw_result = pysages.run(method, generate_context, int(5e5)) ``` @@ -382,11 +382,10 @@ import matplotlib.pyplot as plt ``` ```python id="6W7Xf0ilqAcm" -result = pysages.analyze(run_result) +result = pysages.analyze(raw_result) mesh = result["mesh"] A = result["free_energy"] -A = A.max() - A ``` ```python colab={"base_uri": "https://localhost:8080/", "height": 300} id="TBiPAnMwqEIF" outputId="de1e6c26-0dc9-48ef-cecd-6f94bf11c25c" diff --git a/hoomd-blue/classic/butane/ann/butane_ANN.py b/hoomd-blue/classic/butane/ann/butane_ANN.py index a6d1928..f3e2d6b 100644 --- a/hoomd-blue/classic/butane/ann/butane_ANN.py +++ b/hoomd-blue/classic/butane/ann/butane_ANN.py @@ -22,7 +22,7 @@ from pysages.methods import ANN # %% -kT = 0.596161 +kT = 0.596161 # kcal/mol dt = 0.02045 @@ -284,7 +284,6 @@ def main(argv=[]): mesh = result["mesh"] A = result["free_energy"] - A = A.max() - A fig, ax = plt.subplots() @@ -295,9 +294,8 @@ def main(argv=[]): plt.gca() fig.savefig("butane-fe.png") - # write free energy to file - dih_vs_A = np.stack([mesh[:, 0], A[:, 0]], axis=1) - np.savetxt("butane-fe.dat", dih_vs_A, header='"dih" "Free energy"') + # write results to pickle file + pickle.dump( raw_result, open("raw_result.pickle", "wb") ) return result["free_energy"]