Skip to content

Commit

Permalink
fix liquid
Browse files Browse the repository at this point in the history
  • Loading branch information
srmnitc committed Feb 16, 2024
1 parent c5f70b3 commit d0d192b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions calphy/liquid.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,13 @@ def run_averaging(self):
lmp = ph.create_object(self.cores, self.simfolder, self.calc.md.timestep,
self.calc.md.cmdargs, self.calc.md.init_commands)

lmp.command(f'pair_style {self.calc._pair_style_with_options[0]}')

#set up structure
lmp = ph.create_structure(lmp, self.calc)

#set up potential
lmp = ph.set_potential(lmp, self.calc, ghost_elements=self.calc._ghost_element_count)
lmp.command(f'pair_coeff {self.calc.pair_coeff[0]}')

#Melt regime for the liquid
lmp.velocity("all create", self.calc._temperature_high, np.random.randint(1, 10000))
Expand Down Expand Up @@ -175,14 +177,17 @@ def run_integration(self, iteration=1):
lmp.command("variable li equal 1.0")
lmp.command("variable lf equal 0.0")


lmp.command(f'pair_style {self.calc._pair_style_with_options[0]}')

#read in the conf file
#conf = os.path.join(self.simfolder, "conf.equilibration.dump")
conf = os.path.join(self.simfolder, "conf.equilibration.data")
lmp = ph.read_data(lmp, conf)

#set hybrid ufm and normal potential
#lmp = ph.set_hybrid_potential(lmp, self.options, self.eps)
lmp = ph.set_potential(lmp, self.calc, ghost_elements=self.calc._ghost_element_count)
lmp.command(f'pair_coeff {self.calc.pair_coeff[0]}')

#remap the box to get the correct pressure
lmp = ph.remap_box(lmp, self.lx, self.ly, self.lz)
Expand Down

0 comments on commit d0d192b

Please sign in to comment.