from __future__ import print_function import sys import os qhroot = os.environ["QHROOT"] # root path sys.path.append(qhroot + "/pysrc/") # python libraries from interfacetk import qtwrap # import the library with simple wrappaers to qt4 get = qtwrap.get # get the value of a certain variable getbox = qtwrap.getbox # get the value of a certain variable window = qtwrap.main() # this is the main interface from interfacetk.qh_interface import * # import all the libraries needed from interfacetk import common # common routines for all the geometries common.initialize(qtwrap) # do several common initializations def get_geometry(modify=True): """ Create a 0d island""" lattice_name = getbox("lattice") # get the option n = int(get("width")) # thickness of the system # lattice_name = builder.get_object("lattice").get_active_text() if lattice_name == "Chain": g = geometry.chain() if lattice_name == "Honeycomb": g = geometry.honeycomb_lattice() elif lattice_name == "Square": g = geometry.square_lattice() elif lattice_name == "Kagome": g = geometry.kagome_lattice()
from __future__ import print_function import sys import os qhroot = os.environ["QHROOT"] # root path sys.path.append(qhroot + "/pysrc/") # python libraries from interfacetk import qtwrap # import the library with simple wrappaers to qt4 get = qtwrap.get # get the value of a certain variable getbox = qtwrap.getbox # get the value of a certain variable window = qtwrap.main() # this is the main interface from interfacetk.qh_interface import * # import all the libraries needed from interfacetk import common common.initialize(qtwrap) # initilizations def get_geometry(modify=True): """ Create a 0d island""" lattice = getbox("lattice") # get the option ns = [] # empt list for il in lattice: if il == "A": ns += [-1] elif il == "B": ns += [0] elif il == "C": ns += [1] else: print("Error", il) print(ns) g = specialgeometry.multilayer_graphene(l=ns) nsuper = int(get("nsuper")) g = g.supercell(nsuper)
import sys import os qhroot = os.environ["QHROOT"] # root path sys.path.append(qhroot + "/pysrc/") # python libraries from interfacetk import qtwrap # import the library with simple wrappaers to qt4 get = qtwrap.get # get the value of a certain variable getbox = qtwrap.getbox # get the value of a certain variable window = qtwrap.main() # this is the main interface from interfacetk.qh_interface import * # import all the libraries needed from interfacetk import common # common routines for all the geometries common.initialize(qtwrap) # several initilizations def get_geometry(modify=True): """ Create a 0d island""" lattice_name = getbox("lattice") # get the option n = int(get("width")) # thickness of the system # lattice_name = builder.get_object("lattice").get_active_text() if lattice_name == "Chain": g = geometry.chain() if lattice_name == "Honeycomb": g = geometry.honeycomb_lattice() elif lattice_name == "Square": g = geometry.square_lattice() elif lattice_name == "Kagome": g = geometry.kagome_lattice()
ewin = get("window_ldos") nrep = int(get("nsuper_ldos")) nk = int(get("nk_ldos")) ne = int(get("ne_ldos")) delta = get("delta_ldos") ldos.multi_ldos(h, es=np.linspace(-ewin, ewin, ne), nk=nk, delta=delta, nrep=nrep) execute_script("qh-multildos ") save_results = lambda x: save_outputs(inipath, tmppath) # function to save # create signals signals = dict() #signals["initialize"] = initialize # initialize and run signals["show_bands"] = show_bands # show bandstructure signals["show_structure"] = show_structure # show bandstructure signals["show_dos"] = show_dos # show DOS signals["show_dosbands"] = show_dosbands # show DOS signals["show_interactive_ldos"] = show_interactive_ldos # show DOS common.initialize(qtwrap) # initialize window.connect_clicks(signals) folder = create_folder() tmppath = os.getcwd() # get the initial directory window.run()