Skip to content

Commit 78a42c4

Browse files
Merge pull request #298 from zincware/velocity-verlet-dynamics
implements ase velocity verlet dynamics
2 parents cb7aab7 + 7dc10b7 commit 78a42c4

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

ipsuite/calculators/__init__.pyi

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ from .ase_md import (
1111
RescaleBoxModifier,
1212
TemperatureOscillatingRampModifier,
1313
TemperatureRampModifier,
14+
VelocityVerletDynamic,
1415
)
1516
from .ase_standard import EMTSinglePoint, LJSinglePoint
1617
from .cp2k import CP2KSinglePoint, CP2KYaml
@@ -29,6 +30,7 @@ __all__ = [
2930
"xTBSinglePoint",
3031
"LJSinglePoint",
3132
"LangevinThermostat",
33+
"VelocityVerletDynamic",
3234
"ApaxJaxMD",
3335
"RescaleBoxModifier",
3436
"BoxOscillatingRampModifier",

ipsuite/calculators/ase_md.py

+20
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from ase.md.langevin import Langevin
1616
from ase.md.npt import NPT
1717
from ase.md.velocitydistribution import MaxwellBoltzmannDistribution
18+
from ase.md.verlet import VelocityVerlet
1819
from tqdm import trange
1920

2021
from ipsuite import base
@@ -276,6 +277,25 @@ def get_thermostat(self, atoms):
276277
return thermostat
277278

278279

280+
class VelocityVerletDynamic(base.IPSNode):
281+
"""Initialize the Velocity Verlet dynamics
282+
283+
Attributes
284+
----------
285+
time_step: float
286+
time step of simulation
287+
"""
288+
289+
time_step: int = zntrack.params()
290+
291+
def get_thermostat(self, atoms):
292+
dyn = VelocityVerlet(
293+
atoms=atoms,
294+
timestep=self.time_step * units.fs,
295+
)
296+
return dyn
297+
298+
279299
class NPTThermostat(base.IPSNode):
280300
"""Initialize the ASE NPT barostat
281301
(Nose Hoover temperature coupling + Parrinello Rahman pressure coupling).

ipsuite/nodes.py

+1
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ class _Nodes:
9494
MixCalculator = "ipsuite.calculators.MixCalculator"
9595

9696
LangevinThermostat = "ipsuite.calculators.LangevinThermostat"
97+
VelocityVerletDynamic = "ipsuite.calculators.VelocityVerletDynamic"
9798
NPTThermostat = "ipsuite.calculators.NPTThermostat"
9899
RescaleBoxModifier = "ipsuite.calculators.RescaleBoxModifier"
99100
BoxOscillatingRampModifier = "ipsuite.calculators.BoxOscillatingRampModifier"

0 commit comments

Comments
 (0)