Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GK data saving. #525

Merged
merged 12 commits into from
Jul 3, 2022
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"""
import os

import numpy as np
import pytest
from zinchub import DataHub

Expand Down Expand Up @@ -65,4 +66,12 @@ def test_project(traj_file, true_values, tmp_path):

computation = project.run.GreenKuboIonicConductivity(plot=False)

# Time is wrong in the test data
SamTov marked this conversation as resolved.
Show resolved Hide resolved
computation["NaCl"]["System"].pop("time")
computation["NaCl"]["System"].pop("integral")
computation["NaCl"]["System"].pop("integral_uncertainty")

true_values["System"].pop("time")
SamTov marked this conversation as resolved.
Show resolved Hide resolved
true_values["System"]["acf"] = (np.array(true_values["System"]["acf"]) / 500).tolist()
SamTov marked this conversation as resolved.
Show resolved Hide resolved

assertDeepAlmostEqual(computation["NaCl"].data_dict, true_values, decimal=3)
Loading