Skip to main content

PyPI version fury.io PyPI license

Convenient Interface to Inverse Ising

ConIII is a Python package for solving maximum entropy problems with a focus on the pairwise maximum entropy model, also known as the inverse Ising problem.

If you use ConIII for your research, please consider citing the following:

Lee, E.D. and Daniels, B.C., 2019. Convenient Interface to Inverse Ising (ConIII): A Python 3 Package for Solving Ising-Type Maximum Entropy Models. Journal of Open Research Software, 7(1), p.3. DOI: http://doi.org/10.5334/jors.217.

The paper also contains an overview of the modules. For code documentation, see here.

Installation

To set up an Anaconda environment called "test" and install from pip, run the following code. The openblas package is only recommended for AMD users.

$ conda create -n test -c conda-forge python=3.10 numpy scipy numba cython jupyter ipython multiprocess boost==1.74 matplotlib mpmath blas=*=openblas
$ pip install coniii

If you have trouble using pip, then you can always build this package from source. The following code will down download the latest release from GitHub and install the package. Make sure that you are running Python 3.10 and have boost v1.74.0 installed.

$ git clone https://github.com/eltrompetero/coniii.git
$ cd coniii
$ ./pypi_compile.sh
$ pip install dist/*.whl

Setting up exact solution for systems N > 9

If you would like to use the Enumerate solver for system sizes greater than 9 spins, you must run enumerate.py to write those files yourself. This can be run from the install directory. If you do not know where the installation directory is, you can find it by starting a Python terminal and running

>>> import coniii
>>> coniii.__path__

Once inside the install directory, you can run in your bash shell

$ python enumerate.py [N] 1

where [N] should be replaced by the size of the system. This specifies that the system should be written for the {-1,1} basis. Note that the package uses the {-1,1} basis by default. For more details, see the __main__ block at the end of the file enumerate.py.

For the {0,1} basis, use

$ python enumerate.py [N]

Quick guide with Jupyter notebook

A Jupyter notebook with a brief introduction and examples for how to use ConIII is available. The notebook is also installed into your package directory if you used pip.

To use the notebook, install jupyter such as by following the setup instructions above. Then, copy the notebook file "usage_guide.ipynb" into a directory outside the "coniii" directory. Change to this directory and run

$ jupyter notebook

This should open the notebook in your default web browser.

Troubleshooting

This package is only maintained for Python 3 and has only been tested for Python 3.10. Check which version of Python you are running in your terminal with

$ python --version

ConIII has been tested on the following systems

  • Ubuntu 20.04.5

Trouble compiling the Boost extension manually? Check if your Boost library is included in your path. If it is not, then you can add an include directory entry into the EXTRA_COMPILE_ARGS variable in "setup.py" before compiling.

Support

Please file an issue on the GitHub if you have any problems or feature requests. Provide a stack trace or other information that would be helpful in debugging. For example, OS, system configuration details, and the results of unit tests. Unit tests can be run by navigating to the package directory and running

$ pytest -q

The package directory can be found by running inside python

>>> import coniii
>>> coniii.__path__

You may also need to install pytest.

$ conda install -c conda-forge pytest

Updating

When updating, please read the RELEASE_NOTES. There may be modifications to the interface including parameter names as we make future versions more user friendly.

Documentation.

Metadata

Release files for coniii 3.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for coniii 3.0.1
File Size Uploaded
coniii-3.0.1.tar.gz 797.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for coniii 3.0.1
File Interpreter ABI Platform
coniii-3.0.1-cp310-cp310-manylinux1_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.5+ x86-64 Details

Total release size: 1.8 MB

Release files / coniii-3.0.1.tar.gz

Download URL coniii-3.0.1.tar.gz
Size 797.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e2ae73e6495ee5bdd7395bbb74c73f914fec43eb4791aa39b168f6f47d80afb9
BLAKE2b-256 checksum
How to use checksums
73404b87679c00c172a51e3af08938b616bd737ab43e6e11c88cabfe6cf57c83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release files / coniii-3.0.1-cp310-cp310-manylinux1_x86_64.whl

Download URL coniii-3.0.1-cp310-cp310-manylinux1_x86_64.whl
Size 1.0 MB
Tags CPython 3.10 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
b1d1bf74af0a26f373870834e4af7dc0d42ac73a0556a94318e50081a2342044
BLAKE2b-256 checksum
How to use checksums
265c0389e8886fffafba0bd4968a7bd542dffeeb9f9ee8784a6813a4133d02c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release history Release notifications | RSS feed

This release

3.0.1 This release

2 release files

3.0.0

2 release files

2.4.3

2 release files

2.4.2

2 release files

2.4.1

2 release files

2.4.0

2 release files

2.3.1

2 release files

2.3.0

2 release files

2.2.1

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.9

2 release files

1.1.8

2 release files

1.1.7

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.4

1 release file

1.1.3

1 release file

1.1.2

1 release file

1.1.1

1 release file

1.0.3

1 release file

1.0.2

1 release file

0.2.10

2 release files

0.2.9

2 release files

0.2.8

1 release file

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

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