make_composition_site_functions#

casm.bset.cluster_functions.make_composition_site_functions(
site_basis_functions_specs: list[dict],
prim: Prim,
abs_tol: float = 1e-10,
)[source]#

Construct site basis functions about an average composition specified for each sublattice.

Parameters:
  • site_basis_functions_specs (list[dict]) –

    The average composition on each sublattice with >1 allowed occupant. Example:

    [
      { // composition on sublattices 0 and 1, as listed
      in prim
        "sublat_indices": [0, 1],
        "composition": {"A": 0.25, "B": 0.75}
      },
      { // composition on sublattices 2 and 3, as listed
      in prim
        "sublat_indices": [2, 3],
        "composition": {"A": 0.75, "B": 0.25}
      }
    ]
    

  • prim (libcasm.configation.Prim) – The prim, with symmetry information.

  • abs_tol (float = 1e-10) – A absolute tolerance for comparing values.

Returns:

occ_site_functions – List of occupation site basis functions. For each sublattice with discrete site basis functions includes:

  • ”sublattice_index”: int, index of the sublattice

  • ”value”: list[list[float]], list of the site basis function values, as value = functions[function_index][occupant_index].

Return type:

list[dict]