grammar_type

Full name: ase2sprkkr.common.grammar_types.grammar_type

Module class hierarchy

Inheritance diagram of ase2sprkkr.common.grammar_types.grammar_type.GrammarType, ase2sprkkr.common.grammar_types.grammar_type.TypedGrammarType

Description

Basic types for GrammarTypes and usefull functions

Module Attributes

recognized_set_types

The types, that are recognized as 'list of values' and so that will be accepted as values for array_like type (e.g. Array or SetOf).

Functions

compare_numpy_values(a, b)

The numpy arrays cannot be compared by =, that's why this method.

format_for_type(format, type)

Returns the format appropriate to the given type

type_from_default_value(value[, format, ...])

Guess the grammar type from a value, that will become the default value of the grammar type.

type_from_type(type[, format, format_all, ...])

Guess and return the grammar element (GrammarType class descendatnt) from a python type.

type_from_value(value[, type_map])

Gues the grammar type from a python value.

Classes

GrammarType([prefix, postfix, format, ...])

Base class for definition of configuration option types

TypedGrammarType([prefix, postfix, format, ...])