Correlations calculator object.
Parameters:
basis
: stringindicator-binary
, trigonometric
, polynomial
, and chebyshev
.indicator-binary
: highly interpretable, non-orthogonal basis functions for binary compounds (also binary-linear
, deprecated)trigonomentric
: orthonormal basis; constructed from sine and cosine functions; based on: Axel van de Walle, CALPHAD 33, 266 (2009)polynomial
: orthonormal basis; uses orthogonalized polynomialschebyshev
: orthonormsl basis; chebyshev polynomials for symmetrized sigmas (sigma in {-m/2, …, 0, …, m/2 }); based on: J.M. Sanchez, Physica 128A, 334-350 (1984)parent_lattice
: ParentLattice objectthe parent lattice of the cluster expansion.
clusters_pool
: ClustersPool objectThe clusters pool to be used in the calculator.
lookup
: booleanSwitches if a lookup table for the single-site basis functions should be used. Default is True
. Reduces performance in case of ‘binary-linear’ basis.
filepath
: string (default:None)Initialize object from file generated by the CorrelationsCalculator.serialize(filepath)
method. Overrides json_db_filepath (deprecated).
json_db_filepath
: (DEPRECATED) string (default: None)Overrides all the above. Used to initialize from file. Path of a json
file containing a serialized CorrelationsCalculator object, as generated by the CorrelationsCalculator.serialize()
method.
Notes for developers: For implementing pickle serialization, hints were used from the following link: https://stackoverflow.com/questions/36458221/unpickling-object-of-type-x-in-the-new-method-of-class-x-calls-init-on-r
Return basis set name
Return cluster correlations for binary quasirandom structure
Get cluster correlations for a structure Parameters:
structure
: Structure objectstructure for which to calculate the correlations.
mc
: BooleanSet to True
when performing Monte-Carlo simulations, to use an
optimized version of the method.
Return array of cluster_pool objects, containing cluster orbits for a given supercell
Parameters
scell
: ParentLattice, SuperCell, or Structure objectObject containing the lattice definition to determine the orbit of the clusters in the CorrelationsCalculator.
Return array of cluster orbits for a given supercell
Parameters
scell
: ParentLattice, SuperCell, or Structure objectObject containing the lattice definition to determine the orbit of the clusters in the CorrelationsCalculator.
Return correlation matrix for a structures set.
Parameters:
structures_set
: StructuresSet objecta 2D numpy matrix is returned. every row in the matrix corresponds to
a structure in the StructuresSet
object.
Return ClustersPool object of the calculator
Return integer array of orbit lenghts
structure
: ParentLattice, SuperCell, or Structure objectObject containing the lattice definition to determine the orbit of the clusters in the CorrelationsCalculator.
Write correlations calculator to Atoms Json database
Parameters:
filepath
: string Name of the file to store the correlations_calculator object. It can contain the relative or absolute path. If not given, and if db_name (deprecated) is None, filepathh is set to “CCALC.pickle” and fmt is overriden (set to pickle).
fmt
: stringIt can take the values "pickle"
or "json"
.
So far, object can only be re-initiated from a "pickle"
file, therefore this is the preferred format.
If not given, it is inferred from the filepathh.
db_name
: (DEPRECATED) string Name of the json file containing the database
Calculates the site basis function.
Evaluation of the single site basis functions using different basis sets.
Parameters:
alpha
: integerinteger number between 0 and m
- 1; represents the index of the basis function
sigma
: integerinteger number between 0 and m
- 1; represents the occupation variable
m
: integernumber of components of the sublattice