Documentation
¶
Index ¶
- func AbsErrorM(env *Environment, Ds *HoppingEV, variables []string) solve.Diffable
- func AbsErrorMu(env *Environment, variables []string) solve.Diffable
- func AbsErrorW(env *Environment, Ds *HoppingEV, variables []string) solve.Diffable
- func ElHamiltonian(env *Environment, k vec.Vector) cmatrix.CMatrix
- func EpsilonAE(env *Environment, k vec.Vector) complex128
- func EpsilonAO(env *Environment, k vec.Vector) complex128
- func EpsilonBE(env *Environment, k vec.Vector) complex128
- func EpsilonBO(env *Environment, k vec.Vector) complex128
- func GetEV_K0_K0(env *Environment, k vec.Vector) complex128
- func GetEV_K0_K1(env *Environment, k vec.Vector) complex128
- func GetEV_KQ0_K0(env *Environment, k vec.Vector) complex128
- func GetEV_KQ0_K1(env *Environment, k vec.Vector) complex128
- func MWMuSolve(env *Environment, Ds *HoppingEV, epsAbs, epsRel float64) (vec.Vector, error)
- func MWMuSolve_Iterative(env *Environment, Ds *HoppingEV, epsAbs, epsRel float64) (vec.Vector, error)
- func MWMuSystem(env *Environment, Ds *HoppingEV) (solve.DiffSystem, []float64)
- func MWSolve(env *Environment, Ds *HoppingEV, epsAbs, epsRel float64) (vec.Vector, error)
- func MWSystem(env *Environment, Ds *HoppingEV) (solve.DiffSystem, []float64)
- func MuSystem(env *Environment) (solve.DiffSystem, []float64)
- type Environment
- func (env *Environment) DeltaS() float64
- func (env *Environment) Fermi(energy float64) float64
- func (env *Environment) FiniteHoppings() bool
- func (env *Environment) FreeEnergy(Ds *HoppingEV) float64
- func (env *Environment) FreeEnergyElectrons() float64
- func (env *Environment) FreeEnergyIons(Ds *HoppingEV) float64
- func (env *Environment) Marshal() string
- func (env *Environment) QJ(Ds *HoppingEV) float64
- func (env *Environment) QK() float64
- func (env *Environment) Qele(Ds *HoppingEV) float64
- func (env *Environment) Set(v vec.Vector, vars []string)
- func (env *Environment) String() string
- func (env *Environment) Z1(Ds *HoppingEV) float64
- type FinalEnvironment
- type HoppingEV
- func (Ds *HoppingEV) Dae(env *Environment) float64
- func (Ds *HoppingEV) Dao(env *Environment) float64
- func (Ds *HoppingEV) Dbe(env *Environment) float64
- func (Ds *HoppingEV) Dbo(env *Environment) float64
- func (Ds *HoppingEV) Dce(env *Environment) float64
- func (Ds *HoppingEV) Dco(env *Environment) float64
- func (Ds *HoppingEV) MarshalEnv(env *Environment) string
- func (Ds *HoppingEV) StringEnv(env *Environment) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AbsErrorM ¶
func AbsErrorM(env *Environment, Ds *HoppingEV, variables []string) solve.Diffable
Return the absolute error and gradient of the M equation w.r.t. the given variables (which should be fixed to ["M", "W", "Mu"] for this case).
func AbsErrorMu ¶
func AbsErrorMu(env *Environment, variables []string) solve.Diffable
Return the absolute error and gradient of the Mu equation w.r.t. the given variables (which should be fixed to ["M", "W", "Mu"] for this case).
func AbsErrorW ¶
func AbsErrorW(env *Environment, Ds *HoppingEV, variables []string) solve.Diffable
Return the absolute error and gradient of the W equation w.r.t. the given variables (which should be fixed to ["M", "W", "Mu"] for this case).
func ElHamiltonian ¶
func ElHamiltonian(env *Environment, k vec.Vector) cmatrix.CMatrix
Calculate 4x4 electronic Hamiltonian. k is in the Cartesian basis, with each component scaled by the corresponding lattice constant; i.e. k = (a kx, a ky, c kz) and a kx, a ky, c kz range over [-pi, pi) and periodic copies of this interval.
func EpsilonAE ¶
func EpsilonAE(env *Environment, k vec.Vector) complex128
Cubic axes, even symmetry (k, p; k, p)
func EpsilonAO ¶
func EpsilonAO(env *Environment, k vec.Vector) complex128
Cubic axes, odd symmetry (k, p; k+Q, p)
func EpsilonBE ¶
func EpsilonBE(env *Environment, k vec.Vector) complex128
Body diagonal, even symmetry (k, p; k, pbar)
func EpsilonBO ¶
func EpsilonBO(env *Environment, k vec.Vector) complex128
Body diagonal, odd symmetry (k, p; k+Q, pbar)
func GetEV_K0_K0 ¶
func GetEV_K0_K0(env *Environment, k vec.Vector) complex128
Evaluate <c^{\dagger}_{k,0} c_{k,0}>.
func GetEV_K0_K1 ¶
func GetEV_K0_K1(env *Environment, k vec.Vector) complex128
Evaluate <c^{\dagger}_{k,0} c_{k,1}>.
func GetEV_KQ0_K0 ¶
func GetEV_KQ0_K0(env *Environment, k vec.Vector) complex128
Evaluate <c^{\dagger}_{k+Q,0} c_{k,0}>.
func GetEV_KQ0_K1 ¶
func GetEV_KQ0_K1(env *Environment, k vec.Vector) complex128
Evaluate <c^{\dagger}_{k+Q,0} c_{k,1}>.
func MWMuSolve_Iterative ¶
func MWMuSystem ¶
func MWMuSystem(env *Environment, Ds *HoppingEV) (solve.DiffSystem, []float64)
func MWSystem ¶
func MWSystem(env *Environment, Ds *HoppingEV) (solve.DiffSystem, []float64)
func MuSystem ¶
func MuSystem(env *Environment) (solve.DiffSystem, []float64)
Types ¶
type Environment ¶
type Environment struct {
// Size of BZ on one edge (total number of BZ points is this cubed).
BZPointsPerDim int
// Hopping parameters, even symmetry (a, c, diagonal axes).
Tae, Tce, Tbe float64
// Hopping parameters, odd symmetry (a, c, diagonal axes).
Tao, Tco, Tbo float64
// Order parameter <S>.
M float64
// Order parameter <S^2>.
W float64
// Chemical potential.
Mu float64
// Inverse temperature, 1 / (k_B * T).
Beta float64
// One-spin term for BEG model: coefficient for (S_i)^2.
B float64
// Exchange parameters for BEG model: coefficients to S_i dot S_j.
// Jb is excluded since it does not contribute to results.
Ja, Jc float64
// Biquadratic exchange parameters for BEG model: coefficients to (S_i)^2 * (S_j)^2.
Ka, Kc, Kb float64
// On-site energies in M and R phases.
EpsilonM, EpsilonR float64
// Consider only ionic part of the problem:
// only ions contribute to free energy; should solve
// for (M, W).
// If this is set to true, need to also set the following to 0:
// Tae, Tce, Tbe, Tao, Tco, Tbo, EpsilonM, EpsilonR, Mu.
// (maybe don't need to fix Mu = 0 -- large negative value could
// be better).
IonsOnly bool
}
Contains parameters necessary to characterize electronic and ionic systems. The ionic order parameters M and W and the electronic chemical potential Mu must be determined self-consistently.
func LoadEnv ¶
func LoadEnv(envFilePath string) (*Environment, error)
Load an Environment from the JSON file at envFilePath.
func LoadIonEnv ¶
func LoadIonEnv(envFilePath string) (*Environment, error)
Load an Environment from the JSON file at envFilePath. Set all electronic parameters to 0 to restrict to ionic system.
func NewEnvironment ¶
func NewEnvironment(jsonData string) (*Environment, error)
Create an Environment from the given serialized data.
func (*Environment) DeltaS ¶
func (env *Environment) DeltaS() float64
func (*Environment) Fermi ¶
func (env *Environment) Fermi(energy float64) float64
Fermi distribution function.
func (*Environment) FiniteHoppings ¶
func (env *Environment) FiniteHoppings() bool
Are electronic hopping finite? If not, don't need to calculate D's.
func (*Environment) FreeEnergy ¶
func (env *Environment) FreeEnergy(Ds *HoppingEV) float64
Free energy per cell value (Ncell = 2Nsite). Points on the phase diagram include the state with minimum free energy (may not reach this state, depending on initial conditions - need to consider a set of initial conditions and look for minimum).
func (*Environment) FreeEnergyElectrons ¶
func (env *Environment) FreeEnergyElectrons() float64
func (*Environment) FreeEnergyIons ¶
func (env *Environment) FreeEnergyIons(Ds *HoppingEV) float64
func (*Environment) Marshal ¶
func (env *Environment) Marshal() string
func (*Environment) QJ ¶
func (env *Environment) QJ(Ds *HoppingEV) float64
Combined renormalized 'exchange' coefficient (S_i S_j) favoring dimers.
func (*Environment) QK ¶
func (env *Environment) QK() float64
Combined biquadratic coefficient (S_i^2 S_j^2).
func (*Environment) Qele ¶
func (env *Environment) Qele(Ds *HoppingEV) float64
func (*Environment) Set ¶
func (env *Environment) Set(v vec.Vector, vars []string)
Iterate through v and vars simultaneously. vars specifies the names of fields to change in env (they are set to the values given in v). Panics if vars specifies a field not contained in env (or a field of non-float type).
func (*Environment) String ¶
func (env *Environment) String() string
Convert to string by marshalling to JSON
func (*Environment) Z1 ¶
func (env *Environment) Z1(Ds *HoppingEV) float64
type FinalEnvironment ¶
type FinalEnvironment struct {
Environment
Dae, Dce, Dbe, Dao, Dco, Dbo float64
FreeEnergy float64
}
Environment with all self-consistent values converged. Includes additional data for exporting to outside programs.
func NewFinalEnvironment ¶
func NewFinalEnvironment(env *Environment, Ds *HoppingEV) *FinalEnvironment
Create a FinalEnvironment from the given solved Environment and associated HoppingEV.
func (*FinalEnvironment) Marshal ¶
func (env *FinalEnvironment) Marshal() string
func (*FinalEnvironment) String ¶
func (env *FinalEnvironment) String() string
type HoppingEV ¶
type HoppingEV struct {
// contains filtered or unexported fields
}
func NewHoppingEV ¶
func NewHoppingEV() *HoppingEV
func (*HoppingEV) Dae ¶
func (Ds *HoppingEV) Dae(env *Environment) float64
func (*HoppingEV) Dao ¶
func (Ds *HoppingEV) Dao(env *Environment) float64
func (*HoppingEV) Dbe ¶
func (Ds *HoppingEV) Dbe(env *Environment) float64
func (*HoppingEV) Dbo ¶
func (Ds *HoppingEV) Dbo(env *Environment) float64
func (*HoppingEV) Dce ¶
func (Ds *HoppingEV) Dce(env *Environment) float64
func (*HoppingEV) Dco ¶
func (Ds *HoppingEV) Dco(env *Environment) float64
func (*HoppingEV) MarshalEnv ¶
func (Ds *HoppingEV) MarshalEnv(env *Environment) string
func (*HoppingEV) StringEnv ¶
func (Ds *HoppingEV) StringEnv(env *Environment) string
Convert to string by marshalling to JSON. Leave out internal cache data.