Base
To provide the core functions to control the DFT engine, DMFT engine, quantum impurity solvers, Kohn-Sham adaptor, self-energy engine, and mixer engine. The DFT + DMFT iteration (one-shot mode or charge fully self-consistent mode) is also implemented in this file. This file also includes some functions to watch and manipulate the IterInfo struct.
Source: base.jl
Contents
Index
ZenCore.adaptor_run
ZenCore.build_trees
ZenCore.clear_trees
ZenCore.cntr_it
ZenCore.conv_it
ZenCore.cycle1
ZenCore.cycle2
ZenCore.cycle3
ZenCore.cycle4
ZenCore.cycle5
ZenCore.cycle6
ZenCore.cycle7
ZenCore.cycle8
ZenCore.dft_run
ZenCore.dmft_run
ZenCore.energy_core
ZenCore.final
ZenCore.go
ZenCore.incr_it
ZenCore.mixer_core
ZenCore.monitor
ZenCore.prev_it
ZenCore.ready
ZenCore.show_it
ZenCore.sigma_core
ZenCore.solver_run
ZenCore.suicide
ZenCore.suspend
ZenCore.zero_it
Functions
ZenCore.ready
— Functionready()
Examine whether all the conditions, including input files and working directories, for DFT + DMFT calculations are ready.
See also: go
.
ZenCore.go
— Functiongo()
Dispatcher for DFT + DMFT calculations. Note that it can not call the cycle3()
-cycle8()
functions. These functions are designed only for testing purpose.
See also: ready
.
ZenCore.final
— FunctionZenCore.cycle1
— Functioncycle1()
Perform one-shot DFT + DMFT calculations. In other words, the charge density won't be fed back to the DFT engine. The self-consistency is only achieved at the DMFT level.
ZenCore.cycle2
— Functioncycle2()
Perform fully self-consistent DFT + DMFT calculations. The self-consistency is achieved at both DFT and DMFT levels. This function doesn't work so far.
ZenCore.cycle3
— Functioncycle3()
Perform DFT calculations only. If there are something wrong, then you have chance to adjust the DFT input files manually (for example, you can modify vaspc_incar()/vasp.jl
by yourself).
ZenCore.cycle4
— Functioncycle4(task::I64)
Perform DMFT calculations only. The users can execute it in the REPL mode to see whether the DMFT engine works properly.
ZenCore.cycle5
— Functioncycle5()
Perform calculations using quantum impurity solvers only. The users can execute it in the REPL mode to see whether the quantum impurity solvers work properly.
ZenCore.cycle6
— Functioncycle6()
Perform calculations using Kohn-Sham adaptor only. The users can execute it in the REPL mode to see whether the Kohn-Sham adaptor works properly.
ZenCore.cycle7
— Functioncycle7(task::String = "reset")
Perform calculations using self-energy engine only. The users can execute it in the REPL mode to see whether the self-energy engine works properly.
ZenCore.cycle8
— Functioncycle8(task::String = "sigma")
Perform calculations using mixer engine only. The users can execute it in the REPL mode to see whether the mixer engine works properly.
In order to run this function correctly, sometimes users should modify the predefined parameters in step C01
.
ZenCore.monitor
— Functionmonitor(force_exit::Bool = false)
Determine whether we need to terminate the Zen
code.
See also: query_stop
.
ZenCore.suspend
— Functionsuspend(second::I64)
Suspend the current process to wait the DFT engine. This function is useful for charge fully self-consistent DFT + DMFT calculations.
Now this function only supports the vasp code. We have to improve it to support more DFT engines.
See also: dft_run
.
ZenCore.suicide
— FunctionZenCore.dft_run
— Functiondft_run(it::IterInfo, lr::Logger, sc::Bool = false)
Simple driver for DFT engine. It performs three tasks: (1) Examine the runtime environment for the DFT engine. (2) Launch the DFT engine. (3) Backup the output files by DFT engine for next iterations.
If sc = true
, this function will read in the correction for density matrix, and then feed it back to the DFT engine to continue the DFT + DMFT calculations.
Now only the vasp engine is supported. If you want to support the other DFT engine, this function must be adapted.
See also: adaptor_run
, dmft_run
, solver_run
.
ZenCore.dmft_run
— Functiondmft_run(it::IterInfo, lr::Logger, task::I64)
Simple driver for DMFT engine. It performs three tasks: (1) Examine the runtime environment for the DMFT engine. (2) Launch the DMFT engine. (3) Backup the output files by DMFT engine for next iterations.
The argument task
is used to specify running mode of the DMFT code.
See also: adaptor_run
, dft_run
, solver_run
.
ZenCore.solver_run
— Functionsolver_run(it::IterInfo, lr::Logger, ai::Array{Impurity,1}, force::Bool = false)
Simple driver for quantum impurity solvers. It performs three tasks: (1) Examine the runtime environment for quantum impurity solver. (2) Launch the quantum impurity solver. (3) Backup output files by quantum impurity solver for next iterations.
If force = true
, then we will try to solve all of the quantum impurity problems explicitly, irrespective of their symmetries.
Now only the ct_hyb1
, ct_hyb2
, hub1
, and norg
quantum impurity solvers are supported. If you want to support the other quantum impurity solvers, this function must be adapted.
See also: adaptor_run
, dft_run
, dmft_run
.
ZenCore.adaptor_run
— Functionadaptor_run(it::IterInfo, lr::Logger, ai::Array{Impurity,1})
Simple driver for the adaptor. It performs three tasks: (1) Initialize the adaptor, to check whether the essential files exist. (2) Parse the Kohn-Sham data output by the DFT engine, try to preprocess them, and then transform them into IR format. (3) Backup the files by adaptor.
For the first task, only the vasp adaptor is supported. While for the second task, only the PLO adaptor is supported. If you want to support more adaptors, please adapt this function.
See also: dft_run
, dmft_run
, solver_run
.
ZenCore.sigma_core
— Functionsigma_core(it::IterInfo, lr::Logger, ai::Array{Impurity,1}, task::String = "reset")
Simple driver for functions for processing the self-energy functions and hybridization functions.
Now it supports four tasks: reset
, dcount
, split
, gather
. It won't change the current directory.
See also: mixer_core
.
ZenCore.mixer_core
— Functionmixer_core(it::IterInfo, lr::Logger, ai::Array{Impurity,1}, task::String = "sigma")
Simple driver for the mixer. It will try to mix the self-energy functions or hybridization functions and generate a new one.
Now it supports four tasks: sigma
, delta
, eimpx
, gamma
. It won't change the current directory.
See also: sigma_core
.
ZenCore.energy_core
— Functionenergy_core(it::IterInfo)
Simple driver for treating the total DFT + DMFT energy. It will print the decomposition of total energy, and try to calculate the energy difference between two successive DFT + DMFT iterations.
ZenCore.build_trees
— FunctionZenCore.clear_trees
— FunctionZenCore.incr_it
— Functionincr_it(it::IterInfo)
Modify the internal counters in IterInfo
struct. This function is used in the one-shot DFT + DMFT calculations only.
incr_it(it::IterInfo, c::I64, v::I64)
Modify the internal counters in IterInfo
struct. This function is used in the fully charge self-consistent DFT + DMFT calculations only.
ZenCore.zero_it
— FunctionZenCore.prev_it
— Functionprev_it(it::IterInfo)
Return the iteration information for previous DFT + DMFT step. This function is suitable for one-shot calculation mode.
See also: mixer_core
, incr_it
.
prev_it(it::IterInfo, c::I64)
Return the iteration information for previous DFT + DMFT step. This function is suitable for fully self-consistent calculation mode.
See also: mixer_core
, incr_it
.
ZenCore.cntr_it
— Functioncntr_it(it::IterInfo)
Return the counters in the IterInfo struct as a format string.
See also: IterInfo
ZenCore.show_it
— Functionshow_it(it::IterInfo, lr::Logger)
Try to record the iteration information in the case.cycle
file.
show_it(mode::String, iter::I64, max_iter::I64)
Try to record the iteration information in the terminal.
ZenCore.conv_it
— Function