Old interface

While the following functions still work, they are not guaranteed to be supported in the future. Please adapt to the new, more versatile interface of the run()

Integrating

wannierberri.integrate(system, grid, Efermi=None, omega=None, Ef0=0, smearEf=10, smearW=None, quantities=[], user_quantities={}, adpt_num_iter=0, adpt_fac=1, use_irred_kpt=True, symmetrize=True, fout_name='wberri', write_txt=True, write_bin=False, restart=False, suffix='', file_Klist='Klist', parallel=<wannierberri.parallel.Serial object>, print_Kpoints=True, parameters={}, parameters_K={}, specific_parameters={})[source]

Integrate

Parameters:
  • system (System) – System under investigation
  • grid (Grid) – initial grid for integration
  • Efermi (numpy.array) – The list of Fermi levels to be scanned (for Fermi-sea or Fermi-surface properties)
  • omega (numpy.array) – The list of ferequencies levels to be scanned (for optical properties)
  • smearEf (float) – smearing over Fermi levels (in Kelvin)
  • quantities (list of str) – quantities to be integrated. See Capabilities One can append any label after a ‘^’ symbol. In this case same quantity may be calculated several times in one run, but with different parameters (see specifuc_parameters)
  • user_quantities (dict) – a dictionary {name:function}, where name is any string, and function(data_K,Efermi) takes two arguments data_K of of type Data_K and Efermi - np.array and returns an object EnergyResult
  • adpt_num_iter (int) – number of recursive adaptive refinement iterations. See Recursive adaptive refinement
  • adpt_fac (int) – number of K-points to be refined per quantity and criteria.
  • parallel (Parallel) – object describing parallelization scheme
  • use_irred_kpt (bool) – evaluate only symmetry-irreducible K-points
  • symmetrize (bool) – symmetrize the result (always True if use_irred_kpt == True)
  • fout_name (str) – beginning of the output files for each quantity after each iteration
  • write_txt (bool) – write results after each iteration as text files (“.dat”)
  • write_bin (bool) – write results after each iteration as binary files (“.npz”). See save() for file format
  • print_Kpoints (bool) – print the list of K points
  • parameters (dict) – {‘name’:value,…} , Each quantity that recognizes a parameter with the given name will use it
  • specific_parameters (dict) – ‘quantity^label’:dict, where dict is analogous to parameters. This values will override for the instance of the quantity labeled by ‘^label’
  • parameters_K (dict) – parameters to be passed to the Data_K, so they are common for the calculation.
Returns:

Return type:

dictionary of EnergyResult

Notes

Results are also printed to ASCII files

Tabulating

wannierberri.tabulate(system, grid, quantities=[], user_quantities={}, frmsf_name=None, ibands=None, suffix='', Ef0=0.0, use_irred_kpt=True, symmetrize=True, parameters={}, parameters_K={}, specific_parameters={}, degen_thresh=0.0001, degen_Kramers=False, parallel=<wannierberri.parallel.Serial object>, print_Kpoints=True)[source]

Tabulate quantities to be plotted

Parameters:
  • system (System) – System under investigation
  • grid (Grid) – initial grid for integration
  • Ef0 (float) – a single Fermi level. all energies are given with respect to Ef0
  • quantities (list of str) – quantities to be integrated. See Capabilities
  • user_quantities (dict) – a dictionary {name:formula}, where name is any string, and formula is a name of a child class of Formula_ln which should have defined attributes nn , TRodd, Iodd
  • use_irred_kpt (bool) – evaluate only symmetry-irreducible K-points
  • symmetrize (bool) – symmetrize the result
  • frmsf_name (str) – if not None, the results are also printed to text files, ready to plot by for FermiSurfer
  • parallel (Parallel) – object describing parallelization scheme
  • print_Kpoints (bool) – print the list of K points
  • parameters (dict) – {‘name’:value,…} , Each quantity that recognizes a parameter with the given name will use it
  • specific_parameters (dict) – ‘quantity^label’:dict, where dict is analogous to parameters. This values will override for the instance of the quantity labeled by ‘^label’
  • parameters_K (dict) – parameters to be passed to the Data_K, so they are common for the calculation.
Returns:

Return type:

TABresult

Specifying parameters

While the basic parameters of the calculation in the integrate() and tabulte() methods determine the general behaviour of the calculation (grid, refinement etc.) , the specific evauation of each quantity are determined by the dictionaries parameters and specific_parameters

parameters

a dictionary like {‘parameter1’:value1, ‘parameter2’:value2, …}. Each quantity will look for parameters that it can recognize, and take the corresponding values from the dictionary. The unrecognized paremeters will be ignored. A complete list of available options for each quantity may be obtained by running wannierberri.__old_API.__main.print_options()

specific_parameters – same quantity with different parameters in one run

One can specify the same quantity several times in the quantities list and to distinguish them, a label may be added after the ‘^’ symbol, e.g. quantities = [‘ahc^int’,’ahc^ext’]. Further, different parameters may be passed to ‘ahc^int’ and ‘ahc^ext’ by means of specific_parameters option, which is a dictionary like {‘quantity1^label1’:{‘parameter1’:value1,…},…}. Values found in specific_parameters will always override those found in parameters

For example, after a run

wberri.integrate(system,
          grid=grid,
          Efermi=Efermi,
          quantities=['ahc^int','ahc^ext'],
          parameters = {'tetra':True,'internal_terms':False,'external_terms':False},
          specific_parameters = {'ahc^int':{'internal_terms':True},'ahc^ext':{'external_terms':True}},
          fout_name='Fe',
          )

Fe-ahc^int_iter-0000.dat will contain contributions from internal terms only, and Fe-ahc^ext_iter-0000.dat will contain contributions from external terms.

parameters_K

In addition, there is a dictionary of parameters parameters_K that will de passed to the constructor of the Data_K object. Therefore, these parameters will be common for all quantities calculated