Skip to content

Commit

Permalink
changed default pressure unit to GPa, consistent to bulk modulus
Browse files Browse the repository at this point in the history
  • Loading branch information
bowen-bd committed Sep 1, 2023
1 parent 8948011 commit a42d214
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions chgnet/model/dynamics.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ def __init__(
thermostat: str = "Berendsen_inhomogeneous",
temperature: int = 300,
timestep: float = 2.0,
pressure: float = 6.324e-7,
pressure: float = 1.01325e-4,
taut: float | None = None,
taup: float | None = None,
bulk_modulus: float | None = None,
Expand Down Expand Up @@ -387,9 +387,9 @@ def __init__(
Default = 300
timestep (float): time step in fs
Default = 2
pressure (float): pressure in eV/A^3
pressure (float): pressure in GPa
Can be 3x3 or 6 np.array if thermostat is "Nose-Hoover"
Default = 6.324e-7 eV/A^3 = 1 atm
Default = 1.01325e-4 GPa = 1 atm
taut (float): time constant for temperature coupling in fs.
The temperature will be raised to target temperature in approximate
10 * taut time.
Expand Down Expand Up @@ -554,7 +554,7 @@ def __init__(
atoms=self.atoms,
timestep=timestep * units.fs,
temperature_K=temperature,
externalstress=pressure * (units.eV / units.Angstrom**3),
externalstress=pressure * units.GPa,
ttime=taut * units.fs,
pfactor=bulk_modulus * units.GPa * taup * taup,
trajectory=trajectory,
Expand All @@ -576,7 +576,7 @@ def __init__(
atoms=self.atoms,
timestep=timestep * units.fs,
temperature_K=temperature,
pressure_au=pressure * (units.eV / units.Angstrom**3),
pressure_au=pressure * units.GPa,
taut=taut * units.fs,
taup=taup * units.fs,
compressibility_au=compressibility_au,
Expand All @@ -599,7 +599,7 @@ def __init__(
atoms=self.atoms,
timestep=timestep * units.fs,
temperature_K=temperature,
pressure_au=pressure * (units.eV / units.Angstrom**3),
pressure_au=pressure * units.GPa,
taut=taut * units.fs,
taup=taup * units.fs,
compressibility_au=compressibility_au,
Expand Down

0 comments on commit a42d214

Please sign in to comment.