aton

Welcome to ATON

The Ab-iniTiO & Neutron research toolbox, or ATON, provides powerful and comprehensive tools for cutting-edge materials research, focused on (but not limited to) neutron science. Designed to bridge the gap between theoretical modeling and experimental validation, ATON allows researchers to streamline and simplify workflows in the study of advanced materials.

Just like its ancient Egyptian deity counterpart, this all-in-one Python package comprises a range of utility tools from INS spectra analysis to ab-initio interfaces for Quantum ESPRESSO, Phonopy and CASTEP. Conversion factors and universal constants from the 2022 CODATA Recommended Values of the Fundamental Physical Constants are also included.

The source code is available on GitHub.


Installation

As always, it is recommended to install your packages in a virtual environment:

python3 -m venv .venv
source .venv/bin/activate

With pip

Install ATON with

pip install aton

Or upgrade to a new version as

pip install aton -U

From source

Optionally, you can install ATON from the GitHub repo. Clone the repository or download the latest stable release as a ZIP, unzip it, and run inside the ATON/ directory:

pip install .

Documentation

The full ATON documentation is available online.
An offline version is found at docs/aton.html.
Code examples are included in the examples/ folder.

Interfaces for ab-initio codes

The api module contains Python interfaces for several ab-initio codes and related. These are powered by the aton.txt module and can be easily extended.

aton.api

aton.api.qe Interface for Quantum ESPRESSO's pw.x module
aton.api.phonopy Interface for Phonopy calculations
aton.api.castep Interface for CASTEP calculations
aton.api.slurm Batch jobs via Slurm

Physico-chemical constants

The phys module contains physical constants and conversion factors, as well as chemical information from all known elements. Values are accessed directly as phys.value or phys.function().

aton.phys

aton.phys.units Physical constants and conversion factors
aton.phys.atoms Megadictionary with data for all chemical elements
aton.phys.functions Functions to sort and analyse element data

Quantum rotations

The QRotor module is used to study energy excitations and tunnel splittings from molecular rotations, such as those of methyl and amine groups.

aton.qrotor

aton.qrotor.system Definition of the quantum System object
aton.qrotor.systems Functions to manage several System objects
aton.qrotor.rotate Rotate specific atoms from structural files
aton.qrotor.constants Common bond lengths and inertias
aton.qrotor.potential Potential definitions and loading functions
aton.qrotor.solve Solve rotation eigenvalues and eigenvectors
aton.qrotor.plot Plotting functions

Spectra analysis

The spx module includes tools for spectral analysis from Inelastic Neutron Scattering, Raman, Infrared, etc.

aton.spx

aton.spx.classes Class definitions for the spectra module
aton.spx.fit Spectra fitting functions
aton.spx.normalize Spectra normalization
aton.spx.plot Plotting
aton.spx.deuterium Deuteration estimations via INS
aton.spx.samples Sample materials for testing

General text edition

The txt module handles text files. It powers more complex subpackages, such as aton.api.

aton.txt

aton.txt.find Search for specific content in text files
aton.txt.edit Manipulate text files
aton.txt.extract Extract data from raw text strings

System tools

Additional utility tools are available for common system tasks across subpackages.

aton.file File manipulation
aton.alias Useful dictionaries for user input correction
aton.call Run bash scripts and related

Contributing

If you are interested in opening an issue or a pull request, please feel free to do so on GitHub.
For major changes, please get in touch first to discuss the details.

Code style

Please try to follow some general guidelines:

  • Use a code style consistent with the rest of the project.
  • Include docstrings to document new additions.
  • Include automated tests for new features or modifications, see automated testing.
  • Arrange function arguments by order of relevance. Most implemented functions follow something similar to function(file, key/s, value/s, optional).

Automated testing

If you are modifying the source code, you should run the automated tests of the ATON/tests/ folder to check that everything works as intended. To do so, first install PyTest in your environment,

pip install pytest

And then run PyTest inside the ATON/ directory,

pytest -vv

Compiling the documentation

The documentation can be compiled automatically to docs/aton.html with Pdoc and ATON itself, by running:

python3 makedocs.py

This runs Pdoc, updating links and pictures, and using the custom theme CSS template from the css/ folder.


Citation

ATON development started for the following paper, please cite if you use ATON in your work:
Cryst. Growth Des. 2024, 24, 391−404

License

Copyright (C) 2025 Pablo Gila-Herranz
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the attached GNU Affero General Public License for more details.

 1"""
 2.. include:: ../_README_temp.md
 3"""
 4
 5
 6from ._version import __version__ as version
 7from . import file
 8from . import alias
 9from . import call
10from . import phys
11from . import txt
12from . import api
13from . import spx
14from . import qrotor