Skip to main content

Python interface for ALF, plus scripts and Jupyter notebooks.

Project description

Documentation drawing

pyALF

A Python package building on top of ALF, meant to simplify the different steps of working with ALF, including:

  • Obtaining and compiling the ALF source code
  • Preparing and running simulations
  • Postprocessing and displaying the data obtained during the simulation

It introduces:

  • The Python module py_alf, exposing all the package's utility to Python.
  • A set of command line tools in the folder, that make it easy to leverage pyALF from a Unix shell. They are automatically exposed to the shell when pyALF is installed via pip. Their source code can be found in py_alf/cli and documentation here.
  • Jupyter notebooks in the folder Notebooks, serving as an easy introduction to QMC and ALF.
  • Python Scripts in the folder Scripts that can be run to reproduce benchmark results for established models.

The documentation can be found here.

Installation


⚠️ NOTE In previous versions of pyALF, the installation instructions asked the users to set the environment variable PYTHONPATH. This conflicts with the newer pip package, therefore you should remove definitions of this environment variable related to pyALF.


pyALF can be installed via the Python package installer pip.

pip install pyALF

For running ALF, you will additionaly need the ALF prerequsites.

Alternatively, one could use this Docker image, which has ALF, pyALF and a Jupyter server pre-installed.

Development installation

If you want to develop pyALF, you can clone the repository and install it in development mode, which allows you to edit the files while using them like an installed package. For this, it is highly recommended to use a dedicated Python environment using e.g. Python venv or a conda environment. The following example shows how to install pyALF in development mode using venv.

git clone https://git.physik.uni-wuerzburg.de/ALF/pyALF.git
cd pyALF
python -m venv .venv
source .venv/bin/activate

pip install --editable .

Usage

There are multiple ways to use pyALF, which roughly breaks down into three approaches:

  • Using Jupyter notebooks
  • Using the command line interface
  • Use the module py_alf in custom scripts

Jupyter notebooks

A convenient way to use pyALF is through Jupyter notebooks. They are run through a Jupyter server started, e.g., from the command line:

jupyter-lab

or

jupyter-notebook

which opens the "notebook dashboard" in your default browser, from where one can open the sample notebooks in Notebooks/ and create new notebooks.

Command line interface

pyALF also delivers a set of command line scripts, to be use from a UNIX shell. For a full list of command line scripts see here.

Try, e.g.

alf_run -h

The source code for the scripts can be found in the folder py_alf/cli/.

Use module py_alf in custom scripts

Finally, one can also use the module module py_alf in custom Python scripts, which is analogous to the usage in Jupyter notebooks minus some interactivity.

License

The various works that make up the ALF project are placed under licenses that put a strong emphasis on the attribution of the original authors and the sharing of the contained knowledge. To that end we have placed the ALF source code under the GPL version 3 license (see license.GPL and license.additional) and took the liberty as per GPLv3 section 7 to include additional terms that deal with the attribution of the original authors(see license.additional). The Documentation of the ALF project by the ALF contributors is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License (see Documentation/license.CCBYSA) We mention that we link against parts of lapack which licensed under a BSD license(see license.BSD).

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

pyalf-2.6.post16.tar.gz (124.2 kB view details)

Uploaded Source

Built Distribution

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

pyalf-2.6.post16-py3-none-any.whl (130.4 kB view details)

Uploaded Python 3

File details

Details for the file pyalf-2.6.post16.tar.gz.

File metadata

  • Download URL: pyalf-2.6.post16.tar.gz
  • Upload date:
  • Size: 124.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Alpine Linux","version":"3.23.3","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pyalf-2.6.post16.tar.gz
Algorithm Hash digest
SHA256 7bef6161e05e2e67dd67e4551eb78fc255052c75682699c66ff7c60d21dd3695
MD5 886f0d58dfe798e39887c30edd68aa08
BLAKE2b-256 b0e601d81c713e4347e3461ef7179d6802d657ebaa9902b2e1f6f7c8fc2b456e

See more details on using hashes here.

File details

Details for the file pyalf-2.6.post16-py3-none-any.whl.

File metadata

  • Download URL: pyalf-2.6.post16-py3-none-any.whl
  • Upload date:
  • Size: 130.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Alpine Linux","version":"3.23.3","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pyalf-2.6.post16-py3-none-any.whl
Algorithm Hash digest
SHA256 5d10874c400e6f803ef75e03c4101d32ea12b8d801f03c4caf0ecfdae80ff142
MD5 73119ca12ac5763a57a5008b56b5592e
BLAKE2b-256 d1e2926954ddb3a7fad684ce599060e5e1b4c1eb369ed43859674e1aa17abfa4

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