From 9bf00254afd0043ef11d9ae074434ce28805bbfa Mon Sep 17 00:00:00 2001 From: Sebastian Kloth Date: Sat, 27 Jan 2024 14:54:04 +0100 Subject: [PATCH] Started example for static properties --- examples/static_properties.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 examples/static_properties.py diff --git a/examples/static_properties.py b/examples/static_properties.py new file mode 100644 index 0000000..6b0ea8e --- /dev/null +++ b/examples/static_properties.py @@ -0,0 +1,19 @@ +bins = np.linspace(0, 1, 101) +result_rdf = md.distribution.rdf(oxygen_water[-1], bins=bins) +plt.figure() +plt.plot(bins[:-1], result_rdf) +plt.xlabel(r"$r$ in nm", fontsize=16) +plt.ylabel(r"$g(r)$", fontsize=16) +plt.show() +plt.close() + +bins = np.linspace(0, 1, 101) +result_rdf = md.distribution.time_average( + partial(md.distribution.rdf, bins=bins), oxygen_water, segments=100, skip=0.1 +) +plt.figure() +plt.plot(bins[:-1], result_rdf) +plt.xlabel(r"$r$ in nm", fontsize=16) +plt.ylabel(r"$g(r)$", fontsize=16) +plt.show() +plt.close() \ No newline at end of file