Skip to main content

No project description provided

Project description

Fast calculation of structural parameters and autocorrelation functions

fastatomstruct is a Python package (mostly written in Rust) that includes functions to calculate atomic structural quantities. If possible, thread-based parallelization (using rayon) is employed to speed up calculations and take advantage of multicore processors.

Documentation

The documentation can be found here.

What can this package do?

The package can currently calculate the following quantities:

  • Structural
    • Atomic distances
    • Coordination numbers
    • Nearest neighbours
    • Radial distribution function
    • Static structure factor
    • Bond orientational parameter (Steinhardt et al.) and Bond Order Correlation parameter
    • Tetrahedral order parameter
    • Angular-limited three-body correlation (ALTBC)
    • Bond length ratio (BLR)
  • Dynamical
    • Mean squared displacement
    • Non-gaussian parameter
    • Overlap q
    • Four-point correlation functions
    • Autocorrelation (with and without interpolation)

Example usage

This example uses the Atomistic Simulation Environment, which can also be installed using pip (pip install ase) and is now a dependency of fastatomstruct.

from ase.build import bulk
from fastatomstruct import all_distances, coordination_numbers

# Lithium in the BCC phase with the unit cell repeated
# 10x10x10 times
atoms = bulk("Li", "bcc", 3.45).repeat((10, 10, 10))

# Atomic distances
dists = all_distances(atoms)

# Coordination numbers with a cutoff of 3 A
coordination = coordination_numbers(atoms, 3)

Installation

From PyPI

fastatomstruct can be installed from the Python Package Index. Currently, only Linux and Windows with a Python version >= 3.8 are supported. In addition, your processor has to be x86-64 with AVX2 support. Most processors since 2015 should meet those criteria. If your system doesn't, you can still install fastatomstruct from source (see next subsection).

To run the installation, use

pip install fastatomstruct

Image parallelization

If you want to use image parallelization with fastatomstruct.ipar (see documentation), you should also install mpi4py. Please consult the corresponding documentation for installation instructions and prerequisites.

From source

Installing fastatomstruct from source requires

  • Python >= 3.7
  • pip
  • a working Rust installation (1.56 and newer), including cargo
  • maturin, a Python package that can e.g. be installed using pip3 install --upgrade maturin

To build the Python wheel, run

maturin build --release

The resulting wheel will be located in target/wheels/. You can install it using

python3 -m pip install target/wheels/fastatomstruct-version.whl

Replace "version" with your actual Python version. The package can then be used in Python using e.g. from fastatomstruct import coordination_numbers.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

fastatomstruct-0.7.1-cp312-none-win_amd64.whl (1.2 MB view hashes)

Uploaded CPython 3.12 Windows x86-64

fastatomstruct-0.7.1-cp312-cp312-manylinux_2_34_x86_64.whl (781.1 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.34+ x86-64

fastatomstruct-0.7.1-cp312-cp312-manylinux_2_31_x86_64.whl (781.3 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.31+ x86-64

fastatomstruct-0.7.1-cp311-none-win_amd64.whl (1.2 MB view hashes)

Uploaded CPython 3.11 Windows x86-64

fastatomstruct-0.7.1-cp311-cp311-manylinux_2_34_x86_64.whl (781.9 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.34+ x86-64

fastatomstruct-0.7.1-cp311-cp311-manylinux_2_31_x86_64.whl (782.1 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.31+ x86-64

fastatomstruct-0.7.1-cp310-none-win_amd64.whl (1.2 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

fastatomstruct-0.7.1-cp310-cp310-manylinux_2_34_x86_64.whl (781.9 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.34+ x86-64

fastatomstruct-0.7.1-cp310-cp310-manylinux_2_31_x86_64.whl (782.1 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.31+ x86-64

fastatomstruct-0.7.1-cp39-none-win_amd64.whl (1.2 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

fastatomstruct-0.7.1-cp39-cp39-manylinux_2_34_x86_64.whl (782.7 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.34+ x86-64

fastatomstruct-0.7.1-cp39-cp39-manylinux_2_31_x86_64.whl (782.8 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.31+ x86-64

fastatomstruct-0.7.1-cp38-none-win_amd64.whl (1.2 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

fastatomstruct-0.7.1-cp38-cp38-manylinux_2_34_x86_64.whl (782.5 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.34+ x86-64

fastatomstruct-0.7.1-cp38-cp38-manylinux_2_31_x86_64.whl (782.7 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.31+ x86-64

fastatomstruct-0.7.1-cp37-cp37m-manylinux_2_34_x86_64.whl (782.8 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.34+ x86-64

fastatomstruct-0.7.1-cp37-cp37m-manylinux_2_31_x86_64.whl (782.9 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.31+ x86-64

Supported by

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