BaseRealWithUnits
- class ase2sprkkr.common.grammar_types.basic.BaseRealWithUnits(prefix=None, postfix=None, format='', after_format=None, default_value=None, condition=None, after_convert=None, description='', min=None, max=None, nan=None, *args)[source]
The base class for float value, which can have units append. The value is converted automatically to the base units.
Class hierarchy
Constructor
- Parameters:
prefix (str | None)
postfix (str | None)
format (str)
after_format (str | None)
default_value (Any)
condition (Callable[[Any], bool | str] | None)
after_convert (Callable[[Any], Any] | None)
min (int | None)
max (int | None)
- __init__(prefix=None, postfix=None, format='', after_format=None, default_value=None, condition=None, after_convert=None, description='', min=None, max=None, nan=None, *args)
- Parameters:
prefix (str | None)
postfix (str | None)
format (str)
after_format (str | None)
default_value (Any)
condition (Callable[[Any], bool | str] | None)
after_convert (Callable[[Any], Any] | None)
min (int | None)
max (int | None)
- grammar_cache = {}
The grammar for units is cached
- numpy_type
alias of
float
- allowed_types = (<class 'numpy.float64'>, <class 'float'>)
- datatype_name = 'baserealwithunits'