.. index:: pair: class; EMT .. _doxid-class_e_m_t: class EMT ========= .. toctree:: :hidden: Overview ~~~~~~~~ The Effective Medium Theory (:ref:`EMT `) potential. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class EMT: public :ref:`AsapPotential` { public: // fields int :target:`ids`; int :target:`nblist`; int :target:`sigma1`; int :target:`sigma2`; int :target:`beforeforces`; int :target:`energies`; int :target:`forces`; int :target:`stresses`; int :target:`fullstresses`; // construction :ref:`EMT`(:ref:`EMTParameterProvider`* prov = 0); virtual :ref:`~EMT`(); // methods void :target:`SetSubtractE0`(bool subtractE0); virtual void :ref:`SetAtoms`(:ref:`Atoms`* a); virtual const :ref:`Vec`* :ref:`GetCartesianForces`(); virtual const double* :ref:`GetPotentialEnergies`(); virtual double :ref:`GetPotentialEnergy`(); virtual const symTensor* :ref:`GetStresses`(const :ref:`Vec`* momenta = 0); virtual void :ref:`GetStress`(double stress[6], const :ref:`Vec`* momenta = 0); virtual void :ref:`CheckNeighborLists`(); virtual double :ref:`GetCutoffRadius`() const; virtual double :ref:`GetLatticeConstant`() const; virtual int :ref:`GetNumberOfAtoms`() const; virtual void :ref:`SetContinuumElement`(int z); virtual void :ref:`UpdateSuperCell`(const :ref:`SuperCell`* newSuperCell); virtual double :ref:`CalculateLatticeEnergy`(const :ref:`Vec` a[3]); virtual void :ref:`CalculateDerivatives`(const :ref:`Vec` a[3], double dEdaDota[6]); virtual double :ref:`GetData`() const; const double* :ref:`GetSigma1`(int n); const double* :ref:`GetSigma2`(int n); void :ref:`PrintParameters`(); :ref:`NeighborList`* :ref:`GetNeighborList`() const; }; Inherited Members ----------------- .. ref-code-block:: cpp :class: doxyrest-overview-inherited-code-block public: // methods virtual void :ref:`SetAtoms`(:ref:`Atoms`* a) = 0; virtual double :ref:`GetPotentialEnergy`() = 0; virtual const :ref:`Vec`* :ref:`GetCartesianForces`() = 0; virtual const symTensor* :ref:`GetStresses`(const :ref:`Vec`* momenta = 0) = 0; virtual void :ref:`GetStress`(double stress[6], const :ref:`Vec`* momenta = 0) = 0; virtual const double* :ref:`GetPotentialEnergies`() = 0; virtual void :ref:`CheckNeighborLists`() = 0; virtual double :ref:`CalculateLatticeEnergy`(const :ref:`Vec` a[3]); virtual void :ref:`CalculateDerivatives`(const :ref:`Vec` a[3], double dEdaDota[6]); virtual double :ref:`GetData`() const; virtual double :ref:`GetCutoffRadius`() const = 0; virtual double :ref:`GetLatticeConstant`() const = 0; virtual void :ref:`UpdateSuperCell`(const :ref:`SuperCell`* newSuperCell) = 0; virtual int :ref:`GetNumberOfAtoms`() const = 0; .. _details-class_e_m_t: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ The Effective Medium Theory (:ref:`EMT `) potential. The Effective Medium Theory (:ref:`EMT `) as originally implemented in Per Stoltze's ARTwork program, and documented in * K. W. Jacobsen, P. Stoltze and J. K. Nørskov, Surf. Sci. vol. 366, p. 394-402 (1996). Construction ------------ .. index:: pair: function; EMT .. _doxid-class_e_m_t_1a867725590570ce05a20e470ef0048edd: .. ref-code-block:: cpp :class: doxyrest-title-code-block EMT(:ref:`EMTParameterProvider`* prov = 0) Create an :ref:`EMT ` potential optionally using a parameter provider. .. _doxid-class_e_m_t_1ad96d0a5a6e0ab8eb98d58c3caf65b4d1: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual ~EMT() Delete the :ref:`EMT ` potential. If an :ref:`EMTParameterProvider ` was given when constructing the :ref:`EMT ` object, it will NOT be deleted, but any default parameter provider and the automatically generated neigbor list will be deleted. Methods ------- .. index:: pair: function; SetAtoms .. _doxid-class_e_m_t_1ab8c4dd2d4a8b635e12d669a68669591c: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void SetAtoms(:ref:`Atoms`* a) Set the atoms belonging to this potential. This is called automatically by :ref:`Atoms.SetCalculator() ` and should not be called elsewhere. .. index:: pair: function; GetCartesianForces .. _doxid-class_e_m_t_1aad0a217cf7b6550153dff97e60bf8e63: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual const :ref:`Vec`* GetCartesianForces() Calculate the forces on all atoms and return the result. .. index:: pair: function; GetPotentialEnergies .. _doxid-class_e_m_t_1ab76118bca3e57c44950342b5416cb6fd: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual const double* GetPotentialEnergies() Calculate the energy of all atoms. .. index:: pair: function; GetPotentialEnergy .. _doxid-class_e_m_t_1aa5936d9025b42ec188e4b72fac80b43b: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual double GetPotentialEnergy() Calculate the total energy of the system. .. index:: pair: function; GetStresses .. _doxid-class_e_m_t_1a63fc87f3fe87c0b3fc179c3c065fb974: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual const symTensor* GetStresses(const :ref:`Vec`* momenta = 0) Calculate the stress on all atoms. .. index:: pair: function; GetStress .. _doxid-class_e_m_t_1a37a79878900dabc6a7071e3e681e68e7: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void GetStress(double stress[6], const :ref:`Vec`* momenta = 0) Calculate the total stress of the system. Note that the output variable stress is not zeroed first. In quasicontinuum simulations and other situations where there is a contribution to the stress which is not from the atoms, the stress parameter can initially be set to the appropriate derivatives of the energy of that part of the calculation (without the volume normalization, which will be performed by the potential). .. index:: pair: function; CheckNeighborLists .. _doxid-class_e_m_t_1aa230c9ca1f2b73a7a8f09c3b47fa28bc: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void CheckNeighborLists() Check that neighbor lists are up to date, update them if not. .. index:: pair: function; GetCutoffRadius .. _doxid-class_e_m_t_1a78906ddd6632db572e10eff45efb87ae: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual double GetCutoffRadius() const Return the cutoff radius used in the potential. .. index:: pair: function; GetLatticeConstant .. _doxid-class_e_m_t_1a485e4510a85cc30d6dcc1f4e11fd7717: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual double GetLatticeConstant() const Return the lattice constant of the material, if well-defined. If a lattice constant of the material can be defined, return it in Angstrom, otherwise throw an exception. .. index:: pair: function; GetNumberOfAtoms .. _doxid-class_e_m_t_1aeb188d9b3ced4f560461ab36e79ee8f9: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual int GetNumberOfAtoms() const Get the number of atoms. .. index:: pair: function; SetContinuumElement .. _doxid-class_e_m_t_1aaf6d408e4b49b2cda1d86da220651cea: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void SetContinuumElement(int z) Specify the element in the continuum region of a QuasiContinuum simulation. .. index:: pair: function; UpdateSuperCell .. _doxid-class_e_m_t_1a77b1b423386968c00a577779c27ce677: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void UpdateSuperCell(const :ref:`SuperCell`* newSuperCell) Tell the Potential that a new :ref:`SuperCell ` has been assigned to the atoms. .. index:: pair: function; CalculateLatticeEnergy .. _doxid-class_e_m_t_1afc0d32ca0258ac2993a4a3613712da1d: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual double CalculateLatticeEnergy(const :ref:`Vec` a[3]) Calculate the energy of an atom in a regular fcc(?) lattice. Given the lattice vectors, this function calculates the energy of a single atom in the lattice. Used for the QuasiContinuum method. .. index:: pair: function; CalculateDerivatives .. _doxid-class_e_m_t_1a714134c4513ca56316ef0c7a1c3844b4: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual void CalculateDerivatives(const :ref:`Vec` a[3], double dEdaDota[6]) Calculate derivative of the energy of an atom in a regular lattice. Used by the QuasiContinuum method. .. index:: pair: function; GetData .. _doxid-class_e_m_t_1adead49a30534236077691e25406351f4: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual double GetData() const Get data used by the QuasiContinuum method. .. index:: pair: function; GetSigma1 .. _doxid-class_e_m_t_1ad7f9248a914e4339d41cda2a1786bbd7: .. ref-code-block:: cpp :class: doxyrest-title-code-block const double* GetSigma1(int n) Return a pointer to the :ref:`EMT ` "density" sigma1. .. index:: pair: function; GetSigma2 .. _doxid-class_e_m_t_1aaf539c0723e0c0313103ffd45bd629ad: .. ref-code-block:: cpp :class: doxyrest-title-code-block const double* GetSigma2(int n) Return a pointer to the :ref:`EMT ` "density" sigma2. .. index:: pair: function; PrintParameters .. _doxid-class_e_m_t_1acf792495f18b2c5fdde90b8dd1f380d4: .. ref-code-block:: cpp :class: doxyrest-title-code-block void PrintParameters() Print the :ref:`EMT ` parameters. .. index:: pair: function; GetNeighborList .. _doxid-class_e_m_t_1a97ffab1cf99a06d645697b9cbd322788: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`NeighborList`* GetNeighborList() const Return a pointer to the neighbor list.