Skip to content

Commit

Permalink
Merge pull request #114 from pmrv/liquid
Browse files Browse the repository at this point in the history
Update find_w call sites
  • Loading branch information
srmnitc authored Mar 5, 2024
2 parents 8fcac6f + ddcfe37 commit 2a868ba
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 2a868ba

Please sign in to comment.