1. Interaction energy functionals
A few interaction energy functionals \(W\) are defined in HyMD through
the Hamiltonian
class and associated subclasses.
1.1. \(\chi\)–interaction and \(\kappa\)–incompressibility
The most common hPF energy functional is specified by
hamiltonian = "DefaultWithChi"
in the configuration file (see Configuration file). It takes the form
where \(\tilde\chi_{\text{A}-\text{B}}\) is the interaction energy between overlapping densities of particle types \(\text{A}\) and \(\text{B}\). The incompressibility term is governed by the compressibility parameter \(\kappa\). The average density of the full system is denoted \(\phi_0\).
Using this energy functional necessitates specification of \(\tilde\chi\) and \(\kappa\) in the configuration file (see Configuration file)
kappa = 0.05
chi = [
["A", "B", 15.85],
["B", "C", -5.70],
...
]
1.2. Only \(\kappa\)–incompressibility
The only \(\kappa\) interactions energy functional is specified by
hamiltonian = "DefaultNoChi"
in the configuration file (see Configuration file). It takes the form
where the incompressibility term is governed by the compressibility parameter \(\kappa\). The average density of the full system is denoted \(\phi_0\).
Using this energy functional necessitates specification of \(\kappa\) in the configuration file (see Configuration file)
kappa = 0.05
1.3. Only \(\phi^2\)
The \(\phi^2\) interactions energy functional is specified by
hamiltonian = "SquaredPhi"
in the configuration file (see Configuration file). It takes the form
where the \(\phi\) squared term is governed by the compressibility parameter \(\kappa\). The average density of the full system is denoted \(\phi_0\).
Using this energy functional necessitates specification of \(\kappa\) in the configuration file (see Configuration file)
kappa = 0.05
1.4. Implementing new interaction energy forms
Implementing new interaction energy functions is straightforward by subclassing
Hamiltonian
and applying sympy
differentiation to the symbolic
field objects. The sympy.lamdify
function creates vectorised numpy
functions automatically from the differentiation result which is used to
transform the density fields.