Skip to main content

pycf is a collection of Python modules for crystal field theory and spin Hamiltonian calculations. It provides tools for setting up and fitting energy levels of rare-earth ions using crystal-field Hamiltonians, as well as utilities for working with spin Hamiltonians and transition intensities. The core library is implemented in C99 for performance, with Python/Cython wrappers for ease of use.

Status and Quality

CI Status Python Version Tests Passing

For detailed installation instructions, see INSTALL.md.

Branches

  • main — recommended for users who want stability. Updated when a development cycle reaches a tagged release.

  • devel — current integration branch. Track this if you want to follow ongoing work and try features before they land on main; expect occasional breakage.

  • Feature branches (feat/...) — in-progress work, opened for review via pull requests. Comment on them if you want to influence a feature before it merges into devel.

  • legacy — mirrors Sebastian Horvath’s original Bitbucket repository (https://bitbucket.org/sebastianhorvath/pycf/). Provided for historical reference; not actively developed.

By default git clone checks out main; pass -b devel (or git checkout devel after cloning) to follow the development branch.

Quick Start (Development)

git clone https://github.com/mikereidnz/pycf.git
cd pycf
python3 -m venv env
source env/bin/activate
pip install -e ".[test,examples]"
python -m pytest tests/ -q

Project Structure

  • cfl/ — C99 core library for setting up and fitting Hamiltonians.

  • pycf/ — Python/Cython wrappers

  • examples/ — End-to-end workflows for real materials

  • tests/ — Python and C unit tests

Documentation

  • INSTALL.md — Installation guide with platform-specific instructions

  • docs/legacy/ — Legacy technical documentation preserved for reference

  • examples/ — Material-specific usage examples

Authorship

Originally developed by Sebastian Horvath (sebastian.horvath@gmail.com). Currently maintained by Mike Reid (mike.reid@canterbury.ac.nz).

A legacy version is available at https://bitbucket.org/sebastianhorvath/pycf/ and also on the “legacy” branch of this repository.

License

GNU General Public License v3 (GPLv3)

Download files

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

Source Distribution

pycf_crystalfield-0.2.1.tar.gz (3.5 MB view details)

Uploaded Source

File details

Details for the file pycf_crystalfield-0.2.1.tar.gz.

File metadata

  • Download URL: pycf_crystalfield-0.2.1.tar.gz
  • Upload date:
  • Size: 3.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pycf_crystalfield-0.2.1.tar.gz
Algorithm Hash digest
SHA256 d506289387dd2219c9d429ebceefcb388c272bf5d8613a96c7528ffc3c2bcad1
MD5 4315e10acf4bb64ae1a0c96582314e96
BLAKE2b-256 b5e7345a98e59c0325fb9cbfbda6c0beeeafa4ee505cb79fd653cfcc1af0062f

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.1 This release

1 file

0.2.0

1 file

0.1.0

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page