Skip to content

usnistgov/analphipy

Repository files navigation

Repo Docs PyPI license PyPI version Conda (channel only) Code style: black

analphipy

Utilities to perform metric analysis on fluid pair potentials. The main features of analphipy as follows:

Overview

analphipy is a python package to calculate metrics for classical models for pair potentials. It provides a simple and extendable api for pair potentials creation. Several routines to calculate metrics are included in the package.

Features

  • Pre-defined spherically symmetric potentials
  • Simple interface to extended to user defined pair potentials
  • Routines to calculate Noro-Frenkel effective parameters.
  • Routines to calculate Jensen-Shannon divergence

Status

This package is actively used by the author. Please feel free to create a pull request for wanted features and suggestions!

Quick start

Use one of the following to install analphipy

pip install analphipy

or

conda install -c conda-forge analphipy

Example usage

# Create a Lennard-Jones potential
>>> import analphipy
>>> p = analphipy.potential.LennardJones(sig=1.0, eps=1.0)

# Get a Noro-Frenekl analysis object
>>> n = p.to_nf()

# Get effective parameters at inverse temperature beta
>>> n.sig(beta=1.0)
1.01560...

>>> n.eps(beta=1.0)
-1.0

>>> n.lam(beta=1.0)
1.44097...

Documentation

See the documentation for a look at analphipy in action.

License

This is free software. See LICENSE.

Contact

The author can be reached at wpk@nist.gov.

Credits

This package was created with Cookiecutter and the wpk-nist-gov/cookiecutter-pypackage Project template forked from audreyr/cookiecutter-pypackage.

TODO

  • remove # type: ignore from potentials.py, base_potentials.py
  • add back check_untyped_defs to pyproject.toml mypy config
  • remove use of custom_inherit