Index

Modules

ZenGui — Module
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.API — Type
API

Alias of Integer type (Arbitrary Precision Integer).

See also: APF, APC.

ZenGui.APF — Type
APF

Alias of Float type (Arbitrary Precision Float).

See also: API, APC.

ZenGui.APC — Type
APC

Alias of Complex type (Arbitrary Precision Complex).

See also: API, APF.

ZenGui.R32 — Type
R32

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

See also: N32, N64, APN.

ZenGui.R64 — Type
R64

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

See also: N32, N64, APN.

ZenGui.APR — Type
APR

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

See also: N32, N64, APN.

ZenGui.N32 — Type
N32

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

See also: R32, R64, APR.

ZenGui.N64 — Type
N64

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

See also: R32, R64, APR.

ZenGui.APN — Type
APN

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

See also: R32, R64, APR.

String Constants

General Macros

ZenGui.@cswitch — Macro
@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.sorry — Function
sorry()

Print an error message to the screen.

Arguments

N/A

Returns

N/A

ZenGui.open_url — Function
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_WINDOW — Type
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.MenuFlags — Type
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.FMENU — Constant
FMENU

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

See also: MenuFlags.

Widgets: Menu

ZenGui.create_menu — Function
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_file — Function
set_menu_file()

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

ZenGui.set_menu_edit — Function

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_style — Function

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_help — Function

setmenuhelp()

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

ZenGui.handle_menu_save — Function
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_dark — Function
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_classic — Function
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_light — Function
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_zen — Function
handle_menu_zen(p_open::Ref{Bool})

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

ZenGui.handle_menu_dyson — Function
handle_menu_dyson(p_open::Ref{Bool})

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

ZenGui.handle_menu_dfermion — Function
handle_menu_dfermion(p_open::Ref{Bool})

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

ZenGui.handle_menu_iqist — Function
handle_menu_iqist(p_open::Ref{Bool})

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

ZenGui.handle_menu_acflow — Function
handle_menu_acflow(p_open::Ref{Bool})

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

ZenGui.handle_menu_actest — Function
handle_menu_actest(p_open::Ref{Bool})

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

ZenGui.handle_menu_zengui — Function
handle_menu_zengui(p_open::Ref{Bool})

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

Structs: Zen

ZenGui.ZEN_PCASE — Type
ZEN_PCASE

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

ZenGui.ZEN_PDFT — Type
ZEN_PDFT

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

ZenGui.ZEN_PDMFT — Type
ZEN_PDMFT

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

ZenGui.ZEN_PIMPURITY — Type
ZEN_PIMPURITY

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

ZenGui.ZEN_PSOLVER — Type
ZEN_PSOLVER

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

Widgets: Zen

ZenGui.create_app_zen — Function
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_block — Function
_zen_top_block()

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

ZenGui._zen_main_block — Function
_zen_main_block()

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

ZenGui._zen_bottom_block — Function
_zen_bottom_block(p_open::Ref{Bool})

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

ZenGui.build_zen_dict — Function
build_zen_dict()

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

Structs: Dyson

ZenGui._DYSON — Constant
_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_dyson — Function
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_block — Function
_dyson_main_block()

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

ZenGui._dyson_bottom_block — Function
_dyson_bottom_block(p_open::Ref{Bool})

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

Structs: DFermion

ZenGui._DFERMION — Constant
_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_dfermion — Function
create_app_dfermion(p_open::Ref{Bool})

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

ZenGui._dfermion_bottom_block — Function
_dfermion_bottom_block(p_open::Ref{Bool})

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

Structs: iQIST

ZenGui.IQIST_PCTSEG — Type
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_PCTHYB — Type
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_PATOMIC — Type
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._CTSEG — Constant
_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._CTHYB — Constant
_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._ATOMIC — Constant
_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_ctseg — Function
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_cthyb — Function
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_atomic — Function
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_block — Function
_ctseg_top_block()

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

ZenGui._ctseg_main_block — Function
_ctseg_main_block()

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

ZenGui._ctseg_bottom_block — Function
_ctseg_bottom_block(p_open::Ref{Bool})

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

ZenGui._atomic_top_block — Function
_atomic_top_block()

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

ZenGui._atomic_main_block — Function
_atomic_main_block()

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

ZenGui._atomic_bottom_block — Function
_atomic_bottom_block(p_open::Ref{Bool})

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

ZenGui.build_iqist_dict — Function
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_PBASE — Type
ACFLOW_PBASE

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

ZenGui.ACFLOW_PMaxEnt — Type
ACFLOW_PMaxEnt

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

ZenGui.ACFLOW_PBarRat — Type
ACFLOW_PBarRat

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

Widgets: ACFlow

ZenGui.create_app_acflow — Function
create_app_acflow(p_open::Ref{Bool})

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

ZenGui._acflow_bottom_block — Function
_acflow_bottom_block(p_open::Ref{Bool})

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

ZenGui.build_acflow_dict — Function
build_acflow_dict()

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

Structs: ACTest

ZenGui.ACTEST_PTEST — Type
ACTEST_PTEST

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

Widgets: ACTest

ZenGui.create_app_actest — Function
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_block — Function
_actest_bottom_block(p_open::Ref{Bool})

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

ZenGui.build_actest_dict — Function
build_actest_dict()

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

Widgets: About

ZenGui.create_app_about — Function
create_app_about(p_open::Ref{Bool}, logo_id)

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

Functions: Utilities

ZenGui.dict_to_toml — Function
dict_to_toml(d::AbstractDict)

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

ZenGui.dict_to_ini — Function
dict_to_ini(d::AbstractDict)

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

ZenGui.struct_to_dict — Function
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_texture — Function
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.

— Function
load_logo()

Load logo image from the ZenGui/src/.images directory. It will return an ImTextureID object which is associted with the logo image. Note that the logo image will be displayed in the About window.

See also: load_texture.

ZenGui.setup_flags — Function
setup_flags()

Setup configuration flags for the Dear ImGui library.

ZenGui.setup_fonts — Function
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_window — Function
setup_window()

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

ZenGui.setup_background — Function
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_zen — Function
save_zen(p_open::Ref{Bool})

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

ZenGui.save_dyson — Function
save_dyson(p_open::Ref{Bool})

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

ZenGui.save_dfermion — Function
save_dfermion(p_open::Ref{Bool})

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

ZenGui.save_ctseg — Function
save_ctseg(p_open::Ref{Bool})

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

ZenGui.save_cthyb — Function
save_cthyb(p_open::Ref{Bool})

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

ZenGui.save_atomic — Function
save_atomic(p_open::Ref{Bool})

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

ZenGui.save_acflow — Function
save_acflow(p_open::Ref{Bool})

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

ZenGui.save_actest — Function
save_actest(p_open::Ref{Bool})

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

ZenGui.save_nothing — Function
save_nothing(p_open::Ref{Bool})

This function will create an empty window and do nothing.

Functions: Main

ZenGui.zeng_run — Function
zeng_run()

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