Skip to content

Commit

Permalink
fixes for melting temperature mode
Browse files Browse the repository at this point in the history
  • Loading branch information
srmnitc committed Apr 4, 2022
1 parent 5339a6f commit ffb21b6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
14 changes: 10 additions & 4 deletions calphy/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,15 @@ def pressure(self):

@pressure.setter
def pressure(self, val):
print("im here")
print(val)
self._pressure_input = val
if val is None:
self._fix_lattice = True
elif isinstance(val, list):
if len(val) == 3:
if len(val) == 1:
self._pressure = val[0]
self._iso = True
self._fix_lattice = False
elif len(val) == 3:
if (val[0]==val[1]==val[2]):
self._pressure = val[0]
self._iso = False
Expand All @@ -202,7 +204,11 @@ def temperature(self):
@temperature.setter
def temperature(self, val):
self._temperature_input = val
if isinstance(val, list):
if val is None:
self._temperature = val
self._temperature_stop = val
self._temperature_high = val
elif isinstance(val, list):
if len(val) == 2:
self._temperature = val[0]
self._temperature_stop = val[1]
Expand Down
4 changes: 3 additions & 1 deletion calphy/routines.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
from calphy.errors import *
import calphy.helpers as ph

from calphy.liquid import Liquid
from calphy.solid import Solid

class MeltingTemp:
"""
Expand Down Expand Up @@ -79,7 +81,7 @@ def prepare_calcs(self):
None
"""
self.calc.temperature = [int(self.tmin), int(self.tmax)]
self.calc['temperature_stop'] = int(self.tmax)
self.calc._temperature_stop = int(self.tmax)
csol = copy.deepcopy(self.calc)
clqd = copy.deepcopy(self.calc)

Expand Down

0 comments on commit ffb21b6

Please sign in to comment.