atsim.potentials.tools.potable
¶
Front-end script for atsim.potentials. Allows potentials to be tabulated using simple .ini based configuration files
Package Contents¶
Classes¶
ConfigParser (fp, overrides=[], additional=[]) |
Performs initial stage (tokenizing) of generating a potential model |
FilteredConfigParser (config_parser, exclude=[], include=[]) |
Class that wraps around ConfigParser instances and |
Functions¶
main () |
-
atsim.potentials.tools.potable.
ConfigParserOverrideTuple
¶
-
class
atsim.potentials.tools.potable.
ConfigParser
(fp, overrides=[], additional=[])¶ Bases:
object
Performs initial stage (tokenizing) of generating a potential model suitable for tabulation functions.
-
pair
¶ Returns the contents of the config file’s [Pair] section.
Returns: List of tuples of (SpeciesPair, potential_form_label, params) Where params = [p1, p2, …, pn] and p1 etc are the potential parameters
-
potential_form
¶ Return the contents of the config file’s [Potential-Form] section.
Returns: List of (PotentialFormSignature, formula_string) pairs.
-
tabulation
¶ Return the parsed contents of the config file’s [Tabulation] section.
This defines what type of model (pair, EAM) the config file contains and also how the model should be tabulated.
Returns: _Tabulation_Section object
-
table_form
¶ Returns parsed content of config file’s [Table-Form] section.
This allows pre-tabulated data to be used within atsim.potentials.
Returns: List of TableFormTuple instance tuples.
-
eam_embed
¶ Return the parsed contents of the configuration file’s [EAM-Embed] section.
Returns: List of (SPECIES, potential_form_label, params) Where params = [p1, p2, …, pn] and p1 etc are the embedding function parameters )
-
eam_density
¶ Return the parsed contents of the configuration file’s [EAM-Density] section.
Returns: List of (SPECIES, potential_form_label, params) Where params = [p1, p2, …, pn] and p1 etc are the density function parameters )
-
eam_density_fs
¶ Return the parsed contents of the configuration file’s [EAM-Density] section.
This assumes Finnis-Sinclair parsing rules. This means that SPECIES (below) is parsed as a EAMFSDensitySpeciesTuple with from_species and to_species attributes.
Returns: List of (SPECIES, potential_form_label, params) Where params = [p1, p2, …, pn] and p1 etc are the density function parameters )
-
parsed_sections
¶ Returns a list of relevant sections found inside configuration file.
Names are returned as the ConfigParser attribute names which could be used to access each parsed section. So [Pair] becomes pair and [EAM-Density] is eam_density.
Returns: List of attribute names representing parseable sections of the configuration file
-
orphan_sections
¶ Returns list of section keys, in current configuration file, that are not relevant to the ConfigParser class.property
Returns: List of section labels.
-
raw_config_parser
¶
-
species
¶ Return reference data for atomic species.
Data is returned as a dictionary relating each species label to a dictionary mapping property name to propety value.
Returns: Dictionary of dictionaries.
-
parse_pair_like
(self, section_name)¶ Parse a section as if it contains pair potentials.
Parameters: section_name – Name of section that should be parsed in the same way as the [Pair] section. Returns: List of tuples of (SpeciesPair, potential_form_label, params) Where params = [p1, p2, …, pn] and p1 etc are the potential parameters
-
-
class
atsim.potentials.tools.potable.
FilteredConfigParser
(config_parser, exclude=[], include=[])¶ Bases:
wrapt.ObjectProxy
Class that wraps around ConfigParser instances and filters out entries for particular, unwanted species
-
pair
¶
-
eam_embed
¶
-
eam_density
¶
-
eam_density_fs
¶
-