Thank you for your interest in contributing to ATLAS. This guide is aimed at external collaborators who want to modify the codebase, add features, or fix bugs.
Here are listed a few guidelines to ensure compatibility with the existing codebase and to make the contribution process smoother, however, these are not strict rules and we are open to suggestions and improvements to the development workflow. Please reach out in the discussions if you have any ideas on how to make it better.
- Python 3.11 (minimum version, however 3.12 and 3.13 have been tested successfully)
- Access to a Linux environment with GPU (for MACE-related work)
# Install in editable mode with development dependencies
pip install -e '.[dev]'
# If you need GPU/MACE support
pip install -e '.[dev,mace]'After installation, initialize config files:
atl_init_setupThis will prompt you for a Materials Project Registry (MPR) API key that will be stored in a file in the configuration directory. You can obtain one for free from Materials Project.
Several ATLAS components (DFT calculations, active learning workflows, MACE training) integrate with AiiDA for workflow orchestration and database management.
If you only need to modify core library code (structure handling, database generation, CLI tools, filters), you do not need AiiDA installed.
If you need to work with AiiDA-dependent components (active learning, DFT submissions, CalcJobs, parsers, workchains), you will need:
- An AiiDA installation: aiida-core docs
- A configured profile:
verdi presto(quick setup for development) - aiida-vasp: aiida-vasp docs
- aiida-lammps (for MD simulations): aiida-lammps docs
After any change to CalcJob, Parser, or WorkChain classes, reinstall the package for AiiDA to pick up the new entry points:
pip install -e .Install pre-commit to run linting and checks automatically before each commit:
pre-commit installThe hooks run:
- Documentation regeneration from schema (if
config_schema.yamlchanges) - Ruff linting (
ruff --fix --show-fixes) - End-of-file fixer
- YAML and TOML validation
You can also run manually:
pre-commit run --all-filesATLAS uses commitizen with conventional commits. Use cz commit to guide commit messages.
Commit format: <type>(<scope>): <summary>
Types: feat, fix, docs, style, refactor, perf, test, chore
Scopes: al_loop, schema, report, core, md, dft, safeguard, init_db, domain_validity, benchmarks
Examples:
feat(al_loop): add safeguard check before early stopping
fix(core): correct vacuum direction heuristic for slabs
docs(schema): update MACE training settings documentation
refactor(active_learning): consolidate descriptor generation
pytest tests/Tests are concentrated in core/ modules (Structure, PhaseDiagram, Clusters, Exceptions, Code Utils). The active learning and AiiDA workflow modules have limited test coverage as of now, so contributions adding tests to these areas are welcome.
Some tests require an active AiiDA profile.
ATLAS uses Ruff for linting and formatting:
- Line length: 88 characters
- NumPy-style docstrings
- Single quotes
- Imports sorted (isort)
Ruff configuration is in pyproject.toml. Run ruff check --fix src/ to auto-fix issues.
If you're adding a new CalcJob, Parser, WorkChain, or custom data type:
- Place the class in the appropriate module under
src/ATLAS/. - Register entry points in
pyproject.tomlunder the relevant[project.entry-points."aiida.*"]section. - Reinstall with
pip install -e .for AiiDA to discover the new entry points. - Follow existing patterns, review similar components in the codebase for naming conventions and structure.
Key conventions:
- CalcJobs use
spec.input()/spec.output()for inputs and outputs - Parsers set
node.exit_codeon failure; use exit codes >= 400 for application-level errors - WorkChains use
spec.expose()to expose inner workchain inputs/outputs - Every ASE
Atomsobject should carryatoms.info['atl_id'](UUID) for tracking
API documentation is generated with Sphinx and sphinx-multiversion:
sphinx-multiversion docs _build/htmlInput schema changes: If you modify src/ATLAS/data/config_schema.yaml, run:
pre-commit run update-docs-from-schema --files src/ATLAS/data/config_schema.yamlThis regenerates docs/source/input.md.
When opening an issue, please include:
- ATLAS version (
atl_active_learning --versionor checkpyproject.toml) - Python version (
python --version) - Relevant configuration snippets (after redacting, never share API keys or credentials!)
- Steps to reproduce
- Error messages / logs (full traceback, not just the last line)
For AiiDA-related issues:
- Include the node PK:
verdi node show <pk> - Attach the calculation report:
verdi node report <pk> - Note which AiiDA plugins are involved (aiida-core, aiida-vasp, aiida-lammps versions)
- Create a feature branch from
main - Make your changes, following the commit convention above
- Run
pre-commit run --all-filesto ensure linting passes - Run the test suite:
pytest tests/ - Open a pull request with a clear description of the changes
Thank you for contributing to ATLAS!