Running a calculation
In the new API with the run method one can do integration and tabulating in one run. Also, different parameters may be used for different quantities and also same qantities may be calculated with different sets of parameters in one run. This is done by calling the following function:
- wannierberri.run(system, grid, calculators, adpt_num_iter=0, use_irred_kpt=True, symmetrize=True, fout_name='result', suffix='', parameters_K={}, file_Klist=None, restart=False, Klist_part=10, parallel=<wannierberri.parallel.Serial object>, print_Kpoints=True, adpt_mesh=2, adpt_fac=1, fast_iter=True, print_progress_step=5)[source]
The function to run a calculation. Substitutes the old
integrate()
andtabulate()
and allows to integrate and tabulate in one run.- Parameters:
system (
System
) – System under investigationgrid (
Grid
orPath
) – initial grid for integration. or path for tabulationcalculators (dict) – a dictionary where keys aare any string identifiers, and the values are of
Calculator
adpt_num_iter (int) – number of recursive adaptive refinement iterations. See Recursive adaptive refinement
adpt_mesh (int) – the size of the refinement grid (usuallay no need to change)
adpt_fac (int) – number of K-points to be refined per quantity and criteria.
parallel (
Parallel
) – object describing parallelization schemeuse_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
suffix (str) – extra marker inserted into output files to mark this particular calculation run
print_Kpoints (bool) – print the list of K points
file_Klist (str or None) – name of file where to store the Kpoint list of each iteration. May be needed to restart a calculation to get more iterations. If None – the file is not written
restart (bool) – if True : reads restart information from file_Klist and starts from there
Klist_part (int) – write the file_Klist by portions. Increase for speed, decrease for memory saving
fast_iter (bool) – if under iterations appear peaks that arte not further removed, set this parameter to False.
print_progress_step (float or int) – intervals to print progress
- Return type:
dictionary of
EnergyResult
Notes
Results are also printed to ASCII files
Single k-point
In the new API with the run method one can do integration and tabulating in one run. Also, different parameters may be used for different quantities and also same qantities may be calculated with different sets of parameters in one run. This is done by calling the following function:
- wannierberri.evaluate_k(system=None, k=[0.0, 0.0, 0.0], quantities=[], calculators={}, formula={}, param_formula={}, iband=None, return_single_as_dict=False, parameters_K={})[source]
This function presents a shortcut to evaluate some property at a particular k-point The main goal is to be convenient, rather than efficient
- Parameters:
quantities (list of str) – Which qpre-defined quantities to calculate. Use evaluate() to get the list of available quantities
calculators (dict) – Dictionary str :
Calculator
alows to evaluate quantities that are not available here, or using specific parametersformula (dict) – Dictionary str :
Formula_ln
alows to evaluate block-diagonal part of a covariant formula (considering iband as “inner” states)param_formula (dict) – Dictionary str : dict -parameters to be passed to the corresponding formula
return_single_as_dict (bool) – wether to pack a result into dict if only one calculator/quantity is requested
iband (int or list(int)) – bands to select (only for quantities and formula
- Returns:
Returns a dictionary {key:array} where keys are strings identifying the calculated quantities, if only one quantitt is calculated and return_single_as_dict=False, then only an array is returned, without packing into dict
- Return type:
dict or array