Package: tmmc-lnpy
tmmc-lnpyOverviewA package to analyze $\ln \Pi(N)$ data from Transition Matrix Monte Carlo
simulation. The main output from TMMC simulations, $\ln \Pi(N)$, provides a
means to calculate a host of thermodynamic properties. Moreover, if $\ln \Pi(N)$
is calculated at a specific chemical potential, it can be reweighted to provide
thermodynamic information at a different chemical potentialFeaturestmmc-lnpyprovides a wide array of routines to analyze $\ln \Pi(N)$. These
include:Reweighting to arbitrary chemical potentialSegmenting $\ln \Pi(N)$ (to identify unique phases)Containers for interacting with several values of $\ln \Pi(N)$ in a vectorized
way.Calculating thermodynamic properties from these containersCalculating limits of stability, and phase equilibriumStatusThis package is actively used by the author. Please feel free to create a pull
request for wanted features and suggestions!Quick startUse one of the followingpipinstalltmmc-lnpyorcondainstall-cconda-forgetmmc-lnpyExample usageNote that the distribution nametmmc-lnpyis different than the import namelnpydue to name clashing on pypi.>>>importnumpyasnp>>>importlnpy>>>importlnpy.examples>>>ref=lnpy.examples.load_example_lnpimasked("lj_sub")>>>phase_creator=lnpy.PhaseCreator(nmax=1,ref=ref)>>>build_phases=phase_creator.build_phases_mu([None])>>>collection=lnpy.lnPiCollection.from_builder(...lnzs=np.linspace(-10,3,5),build_phases=build_phases...)# Collections are like pandas.Series>>>collection<class lnPiCollection>lnz_0   phase-10.00  0        [-10.0]-6.75   0        [-6.75]-3.50   0         [-3.5]-0.25   0        [-0.25]3.00   0          [3.0]dtype: object# Access xarray backend for Grand Canonical properties with `xge` accessor>>>collection.xge.betaOmega()<xarray.DataArray 'betaOmega' (lnz_0: 5, phase: 1)>array([[-2.3245e-02],[-6.0370e-01],[-1.8552e+02],[-1.5447e+03],[-2.9580e+03]])Coordinates:* lnz_0    (lnz_0) float64 -10.0 -6.75 -3.5 -0.25 3.0* phase    (phase) int64 0beta     float64 1.372volume   float64 512.0Attributes:dims_n:         ['n_0']dims_lnz:       ['lnz_0']dims_comp:      ['component']dims_state:     ['lnz_0', 'beta', 'volume']dims_rec:       ['sample']standard_name:  grand_potentiallong_name:      $\beta \Omega(\mu,V,T)$DocumentationSee thedocumentationfor a look attmmc-lnpyin action.LicenseThis is free software. SeeLICENSE.Related workThis package is used for withthermoextrapto analyze
thermodynamically extrapolated macro state probability distributions.ContactThe author can be reached atwpk@nist.gov.CreditsThis package was created withCookiecutterand thewpk-nist-gov/cookiecutter-pypackageProject template forked fromaudreyr/cookiecutter-pypackage.ChangelogChangelog forlnpyUnreleasedSee the fragment files inchangelog.dv0.5.0 — 2023-07-06AddedNow uselazy_loaderto
speed up initial load time.Full set of changes:v0.4.0...0.5.0v0.4.0 — 2023-05-12AddedPackage now available on conda-forge Full set of changes:v0.3.0...0.4.0ChangedChangedexamples.load_example_maskddatatoexamples.load_example_lnpimaskedfor consistency with other method names.v0.3.0 — 2023-05-02AddedAdded support for python3.11Moved_docstrings->docstringsto make availableMoved from local docfiller to module_utilities.docfillerMoved from local cached module to module-utilities.cachedAdd support for python3.11Full set of changes:v0.2.2...0.3.0ChangedUpdate package layoutNew linters via pre-commitDevelopment env now handled by toxv0.2.2 - 2023-04-05Full set of changes:v0.2.1...v0.2.2v0.2.1 - 2023-04-04Full set of changes:v0.2.0...v0.2.1v0.2.0 - 2023-04-04Full set of changes:v0.1.5...v0.2.0v0.1.5 - 2022-09-28Full set of changes:v0.1.4...v0.1.5v0.1.4 - 2022-09-26Full set of changes:v0.1.3...v0.1.4v0.1.3 - 2022-09-15Full set of changes:v0.1.2...v0.1.3v0.1.2 - 2022-09-14Full set of changes:v0.1.1...v0.1.2v0.1.1 - 2022-09-13Full set of changes:v0.1.0...v0.1.1v0.1.0 - 2022-09-13Full set of changes:v0.0.1...v0.1.0v0.0.1 - 2022-09-13This software was developed by employees of the National Institute of Standards
and Technology (NIST), an agency of the Federal Government. Pursuant to title 17
United States Code Section 105, works of NIST employees are not subject to
copyright protection in the United States and are considered to be in the public
domain. Permission to freely use, copy, modify, and distribute this software and
its documentation without fee is hereby granted, provided that this notice and
disclaimer of warranty appears in all copies.THE SOFTWARE IS PROVIDED 'AS IS' WITHOUT ANY WARRANTY OF ANY KIND, EITHER
EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY
THAT THE SOFTWARE WILL CONFORM TO SPECIFICATIONS, ANY IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND FREEDOM FROM
INFRINGEMENT, AND ANY WARRANTY THAT THE DOCUMENTATION WILL CONFORM TO THE
SOFTWARE, OR ANY WARRANTY THAT THE SOFTWARE WILL BE ERROR FREE. IN NO EVENT
SHALL NIST BE LIABLE FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO, DIRECT,
INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF, RESULTING FROM, OR
IN ANY WAY CONNECTED WITH THIS SOFTWARE, WHETHER OR NOT BASED UPON WARRANTY,
CONTRACT, TORT, OR OTHERWISE, WHETHER OR NOT INJURY WAS SUSTAINED BY PERSONS OR
PROPERTY OR OTHERWISE, AND WHETHER OR NOT LOSS WAS SUSTAINED FROM, OR AROSE OUT
OF THE RESULTS OF, OR USE OF, THE SOFTWARE OR SERVICES PROVIDED HEREUNDER.Distributions of NIST software should also include copyright and licensing
statements of any third-party software that are legally bundled with the code in
compliance with the conditions of those licenses.