xnn.ffnn.common.frc.Section#

class xnn.ffnn.common.frc.Section(kind, label, comments=<factory>, annotations=<factory>, modifiers=<factory>, key_columns=<factory>, columns=<factory>, rows=<factory>, data=None, source='')[source]#

Bases: object

A #<kind> <label> section.

Variables:
  • label (kind,) – The section kind and label.

  • comments (list of str) – ! lines (without the marker).

  • annotations (list of str) – > lines: the energy expression and notes.

  • modifiers (dict) – @ lines grouped by keyword: {"units": [["K2", "kJ/mol/nm^2"]], "type": [["rmin-eps"]], ...}.

  • columns (key_columns,) – Names of the key columns and of the value columns.

  • rows (list of Row) – The data rows (empty for JSON sections).

  • data (object) – Parsed JSON for templates / fragments, else None.

  • source (str) – Originating file.

Parameters:
property schema: dict | None#

The registered schema for this kind (None if unknown).

units(column)[source]#

The unit a value column is stored in (schema default).

Parameters:

column (str)

Return type:

str

modifier(keyword)[source]#

First @keyword modifier’s arguments, or None.

Parameters:

keyword (str)

Return type:

list | None

latest()[source]#

Key -> newest Row within this section.

Return type:

dict