2.6.8. prismatique.sample.num_frozen_phonon_configs_in_subset

num_frozen_phonon_configs_in_subset(sample_specification, subset_idx=0, skip_validation_and_conversion=False)[source]

Calculate the number of frozen phonon configurations in a given subset of a given sample model.

See the documentation for the class prismatique.thermal.Params for a discussion on frozen phonon configurations and subsets thereof.

Parameters:
sample_specificationprismatique.sample.ModelParams | prismatique.sample.PotentialSliceSubsetIDs | prismatique.sample.SMatrixSubsetIDs | prismatique.sample.PotentialSliceAndSMatrixSubsetIDs

The simulation parameters specifying the sample model.

If sample_specification is of the type prismatique.sample.ModelParams, then sample_specifications specifies sample model parameters that are used to construct the model from scratch, i.e. the potential slices for each frozen phonon configuration subset are calculated from said model parameters. See the documentation for the classes prismatique.discretization.Params and prismatique.thermal.Params for discussions on potential slices and frozen phonon configuration subsets respectively. Note that of parameters stored in sample_specification, only the following are used:

  • sample_specification

    • thermal_params

      • num_frozen_phonon_configs_per_subset

      • num_subsets

Otherwise, if sample_specification is an instance of the class prismatique.sample.PotentialSliceSubsetIDs, the class prismatique.sample.SMatrixSubsetIDs, or the class prismatique.sample.PotentialSliceAndSMatrixSubsetIDs, then sample_specification specifies a set of files, where each file stores either the pre-calculated potential slices or \(S\)-matrices for a frozen phonon configuration subset. See the documentation for the aforementioned classes for further discussions on specifying pre-calculated objects. See the documentation for the subpackage prismatique.stem for a discussion on \(S\)-matrices.

subset_idxint, optional

The index specifying the frozen phonon configuration subset of interest. Must satisfy 0<=subset_idx<prismatique.sample.num_frozen_phonon_config_subsets(sample_specification).

skip_validation_and_conversionbool, optional

If skip_validation_and_conversion is set to False, then validations and conversions are performed on the above parameters.

Otherwise, if skip_validation_and_conversion is set to True, no validations and conversions are performed on the above parameters. This option is desired primarily when the user wants to avoid potentially expensive validation and/or conversion operations.

Returns:
num_configs_in_subsetint

The number of frozen phonon configurations in the given subset of the given sample model.