Skip to content

Commit

Permalink
set the stress weight to the correct unit conversion from GPa to eV/A3
Browse files Browse the repository at this point in the history
  • Loading branch information
kenko911 committed Nov 19, 2023
1 parent 63e91c4 commit c27859d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion matcalc/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def get_universal_calculator(name: str | Calculator, **kwargs) -> Calculator:
# M3GNet is shorthand for latest M3GNet based on DIRECT sampling.
name = {"m3gnet": "M3GNet-MP-2021.2.8-PES"}.get(name.lower(), name)
model = matgl.load_model(name)
kwargs.setdefault("stress_weight", 0.01)
kwargs.setdefault("stress_weight", 1.0 / 160.21766208)
return M3GNetCalculator(potential=model, **kwargs)

if name.lower() == "chgnet":
Expand Down

0 comments on commit c27859d

Please sign in to comment.