:orphan: :mod:`atsim.potentials.config._tabulation_factories` ==================================================== .. py:module:: atsim.potentials.config._tabulation_factories Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: atsim.potentials.config._tabulation_factories.PairTabulationFactory atsim.potentials.config._tabulation_factories.EAMTabulationFactory atsim.potentials.config._tabulation_factories.DLPOLY_PairTabulationFactory atsim.potentials.config._tabulation_factories.ADP_EAMTabulationFactory .. data:: Mapping .. data:: RCutoffTuple .. data:: R_Rho_CutoffTuple .. py:class:: PairTabulationFactory(tabulation_target, tabulation_class) Bases: :class:`object` Factory 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. .. method:: extract_cutoffs(self, cp) Called by .create_tabulation() to determine the maximum separation cutoff for the tabulation. :param cp: atsim.potentials.config.ConfigParser instance representing parsed configuration file. :return: RCutoffTuple (or object providing .cutoff and .nr properties) .. method:: extract_potential_objects(self, cp, potential_form_registry, modifier_registry) Method called by .create_tabulation() to create a list of atsim.potentials.Potential objects. :param cp: atsim.potentials.config.ConfigParser instance representing parsed configuration file. :param potential_form_registry: atsim.potentials.config.Potential_Form_Registry object. :param modifier_registry: atsim.potentials.config.Modifier_Registry instance. :return: List of atsim.potentials.Potential objects. .. method:: extract_tabulation_args(self, cp, r_cutoff, potobjs, potential_form_registry, modifier_registry) 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: * ``potobjs`` is a list of :class:`atsim.potentials.Potential` instances. * ``cutoff`` is a float giving the maximum separation for the tabulation. * ``nr`` the number of rows to be used in the tabulation. :param cp: atsim.potentials.config.ConfigParser instance representing parsed configuration file. :param r_cutoff: Float giving the maximum separation for tabulation (as extracted from configuration). :param potobjs: List of atsim.potentials.Potential objects to be tabulated. :param potential_form_registry: atsim.potentials.config.Potential_Form_Registry object. :param modifier_registry: atsim.potentials.config.Modifier_Registry instance. :return: List containing Tabulation class constructor arguments. .. method:: create_tabulation(self, cp) .. py:class:: EAMTabulationFactory(tabulation_target, tabulation_class, eam_builder_class=EAM_Potential_Builder) Bases: :class:`atsim.potentials.config._tabulation_factories.PairTabulationFactory` Tabulation factory for setfl (LAMMPS eam/alloy) potentials .. method:: extract_cutoffs(self, cp) Called by .create_tabulation() to determine the maximum separation cutoff for the tabulation. :param cp: atsim.potentials.config.ConfigParser instance representing parsed configuration file. :return: RCutoffTuple (or object providing .cutoff and .nr properties) .. method:: extract_tabulation_args(self, cp, r_cutoff, potobjs, potential_form_registry, modifier_registry) 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: * ``potobjs`` is a list of :class:`atsim.potentials.Potential` instances. * ``cutoff`` is a float giving the maximum separation for the tabulation. * ``nr`` the number of rows to be used in the tabulation. :param cp: atsim.potentials.config.ConfigParser instance representing parsed configuration file. :param r_cutoff: Float giving the maximum separation for tabulation (as extracted from configuration). :param potobjs: List of atsim.potentials.Potential objects to be tabulated. :param potential_form_registry: atsim.potentials.config.Potential_Form_Registry object. :param modifier_registry: atsim.potentials.config.Modifier_Registry instance. :return: List containing Tabulation class constructor arguments. .. py:class:: DLPOLY_PairTabulationFactory(tabulation_target, tabulation_class) Bases: :class:`atsim.potentials.config._tabulation_factories.PairTabulationFactory` PairTabulationFactory that performs extra checks required by DL_POLY TABLEs and raises ConfigException if errors are found .. method:: extract_cutoffs(self, cp) Called by .create_tabulation() to determine the maximum separation cutoff for the tabulation. :param cp: atsim.potentials.config.ConfigParser instance representing parsed configuration file. :return: RCutoffTuple (or object providing .cutoff and .nr properties) .. py:class:: ADP_EAMTabulationFactory(tabulation_target, tabulation_class, eam_builder_class=EAM_Potential_Builder) Bases: :class:`atsim.potentials.config._tabulation_factories.EAMTabulationFactory` EAMTabulationFactory which creates the additional dipole and quadrupole objects required by the ADP EAM extension .. method:: extract_dipoles(self, cp, potential_form_registry, modifier_registry) .. method:: extract_quadrupoles(self, cp, potential_form_registry, modifier_registry) .. method:: extract_tabulation_args(self, cp, r_cutoff, potobjs, potential_form_registry, modifier_registry) 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: * ``potobjs`` is a list of :class:`atsim.potentials.Potential` instances. * ``cutoff`` is a float giving the maximum separation for the tabulation. * ``nr`` the number of rows to be used in the tabulation. :param cp: atsim.potentials.config.ConfigParser instance representing parsed configuration file. :param r_cutoff: Float giving the maximum separation for tabulation (as extracted from configuration). :param potobjs: List of atsim.potentials.Potential objects to be tabulated. :param potential_form_registry: atsim.potentials.config.Potential_Form_Registry object. :param modifier_registry: atsim.potentials.config.Modifier_Registry instance. :return: List containing Tabulation class constructor arguments. .. data:: TABULATION_FACTORIES