Skip to content

Commit

Permalink
updating logging
Browse files Browse the repository at this point in the history
  • Loading branch information
srmnitc committed Nov 26, 2021
1 parent 654db7f commit 4be4450
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions calphy/routines.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ def run_jobs(self):

self.logger.info("Free energy of %s and %s phases will be calculated"%(self.soljob.calc['lattice'], self.lqdjob.calc['lattice']))
self.logger.info("Temperature range of %f-%f"%(self.tmin, self.tmax))
self.logger.info("STATE: Temperature range of %f-%f K"%(self.tmin, self.tmax))
self.logger.info('Starting solid fe calculation')

try:
Expand Down Expand Up @@ -272,6 +273,7 @@ def extrapolate_tm(self, arg):
raise ValueError('failed to extrapolate melting temperature')

self.logger.info("Predicted melting temperature from extrapolation: %f"%tpred)
self.logger.info("STATE: Predicted Tm from extrapolation: %f K"%tpred)
return tpred


Expand All @@ -293,6 +295,7 @@ def find_tm(self):

if ((arg==0) or (arg==len(self.solres[1])-1)):
self.logger.info('From calculation, melting temperature is not within the selected range.')
self.logger.info('STATE: From calculation, Tm is not within range.')
if arg==len(self.solres[1])-1:
arg = 999
#the above is just a trick to extrapolate
Expand All @@ -304,6 +307,7 @@ def find_tm(self):
self.tmin = 0
self.tmax = tpred + self.dtemp
self.logger.info('Restarting calculation with predicted melting temperature +/- %f'%self.dtemp)
#self.logger.info('STATE: Restarting calculation with predicted melting temperature +/- %f'%self.dtemp)
self.start_calculation()

else:
Expand All @@ -328,4 +332,5 @@ def calculate_tm(self):
tm, tmerr = self.find_tm()
self.logger.info('Found melting temperature = %.2f +/- %.2f K '%(tm, tmerr))
self.logger.info('Experimental melting temperature = %.2f K '%(self.org_tm))
self.logger.info('STATE: Tm = %.2f K +/- %.2f K, Exp. Tm = %.2f K'%(tm, tmerr, self.org_tm))

0 comments on commit 4be4450

Please sign in to comment.