atsim.potentials.config._tabulation_factories¶
Module Contents¶
Classes¶
PairTabulationFactory(tabulation_target, tabulation_class) |
Factory class for Tabulation objects such as those in the atsim.potentials.pair_tabulation module. |
EAMTabulationFactory(tabulation_target, tabulation_class, eam_builder_class=EAM_Potential_Builder) |
Tabulation factory for setfl (LAMMPS eam/alloy) potentials |
DLPOLY_PairTabulationFactory(tabulation_target, tabulation_class) |
PairTabulationFactory that performs extra checks required by DL_POLY TABLEs and raises ConfigException if errors are found |
ADP_EAMTabulationFactory(tabulation_target, tabulation_class, eam_builder_class=EAM_Potential_Builder) |
EAMTabulationFactory which creates the additional dipole and quadrupole objects |
-
class
atsim.potentials.config._tabulation_factories.PairTabulationFactory(tabulation_target, tabulation_class)[source]¶ Bases:
objectFactory class for Tabulation objects such as those in the atsim.potentials.pair_tabulation module.
The role of this class is to extract data from an atsim.potentials.config.ConfigParser and together with other builder classes, create atsim.potentials.Potential objects and extract the cutoff values that can be used to instantiate a Tabulation object.
The key method for clients of this object is .create_tabulation().
Other public methods are provided to allow customisation in sub-classes.
-
extract_cutoffs(self, cp)[source]¶ Called by .create_tabulation() to determine the maximum separation cutoff for the tabulation.
Parameters: cp – atsim.potentials.config.ConfigParser instance representing parsed configuration file. Returns: RCutoffTuple (or object providing .cutoff and .nr properties)
-
extract_potential_objects(self, cp, potential_form_registry, modifier_registry)[source]¶ Method called by .create_tabulation() to create a list of atsim.potentials.Potential objects.
Parameters: - cp – atsim.potentials.config.ConfigParser instance representing parsed configuration file.
- potential_form_registry – atsim.potentials.config.Potential_Form_Registry object.
- modifier_registry – atsim.potentials.config.Modifier_Registry instance.
Returns: List of atsim.potentials.Potential objects.
-
extract_tabulation_args(self, cp, r_cutoff, potobjs, potential_form_registry, modifier_registry)[source]¶ Extract and prepare arguments to be passed to Tabulation class constructor.
Returns a list of arguments suitable for passing to Tabulation class constructor. Typically these are:
[potobjs, cutoff, nr]- Where:
potobjsis a list ofatsim.potentials.Potentialinstances.cutoffis a float giving the maximum separation for the tabulation.nrthe number of rows to be used in the tabulation.
Parameters: - cp – atsim.potentials.config.ConfigParser instance representing parsed configuration file.
- r_cutoff – Float giving the maximum separation for tabulation (as extracted from configuration).
- potobjs – List of atsim.potentials.Potential objects to be tabulated.
- potential_form_registry – atsim.potentials.config.Potential_Form_Registry object.
- modifier_registry – atsim.potentials.config.Modifier_Registry instance.
Returns: List containing Tabulation class constructor arguments.
-
-
class
atsim.potentials.config._tabulation_factories.EAMTabulationFactory(tabulation_target, tabulation_class, eam_builder_class=EAM_Potential_Builder)[source]¶ Bases:
atsim.potentials.config._tabulation_factories.PairTabulationFactoryTabulation factory for setfl (LAMMPS eam/alloy) potentials
-
extract_cutoffs(self, cp)[source]¶ Called by .create_tabulation() to determine the maximum separation cutoff for the tabulation.
Parameters: cp – atsim.potentials.config.ConfigParser instance representing parsed configuration file. Returns: RCutoffTuple (or object providing .cutoff and .nr properties)
-
extract_tabulation_args(self, cp, r_cutoff, potobjs, potential_form_registry, modifier_registry)[source]¶ Extract and prepare arguments to be passed to Tabulation class constructor.
Returns a list of arguments suitable for passing to Tabulation class constructor. Typically these are:
[potobjs, cutoff, nr]- Where:
potobjsis a list ofatsim.potentials.Potentialinstances.cutoffis a float giving the maximum separation for the tabulation.nrthe number of rows to be used in the tabulation.
Parameters: - cp – atsim.potentials.config.ConfigParser instance representing parsed configuration file.
- r_cutoff – Float giving the maximum separation for tabulation (as extracted from configuration).
- potobjs – List of atsim.potentials.Potential objects to be tabulated.
- potential_form_registry – atsim.potentials.config.Potential_Form_Registry object.
- modifier_registry – atsim.potentials.config.Modifier_Registry instance.
Returns: List containing Tabulation class constructor arguments.
-
-
class
atsim.potentials.config._tabulation_factories.DLPOLY_PairTabulationFactory(tabulation_target, tabulation_class)[source]¶ Bases:
atsim.potentials.config._tabulation_factories.PairTabulationFactoryPairTabulationFactory that performs extra checks required by DL_POLY TABLEs and raises ConfigException if errors are found
-
extract_cutoffs(self, cp)[source]¶ Called by .create_tabulation() to determine the maximum separation cutoff for the tabulation.
Parameters: cp – atsim.potentials.config.ConfigParser instance representing parsed configuration file. Returns: RCutoffTuple (or object providing .cutoff and .nr properties)
-
-
class
atsim.potentials.config._tabulation_factories.ADP_EAMTabulationFactory(tabulation_target, tabulation_class, eam_builder_class=EAM_Potential_Builder)[source]¶ Bases:
atsim.potentials.config._tabulation_factories.EAMTabulationFactoryEAMTabulationFactory which creates the additional dipole and quadrupole objects required by the ADP EAM extension
-
extract_tabulation_args(self, cp, r_cutoff, potobjs, potential_form_registry, modifier_registry)[source]¶ Extract and prepare arguments to be passed to Tabulation class constructor.
Returns a list of arguments suitable for passing to Tabulation class constructor. Typically these are:
[potobjs, cutoff, nr]- Where:
potobjsis a list ofatsim.potentials.Potentialinstances.cutoffis a float giving the maximum separation for the tabulation.nrthe number of rows to be used in the tabulation.
Parameters: - cp – atsim.potentials.config.ConfigParser instance representing parsed configuration file.
- r_cutoff – Float giving the maximum separation for tabulation (as extracted from configuration).
- potobjs – List of atsim.potentials.Potential objects to be tabulated.
- potential_form_registry – atsim.potentials.config.Potential_Form_Registry object.
- modifier_registry – atsim.potentials.config.Modifier_Registry instance.
Returns: List containing Tabulation class constructor arguments.
-