Statistical Mechanics on Lattices#

Lightweight but caffeinated Python implementation of computational methods for statistical mechanical calculations of configurational states in crystalline materials.

Test Status Coverage PyPi Version Python Versions JOSS Status

smol is a minimal implementation of computational methods to calculate statistical mechanical and thermodynamic properties of crystalline material systems based on the cluster expansion method from alloy theory and related methods. Although smol is intentionally lightweight—in terms of dependencies and built-in functionality—it has a modular design that closely follows underlying mathematical formalism and provides useful abstractions to easily extend existing methods or implement and test new ones.

Functionality#

smol currently includes the following functionality:

  • Defining cluster expansion terms for a given disordered structure using a variety of available site basis functions with and without explicit redundancy.

  • Option to include explicit electrostatics using the Ewald summation method.

  • Computing correlation vectors for a set of training structures with a variety of functionality to inspect the resulting feature matrix.

  • Defining cluster expansions for subsequent property prediction.

  • Fast evaluation of correlation vectors and differences in correlation vectors from local updates in order to quickly compute properties and changes in properties for specified supercells.

  • Flexible toolset to sample cluster expansions using Monte Carlo with canonical, semigrand canonical, and charge neutral semigrand canonical ensembles using a Metropolis or a Wang-Landau sampler.

  • Special quasi-random structure generation based on either correlation vectors or cluster interaction vectors.

  • Solving for periodic ground-states of any given cluster expansion with or without electrostatics over a given supercell.

smol is built on top of pymatgen so any pre/post structure analysis can be done seamlessly using the various functionality supported there.

Citing#

If you find smol useful please cite the following publication,

Barroso-Luque, L., Yang, J.H., Xie, F., Chen T., Kam, R.L., Jadidi, Z., Zhong, P. & Ceder, G. smol: A Python package for cluster expansions and beyond. Journal of Open Source Software 7, 4504 (2022).

Since smol is based on pymatgen, please also cite this publication,

Ong, S. P. et al. Python Materials Genomics (pymatgen): A robust, open-source python library for materials analysis. ComputationalMaterials Science 68, 314–319 (2013).

Additionally, several of the functionality included in smol is based on methodology developed by various researchers. Please see the citing page for additional references.

License#

smol is distributed openly under a modified 3-clause BSD licence.

Statistical Mechanics on Lattices (smol) Copyright (c) 2022, The Regents
of the University of California, through Lawrence Berkeley National
Laboratory (subject to receipt of any required approvals from the U.S.
Dept. of Energy) and the University of California, Berkeley. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

(1) Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.

(2) Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

(3) Neither the name of the University of California, Lawrence Berkeley
National Laboratory, U.S. Dept. of Energy, University of California,
Berkeley nor the names of its contributors may be used to endorse or
promote products derived from this software without specific prior written
permission.


THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

You are under no obligation whatsoever to provide any bug fixes, patches,
or upgrades to the features, functionality or performance of the source
code ("Enhancements") to anyone; however, if you choose to make your
Enhancements available either publicly, or directly to Lawrence Berkeley
National Laboratory, without imposing a separate written license agreement
for such Enhancements, then you hereby grant the following license: a
non-exclusive, royalty-free perpetual license to install, use, modify,
prepare derivative works, incorporate into other computer software,
distribute, and sublicense such enhancements or derivative works thereof,
in binary and source code form.