Options for f0j_calculations
This section is an autogenerated list of the computation_dicts of all currently available f0j_sources.
custom_function
This is the computation dict docstring (automatically copied from .py files)
computation_dict : Dict[str, Any]
contains the function(s) that are called to calculate the atomic form factors in the custom refinement, as well as a computation dict for any settings you want to pass to your function. This is meant for development. If you have build something working and nice, please consider transferring your sources to an *_source.py file and uploading it to the XHARPy Repository, at least after you have published your results.
calc_f0j (Callable): function that implements the arguments: cell_mat_m, construction_instructions, parameters, index_vec_h, symm_mats_vecs, computation_dict, restart and explicit_core and returns the calculated f0j values as an array. Examples and the explanation of the input parameters can be found in any *_source.py file in the calc_f0j function and its docstring
calc_f0j_core (Callable, Optional): function that implements the arguments: cell_mat_m, construction_instructions, parameters, index_vec_h, symm_mats_vecs, computation_dict and returns the f0j_core values for a spherical frozen core density. Will only be called once at the beginning of the refinement. Is optional if the refinement_dict[‘core’] is set to ‘combine’ otherwise it will throw a NotImplementError. Examples and the explanation of the input parameters can be found in any *_source.py file in the calc_f0j_core function and its docstring.
generate_cif_output (Callable): functional with the argument computation dict, which will be called during .cif generation to write an output of the methodology used to the .cif file.
inner_computation_dict (Dict): dictionary with options to pass on to your functions. The equivalent of the computation_dict that is used for the f0j_sources in XHARPy
gpaw_mpi
This is the computation dict docstring (automatically copied from .py files)
computation_dict : Dict[str, Any]
contains options for the atomic form factor calculation. The function will use and exclude the following options from the dictionary and pass the rest onto the GPAW calculator without further checks.
save_file (str): Path to the file that is used for saving and loading DFT results, by default ‘gpaw_result.gpw’
gridinterpolation (1, 2, 4): Using GPAWs interpolation this is the factor by which the grid from the wave function will be interpolated for the calculation of atomic form factors with FFT. This can be reduced if you run out of memory for this step. Allowed values are 1, 2, and 4, by default 4
symm_equiv (str): The atomic form factors of symmetry equivalent atoms can be calculated individually for each atom (‘individually’) or they can be calculated once for each atom in the asymmetric unit and expanded to the other atoms (‘once’), finally they can be averaged between symmetry equivalent atoms and expanded afterwards (‘averaged’). Once should be sufficient for most structures and saves time. Try one of the other options if you suspect problems, by default ‘once’
skip_symm (Dict[int, List[int]]): Can used to prevent the expansion of the atom(s) with the index(es) given as dictionary keys as given in the construction_instructions with the symmetry operations of the indexes given in the list, which correspond to the indexes in the symm_mats_vecs object. This has proven to be successful for the calculation of atoms disordered on special positions. Can not be used with if symm_equiv is ‘individually’, by default {}
magmoms (np.ndarray): Experimental: starting values for magnetic moments of atoms. These will be expanded to atoms in the unit cell by just applying the same magnetic moment to all symmetry equivalent atoms. This is probably too simplistic and will fail.
core_grid (Union[str, int]): Determines how the core grid is build on which the core density is evaluated ‘rgd’ will use the default grid from GPAW, an integer k will span a grid of 2**k + 1 points, where the first point is 0 and all other points are determined by exp(-ai) * r_max, where ai is a np linspace between 1.25 * k and 0, by default ‘rgd’
mpicores (Union[int, str]): give the number of cores used for the mpi calculation. If this is ‘auto’ GPAW will select the number itself, by default ‘auto’
For the allowed options of the GPAW calculator consult: https://wiki.fysik.dtu.dk/gpaw/documentation/basic.html
gpaw
This is the computation dict docstring (automatically copied from .py files)
computation_dict : Dict[str, Any]
contains options for the atomic form factor calculation. The function will use and exclude the following options from the dictionary and pass the rest onto the GPAW calculator without further checks.
save_file (str): Path to the file that is used for saving and loading DFT results, by default ‘gpaw_result.gpw’
gridinterpolation (1, 2, 4): Using GPAWs interpolation this is the factor by which the grid from the wave function will be interpolated for the calculation of atomic form factors with FFT. This can be reduced if you run out of memory for this step. Allowed values are 1, 2, and 4, by default 4
symm_equiv (str): The atomic form factors of symmetry equivalent atoms can be calculated individually for each atom (‘individually’) or they can be calculated once for each atom in the asymmetric unit and expanded to the other atoms (‘once’), finally they can be averaged between symmetry equivalent atoms and expanded afterwards (‘averaged’). Once should be sufficient for most structures and saves time. Try one of the other options if you suspect problems, by default ‘once’
skip_symm (Dict[int, List[int]]): Can used to prevent the expansion of the atom(s) with the index(es) given as dictionary keys as given in the construction_instructions with the symmetry operations of the indexes given in the list, which correspond to the indexes in the symm_mats_vecs object. This has proven to be successful for the calculation of atoms disordered on special positions. Can not be used with if symm_equiv is ‘individually’, by default {}
core_grid (Union[str, int]): Determines how the core grid is build on which the core density is evaluated ‘rgd’ will use the default grid from GPAW, an integer k will span a grid of 2**k + 1 points, where the first point is 0 and all other points are determined by exp(-ai) * r_max, where ai is a np linspace between 1.25 * k and 0, by default ‘rgd’
magmoms (np.ndarray): Experimental: starting values for magnetic moments of atoms. These will be expanded to atoms in the unit cell by just applying the same magnetic moment to all symmetry equivalent atoms. This is probably too simplistic and will fail.
For the allowed options of the GPAW calculator consult: https://wiki.fysik.dtu.dk/gpaw/documentation/basic.html
gpaw_spherical
This is the computation dict docstring (automatically copied from .py files)
computation_dict : Dict[str, Any]
contains options for the atomic form factor calculation. The function will use and exclude the following options from the dictionary and pass the rest onto the GPAW calculator without further checks.
save_file (str): Path to the file that is used for saving and loading DFT results, by default ‘gpaw_result.gpw’
spherical_grid (str): Can be used to select a grid. Possible options are: coarse, medium, fine, veryfine, ultrafine and insane, by by default ‘fine’
skip_symm (Dict[int, List[int]]): Can used to prevent the expansion of the atom(s) with the index(es) given as dictionary keys as given in the construction_instructions with the symmetry operations of the indexes given in the list, which correspond to the indexes in the symm_mats_vecs object. This has proven to be successful for the calculation of atoms disordered on special positions. Can only be used with average_symmequiv, by default {}
magmoms (np.ndarray): Experimental: starting values for magnetic moments of atoms. These will be expanded to atoms in the unit cell by just applying the same magnetic moment to all symmetry equivalent atoms. This is probably too simplistic and will fail.
For the allowed options of the GPAW calculator consult: https://wiki.fysik.dtu.dk/gpaw/documentation/basic.html
iam
This is the computation dict docstring (automatically copied from .py files)
computation_dict : Dict[str, Any]
There are no options here, will be ignored
nosphera2_orca
This is the computation dict docstring (automatically copied from .py files)
computation_dict : Dict[str, Any]
Contains options for NoSpherA2/ORCA calculation
orca_path (str): Path to the ORCA executable. Is required for multi-core calculations. If the path given is relative, take into account that the executable will be run in the calc_folder and change the relative path accordingly, by default ‘orca’
nosphera2_path (str): Path to the NoSpherA2 executable. If you want to use a relative path, it needs to be given relative to the calc_folder, not the folder, where the script is run.
nosphera2_accuracy (int): Number between 1-5 for the size of the grid nosphera2 uses for the calculation of atomic form factors, by default 3
calc_folder (str): Folder in which the ORCA and NoSpherA2 calculations will be conducted. Mainly used to keep the main directory somewhat clean, by default ‘calc’
basis_set (str): If there is no newline character, this string will be used by ORCA to select the basis set by name (e.g. def2-TZVPP). If a newline is present, it will instead be used within ORCA’s %basis keyword, with a single ‘end’ added at the end. This way basis sets from EMSL can be used, by default ‘def2-SVP’
functional (str): Density functional as ORCA keyword, by default ‘PBE’
charge (float): Fragment charge, by default 0
multiplicity (int): Fragment multiplicity, by default 1
n_cores (int): number of cores used for the ORCA and NoSpherA2 calculations. If larger than 1, the orca path needs to be given as an absolute path, by default 1.
cutoff (float): Cutoff in Angstrom for the generation of cluster- charges. Fragments, which have an atom within this radius will be added completely to the cluster charge list, by default 0.0
build_dict (Dict[str, List(str)]): Dictionary to complete a fragment before the calculation. The key string needs to be a symmetry card (e.g. -x, 1-y, 1/2-z). The following list needs to contain the atom names, on which the symmetry is supposed to be applied.
qe
This is the computation dict docstring (automatically copied from .py files)
computation_dict : Dict[str, Any]
contains options for the atomic form factor calculation. The function will use and exclude the following options from the dictionary and write the rest into the quantum-espresso pw.x output file without further check
mpicores (Union[str, int]): The number of cores used for the pw.x and pp.x calculation in Quantum Espresso, ‘auto’ will mpiexec let select this option. However sometimes it has proven faster to choose a lower number of cores manually. This is not the only option for parallelisation: setting mpicores to 1 might still use non-MPI means of multi-core calculations.
symm_equiv (str): The atomic form factors of symmetry equivalent atoms can be calculated individually for each atom (‘individually’) or they can be calculated once for each atom in the asymmetric unit and expanded to the other atoms (‘once’), finally they can be averaged between symmetry equivalent atoms and expanded afterwards (‘averaged’). Once should be sufficient for most structures and saves time. Try one of the other options if you suspect problems, by default ‘once’
skip_symm (Dict[int, List[int]]): Can used to prevent the expansion of the atom(s) with the index(es) given as dictionary keys as given in the construction_instructions with the symmetry operations of the indexes given in the list, which correspond to the indexes in the symm_mats_vecs object. This has proven to be successful for the calculation of atoms disordered on special positions. Can not be used with if symm_equiv is ‘individually’, by default {}
pw_in_file (str): Filename for the input file of the pw.x scf calculation, by default pw.in
pp_in_file (str): Filename for the input file of pp.x, by default pp.in
pw_out_file (str): Filename for the output file of the pw.x scf calculation, by default pw.out
pp_out_file (str): Filename for the output file of pp.x, by default pp.out
pw_executable (str): Filename or path to the executable of pw, by default pw.x
pp_executable (str): Filename or path to the executable of pp, by default pp.x
windows (bool): If set to True, Windows PowerShell commands will be used to call Quantum Espresso, by default False
non_convergence (str): How to deal with non-convergence in SCF ‘exception’ will stop the calculation with a ValueError, ‘warning’ will print out a warning module ‘print’ will only print the warning in the usual text, by default ‘exception’
K-points are organised into their own entry ‘k_points’ which is a dict ‘mode’ is the selection mode, and ‘input’ is the output after the K_POINTS entry in the pw.x output file.
The other options are organised as subdicts with the naming of the section in the pw.x input file in lowercase. For these options consult the pw.x file format documentation at: https://www.quantum-espresso.org/Doc/INPUT_PW.html
tsc_file
This is the computation dict docstring (automatically copied from .py files)
computation_dict : Dict[str, Any]
Contains options for the .tsc source
file_name (str): Path to the .tsc file, by default ‘to_xharpy.tsc’
call_function (python function): If this option is not ‘none’ you can pass a function, which will be called in each Hirshfeld cycle. The function receives four arguments: labels contains the atom label for each atom in the asymmetric unit, element_symbols contains the element symbols (e.g. H, Na), positions are the atomic positions in FRACTIONAL coordinates, restart is a bool, which you can check to trigger a start of a calculation from a precalculated density. (Usually you would want to start the first step with a calculation from scratch and then recycle for all other HAR cycles, as the differences in positions get smaller). At the end of the function you should write a new .tsc file with the atomic form factors, by default ‘none’
call_args (List): If you have a call_function you can use this option to pass additional arguments, which will be passed after the four default arguments, by default []
call_kwargs (Dict): If you have a call_function you can use this option to pass additional keyword arguments, by default {}
cif_addition (str): Will be added to the refinement_details section of the cif_file
core_file_name (str): Can be used to give a separate tsc file name for the frozen core atom form factors, in case they have been determined separately.