Skip to main content

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.

Project description

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.

Just like its ancient Egyptian deity counterpart, this all-in-one Python package contains a range of tools from spectra normalisation to deuteration estimations. A set of physico-chemical constants and definitions is also included. Aton also allows you to easily create, edit and analyse all kinds of text files, with a special focus on ab-initio calculation files. In particular, it contains interfaces for Quantum ESPRESSO, Phonopy and CASTEP.

The source code is available on GitHub.
Check the full documentation online.


Installation

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

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

With pip

The fastest way to install Aton is through pip:

pip install aton

From source

Optionally, you can install Aton from the GitHub repository.

First install the dependencies:

pip install pandas numpy scipy

Then 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 of the documentation is found at docs/aton.html.
Code examples are included in the examples/ folder.

Interfaces for ab-initio codes

The interface module contains interfaces for several ab-initio codes.
These are powered by the text module and can be easily extended.

aton.interface

interface.qe Interface for Quantum ESPRESSO's pw.x module
interface.phonopy Interface for Phonopy calculations
interface.castep Interface for CASTEP calculations

Physico-chemical constants

The phys module contains physico-chemical definitions. All values can be accessed directly as phys.value or phys.function().

aton.phys

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

Spectral analysis tools

The spectra module includes tools to analyse spectral data, such as Inelastic Neutron Scattering, Raman, Infrared, etc.

⚠️ WARNING: The spectra module is not yet 100% ported, bugs are expected!

aton.spectra

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

General text edition

The text module includes tools for general text edition.

aton.text

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

System tools

The st module contains System Tools for common tasks across subpackages.

aton.st

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

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 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.


License

Copyright (C) 2024 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.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aton-0.0.1b8.tar.gz (73.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aton-0.0.1b8-py3-none-any.whl (78.8 kB view details)

Uploaded Python 3

File details

Details for the file aton-0.0.1b8.tar.gz.

File metadata

  • Download URL: aton-0.0.1b8.tar.gz
  • Upload date:
  • Size: 73.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for aton-0.0.1b8.tar.gz
Algorithm Hash digest
SHA256 1f9e38f154e648bd7cdc4b2c2cab47a3b2845d0956c691fb9aeaf925f544a215
MD5 962c2cde060402de785da750773942c3
BLAKE2b-256 a9d20dafeaa82ddd4a7ddcd2009229bfa3fe030b467f557802f3934ee70c9bdb

See more details on using hashes here.

File details

Details for the file aton-0.0.1b8-py3-none-any.whl.

File metadata

  • Download URL: aton-0.0.1b8-py3-none-any.whl
  • Upload date:
  • Size: 78.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for aton-0.0.1b8-py3-none-any.whl
Algorithm Hash digest
SHA256 a52606c1ed0d552bb210460af993e622cfe2d54f15124b90d8b86a7604f89e04
MD5 ca8c4ce3dc75b459a264337669ddb867
BLAKE2b-256 2f736b4fbfe065735517ce3b70889856410cd6a5d5e65aa6adf0601dc428cb35

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page