Python API

Opening ATAT structure files (str.out, lat.in)

from IMDgroup.pymatgen.core.structure import IMDStructure
s=IMDStructure.from_file('str.out') # Vacancies will be replaced with "X" atom species

VASP Directory Handling

The IMDGVaspDir class provides a dictionary-like interface to VASP directories with aggressive caching to handle high-throughput analysis on file systems like Lustre.

from IMDgroup.pymatgen.io.vasp.vaspdir import IMDGVaspDir

# Initialize (data will be loaded from cache if available)
vdir = IMDGVaspDir("path/to/vasp/calculation")

# Access parsed pymatgen objects
structure = vdir.structure
energy = vdir.final_energy
incar = vdir["INCAR"]

# Check convergence
if vdir.converged:
    print("Calculation converged!")

# Handling NEB directories
if vdir.nebp:
    for image_dir in vdir.neb_dirs():
        print(f"Image {image_dir.path}: {image_dir.final_energy}")

Transformations

Inserting Molecules

Find void space and insert species.

from IMDgroup.pymatgen.transformations.insert_molecule import InsertMoleculeTransformation

transformer = InsertMoleculeTransformation(
    molecule='Li',  # or Molecule object
    step=0.2,       # Grid spacing in Angstroms
    proximity_threshold=0.75
)

# Get list of all unique insertion structures
inserts = transformer.all_inserts('host_structure.cif')

Symmetry Cloning

Generate all symmetrically equivalent configurations of a structure.

from IMDgroup.pymatgen.transformations.symmetry_clone import SymmetryCloneTransformation
from pymatgen.core import Structure

host = Structure.from_file("host.cif")
# Structure with one interstitial site
defect = Structure.from_file("defect.cif")

# Generate all symmetrically equivalent defects
# relative to the host symmetry
trans = SymmetryCloneTransformation(sym_operations=host)
clones = trans.get_all_clones(defect)

Diffusion Analysis

The get_neb_pairs function automates the discovery of unique diffusion paths in a material.

from IMDgroup.pymatgen.diffusion.neb import get_neb_pairs

# Given a list of stable interstitial sites (structures) and the host prototype
# calculate all unique hops between them.
pairs = get_neb_pairs(
    structures=stable_sites_list,
    prototype=host_structure,
    cutoff='auto',         # Automatically determine max hop distance
    remove_compound=True   # Remove multi-step paths if single steps exist
)

for start, end in pairs:
    print(f"Path from {start} to {end}")