Skip to content

Commit

Permalink
Update find_w call sites
Browse files Browse the repository at this point in the history
ca61abc changed its signature but did not change how it is called
in liquid and alchemical modes.
  • Loading branch information
pmrv committed Mar 1, 2024
1 parent 4b2bf87 commit ddcfe37
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
8 changes: 2 additions & 6 deletions calphy/alchemy.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,19 +314,15 @@ 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
self.ferr = qerr
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
Expand Down
7 changes: 3 additions & 4 deletions calphy/liquid.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit ddcfe37

Please sign in to comment.