atomistics.calculators.ase.calc_molecular_dynamics_npt_with_ase#
- atomistics.calculators.ase.calc_molecular_dynamics_npt_with_ase(structure: Atoms, ase_calculator: Calculator, run: int = 100, thermo: int = 100, timestep: float = 0.09822694788464063, ttime: float = 9.822694788464064, pfactor: float = 120.44281717098323, temperature: float = 300.0, externalstress: ndarray = array([0., 0., 0., 0., 0., 0.]), output_keys: Iterable[str] = ('positions', 'cell', 'forces', 'temperature', 'energy_pot', 'energy_tot', 'pressure', 'velocities', 'volume')) dict[source]#
Perform NPT molecular dynamics simulation using ASE.
- Parameters:
structure (Atoms) – The atomic structure to simulate.
ase_calculator (ASECalculator) – The ASE calculator to use for energy and force calculations.
run (int, optional) – The number of MD steps to perform. Defaults to 100.
thermo (int, optional) – The interval at which to print thermodynamic properties. Defaults to 100.
timestep (float, optional) – The time step size in fs. Defaults to 1 * units.fs.
ttime (float, optional) – The total time for the simulation in fs. Defaults to 100 * units.fs.
pfactor (float, optional) – The pressure factor in GPa * fs^2. Defaults to 2e6 * units.GPa * (units.fs**2).
temperature (float, optional) – The desired temperature in Kelvin. Defaults to 300.0.
externalstress (np.ndarray, optional) – The external stress tensor in bar. Defaults to np.array([0.0, 0.0, 0.0, 0.0, 0.0, 0.0]) * units.bar.
output_keys (list[str], optional) – The keys of the properties to include in the output dictionary. Defaults to OutputMolecularDynamics.keys().
- Returns:
A dictionary containing the calculated properties at each MD step.
- Return type:
dict