FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit 6b2d47e2 authored by M.D. Driver's avatar M.D. Driver
Browse files

update method to change x axis order for solvation maps, and update axis...

update method to change x axis order for solvation maps, and update axis labels for solvation curve plotting, based on changes to Datapoint labels.
parent bf9aad9a
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,7 @@ def create_input_data_values(epsilon_i_list, epsilon_j_list, temperature, theta,
def get_axis_range(epsilon_i_list, epsilon_j_list):
"""This gets the range of the values in the x and y data.
"""
return (epsilon_i_list.min(), epsilon_i_list.max(),
return (epsilon_i_list.max(), epsilon_i_list.min(),
epsilon_j_list.min(), epsilon_j_list.max())
def create_meshgrids(epsilon_i_list, epsilon_j_list):
......
......@@ -46,7 +46,7 @@ class PolynomialPlottingTestCase(unittest.TestCase):
'x_axis_range':[-15.4, 7.2000000000000002],
'x_data': np.array([[-0.1, -11.1, -14.1, -15.4, -2.4,
-4.3, -5.4, -9.1, 0.5, 1.2, 7.2]]),
'x_label': "ssip",
'x_label': "SSIP Value",
'y_axis_range': [-38.635444, 0.918583],
'y_data': np.array([[0.9185830776018105, -26.013780093398356,
-34.8195308084233, -38.635444108544405,
......@@ -54,7 +54,7 @@ class PolynomialPlottingTestCase(unittest.TestCase):
-9.315464914185585, -20.143787975013183,
0.6588682955012527, -0.4429837300591526,
-25.844114335864262]]),
'y_label': "/$kJmol^{-1}$"}
'y_label': "Solvation Energy/$kJmol^{-1}$"}
actual_dict = polynomialplotting.parse_energies_create_plot_input_data("resources/water.xml", 4)
LOGGER.debug(actual_dict["x_data"].tolist())
LOGGER.debug(actual_dict["y_data"].tolist())
......
......@@ -43,7 +43,7 @@ class SolvationMapGeneratorTestCase(unittest.TestCase):
[-3.46086, -1.671915],
[-2.389432, 0.06058]]),
"x_label":"$\\beta$", "y_label":"$\\alpha$",
"plot_axis_range":(0.0, 2.0, 0.0, 1.0),
"plot_axis_range":(2.0, 0.0, 0.0, 1.0),
"figure_label":"water_solv_map"}
actual_dict = solvationmapgenerator.create_plot_input_data_from_files(self.epsilon_i_list, self.epsilon_j_list,
"resources/watersolvent.xml", "water",
......@@ -81,7 +81,7 @@ class SolvationMapGeneratorTestCase(unittest.TestCase):
[-3.004792, -1.250065],
[-2.004792, 0.454246]]),
"x_label":"x_label", "y_label":"y_label",
"plot_axis_range":(0.0, 2.0, 0.0, 1.0)}
"plot_axis_range":(2.0, 0.0, 0.0, 1.0)}
actual_dict = solvationmapgenerator.create_plot_input_data(self.epsilon_i_list,
self.epsilon_j_list,
298.0, 1.0,
......
......@@ -37,7 +37,7 @@ class SolvationPlotInformationTestCase(unittest.TestCase):
[-3.004792, -1.250065],
[-2.004792, 0.454246]]),
"x_label":"x_label", "y_label":"y_label",
"plot_axis_range":(0.0, 2.0, 0.0, 1.0)}
"plot_axis_range":(2.0, 0.0, 0.0, 1.0)}
actual_dict = solvationplotinformation.create_plot_input_data(self.epsilon_i_list, self.epsilon_j_list, 298.0, 1.0, np.array([0.5, 1.0]), "x_label", "y_label")
self.assertListEqual(sorted(expected_dict.keys()), sorted(actual_dict.keys()))
for key in expected_dict.keys():
......@@ -51,7 +51,7 @@ class SolvationPlotInformationTestCase(unittest.TestCase):
"""Test to see if expected dictionary is produced.
"""
expected_dict = {"x_label":"x_label", "y_label":"y_label",
"plot_axis_range":(0.0, 2.0, 0.0, 1.0)}
"plot_axis_range":(2.0, 0.0, 0.0, 1.0)}
actual_dict = solvationplotinformation.create_input_data_labels(self.epsilon_i_list, self.epsilon_j_list, "x_label", "y_label")
self.assertListEqual(sorted(expected_dict.keys()), sorted(actual_dict.keys()))
for key in expected_dict.keys():
......@@ -74,7 +74,7 @@ class SolvationPlotInformationTestCase(unittest.TestCase):
def test_get_axis_range(self):
"""Test to see if expected axis range is returned.
"""
expected_range = (0.0, 2.0, 0.0, 1.0)
expected_range = (2.0, 0.0, 0.0, 1.0)
actual_range = solvationplotinformation.get_axis_range(self.epsilon_i_list, self.epsilon_j_list)
np.testing.assert_array_almost_equal(np.array(expected_range), np.array(actual_range))
def test_create_meshgrids(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment