Library

Contents

Index

Modules

ZenGuiModule
ZenGui

ZenGui is a general-purpose graphic user interface for ab initio dynamical mean-field theory codes, which have been developed at the China Academy of Engineeing Physics. It should be used to generate necessary configuration files for them. Now it supports the following codes:

  • All-in-one DFT + DMFT package (Zen)
  • Dynamical mean-field theory engines (Dyson and DFermion)
  • Quantum impurity solver toolkit (iQIST)
  • Analytic continuation tools (ACFlow and ACTest)

More codes will be supported in the future. Now this code is under heavy development. PLEASE USE IT AT YOUR OWN RISK.

For more details about how to obtain, install and use this ZenGui app, please visit the following website:

  • https://huangli712.github.io/projects/zengui/index.html

Any suggestions, comments, and feedbacks are welcome. Enjoy it!

Numerical Types

ZenGui.APIType
API

Alias of Integer type (Arbitrary Precision Integer).

See also: APF, APC.

ZenGui.APFType
APF

Alias of Float type (Arbitrary Precision Float).

See also: API, APC.

ZenGui.APCType
APC

Alias of Complex type (Arbitrary Precision Complex).

See also: API, APF.

ZenGui.R32Type
R32

Alias of Integer and Float types (32 bit). Here R means Real.

See also: N32, N64, APN.

ZenGui.R64Type
R64

Alias of Integer and Float types (64 bit). Here R means Real.

See also: N32, N64, APN.

ZenGui.APRType
APR

Alias of Integer and Float types (Arbitrary Precision). Here R means Real.

See also: N32, N64, APN.

ZenGui.N32Type
N32

Alias of Integer, Float, and Complex types (32 bit). Here N means Number.

See also: R32, R64, APR.

ZenGui.N64Type
N64

Alias of Integer, Float, and Complex types (64 bit). Here N means Number.

See also: R32, R64, APR.

ZenGui.APNType
APN

Alias of Integer, Float, and Complex types (Arbitrary Precision). Here N means Number.

See also: R32, R64, APR.

String Constants

General Macros

ZenGui.@cswitchMacro
@cswitch(constexpr, body)

Provides a C-like switch statement with the falling through behavior. This implementation was borrowed from the following github repository:

  • https://github.com/Gnimuc/CSyntax.jl

Examples

engine = get_d("engine")
@cswitch engine begin
    @case "vasp"
        just_do_it()
        break

    @default
        sorry()
        break
end

General Utilities

ZenGui.sorryFunction
sorry()

Print an error message to the screen.

Arguments

N/A

Returns

N/A

ZenGui.open_urlFunction
open_url(url::String)

Invoke the default web browser to open the given url. It only supports the windows, macos, and linux systems.

Structs: Menu

ZenGui.CURRENT_WINDOWType
CURRENT_WINDOW

A struct used to keep the name of the current (activate) window. Note that its global instance is CWIN

Members

  • name -> Name of the current window.
ZenGui.MenuFlagsType
MenuFlags

A struct used to track the status of all the menu items. The renderloop should respond the mouse events according to this struct. Note that its global instance is FMENU

The meun items are created at src/menu.jl.

Members

  • F_SAVE -> File | Save.
  • F_EXIT -> File | Exit.
  • E_ZEN -> Edit | Integrated Package | Zen.
  • E_DYSON -> Edit | Quantum Many-Body Theory Engines | Dyson.
  • E_DFERMION -> Edit | Quantum Many-Body Theory Engines | DFermion.
  • E_CTSEG -> Edit | Quantum Impurity Solvers | iQIST | ctseg.
  • E_CTHYB -> Edit | Quantum Impurity Solvers | iQIST | cthyb.
  • E_ATOMIC -> Edit | Quantum Impurity Solvers | iQIST | atomic.
  • E_ACFLOW -> Edit | Analytic Continuation Tools | ACFlow.
  • E_ACTEST -> Edit | Analytic Continuation Tools | ACTest.
  • S_BGIMAGE -> Style | Change Background.
  • S_CLASSIC -> Style | Classic.
  • S_DARK -> Style | Dark.
  • S_LIGHT -> Style | Light.
  • H_ZEN -> Help | Documentation | Zen.
  • H_DYSON -> Help | Documentation | Dyson.
  • H_DFERMION -> Help | Documentation | DFermion.
  • H_IQIST -> Help | Documentation | iQIST.
  • H_ACFLOW -> Help | Documentation | ACFlow.
  • H_ACTEST -> Help | Documentation | ACTest.
  • H_ZENGUI -> Help | User's Manual.
  • H_ABOUT -> Help | About ZenGui.
ZenGui.FMENUConstant
FMENU

An instance for the MenuFlags struct. Initially, all members are set to be false.

See also: MenuFlags.

Widgets: Menu

ZenGui.create_menuFunction
create_menu()

Generate all menu items in the main window. Note that the FMENU struct should be modified here.

See also: MenuFlags and FMENU.

ZenGui.set_menu_fileFunction
set_menu_file()

Setup menu items in ``File''. There are only two items: Save and Exit.

ZenGui.set_menu_editFunction

setmenuedit()

Setup menu items in ``Edit''. They are related to the apps developed by myself. Now only the Zen, Dyson, DFermion, iQIST, ACFlow, and ACTest codes are supported.

ZenGui.set_menu_styleFunction

setmenustyle()

Setup menu items in ``Style''. They are used to modify the appearance, including background image and color styles, of this window-based app.

ZenGui.set_menu_helpFunction

setmenuhelp()

Setup menu items in ``Help''. They are related to the documentation and user guides of all the apps.

ZenGui.handle_menu_saveFunction
handle_menu_save(p_open::Ref{Bool})

Respond the menu event: save. Try to save configurtion files for various tools or codes.

ZenGui.handle_menu_darkFunction
handle_menu_dark(p_open::Ref{Bool})

Respond the menu event: dark. Change the appearance of graphic user interface to dark style. Note that the defalt style is dark.

See also: setup_window.

ZenGui.handle_menu_classicFunction
handle_menu_classic(p_open::Ref{Bool})

Respond the menu event: classic. Change the appearance of graphic user interface to classic style.

See also: setup_window.

ZenGui.handle_menu_lightFunction
handle_menu_light(p_open::Ref{Bool})

Respond the menu event: light. Change the appearance of graphic user interface to light style.

See also: setup_window.

ZenGui.handle_menu_zenFunction
handle_menu_zen(p_open::Ref{Bool})

Respond the menu event: zen. Try to open documentation for the Zen package.

ZenGui.handle_menu_dysonFunction
handle_menu_dyson(p_open::Ref{Bool})

Respond the menu event: dyson. Try to open documentation for the Dyson code.

ZenGui.handle_menu_dfermionFunction
handle_menu_dfermion(p_open::Ref{Bool})

Respond the menu event: dfermion. Try to open documentation for the DFermion code.

ZenGui.handle_menu_iqistFunction
handle_menu_iqist(p_open::Ref{Bool})

Respond the menu event: iqist. Try to open documentation for the iQIST package.

ZenGui.handle_menu_acflowFunction
handle_menu_acflow(p_open::Ref{Bool})

Respond the menu event: acflow. Try to open documentation for the ACFlow toolkit.

ZenGui.handle_menu_actestFunction
handle_menu_actest(p_open::Ref{Bool})

Respond the menu event: actest. Try to open documentation for the ACTest toolkit.

ZenGui.handle_menu_zenguiFunction
handle_menu_zengui(p_open::Ref{Bool})

Respond the menu event: zengui. Try to open documentation for the ZenGui application.

Structs: Zen

ZenGui.ZEN_PCASEType
ZEN_PCASE

This struct represents the [case] block in the case.toml file.

ZenGui.ZEN_PDFTType
ZEN_PDFT

This struct represents the [dft] block in the case.toml file.

ZenGui.ZEN_PDMFTType
ZEN_PDMFT

This struct represents the [dmft] block in the case.toml file.

ZenGui.ZEN_PIMPURITYType
ZEN_PIMPURITY

This struct represents the [impurity] block in the case.toml file.

ZenGui.ZEN_PSOLVERType
ZEN_PSOLVER

This struct represents the [solver] block in the case.toml file.

Widgets: Zen

ZenGui.create_app_zenFunction
create_app_zen(p_open::Ref{Bool})

Create an UI window for the Zen toolkit, which is an integrated package for ab initio dynamical mean-field theory calculations.

ZenGui._zen_top_blockFunction
_zen_top_block()

Setup widgets in the top of the window for the Zen package.

ZenGui._zen_main_blockFunction
_zen_main_block()

Setup widgets associated with the parameters in the case.toml file.

ZenGui._zen_bottom_blockFunction
_zen_bottom_block(p_open::Ref{Bool})

Setup widgets in the bottom of the window for the Zen package.

ZenGui.build_zen_dictFunction
build_zen_dict()

Assemble the ordered dictionary, which is then converted into case.toml, for the Zen package.

Structs: Dyson

ZenGui._DYSONConstant
_DYSON

This set records the names of modified parameters, which will be presented in the dmft.in file. Note that not all the parameters in DYSON_PDYSON should be presented in the dmft.in file.

See also: DYSON_PDYSON.

Widgets: Dyson

ZenGui.create_app_dysonFunction
create_app_dyson(p_open::Ref{Bool})

Create an UI window for the Dyson code, which is a dynamical mean-field theory engine.

ZenGui._dyson_main_blockFunction
_dyson_main_block()

Setup widgets associated with the parameters in the dmft.in file.

ZenGui._dyson_bottom_blockFunction
_dyson_bottom_block(p_open::Ref{Bool})

Setup widgets in the bottom of the window for the Dyson code.

Structs: DFermion

ZenGui._DFERMIONConstant
_DFERMION

This set records the names of modified parameters, which will be presented in the dfa.in file. Note that not all the parameters in DFERMION_PDFERMION should be presented in the dfa.in file.

See also: DFERMION_PDFERMION.

Widgets: DFermion

ZenGui.create_app_dfermionFunction
create_app_dfermion(p_open::Ref{Bool})

Create an UI window for the DFermion code, which is a dual fermion engine.

ZenGui._dfermion_bottom_blockFunction
_dfermion_bottom_block(p_open::Ref{Bool})

Setup widgets in the bottom of the window for the DFermion code.

Structs: iQIST

ZenGui.IQIST_PCTSEGType
IQIST_PCTSEG

This struct encapsulates the parameters in the solver.ctqmc.in file. It is for the iQIST/ctseg code only.

See also: PCTSEG.

ZenGui.IQIST_PCTHYBType
IQIST_PCTHYB

This struct encapsulates the parameters in the solver.ctqmc.in file. It is for the iQIST/cthyb code only.

See also: PCTHYB.

ZenGui.IQIST_PATOMICType
IQIST_PATOMIC

This struct encapsulates the parameters in the solver.atomic.in file. It is for the iQIST/atomic code only.

See also: PATOMIC.

ZenGui._CTSEGConstant
_CTSEG

This set records the names of modified parameters, which will be presented in the solver.ctqmc.in file. It is for the iQIST/ctseg code only.

Note that not all the parameters in IQIST_PCTSEG will be presented in the solver.ctqmc.in file.

See also: IQIST_PCTSEG.

ZenGui._CTHYBConstant
_CTHYB

This set records the names of modified parameters, which will be presented in the solver.ctqmc.in file. It is for the iQIST/cthyb code only.

Note that not all the parameters in IQIST_PCTHYB will be presented in the solver.ctqmc.in file.

See also: IQIST_PCTHYB.

ZenGui._ATOMICConstant
_ATOMIC

This set records the names of modified parameters, which will be presented in the solver.atomic.in file. It is for the iQIST/atomic code only.

Note that not all the parameters in IQIST_PATOMIC will be presented in the solver.atomic.in file.

See also: IQIST_PATOMIC.

Widgets: iQIST

ZenGui.create_app_ctsegFunction
create_app_ctseg(p_open::Ref{Bool})

Create an UI window for the ctseg code, which is a continuous-time quantum impurity solver in the iQIST package.

ZenGui.create_app_cthybFunction
create_app_cthyb(p_open::Ref{Bool})

Create an UI window for the cthyb code, which is a continuous-time quantum impurity solver in the iQIST package.

ZenGui.create_app_atomicFunction
create_app_atomic(p_open::Ref{Bool})

Create an UI window for the atomic code, which is an atomic eigenvalue problem solver in the iQIST package.

ZenGui._ctseg_top_blockFunction
_ctseg_top_block()

Setup widgets in the top of the window for the iQIST/ctseg code.

ZenGui._ctseg_main_blockFunction
_ctseg_main_block()

Setup widgets associated with the parameters in the solver.ctqmc.in file.

ZenGui._ctseg_bottom_blockFunction
_ctseg_bottom_block(p_open::Ref{Bool})

Setup widgets in the bottom of the window for the iQIST/ctseg code.

ZenGui._atomic_top_blockFunction
_atomic_top_block()

Setup widgets in the top of the window for the iQIST/atomic code.

ZenGui._atomic_main_blockFunction
_atomic_main_block()

Setup widgets associated with the parameters in the solver.atomic.in file.

ZenGui._atomic_bottom_blockFunction
_atomic_bottom_block(p_open::Ref{Bool})

Setup widgets in the bottom of the window for the iQIST/atomic code.

ZenGui.build_iqist_dictFunction
build_iqist_dict()

Assemble the ordered dictionary, which is then converted into solver.ctqmc.in or solver.atomic.in file for the ctseg, cthyb, and atomic codes.

Structs: ACFlow

ZenGui.ACFLOW_PBASEType
ACFLOW_PBASE

This struct represents the [BASE] block in the ac.toml file.

ZenGui.ACFLOW_PMaxEntType
ACFLOW_PMaxEnt

This struct represents the [MaxEnt] block in the ac.toml file.

ZenGui.ACFLOW_PBarRatType
ACFLOW_PBarRat

This struct represents the [BarRat] block in the ac.toml file.

Widgets: ACFlow

ZenGui.create_app_acflowFunction
create_app_acflow(p_open::Ref{Bool})

Create an UI window for the ACFlow toolkit, which provides some analytic continuation tools.

ZenGui._acflow_bottom_blockFunction
_acflow_bottom_block(p_open::Ref{Bool})

Setup widgets in the bottom of the window for the ACFlow toolkit.

ZenGui.build_acflow_dictFunction
build_acflow_dict()

Assemble the ordered dictionary, which is then converted into ac.toml, for the ACFlow toolkit.

Structs: ACTest

ZenGui.ACTEST_PTESTType
ACTEST_PTEST

This struct represents the [Test] block in the act.toml file.

Widgets: ACTest

ZenGui.create_app_actestFunction
create_app_actest(p_open::Ref{Bool})

Create an UI window for the ACTest toolkit, which is used to benchmark the analytic continuation tools as implemented in the ACFlow package.

ZenGui._actest_bottom_blockFunction
_actest_bottom_block(p_open::Ref{Bool})

Setup widgets in the bottom of the window for the ACTest toolkit.

ZenGui.build_actest_dictFunction
build_actest_dict()

Assemble the ordered dictionary, which is then converted into act.toml, for the ACTest toolkit.

Widgets: About

ZenGui.create_app_aboutFunction
create_app_about(p_open::Ref{Bool})

Display the About window, which is used to show some userful information about this ZenGui app.

Functions: Utilities

ZenGui.dict_to_tomlFunction
dict_to_toml(d::AbstractDict)

Convert an ordered dictionary to toml file (actually String).

ZenGui.dict_to_iniFunction
dict_to_ini(d::AbstractDict)

Convert an ordered dictionary to ini file (actually String).

ZenGui.struct_to_dictFunction
struct_to_dict(s::ZEN_PCASE)

Convert a struct to an ordered dictionary (for ZEN_PCASE).

See ZEN_PCASE.

struct_to_dict(s::ZEN_PDFT)

Convert a struct to an ordered dictionary (for ZEN_PDFT).

See ZEN_PDFT.

struct_to_dict(s::ZEN_PDMFT)

Convert a struct to an ordered dictionary (for ZEN_PDMFT).

See ZEN_PDMFT.

struct_to_dict(s::ZEN_PIMPURITY)

Convert a struct to an ordered dictionary (for ZEN_PIMPURITY).

See ZEN_PIMPURITY.

struct_to_dict(s::ZEN_PSOLVER)

Convert a struct to an ordered dictionary (for ZEN_PSOLVER).

See ZEN_PSOLVER.

struct_to_dict(s::DYSON_PDYSON)

Convert a struct to an ordered dictionary (for DYSON_PDYSON).

See also: DYSON_PDYSON.

struct_to_dict(s::DFERMION_PDFERMION)

Convert a struct to an ordered dictionary (for DFERMION_PDFERMION).

See also: DFERMION_PDFERMION.

struct_to_dict(s::IQIST_PCTSEG)

Convert a struct to an ordered dictionary (for IQIST_PCTSEG).

See IQIST_PCTSEG.

struct_to_dict(s::IQIST_PCTHYB)

Convert a struct to an ordered dictionary (for IQIST_PCTHYB).

See IQIST_PCTHYB.

struct_to_dict(s::IQIST_PATOMIC)

Convert a struct to an ordered dictionary (for IQIST_PATOMIC).

See IQIST_PATOMIC.

struct_to_dict(s::ACFLOW_PBASE)

Convert a struct to an ordered dictionary (for ACFLOW_PBASE).

See ACFLOW_PBASE.

struct_to_dict(s::ACFLOW_PMaxEnt)

Convert a struct to an ordered dictionary (for ACFLOW_PMaxEnt).

See ACFLOW_PMaxEnt.

struct_to_dict(s::ACFLOW_PBarRat)

Convert a struct to an ordered dictionary (for ACFLOW_PBarRat).

See ACFLOW_PBarRat.

struct_to_dict(s::ACFLOW_PNevanAC)

Convert a struct to an ordered dictionary (for ACFLOW_PNevanAC).

See ACFLOW_PNevanAC.

struct_to_dict(s::ACFLOW_PStochAC)

Convert a struct to an ordered dictionary (for ACFLOW_PStochAC).

See ACFLOW_PStochAC.

struct_to_dict(s::ACFLOW_PStochSK)

Convert a struct to an ordered dictionary (for ACFLOW_PStochSK).

See ACFLOW_PStochSK.

struct_to_dict(s::ACFLOW_PStochOM)

Convert a struct to an ordered dictionary (for ACFLOW_PStochOM).

See ACFLOW_PStochOM.

struct_to_dict(s::ACFLOW_PStochPX)

Convert a struct to an ordered dictionary (for ACFLOW_PStochPX).

See ACFLOW_PStochPX.

struct_to_dict(s::ACTEST_PTEST)

Convert a struct to an ordered dictionary (for ACTEST_PTEST).

See ACTEST_PTEST.

Functions: Setup

ZenGui.load_textureFunction
load_texture()

Load images from the ZenGui/src/.images directory. Note that there are 12 images now. This function will pick one image randomly and load it. Finally, it will return an ImTextureID object which is associted with the selected image.

See also: setup_background.

ZenGui.setup_flagsFunction
setup_flags()

Setup configuration flags for the Dear ImGui library.

ZenGui.setup_fontsFunction
setup_fonts()

Setup fonts for this graphic user interface. Note that the files for fonts should be saved in the ZenGui/src/.fonts directory.

ZenGui.setup_windowFunction
setup_window()

Tweak the window's style in this graphic user interface.

ZenGui.setup_backgroundFunction
setup_background(texture_id)

Setup the background image for this app. texture_id is an ImTextureID object. which is initialized by load_texture().

See also: load_texture.

Functions: Save

ZenGui.save_zenFunction
save_zen(p_open::Ref{Bool})

Save configuration file (case.toml) for the Zen package.

ZenGui.save_dysonFunction
save_dyson(p_open::Ref{Bool})

Save configuration file (dmft.in) for the Dyson code.

ZenGui.save_dfermionFunction
save_dfermion(p_open::Ref{Bool})

Save configuration file (dfa.in) for the DFermion code.

ZenGui.save_ctsegFunction
save_ctseg(p_open::Ref{Bool})

Save configuration file (solver.ctqmc.in) for the iQIST/ctseg code.

ZenGui.save_cthybFunction
save_cthyb(p_open::Ref{Bool})

Save configuration file (solver.ctqmc.in) for the iQIST/cthyb code.

ZenGui.save_atomicFunction
save_atomic(p_open::Ref{Bool})

Save configuration file (solver.atomic.in) for the iQIST/atomic code.

ZenGui.save_acflowFunction
save_acflow(p_open::Ref{Bool})

Save configuration file (ac.toml) for the ACFlow toolkit.

ZenGui.save_actestFunction
save_actest(p_open::Ref{Bool})

Save configuration file (act.toml) for the ACTest toolkit.

ZenGui.save_nothingFunction
save_nothing(p_open::Ref{Bool})

This function will create an empty window and do nothing.

Functions: Main

ZenGui.zeng_runFunction
zeng_run()

Main function. It launchs the graphic user interface and respond to user inputs unitl the main window is closed.