Skip to main content

A material interface structure prediction package

Project description

GPLv3 workflow Latest Release Methods Paper Code Paper Documentation Status FPM CMAKE GCC compatibility Coverage

RAFFLE

by Ned Thaddeus Taylor, Joe Pitfield, and Steven Paul Hepplestone

RAFFLE (pseudoRandom Approach For Finding Local Energetic minima) is a package for structural prediction applied to material interfaces. RAFFLE interfaces with the Atomic Simulation Environment (ASE).

RAFFLE is both a Fortran and a Python library, with the option of a Fortran executable. The code heavily relies on features of Fortran 2018 and above, so there is no backwards compatibility with Fortran95.

Documentation

Tutorials and documentation are provided on the docs website. The methodology is detailed in the Phys Rev B paper. The paper detailing the software package is currently avaialble on arXiv with plans for peer-reviewed publication.

Refer to the API Documentation section later in this document to see how to access the API-specific documentation.

Requirements

  • Fortran compiler supporting Fortran 2018 standard or later
  • fpm or CMake (fpm works only for Fortran installation)

Python-specific installation:

  • Python 3.11 or later (might work on earlier, have not tested)
  • NumPy.f2py
  • f90wrap
  • cython
  • scikit-build-core
  • meson
  • make or ninja
  • CMake
  • ASE

The library bas been developed and tested using the following Fortran compilers:

  • gfortran -- gcc 11.4.0
  • gfortran -- gcc 13.2.0
  • gfortran -- gcc 14.1.0
  • gfortran -- gcc 14.2.0

The library is known to not currently work with the intel Fortran compilers.

Installation

For the Python library, the easiest method of installation is to install it directly from pip:

pip install raffle

Once this is done, RAFFLE is ready to be used.

Alternatively, to download development versions or, if, for some reason, the pip method does not work, then RAFFLE can be installed from the source. To do so, the source must be obtained from the git repository. Use the following commands to get started:

 git clone https://github.com/ExeQuantCode/raffle.git
 cd raffle

Depending on what language will be used in, installation will vary from this point.

Python

For Python, the easiest installation is through pip:

pip install .

Another option is installing it through cmake, which involves:

mkdir build
cd build
cmake ..
make install

Then, the path to the install directory (${HOME}/.local/raffle) needs to be added to the include path. NOTE: this method requires that the user manually installs the ase, numpy and f90wrap modules for Python.

Fortran

For Fortran, either fpm or cmake are required.

fpm

fpm installation is as follows:

fpm build --profile release

