ConfigurationFile

class ase2sprkkr.sprkkr.configuration.ConfigurationFile(definition, container=None)[source]

‘Root’ configuration container for SPRKKR configuration file

Class hierarchy

Inheritance diagram of ase2sprkkr.sprkkr.configuration.ConfigurationFile

Constructor

__init__(definition, container=None)

Create the container and its members, according to the definition

save_to_file(file, atoms=None, *, validate='save')[source]

Save the configuration to a file in a given format.

This routine do some basic stuff and then call _save_to_file routine, that contains the implementation specific for the type of the configuration container/value.

Parameters
  • file (str or file) – File to read the data from

  • validate – Validate the data in the container first and raise an exception, if there is an error (e.g. the the data are not complete). The string value can be used to select the type of validation save means the full check (same as the default value True), use set to allow some missing values.