Installation¶
Requirements¶
Package |
Version |
Purpose |
|---|---|---|
Python |
≥ 3.10 |
Runtime |
NumPy |
≥ 1.24 |
Array operations throughout |
SciPy |
≥ 1.10 |
FFT convolution, NNLS, curve fitting, spherical Bessel functions |
Matplotlib |
≥ 3.7 |
All plotting functions in |
h5py |
≥ 3.7 |
Reading |
emcee |
≥ 3.1 (optional) |
Ensemble MCMC sampler. Falls back to Metropolis-Hastings if absent. |
From PyPI¶
pip install qens
# with the recommended ensemble sampler
pip install "qens[mcmc]"
From Source (recommended for development)¶
git clone https://github.com/ShubhamX57/QENS.git
cd QENS
pip install -e ".[mcmc]"
Verify¶
import qens
print(qens.__version__) # 2.0.0
print(qens.available_models())
# ['anisotropic_rotor', 'isotropic_rotor', 'translation_only']
Note
If emcee is not installed, run_mcmc() prints a
warning and falls back to a 4-chain Metropolis-Hastings sampler.
Results are statistically equivalent but the ensemble autocorrelation
time estimate is not available.
Connecting to Read the Docs¶
The repo ships a .readthedocs.yaml at the project root. To publish:
Push your fork to GitHub.
Log in at readthedocs.org with your GitHub account.
Click Import a Project and select
ShubhamX57/QENS.Read the Docs detects
.readthedocs.yamlautomatically — click Build.Docs go live at
https://qens.readthedocs.io/en/latest/.
Every git push to main triggers an automatic rebuild.