Skip to content

Commit

Permalink
bug fixes in alchemy
Browse files Browse the repository at this point in the history
  • Loading branch information
srmnitc committed Apr 4, 2022
1 parent ffb21b6 commit bf374a5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions calphy/alchemy.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def run_averaging(self):
lmp.command("variable mlz equal lz")
lmp.command("variable mpress equal press")

if not self.calc["fix_lattice"]:
if not self.calc._fix_lattice:
if self.calc._pressure == 0:
#This routine should be followed for zero pressure
lmp.command("velocity all create %f %d"%(self.calc._temperature, np.random.randint(0, 10000)))
Expand Down Expand Up @@ -201,7 +201,7 @@ def run_averaging(self):

#close object and process traj
lmp.close()
self.calc.process_traj()
self.process_traj()



Expand Down Expand Up @@ -233,7 +233,7 @@ def run_integration(self, iteration=1):

#read dump file
conf = os.path.join(self.simfolder, "conf.dump")
lmp = ph.read_dump(lmp, conf, species=self.calc.element)
lmp = ph.read_dump(lmp, conf, species=self.calc.n_elements)

#set up hybrid potential
#here we only need to set one potential
Expand All @@ -244,7 +244,7 @@ def run_integration(self, iteration=1):
lmp = ph.remap_box(lmp, self.lx, self.ly, self.lz)

# Integrator & thermostat.
if self.calc["npt"]:
if self.calc._npt:
lmp.command("fix f1 all npt temp %f %f %f %s %f %f %f"%(self.calc._temperature, self.calc._temperature,
self.calc.md.thermostat_damping, self.iso, self.calc._pressure, self.calc._pressure, self.calc.md.barostat_damping))
else:
Expand Down Expand Up @@ -390,7 +390,7 @@ def thermodynamic_integration(self):
the calculated free energy is the same as the work.
"""
w, q, qerr = find_w(self.simfolder, nelements=self.calc.n_elements,
concentration=self.concentration, nsims=self.n_iterations,
concentration=self.concentration, nsims=self.calc.n_iterations,
full=True, solid=False, alchemy=True)

self.w = w
Expand Down

0 comments on commit bf374a5

Please sign in to comment.