API Reference#
Complete API documentation for airsspy modules and classes.
Core Modules#
airsspy.seed
SeedAtoms, BuildcellParam, and tag classes for seed generation.
airsspy.build
Buildcell class for interfacing with AIRSS buildcell executable.
airsspy.restools
RESFile and utilities for handling CASTEP .res files.
airsspy.utils
Utility functions for file parsing and data processing.
Module Index#
Usage Examples#
Creating Seeds#
from airsspy import SeedAtoms
# Create a seed
seed = SeedAtoms('Si8', cell=[5, 5, 5], pbc=True)
seed[0].num = 8
seed.gentags.minsep = 2.0
seed.gentags.varvol = 20
# Generate structure
atoms = seed.build_random_atoms()
Using Buildcell#
from airsspy import Buildcell
# Create Buildcell instance
builder = Buildcell(seed)
# Generate with custom timeout
atoms = builder.generate(timeout=30)
Working with RES Files#
from airsspy import RESFile, save_airss_res
# Read RES file
res = RESFile.from_file('structure.res')
print(f"Formula: {res.formula}")
print(f"Enthalpy: {res.enthalpy:.4f} eV")
# Save structure
info_dict = {
'uid': 'test-1',
'P': 0.0,
'V': atoms.get_volume(),
'H': atoms.get_potential_energy(),
'nat': len(atoms),
'sym': 'P1'
}
save_airss_res(atoms, info_dict, 'output.res')
Type Hints#
airsspy uses type hints throughout for better IDE support and code clarity. Import types from modules:
from airsspy.seed import SeedAtoms, BuildcellParam
from airsspy.build import Buildcell
from airsspy.restools import RESFile, TitlInfo
See Also#
Getting Started - Learn the basics
How-To Guides - Task-oriented guides
Explanations - Understand concepts