Runner¶
High-level functions for molecular dynamics simulations and structure optimization.
melt_quench_md ¶
melt_quench_md(atoms, calculator: Calculator, *, equi_steps: int = 2500, cool_steps: int = 2500, final_steps: int = 2500, T_high: float = 2000.0, T_low: float = 300.0, time_step: float = 2.0, friction: float = 0.01, trajectory_file: str | None = None, seed: int = 42, verbose: bool = True, log_interval: int = 100)
Run melt-quench molecular dynamics to generate amorphous structures.
Performs a three-stage MD simulation: 1. High-temperature equilibration to melt the structure 2. Controlled cooling to quench the liquid 3. Low-temperature equilibration to relax the structure
Parameters:
Name | Type | Description | Default |
---|---|---|---|
atoms
|
Atoms
|
ASE Atoms object with initial atomic structure |
required |
calculator
|
Calculator
|
ASE calculator for computing forces and energies |
required |
equi_steps
|
int
|
Number of steps for high-temperature equilibration |
2500
|
cool_steps
|
int
|
Number of steps for cooling phase |
2500
|
final_steps
|
int
|
Number of steps for final low-temperature equilibration |
2500
|
T_high
|
float
|
High temperature for melting phase (K) |
2000.0
|
T_low
|
float
|
Low temperature for final phase (K) |
300.0
|
time_step
|
float
|
MD time step (fs) |
2.0
|
friction
|
float
|
Langevin friction parameter (atomic units) |
0.01
|
trajectory_file
|
str
|
Path to save MD trajectory |
None
|
seed
|
int
|
Random seed for reproducibility |
42
|
verbose
|
bool
|
Whether to print progress information |
True
|
log_interval
|
int
|
Number of steps between progress logs |
100
|
Returns:
Name | Type | Description |
---|---|---|
atoms |
Atoms
|
ASE Atoms with final amorphous structure |
log_data |
dict
|
Dictionary with temperature and energy trajectories |
relax_unit_cell ¶
relax_unit_cell(atoms: Atoms, calculator: Calculator, *, max_iter: int = 200, fmax: float = 0.01, trajectory_file: str | None = None, verbose: bool = True) -> tuple[Atoms, dict]
Relax atomic positions and cell parameters using FIRE optimization.
Performs simultaneous optimization of atomic positions and unit cell parameters using the Fast Inertial Relaxation Engine (FIRE) algorithm. The cell optimization is handled through ASE's FrechetCellFilter.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
atoms
|
Atoms
|
ASE Atoms object containing atomic positions, species and cell information |
required |
calculator
|
Calculator
|
ASE calculator for computing energies, forces and stresses |
required |
max_iter
|
int
|
Maximum FIRE iterations, by default 200 |
200
|
fmax
|
float
|
Force convergence criterion in eV/Å, by default 0.01 |
0.01
|
trajectory_file
|
str
|
Path to save optimization trajectory, by default None |
None
|
verbose
|
bool
|
Print optimization progress, by default True |
True
|
Returns:
Type | Description |
---|---|
tuple[Atoms, dict]
|
|
Notes
The calculator must support stress tensor calculations. Periodic boundary conditions must be enabled on the Atoms object.