pythtb.TBModel.with_parameters#

TBModel.with_parameters(params=None, /, **kwargs)[source]#

Create a new TBModel instance with parameter-dependent terms evaluated at the supplied scalar values.

This function is similar to set_parameters, but instead of modifying the current model in place, it returns a new model instance where all parameter-dependent onsite and hopping terms have been evaluated at the provided values.

Added in version 2.0.0.

Parameters:
paramsMapping[str, Any], optional

Dictionary mapping parameter names to scalar values. Use this when a name is not a valid Python identifier (e.g. contains spaces or -). If both params and kwargs are given, values in kwargs override those from params.

**kwargs

Additional name=value overrides for parameters whose names are valid identifiers (e.g. tb.set_parameters(beta=0.3)).

Returns:
new_modelTBModel

A new TBModel instance with parameter-dependent terms evaluated.

See also

set_parameters

Evaluate parameter-dependent terms in place.