This will install both the Fortran library and the Fortran application for RAFFLE. The library can then be called from other fpm-built Fortran programs through normal means (usually referencing the location of RAFFLE in the program's own fpm.toml file). The application can be run using (NOTE: The application is not a priority for development, so is less likely to work):

fpm run

The library can be tested to ensure compilation was successful (NOTE: Unit tests currently only provide minimal code coverage):

fpm test --profile release

cmake

cmake installation is as follows:

mkdir build
cd build
cmake [-DBUILD_PYTHON=Off] ..
make install

The optional filed (dentoted with [...]) can be used to turn off installation of the Python library. This will build the library in the build/ directory. All library files will then be found in:

${HOME}/.local/raffle

Inside this directory, the following files will be generated:

include/raffle.mod
lib/libraffle.a

To check whether RAFFLE has installed correctly and that the compilation works as expected, the following command can be run:

ctest

This runs the unit tests (found in the test directory) to ensure procedures output as expected.

MacOS

Issues can arise with the built-in C and Fortran compilers when installing on MacOS, particularly for Python installation. It is recommended to manually install new versions (such as via Homebrew) and setting the CC and FC environment variables (i.e. defining the default compilers for the respective language). We have found the following to work:

brew install gcc
brew install gfortran
export CC=$(brew --prefix gfortran)
export FC=$(brew --prefix gcc)

Now follow the instructions for the Python build methods.

Examples

After the library has been installed, a set of example programs can be found in the example directory (note, the test directory is for unit tests to ensure each procedure in the library produces expected outputs after compilation, they are not really needed to be looked at by potential users).

The example/fortran_exe example uses a shell script to run the Fortran installed application. It uses a user-editable input file param.in in the same directory to change values of the RAFFLE generator and provided database.

The example/python_pkg directory contains a set of subdirectories MATERIAL_learn that show how RAFFLE can be called using Python to implement it into existing structure search workflows. These examples are the recommended ones to run. To successfully run them, follow the above installation instructions for Python, then go to the example/python_pkg directory and run one of the scripts.

API documentation

API documentation can be generated using FORD (Fortran Documenter). To do so, follow the installation guide on the FORD website to ensure FORD is installed. Once FORD is installed, run the following command in the root directory of the git repository:

  ford ford.md

Contributing

Please note that this project adheres to the Contributing Guide. If you want to contribute to this project, please first read through the guide. If you have any questions, bug reports, or feature requests, please either discuss then in issues.

License

This work is licensed under a GPL v3 license.

Code Coverage

Automated reporting on unit test code coverage in the README is achieved through utilising the cmake-modules and dynamic-badges-action projects.

References

If you use this code, please cite our papers:

@article{Pitfield2024PredictingPhaseStability,
  title = {Predicting Phase Stability at Interfaces},
  author = {Pitfield, J. and Taylor, N. T. and Hepplestone, S. P.},
  journal = {Phys. Rev. Lett.},
  volume = {132},
  issue = {6},
  pages = {066201},
  numpages = {8},
  year = {2024},
  month = {Feb},
  publisher = {American Physical Society},
  doi = {10.1103/PhysRevLett.132.066201},
  url = {https://link.aps.org/doi/10.1103/PhysRevLett.132.066201}
}

@article{Taylor2025RAFFLEActiveLearning,
  title = {RAFFLE: Active learning accelerated interface structure prediction},
  author = {Taylor,  Ned Thaddeus and Pitfield,  Joe and Davies,  Francis Huw and Hepplestone,  Steven Paul},
  year = {2025},
  eprint={2504.02528},
  archivePrefix={arXiv},
  primaryClass={cond-mat.mtrl-sci},
  doi = {10.48550/ARXIV.2504.02528},
  url = {https://arxiv.org/abs/2504.02528},
  publisher = {arXiv},
}

Project details


Download files

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

Source Distribution

raffle-1.1.1.tar.gz (404.5 kB view details)

Uploaded Source

Built Distributions

raffle-1.1.1-cp313-cp313-musllinux_1_2_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

raffle-1.1.1-cp313-cp313-musllinux_1_2_i686.whl (2.4 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ i686

raffle-1.1.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

raffle-1.1.1-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl (1.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ i686

raffle-1.1.1-cp313-cp313-macosx_14_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.13macOS 14.0+ ARM64

raffle-1.1.1-cp312-cp312-musllinux_1_2_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

raffle-1.1.1-cp312-cp312-musllinux_1_2_i686.whl (2.4 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ i686

raffle-1.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

raffle-1.1.1-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl (1.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ i686

raffle-1.1.1-cp312-cp312-macosx_14_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

raffle-1.1.1-cp311-cp311-musllinux_1_2_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

raffle-1.1.1-cp311-cp311-musllinux_1_2_i686.whl (2.4 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ i686

raffle-1.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

raffle-1.1.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl (1.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ i686

raffle-1.1.1-cp311-cp311-macosx_14_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

File details

Details for the file raffle-1.1.1.tar.gz.

File metadata

  • Download URL: raffle-1.1.1.tar.gz
  • Upload date:
  • Size: 404.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for raffle-1.1.1.tar.gz
Algorithm Hash digest
SHA256 5ca37fd88b4f24134cb09348c1b5c717345801f37ce0582c954359efb7738e12
MD5 42313b511de00350e4028d6302eaaf68
BLAKE2b-256 f820e7285b606d5968cb68497f1bc876bd49a38ec085b1db0cbf69bc8f9ac1a4

See more details on using hashes here.

Provenance

The following attestation bundles were made for raffle-1.1.1.tar.gz:

Publisher: publish-to-test-pypi.yml on ExeQuantCode/RAFFLE

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file raffle-1.1.1-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for raffle-1.1.1-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 4d452f5b7d3af519dbee6b01eddb42d08a8992cb56c99f3885766e2a17a166ef
MD5 5a8e9a4cf830cbc194e2c6c97982e692
BLAKE2b-256 ab22f9e6e1ae1c4fc1a2058529cddae60cd1ec618fa1efa6e0342f0db692b263

See more details on using hashes here.

Provenance

The following attestation bundles were made for raffle-1.1.1-cp313-cp313-musllinux_1_2_x86_64.whl:

Publisher: publish-to-test-pypi.yml on ExeQuantCode/RAFFLE

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file raffle-1.1.1-cp313-cp313-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for raffle-1.1.1-cp313-cp313-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 143aa86ea8d75b6bdb942b2c37cecce52400020cc9a47fa529ef864263eebf32
MD5 ff5695acb0b6f444632ed341356609fb
BLAKE2b-256 62305ad9aeb66be98e0f8cc2feacd75ff2c1f7d638296705d9733605b4817cab

See more details on using hashes here.

Provenance

The following attestation bundles were made for raffle-1.1.1-cp313-cp313-musllinux_1_2_i686.whl:

Publisher: publish-to-test-pypi.yml on ExeQuantCode/RAFFLE

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file raffle-1.1.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for raffle-1.1.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c367a643589c8c4839a629c697c9df71ac3d3eb2895a1af906e3503ac2459266
MD5 3c80b2293f88038ec54c1daac5355c0d
BLAKE2b-256 c72de7a6e522484ea820fb4834216d7fc685ebeeb69dd92c09e200636d5c1fcd

See more details on using hashes here.

Provenance

The following attestation bundles were made for raffle-1.1.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish-to-test-pypi.yml on ExeQuantCode/RAFFLE

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file raffle-1.1.1-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for raffle-1.1.1-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 af5601a4597a04e92f59590f066688f21388ee7e608d2ea68ddacb111b864204
MD5 ba77046b5dc244e156c998abf4e421e4
BLAKE2b-256 d495fe898f17a424fb8fcacb09814c7174c898f1a5f28e1da9be151dd284af0e

See more details on using hashes here.

Provenance

The following attestation bundles were made for raffle-1.1.1-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl:

Publisher: publish-to-test-pypi.yml on ExeQuantCode/RAFFLE

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file raffle-1.1.1-cp313-cp313-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for raffle-1.1.1-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 0f095a89a36e6a36e2acd7d53194302c0355df95e6a77b46823587eaeb4f2b4a
MD5 f4894225d2632e8863406757d88eca03
BLAKE2b-256 9d54699fa6082f35b84629a5f275d0589688cf28b948b25e527f527e0afc8757

See more details on using hashes here.

Provenance

The following attestation bundles were made for raffle-1.1.1-cp313-cp313-macosx_14_0_arm64.whl:

Publisher: publish-to-test-pypi.yml on ExeQuantCode/RAFFLE

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file raffle-1.1.1-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for raffle-1.1.1-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 fa2ec3af927f1dc0c27b3875ae23ecc6322a959f6027d505407d99cb7b9ec59e
MD5 45631caacf21748eebac954dbd028ff6
BLAKE2b-256 1be919b2897d591f5e7c2bf3c06910dbb0d84d7b1edf22adb1636cfc597b9335

See more details on using hashes here.

Provenance

The following attestation bundles were made for raffle-1.1.1-cp312-cp312-musllinux_1_2_x86_64.whl:

Publisher: publish-to-test-pypi.yml on ExeQuantCode/RAFFLE

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file raffle-1.1.1-cp312-cp312-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for raffle-1.1.1-cp312-cp312-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 e1470efac51e7fd4be2b4c88f42cdb861e01457e0f6ac0d088123ba6d5482c4f
MD5 a924d9291b00cd9b020615ad65797874
BLAKE2b-256 fe1400732aeecc99ebc6d79003e953a989683b3aa7cadf53a7c3bc0f11bd00ce

See more details on using hashes here.

Provenance

The following attestation bundles were made for raffle-1.1.1-cp312-cp312-musllinux_1_2_i686.whl:

Publisher: publish-to-test-pypi.yml on ExeQuantCode/RAFFLE

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file raffle-1.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for raffle-1.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4c770f6c2b82d787994172fe80c0180d75817c9b5752be91530f2417659ad848
MD5 efcf3ab08f552b50088223562c3dec00
BLAKE2b-256 3910a976c0f76b35aa1667e10121fcfbc8eae3c781d867cb80ce5fbbf5ca693e

See more details on using hashes here.

Provenance

The following attestation bundles were made for raffle-1.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish-to-test-pypi.yml on ExeQuantCode/RAFFLE

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file raffle-1.1.1-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for raffle-1.1.1-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 e85ed63d6a1b51a9651f18b90db6b0e2bab2a4c3219307a65774a47e621173e2
MD5 511b424796a9aa7c815927593bb68ed8
BLAKE2b-256 2f8ef45375ce5eae47436bc78e4f2677d07b25e199fce491ab3a0b23eecd4c97

See more details on using hashes here.

Provenance

The following attestation bundles were made for raffle-1.1.1-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl:

Publisher: publish-to-test-pypi.yml on ExeQuantCode/RAFFLE

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file raffle-1.1.1-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for raffle-1.1.1-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 826d0fabd1c2e28572f2774c0763be5dcfdbd76a68868be66257234492f4a6eb
MD5 fc88c5d55c4a23b473e455ce08aeeac5
BLAKE2b-256 90b497c3ba216ca5198650bb3d24b59837fe136a579556091d09d33f1bae0557

See more details on using hashes here.

Provenance

The following attestation bundles were made for raffle-1.1.1-cp312-cp312-macosx_14_0_arm64.whl:

Publisher: publish-to-test-pypi.yml on ExeQuantCode/RAFFLE

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file raffle-1.1.1-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for raffle-1.1.1-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e64e850164d9803f525de6d4ee68a43fbb2ad5efb9fc8c4f88ef65c00f738fd0
MD5 bfd27c103828d885454948ae57481454
BLAKE2b-256 0e2c60aa44b9feadfb53fcb9e7c58546944cbd683c3e3695d1c32e41af605f59

See more details on using hashes here.

Provenance

The following attestation bundles were made for raffle-1.1.1-cp311-cp311-musllinux_1_2_x86_64.whl:

Publisher: publish-to-test-pypi.yml on ExeQuantCode/RAFFLE

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file raffle-1.1.1-cp311-cp311-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for raffle-1.1.1-cp311-cp311-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 5257135c617aa250e2935fedcb2a6ee5c4e73ad8f192f9514c47f15d917da98b
MD5 85e304a27b5474097520079777a708f4
BLAKE2b-256 0da771700581dc8c18c7b727d94b5442c419d3db8fdc9e0ba6ccd9c129f391d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for raffle-1.1.1-cp311-cp311-musllinux_1_2_i686.whl:

Publisher: publish-to-test-pypi.yml on ExeQuantCode/RAFFLE

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file raffle-1.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for raffle-1.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0f6b75328d1be1da20cc212be2c0dcfae5150935b91088ddc70382f147fe3dce
MD5 ea8d11e38e4777d8a868fe501f4c7e3d
BLAKE2b-256 4f900553d9865fb1a30b9a06e1947a7230c943b57b8252e0b819d0c0296e2e5f

See more details on using hashes here.

Provenance

The following attestation bundles were made for raffle-1.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish-to-test-pypi.yml on ExeQuantCode/RAFFLE

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file raffle-1.1.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for raffle-1.1.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 358e5bcdf15db0cdc83a6f9e737be1991aa6d0a88e986e82927de4667ae91545
MD5 3658e8309fec01613b16064a888901bf
BLAKE2b-256 b3f2e8ac6fb82fe9dda8fb6b966bf959839b0b28353abb8b0f31c856c06cc81b

See more details on using hashes here.

Provenance

The following attestation bundles were made for raffle-1.1.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl:

Publisher: publish-to-test-pypi.yml on ExeQuantCode/RAFFLE

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file raffle-1.1.1-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for raffle-1.1.1-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 42ebb22994557bdb4bb137ebf2c97fdac9debf03e98b5a467f071af21d3d7433
MD5 217397eb7f9d23db52fe8ade5c814277
BLAKE2b-256 e2b331db653a7d630ece3e9c37852c63e987472c590fb13f381ee38e325fc3a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for raffle-1.1.1-cp311-cp311-macosx_14_0_arm64.whl:

Publisher: publish-to-test-pypi.yml on ExeQuantCode/RAFFLE

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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