RepeatedNumberedIf

class ase2sprkkr.common.repetition.RepeatedNumberedIf(condition)[source]

Dense repetition whose output numbering is selected at runtime.

The parser accepts both NAME and NAME<number> because the option controlling the condition may occur later in the input. Values are always stored as an array; condition(option) only controls validation and the spelling used for output.

Class hierarchy

Inheritance diagram of ase2sprkkr.common.repetition.RepeatedNumberedIf


Constructor

Parameters:

condition (Callable[[Option], bool])

__init__(condition)[source]

Store the one-argument runtime numbering condition.

Parameters:

condition (Callable[[Option], bool])

Return type:

None

type = <class 'numpy.ndarray'>
key_type

alias of ase2sprkkr.common.parsing_results.DefArrayKey

is_numbered = 1
grammar_numbering = 2
has_header = True
property is_array
property is_dict
numbering_for(option)[source]

Evaluate numbering for runtime option.

Parameters:

option (Option)

Return type:

ase2sprkkr.common.repetition.Repeated.Numbering