basic

Full name: ase2sprkkr.ase.test.grammar_types.basic

Module class hierarchy

Inheritance diagram of ase2sprkkr.ase.test.grammar_types.basic.AlwaysQString, ase2sprkkr.ase.test.grammar_types.basic.BaseBool, ase2sprkkr.ase.test.grammar_types.basic.BaseRealWithUnits, ase2sprkkr.ase.test.grammar_types.basic.BaseString, ase2sprkkr.ase.test.grammar_types.basic.BasicSeparator, ase2sprkkr.ase.test.grammar_types.basic.BlankSeparator, ase2sprkkr.ase.test.grammar_types.basic.Bool, ase2sprkkr.ase.test.grammar_types.basic.Boolean, ase2sprkkr.ase.test.grammar_types.basic.Date, ase2sprkkr.ase.test.grammar_types.basic.Energy, ase2sprkkr.ase.test.grammar_types.basic.FixedPointNumber, ase2sprkkr.ase.test.grammar_types.basic.Flag, ase2sprkkr.ase.test.grammar_types.basic.IntBool, ase2sprkkr.ase.test.grammar_types.basic.Integer, ase2sprkkr.ase.test.grammar_types.basic.Keyword, ase2sprkkr.ase.test.grammar_types.basic.LineString, ase2sprkkr.ase.test.grammar_types.basic.Number, ase2sprkkr.ase.test.grammar_types.basic.ObjectNumber, ase2sprkkr.ase.test.grammar_types.basic.QString, ase2sprkkr.ase.test.grammar_types.basic.Real, ase2sprkkr.ase.test.grammar_types.basic.RealWithUnits, ase2sprkkr.ase.test.grammar_types.basic.Separator, ase2sprkkr.ase.test.grammar_types.basic.String, ase2sprkkr.ase.test.grammar_types.basic.Unsigned

Description

Common GrammarTypes as numbers, strings etc.

Module Attributes

integer

A standard grammar type instance for (signed) integers

unsigned

A standard grammar type instance for unsigned integers

boolean

A standard grammar type instance for True|False 0|1 yes|no boolean

flag

A standard grammar type instance for booleans in input files

real

A standard grammar type instance for reals

date

A standard instance for the grammar type for dates

string

A standard grammar type instance for strings

qstring

A standard grammar type instance for quoted strings in configuration files

line_string

A standard grammar type instance for one-line strings in potential files

energy

A standard grammar type instance for energy values (float) for potential files

separator

A standard grammar type instance for separators in potential files

int_bool

A standard grammar type instance for bool expressed as integer

Functions

DefKeyword(default, *others, **kwargs)

A value, that can take values from the predefined set of strings, the first one is the default value.

Classes

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

Either a quoted string, or just a word (without whitespaces or special chars).

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

A base type for all kind of boolean values.

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

The base class for float value, which can have units append.

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

Base type for string grammar types

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

Basic type for separators - fake items in input/output file, which has no value

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

Special class for a blank separator.

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

A bool type, whose value is represented by a letter (T or F)

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

A bool type, whose value is represented by a letter (T or F)

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

A date value of the form 'DD.MM.YYYY'

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

The grammar type for energy.

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

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

A boolean value, which is True, if a name of the value appears in the input file.

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

A bool type, whose value is represented by a letter (1 or 0)

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

Signed integer

Keyword(*keywords[, aliases, transform, quote])

A value, that can take values from the predefined set of strings.

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

A string, that takes all up to the end of the line

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

Base class for a number - descendants of this class can have minimal and/or maximal possible value.

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

An abstract class, that describe an unsigned integer, that reffers to an object.

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

Either a quoted string, or just a word (without whitespaces or special chars)

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

A real value

RealWithUnits(*args, units, **kwargs)

A float value with user-defined units

Separator([grammar, char, length])

Special class for a separator inside a section.

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

Just a string (without whitespaces and few special chars)

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

Unsigned integer (zero is possible)