How-To Guides#
Step-by-step guides for common tasks and workflows with aiida-atomistic.
User Guides#
🏗️ Creating and Modifying Structures#
Learn the basics of structure creation and manipulation:
How-to Guide: Creation and Mutation
Topics: Initialization methods, mutable vs immutable, conversion between formats
Use cases: Building structures from scratch, importing from files, modifying existing structures
What you’ll learn:
Create structures from dictionaries, ASE, pymatgen
Use
StructureDataMutablefor building and editingConvert between mutable and immutable structures
Export to various formats (CIF, MCIF, ASE, pymatgen)
🧲 Working with Magnetic Structures#
Add and manipulate magnetic properties:
How-to Guide: Magnetic Structures
Topics: Collinear and non-collinear magnetism, magnetic kinds, total magnetization
Use cases: Magnetic materials, spin-polarized DFT calculations, magnetic ordering
What you’ll learn:
Set collinear magnetic moments
Define non-collinear spin orientations
Work with magnetic kinds
Calculate total magnetization
🏷️ Understanding and Using Kinds#
Master the kinds system for efficient structure representation:
How-to Guide: Working with Kinds
Topics: Automatic kind generation, tolerance system, kind validation, manual assignment
Applications: Storage optimization, plugin compatibility, large structures
What you’ll learn:
What kinds are and why they matter
Generate kinds automatically with
generate_kinds()Control tolerances for property comparison
Validate kind consistency
Access kind-based structure representations
🎨 Defining Custom Properties#
Store additional structure-related information:
How-to Guide: Custom Properties
Topics: Using the
customdictionary, when to use extras insteadUse cases: Plugin-specific data, experimental metadata, specialized properties
What you’ll learn:
Store custom data in structures
Difference between
customdict and AiiDA extrasBest practices for custom properties
🔍 Querying Structures#
Find and analyze structures in your database:
How-to Guide: Querying Structures
Topics: Search patterns, property filtering, QueryBuilder usage
Tools: AiiDA QueryBuilder integration
What you’ll learn:
Query structures by properties
Filter by composition, magnetic properties, etc.
Efficient database searches
Developer Guides#
🔧 Adding New Properties#
Extend aiida-atomistic with new property types:
Developer Guide: Adding Properties
Topics: Site vs global properties, computed fields, setters/getters, validation, testing
For: Contributors adding features to aiida-atomistic
What you’ll learn:
Add new site properties with full integration
Add new global properties
Implement computed fields for array access
Write validators and tests
Contribute via fork and pull request
🔌 Migrating Your Plugin#
Update your AiiDA plugin to support aiida-atomistic:
Developer Guide: Plugin Migration
Topics: Property validation, supported properties, backward compatibility
For: Plugin developers migrating from legacy
orm.StructureData
What you’ll learn:
Access properties via the
propertiesattributeValidate supported properties in CalcJobs
Handle unsupported properties gracefully
Support both legacy and atomistic structures
Real examples from aiida-quantumespresso