Skip to content

Commit

Permalink
add structure override option
Browse files Browse the repository at this point in the history
  • Loading branch information
Raynol Dsouza committed Nov 9, 2023
1 parent 4dbc822 commit c34b0bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pyiron_contrib/atomistics/mean_field/core/bond_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,8 @@ def validate_ready_to_run(self):
if self.input.md_job is not None:
self.input.md_trajectory = self.input.md_job.output.unwrapped_positions[self.input.thermalize_snapshots:]
self.input.md_cells = self.input.md_job.output.cells[self.input.thermalize_snapshots:]
self.input.structure = self.input.md_job.structure.copy()
if self.input.structure is None:
self.input.structure = self.input.md_job.structure.copy()

if (self.input.md_trajectory is None) | (self.input.md_cells is None):
raise AttributeError('Either <job>.input.md_job or <job>.input.md_trajectory and <job>.input.md_cells must be set')
Expand Down
2 changes: 1 addition & 1 deletion pyiron_contrib/atomistics/mean_field/core/mean_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ def virial(args):
_, _, b_eps = self.find_virial_quant(bonds=bonds, meshes=meshes, temperature=temperature, eps=eps, lm=args,
fix=fix, Veff=Veff)
return np.abs(self.b_0*eps-b_eps)
solver = root_scalar(virial, x0=lm, x1=lm+0.001, method='lm', rtol=1e-20)
solver = root_scalar(virial, x0=lm, x1=lm+0.001, rtol=1e-20)
eff_temp, lm = temperature, solver.root
virial_q = self.find_virial_quant(bonds=bonds, meshes=meshes, temperature=eff_temp, eps=eps, lm=lm, fix=fix,
Veff=Veff, return_rho_1=True)
Expand Down

0 comments on commit c34b0bb

Please sign in to comment.