Quick Start¶
Get started with a2c_ase
in minutes.
Prerequisites¶
a2c_ase
installed (Installation Guide)- A calculator installed (MACE)
Five-Step Workflow¶
1. Generate Random Structure¶
from a2c_ase.utils import random_packed_structure
from pymatgen.core.composition import Composition
import numpy as np
comp = Composition("Si64")
cell = np.array([[11.1, 0.0, 0.0], [0.0, 11.1, 0.0], [0.0, 0.0, 11.1]])
atoms, log = random_packed_structure(comp, cell, auto_diameter=True)
2. Run Melt-Quench MD¶
from a2c_ase.runner import melt_quench_md
amorphous, md_log = melt_quench_md(
atoms, calculator,
T_high=2000.0, T_low=300.0,
equi_steps=2500, cool_steps=2500, final_steps=2500
)
3. Extract Subcells¶
from a2c_ase.utils import extract_crystallizable_subcells
subcells = extract_crystallizable_subcells(
amorphous, d_frac=0.2, n_min=2, n_max=8, cubic_only=True
)
4. Optimize Structures¶
from a2c_ase.runner import relax_unit_cell
for subcell in subcells:
relaxed, logger = relax_unit_cell(subcell, calculator, fmax=0.01)
# Analyze relaxed structure
5. Analyze Results¶
from pymatgen.analysis.structure_analyzer import SpacegroupAnalyzer
# Find lowest energy and determine space group
# Compare to reference structures
Complete Example¶
See the full working example: example/Si64.py
Next Steps¶
- Understand the workflow: User Guide
- API documentation: Runner | Utils
- Full example: Si64.py Example
Tips¶
Memory
Large systems with many subcells need significant memory. Use larger d_frac
or smaller n_max
to reduce subcell count.