From 82700ee5ec288ae522b873dc39006bf315408f76 Mon Sep 17 00:00:00 2001 From: Sarath Menon Date: Fri, 29 Sep 2023 09:07:06 +0200 Subject: [PATCH] fix pressure in input --- calphy/input.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/calphy/input.py b/calphy/input.py index 9e2f0a5..01d67bd 100644 --- a/calphy/input.py +++ b/calphy/input.py @@ -214,27 +214,27 @@ def _validate_pressure(self) -> 'Input': elif np.shape(self.pressure) == (1,): self._iso = True self._fix_lattice = False - self._pressure = self.pressure_input[0] - self._pressure_stop = self.pressure_input[0] + self._pressure = self.pressure[0] + self._pressure_stop = self.pressure[0] elif np.shape(self.pressure) == (2,): self._iso = True self._fix_lattice = False - self._pressure = self.pressure_input[0] - self._pressure_stop = self.pressure_input[1] + self._pressure = self.pressure[0] + self._pressure_stop = self.pressure[1] elif np.shape(self.pressure) == (1, 3): if not _check_equal(self.pressure[0]): raise ValueError('All pressure terms must be equal') self._iso = False self._fix_lattice = False - self._pressure = self.pressure_input[0][0] - self._pressure_stop = self.pressure_input[0][0] + self._pressure = self.pressure[0][0] + self._pressure_stop = self.pressure[0][0] elif np.shape(self.pressure) == (2, 3): if not (_check_equal(self.pressure[0]) and _check_equal(self.pressure[1])): raise ValueError('All pressure terms must be equal') self._iso = False self._fix_lattice = False - self._pressure = self.pressure_input[0][0] - self._pressure_stop = self.pressure_input[1][0] + self._pressure = self.pressure[0][0] + self._pressure_stop = self.pressure[1][0] else: raise ValueError('Unknown format for pressure') return self