From ddcfe37dcf19c7393104b01d4d6ad8d9bee55cfc Mon Sep 17 00:00:00 2001 From: Marvin Poul Date: Fri, 1 Mar 2024 11:22:05 +0100 Subject: [PATCH] Update find_w call sites ca61abc changed its signature but did not change how it is called in liquid and alchemical modes. --- calphy/alchemy.py | 8 ++------ calphy/liquid.py | 7 +++---- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/calphy/alchemy.py b/calphy/alchemy.py index d114854..9b98807 100644 --- a/calphy/alchemy.py +++ b/calphy/alchemy.py @@ -314,9 +314,7 @@ def thermodynamic_integration(self): Calculates the final work, energy dissipation; In alchemical mode, there is reference system, the calculated free energy is the same as the work. """ - w, q, qerr = find_w(self.simfolder, nelements=self.calc.n_elements, - concentration=[val['composition'] for key, val in self.calc._element_dict.items()], - nsims=self.calc.n_iterations, + w, q, qerr = find_w(self.simfolder, self.calc, full=True, solid=False, alchemy=True) self.w = w @@ -324,9 +322,7 @@ def thermodynamic_integration(self): self.fe = self.w if self.calc.mode == "composition_scaling": - w_arr, q_arr, qerr_arr, flambda_arr = find_w(self.simfolder, nelements=self.calc.n_elements, - concentration=[val['composition'] for key, val in self.calc._element_dict.items()], - nsims=self.calc.n_iterations, + w_arr, q_arr, qerr_arr, flambda_arr = find_w(self.simfolder, self.calc, full=True, solid=False, alchemy=True, composition_integration=True) #now we need to process the comp scaling diff --git a/calphy/liquid.py b/calphy/liquid.py index a04a611..9f0d32f 100644 --- a/calphy/liquid.py +++ b/calphy/liquid.py @@ -323,10 +323,9 @@ def thermodynamic_integration(self): Calculates the final work, energy dissipation and free energy by matching with UFM model """ - w, q, qerr = find_w(self.simfolder, nsims=self.calc.n_iterations, - full=True, solid=False) - - #TODO: Hardcoded UFM parameters - enable option to change + w, q, qerr = find_w(self.simfolder, self.calc, full=True, solid=False) + + #TODO: Hardcoded UFM parameters - enable option to change f1 = get_uhlenbeck_ford_fe(self.calc._temperature, self.rho, 50, 1.5)