| Latest release | |
|---|---|
| Status | |
| Community |
A Python package for FRESEAN based analysis
pyFRESEAN is bound by a Code of Conduct.
import MDAnalysis as mda
from pyfresean import FRESEAN, Align, Unwrap
u = mda.Universe("topol.tpr", "traj.trr")
sel = u.select_atoms("all")
u_ref = mda.Universe("min.xyz")
# optional preprocessing (standard MDA trajectory transforms)
u.trajectory.add_transformations(
Unwrap(u.atoms),
Align(
sel,
reference_positions=u_ref.atoms.positions,
place_com_in_box=False, # gas phase
),
)
analysis = FRESEAN(
u,
select="all",
n_constraints=6,
n_corr=500,
dt=0.004,
sigma=10.0,
)
analysis.run()
print(analysis.results.freqs)
print(analysis.results.eigenvalues)
print(analysis.results.vdos_total)See also the minimal notebooks in examples/.
pip install -e ".[test]"
pytest # unit tests (default)
pytest -m pytutorial_ref # vs Python tutorial reference (~90 s; may download trajectory)
pytest -m c_ref # vs FRESEAN COARSE (C) referenceReference data:
pyfresean/tests/data/fresean_pytutorial_ref/— Python tutorial comparisonspyfresean/tests/data/fresean_c_ref/— FRESEAN COARSE (C) comparisons
On CI, every pull request runs unit tests plus all pytutorial_ref and
c_ref regressions. Download the c-ref-plots-* artifact from the
workflow run (Actions tab) for eigenvalue and VDoS PNG comparisons.
To build pyFRESEAN from source,
we highly recommend using virtual environments.
If possible, we strongly recommend that you use
Anaconda as your package manager.
Below we provide instructions both for conda and
for pip.
Ensure that you have conda installed.
Create a virtual environment and activate it:
conda create --name pyfresean
conda activate pyfresean
Install the development and documentation dependencies:
conda env update --name pyfresean --file devtools/conda-envs/test_env.yaml
conda env update --name pyfresean --file docs/requirements.yaml
Build this package from source:
pip install -e .
If you want to update your dependencies (which can be risky!), run:
conda update --all
And when you are finished, you can exit the virtual environment with:
conda deactivate
To build the package from source, run:
pip install .
If you want to create a development environment, install the dependencies required for tests and docs with:
pip install ".[test,doc]"
The pyFRESEAN source code is hosted at https://github.com/HeydenLabASU-collab/pyFRESEAN and is available under the MIT License (see the file LICENSE).
Copyright (c) 2026, Amruthesh Thirumalaiswamy
Project based on the MDAnalysis Cookiecutter version 0.1. Please cite MDAnalysis when using pyFRESEAN in published work.