SIRIUS 7.5.0
Electronic structure library and applications
|
Namespace of the SIRIUS library. More...
Modules | |
namespace | acc |
Namespace for accelerator-related functions. | |
namespace | cg |
Conjugate-gradient solver. | |
namespace | env |
Get environment variables. | |
namespace | fft |
FFT-related functions and objects. | |
namespace | la |
Interface to linear algebra BLAS/LAPACK functions. | |
namespace | local |
Internal implementation of beta-projectors generator. | |
namespace | lr |
Linear respone functions and objects. | |
namespace | magma |
Interface to MAGMA functions. | |
namespace | mixer |
Mixer functions and objects. | |
namespace | mpi |
MPI related functions and classes. | |
namespace | r3 |
Work with 3D vectors and matrices. | |
namespace | rte |
Run-time error and warning handling. | |
namespace | sf |
Special functions. | |
namespace | smearing |
Occupancy smearing functions. | |
namespace | wf |
Namespace for the wave-functions. | |
Data Types | |
class | angular_momentum |
Angular momentum quantum number. More... | |
class | any_ptr |
Handle deallocation of a poiniter to an object of any type. More... | |
class | Array1d |
TODO: Array1d owns data... More... | |
class | Atom |
Data and methods specific to the actual atom in the unit cell. More... | |
struct | atom_index_t |
class | Atom_symmetry_class |
Data and methods specific to the symmetry class of the atom. More... | |
struct | atom_symmetry_class_index_t |
class | Atom_type |
Defines the properties of atom type. More... | |
class | Atom_type_base |
Base class for sirius::Atom_type and sirius::Free_atom classes. More... | |
struct | atom_type_index_t |
class | Augmentation_operator |
Augmentation charge operator Q(r) of the ultrasoft pseudopotential formalism. More... | |
struct | basic_index_t |
Basic index type. More... | |
struct | basis_function_index_descriptor |
class | basis_functions_index |
A helper class to establish various index mappings for the atomic basis functions. More... | |
struct | beta_chunk_t |
Describe chunk of beta-projectors for a block of atoms. More... | |
struct | beta_desc_idx |
Named index of a descriptor of beta-projectors. The same order is used by the GPU kernel. More... | |
class | Beta_projector_generator |
class | Beta_projectors |
Stores <G+k | beta> expansion. More... | |
class | Beta_projectors_base |
Base class for beta-projectors, gradient of beta-projectors and strain derivatives of beta-projectors. More... | |
struct | beta_projectors_coeffs_t |
Stores a chunk of the beta-projector and metadata. More... | |
class | Beta_projectors_gradient |
Compute gradient of beta-projectors over atomic positions \( d \langle {\bf G+k} | \beta \rangle / d \tau_{\alpha} \). More... | |
class | Beta_projectors_strain_deriv |
class | Bound_state |
struct | callback_functions_t |
Store all callback functions in one place. More... | |
class | cmd_args |
Simple command line arguments handler. More... | |
class | Config |
class | config_t |
class | Crystal_symmetry |
Representation of the crystal symmetry. More... | |
class | CUDA_timer |
class | CUDA_timers_wrapper |
class | D_operator |
struct | davidson_result_t |
Result of Davidson solver. More... | |
class | Density |
Generate charge density and magnetization from occupied spinor wave-functions. More... | |
class | density_matrix_t |
class | DFT_ground_state |
The whole DFT ground state implementation. More... | |
struct | diagonalize_result_t |
class | DiagonalPreconditioner |
class | Energy |
Kohn-Sham energy. More... | |
class | Enu_finder |
class | ffmt |
Floating-point formatting (precision and width). More... | |
class | Field4D |
Four-component function consisting of scalar and vector parts. More... | |
class | Force |
Compute atomic forces. More... | |
class | Free_atom |
Full potential free atom solver. More... | |
class | Gaunt_coefficients |
Compact storage of non-zero Gaunt coefficients \( \langle \ell_1 m_1 | \ell_3 m_3 | \ell_2 m_2 \rangle \). More... | |
struct | gaunt_L1_L2 |
Used in the {lm1, lm2, coefficient} : {lm3} way of grouping non-zero Gaunt coefficients. More... | |
struct | gaunt_L3 |
Used in the {lm1, lm2} : {lm3, coefficient} way of grouping non-zero Gaunt coefficients. More... | |
struct | GPU_Complex |
helper type traits to template kernel function More... | |
struct | GPU_Complex< double > |
struct | GPU_Complex< float > |
class | Hamiltonian0 |
Represent the k-point independent part of Hamiltonian. More... | |
class | Hamiltonian_k |
Representation of Kohn-Sham Hamiltonian. More... | |
class | hbar |
Horisontal bar. More... | |
class | HDF5_tree |
Interface to the HDF5 library. More... | |
struct | hdf5_type_wrapper |
struct | hdf5_type_wrapper< double > |
struct | hdf5_type_wrapper< float > |
struct | hdf5_type_wrapper< int > |
struct | hdf5_type_wrapper< uint8_t > |
class | Hubbard |
Apply Hubbard correction in the collinear case. More... | |
class | Hubbard_matrix |
Describes Hubbard orbital occupancy or potential correction matrices. More... | |
class | hubbard_orbital_descriptor |
Structure containing all information about a specific hubbard orbital (including the radial function). More... | |
struct | identity |
class | InverseS_k |
class | K_point |
K-point related variables and methods. More... | |
class | K_point_set |
Set of k-points. More... | |
struct | kp_index_t |
K-point index type. More... | |
class | Lattice_relaxation |
struct | lo_basis_descriptor |
Descriptor of the local-orbital part of the LAPW+lo basis. More... | |
class | Local_operator |
Representation of the local operator. More... | |
struct | local_orbital_descriptor |
Descriptor of a local orbital radial function. More... | |
struct | magnetic_group_symmetry_descriptor |
Descriptor of the magnetic group symmetry operation. More... | |
class | Matching_coefficients |
class | Matrix |
class | Measurement |
struct | nearest_neighbour_descriptor |
Descriptor of an atom in a list of nearest neighbours for each atom. More... | |
class | Non_local_operator |
Non-local part of the Hamiltonian and S-operator in the pseudopotential method. More... | |
class | null_stream_t |
class | Occupation_matrix |
struct | paw_atom_index_t |
class | PAW_density |
PAW density storage. More... | |
class | PAW_field4D |
PAW density and potential storage. More... | |
class | Periodic_function |
Representation of the periodical function on the muffin-tin geometry. More... | |
struct | periodic_function_ptr_t |
Describe external pointers to periodic function. More... | |
class | Potential |
Generate effective potential from charge density and magnetization. More... | |
struct | ps_atomic_wf_descriptor |
Store basic information about radial pseudo wave-functions. More... | |
class | Q_operator |
struct | radial_function_index_descriptor |
Descriptor for the atomic radial functions. More... | |
class | radial_functions_index |
Radial basis function index. More... | |
class | Radial_grid |
Base class for radial grids. More... | |
class | Radial_grid_exp |
class | Radial_grid_ext |
External radial grid provided as a list of points. More... | |
class | Radial_grid_lin |
class | Radial_grid_lin_exp |
class | Radial_grid_pow |
class | Radial_integrals_atomic_wf |
Radial integrals of the atomic centered orbitals. More... | |
class | Radial_integrals_aug |
Radial integrals of the augmentation operator. More... | |
class | Radial_integrals_base |
Base class for all kinds of radial integrals. More... | |
class | Radial_integrals_beta |
Radial integrals of beta projectors. More... | |
class | Radial_integrals_rho_core_pseudo |
class | Radial_integrals_rho_free_atom |
class | Radial_integrals_rho_pseudo |
struct | radial_integrals_t |
Store all radial integrals in one place. More... | |
class | Radial_integrals_vloc |
struct | radial_solution_descriptor |
Describes radial solution. More... | |
class | Radial_solver |
Finds a solution to radial Schrodinger, Koelling-Harmon or Dirac equation. More... | |
struct | Real |
struct | Real< gpu_complex_type< double > > |
struct | Real< gpu_complex_type< float > > |
struct | Real< std::complex< T > > |
class | S_k |
class | Scalar |
class | serializer |
Serialize and deserialize objects. More... | |
class | SHT |
Spherical harmonics transformations and related oprtations. More... | |
class | Simulation_context |
Simulation context is a set of parameters and objects describing a single simulation. More... | |
class | Simulation_parameters |
Set of basic parameters of a simulation. More... | |
type | sirius_context_handler |
Opaque wrapper for simulation context handler. More... | |
interface | sirius_free_handler |
Free any of the SIRIUS handlers (context, ground state or k-points). More... | |
type | sirius_ground_state_handler |
Opaque wrapper for DFT ground statee handler. More... | |
type | sirius_kpoint_set_handler |
Opaque wrapper for K-point set handler. More... | |
class | Smooth_periodic_function |
Representation of a smooth (Fourier-transformable) periodic function. More... | |
struct | smooth_periodic_function_ptr_t |
class | Smooth_periodic_vector_function |
Vector of the smooth periodic functions. More... | |
struct | space_group_symmetry_descriptor |
Descriptor of the space group symmetry operation. More... | |
class | Spheric_function |
Function in spherical harmonics or spherical coordinates representation. More... | |
class | Spheric_function_set |
struct | spheric_function_set_ptr_t |
class | Spheric_vector_function |
3D vector function. More... | |
class | splindex |
Base class for split index. More... | |
class | splindex_block |
class | splindex_block_cyclic |
class | splindex_chunk |
Externally defined block distribution. More... | |
class | splindex_iterator_t |
class | Spline |
Cubic spline with a not-a-knot boundary conditions. More... | |
struct | step_function_t |
Representation of the unit step function. More... | |
class | Stress |
Stress tensor. More... | |
class | strong_type |
class | Teter |
class | U_operator |
class | Ultrasoft_preconditioner |
class | Unit_cell |
Representation of a unit cell. More... | |
struct | unit_cell_parameters_descriptor |
class | XC_functional |
Interface class to Libxc. More... | |
class | XC_functional_base |
Interface class to Libxc. More... | |
Typedefs | |
using | acc_stream_t = cudaStream_t |
using | acc_error_t = cudaError_t |
using | acc_complex_float_t = cuFloatComplex |
using | acc_complex_double_t = cuDoubleComplex |
template<typename T > | |
using | gpu_complex_type = typename GPU_Complex< T >::type |
template<typename T > | |
using | real_type = typename Real< T >::type |
using | n_blocks = strong_type< int, struct __n_blocks_tag > |
Number of blocks to which the global index is split. More... | |
using | block_id = strong_type< int, struct __block_id_tag > |
ID of the block. More... | |
using | time_point_t = std::chrono::high_resolution_clock::time_point |
template<class X > | |
using | identity_t = typename identity< X >::type |
typedef std::vector< radial_solution_descriptor > | radial_solution_descriptor_set |
Set of radial solution descriptors, used to construct augmented waves or local orbitals. More... | |
using | Flm = Spheric_function< function_domain_t::spectral, double > |
using | Ftp = Spheric_function< function_domain_t::spatial, double > |
using | lmax_t = strong_type< int, struct __lmax_t_tag > |
using | rf_index = strong_type< int, struct __rf_index_tag > |
Radial function index. More... | |
using | rf_aw_index = strong_type< int, struct __rf_aw_index_tag > |
Augmented wave radial function index. More... | |
using | rf_lo_index = strong_type< int, struct __rf_lo_index_tag > |
Local orbital radial function index. More... | |
using | bf_index = strong_type< int, struct __bf_index_tag > |
Basis function index. More... | |
using | bf_aw_index = strong_type< int, struct __bf_aw_index_tag > |
Augmented wave basis function index. More... | |
using | bf_lo_index = strong_type< int, struct __bf_lo_index_tag > |
Local orbital basis function index. More... | |
using | json = nlohmann::json |
Enumerations | |
enum class | hdf5_access_t { truncate , read_write , read_only } |
enum class | index_domain_t { global , local } |
enum class | spin_block_t { nm , uu , dd , ud , du } |
Spin-blocks of the Hamiltonian. More... | |
enum class | electronic_structure_method_t { full_potential_lapwlo , pseudopotential } |
Type of electronic structure methods. More... | |
enum class | function_domain_t { spatial , spectral } |
Type of a function domain. More... | |
enum class | relativity_t { none , koelling_harmon , zora , iora , dirac } |
Type of relativity treatment in the case of LAPW. More... | |
enum class | davidson_evp_t { hamiltonian , overlap } |
enum class | sync_band_t { energy , occupancy } |
enum class | radial_grid_t : int { linear = 0 , exponential = 1 , power = 2 , lin_exp = 3 } |
Types of radial grid. More... | |
Functions/Subroutines | |
character(kind=c_char, len=1) function, dimension(len_trim(f_string)+1) | string_f2c (f_string) |
Internal function that adds trailing null character to the string to make it C-style. More... | |
character(kind=c_char, len=size(c_string) - 1) function | string_c2f (c_string) |
Internal function that converts C-string (with trailing null character) to the Fortran string. More... | |
subroutine | sirius_initialize (call_mpi_init, error_code) |
Initialize the SIRIUS library. More... | |
subroutine | sirius_finalize (call_mpi_fin, call_device_reset, call_fftw_fin, error_code) |
Shut down the SIRIUS library. More... | |
subroutine | sirius_start_timer (name, error_code) |
Start the timer. More... | |
subroutine | sirius_stop_timer (name, error_code) |
Stop the running timer. More... | |
subroutine | sirius_print_timers (flatten, error_code) |
Print all timers. More... | |
subroutine | sirius_serialize_timers (fname, error_code) |
Save all timers to JSON file. More... | |
subroutine | sirius_context_initialized (handler, status, error_code) |
Check if the simulation context is initialized. More... | |
subroutine | sirius_create_context (fcomm, handler, fcomm_k, fcomm_band, error_code) |
Create context of the simulation. More... | |
subroutine | sirius_import_parameters (handler, str, error_code) |
Import parameters of simulation from a JSON string. More... | |
subroutine | sirius_set_parameters (handler, lmax_apw, lmax_rho, lmax_pot, num_fv_states, num_bands, num_mag_dims, pw_cutoff, gk_cutoff, fft_grid_size, auto_rmt, gamma_point, use_symmetry, so_correction, valence_rel, core_rel, iter_solver_tol_empty, iter_solver_type, verbosity, hubbard_correction, hubbard_correction_kind, hubbard_full_orthogonalization, hubbard_orbitals, sht_coverage, min_occupancy, smearing, smearing_width, spglib_tol, electronic_structure_method, error_code) |
Set parameters of the simulation. More... | |
subroutine | sirius_get_parameters (handler, lmax_apw, lmax_rho, lmax_pot, num_fv_states, num_bands, num_spins, num_mag_dims, pw_cutoff, gk_cutoff, fft_grid_size, auto_rmt, gamma_point, use_symmetry, so_correction, iter_solver_tol, iter_solver_tol_empty, verbosity, hubbard_correction, evp_work_count, num_loc_op_applied, num_sym_op, electronic_structure_method, error_code) |
Get parameters of the simulation. More... | |
subroutine | sirius_add_xc_functional (handler, name, error_code) |
Add one of the XC functionals. More... | |
subroutine | sirius_set_mpi_grid_dims (handler, ndims, dims, error_code) |
Set dimensions of the MPI grid. More... | |
subroutine | sirius_set_lattice_vectors (handler, a1, a2, a3, error_code) |
Set vectors of the unit cell. More... | |
subroutine | sirius_initialize_context (handler, error_code) |
Initialize simulation context. More... | |
subroutine | sirius_update_context (handler, error_code) |
Update simulation context after changing lattice or atomic positions. More... | |
subroutine | sirius_print_info (handler, error_code) |
Print basic info. More... | |
subroutine | sirius_free_object_handler (handler, error_code) |
Free any object handler created by SIRIUS. More... | |
subroutine | sirius_set_periodic_function_ptr (handler, label, f_mt, lmmax, nrmtmax, num_atoms, f_rg, size_x, size_y, size_z, offset_z, error_code) |
Set pointer to density or magnetization. More... | |
subroutine | sirius_set_periodic_function (handler, label, f_mt, lmmax, nrmtmax, num_atoms, f_rg, size_x, size_y, size_z, offset_z, error_code) |
Set values of the periodic function. More... | |
subroutine | sirius_get_periodic_function (handler, label, f_mt, lmmax, nrmtmax, num_atoms, f_rg, size_x, size_y, size_z, offset_z, error_code) |
Get values of the periodic function. More... | |
subroutine | sirius_create_kset (handler, num_kpoints, kpoints, kpoint_weights, init_kset, kset_handler, error_code) |
Create k-point set from the list of k-points. More... | |
subroutine | sirius_create_kset_from_grid (handler, k_grid, k_shift, use_symmetry, kset_handler, error_code) |
Create k-point set from a grid. More... | |
subroutine | sirius_create_ground_state (ks_handler, gs_handler, error_code) |
Create a ground state object. More... | |
subroutine | sirius_initialize_kset (ks_handler, count, error_code) |
Initialize k-point set. More... | |
subroutine | sirius_find_ground_state (gs_handler, density_tol, energy_tol, iter_solver_tol, initial_guess, max_niter, save_state, converged, niter, rho_min, error_code) |
Find the ground state. More... | |
subroutine | sirius_check_scf_density (gs_handler, error_code) |
Check the self-consistent density. More... | |
subroutine | sirius_update_ground_state (gs_handler, error_code) |
Update a ground state object after change of atomic coordinates or lattice vectors. More... | |
subroutine | sirius_add_atom_type (handler, label, fname, zn, symbol, mass, spin_orbit, error_code) |
Add new atom type to the unit cell. More... | |
subroutine | sirius_set_atom_type_radial_grid (handler, label, num_radial_points, radial_points, error_code) |
Set radial grid of the atom type. More... | |
subroutine | sirius_set_atom_type_radial_grid_inf (handler, label, num_radial_points, radial_points, error_code) |
Set radial grid of the free atom (up to effectice infinity). More... | |
subroutine | sirius_add_atom_type_radial_function (handler, atom_type, label, rf, num_points, n, l, idxrf1, idxrf2, occ, error_code) |
Add one of the radial functions. More... | |
subroutine | sirius_set_atom_type_hubbard (handler, label, l, n, occ, U, J, alpha, beta, J0, error_code) |
Set the hubbard correction for the atomic type. More... | |
subroutine | sirius_set_atom_type_dion (handler, label, num_beta, dion, error_code) |
Set ionic part of D-operator matrix. More... | |
subroutine | sirius_set_atom_type_paw (handler, label, core_energy, occupations, num_occ, error_code) |
Set PAW related data. More... | |
subroutine | sirius_add_atom (handler, label, position, vector_field, error_code) |
Add atom to the unit cell. More... | |
subroutine | sirius_set_atom_position (handler, ia, position, error_code) |
Set new atomic position. More... | |
subroutine | sirius_set_pw_coeffs (handler, label, pw_coeffs, transform_to_rg, ngv, gvl, comm, error_code) |
Set plane-wave coefficients of a periodic function. More... | |
subroutine | sirius_get_pw_coeffs (handler, label, pw_coeffs, ngv, gvl, comm, error_code) |
Get plane-wave coefficients of a periodic function. More... | |
subroutine | sirius_initialize_subspace (gs_handler, ks_handler, error_code) |
Initialize the subspace of wave-functions. More... | |
subroutine | sirius_find_eigen_states (gs_handler, ks_handler, precompute_pw, precompute_rf, precompute_ri, iter_solver_tol, error_code) |
Find eigen-states of the Hamiltonian. More... | |
subroutine | sirius_generate_initial_density (handler, error_code) |
Generate initial density. More... | |
subroutine | sirius_generate_effective_potential (handler, error_code) |
Generate effective potential and magnetic field. More... | |
subroutine | sirius_generate_density (gs_handler, add_core, transform_to_rg, paw_only, error_code) |
Generate charge density and magnetization. More... | |
subroutine | sirius_set_band_occupancies (ks_handler, ik, ispn, band_occupancies, error_code) |
Set band occupancies. More... | |
subroutine | sirius_get_band_occupancies (ks_handler, ik, ispn, band_occupancies, error_code) |
Set band occupancies. More... | |
subroutine | sirius_get_band_energies (ks_handler, ik, ispn, band_energies, error_code) |
Get band energies. More... | |
subroutine | sirius_get_energy (handler, label, energy, error_code) |
Get one of the total energy components. More... | |
subroutine | sirius_get_forces (handler, label, forces, error_code) |
Get one of the total force components. More... | |
subroutine | sirius_get_stress_tensor (handler, label, stress_tensor, error_code) |
Get one of the stress tensor components. More... | |
subroutine | sirius_get_num_beta_projectors (handler, label, num_bp, error_code) |
Get the number of beta-projectors for an atom type. More... | |
subroutine | sirius_get_wave_functions (ks_handler, vkl, spin, num_gvec_loc, gvec_loc, evec, ld, num_spin_comp, error_code) |
Get wave-functions. More... | |
subroutine | sirius_add_atom_type_aw_descriptor (handler, label, n, l, enu, dme, auto_enu, error_code) |
Add descriptor of the augmented wave radial function. More... | |
subroutine | sirius_add_atom_type_lo_descriptor (handler, label, ilo, n, l, enu, dme, auto_enu, error_code) |
Add descriptor of the local orbital radial function. More... | |
subroutine | sirius_set_atom_type_configuration (handler, label, n, l, k, occupancy, core, error_code) |
Set configuration of atomic levels. More... | |
subroutine | sirius_generate_coulomb_potential (handler, vh_el, error_code) |
Generate Coulomb potential by solving Poisson equation. More... | |
subroutine | sirius_generate_xc_potential (handler, error_code) |
Generate XC potential using LibXC. More... | |
subroutine | sirius_get_kpoint_inter_comm (handler, fcomm, error_code) |
Get communicator which is used to split k-points. More... | |
subroutine | sirius_get_kpoint_inner_comm (handler, fcomm, error_code) |
Get communicator which is used to parallise band problem. More... | |
subroutine | sirius_get_fft_comm (handler, fcomm, error_code) |
Get communicator which is used to parallise FFT. More... | |
subroutine | sirius_get_num_gvec (handler, num_gvec, error_code) |
Get total number of G-vectors on the fine grid. More... | |
subroutine | sirius_get_gvec_arrays (handler, gvec, gvec_cart, gvec_len, index_by_gvec, error_code) |
Get G-vector arrays. More... | |
subroutine | sirius_get_num_fft_grid_points (handler, num_fft_grid_points, error_code) |
Get local number of FFT grid points. More... | |
subroutine | sirius_get_fft_index (handler, fft_index, error_code) |
Get mapping between G-vector index and FFT index. More... | |
subroutine | sirius_get_max_num_gkvec (ks_handler, max_num_gkvec, error_code) |
Get maximum number of G+k vectors across all k-points in the set. More... | |
subroutine | sirius_get_gkvec_arrays (ks_handler, ik, num_gkvec, gvec_index, gkvec, gkvec_cart, gkvec_len, gkvec_tp, error_code) |
Get all G+k vector related arrays. More... | |
subroutine | sirius_get_step_function (handler, cfunig, cfunrg, num_rg_points, error_code) |
Get the unit-step function. More... | |
subroutine | sirius_set_h_radial_integrals (handler, ia, lmmax, val, l1, o1, ilo1, l2, o2, ilo2, error_code) |
Set LAPW Hamiltonian radial integrals. More... | |
subroutine | sirius_set_o_radial_integral (handler, ia, val, l, o1, ilo1, o2, ilo2, error_code) |
Set LAPW overlap radial integral. More... | |
subroutine | sirius_set_o1_radial_integral (handler, ia, val, l1, o1, ilo1, l2, o2, ilo2, error_code) |
Set a correction to LAPW overlap radial integral. More... | |
subroutine | sirius_set_radial_function (handler, ia, deriv_order, f, l, o, ilo, error_code) |
Set LAPW radial functions. More... | |
subroutine | sirius_set_equivalent_atoms (handler, equivalent_atoms, error_code) |
Set equivalent atoms. More... | |
subroutine | sirius_update_atomic_potential (handler, error_code) |
Set the new spherical potential. More... | |
subroutine | sirius_option_get_number_of_sections (length, error_code) |
Return the total number of sections defined in the input JSON schema. More... | |
subroutine | sirius_option_get_section_name (elem, section_name, section_name_length, error_code) |
Return the name of a given section. More... | |
subroutine | sirius_option_get_section_length (section, length, error_code) |
Return the number of options in a given section. More... | |
subroutine | sirius_option_get_info (section, elem, key_name, key_name_len, type, length, enum_size, title, title_len, description, description_len, error_code) |
Return information about the option. More... | |
subroutine | sirius_option_get (section, name, type, data_ptr, max_length, enum_idx, error_code) |
Return the default value of the option as defined in the JSON schema. More... | |
subroutine | sirius_option_set (handler, section, name, type, data_ptr, max_length, append, error_code) |
Set the value of the option name in a (internal) json dictionary. More... | |
subroutine | sirius_dump_runtime_setup (handler, filename, error_code) |
Dump the runtime setup in a file. More... | |
subroutine | sirius_get_fv_eigen_vectors (handler, ik, fv_evec, ld, num_fv_states, error_code) |
Get the first-variational eigen vectors. More... | |
subroutine | sirius_get_fv_eigen_values (handler, ik, fv_eval, num_fv_states, error_code) |
Get the first-variational eigen values. More... | |
subroutine | sirius_get_sv_eigen_vectors (handler, ik, sv_evec, num_bands, error_code) |
Get the second-variational eigen vectors. More... | |
subroutine | sirius_set_rg_values (handler, label, grid_dims, local_box_origin, local_box_size, fcomm, values, transform_to_pw, error_code) |
Set the values of the function on the regular grid. More... | |
subroutine | sirius_get_rg_values (handler, label, grid_dims, local_box_origin, local_box_size, fcomm, values, transform_to_rg, error_code) |
Get the values of the function on the regular grid. More... | |
subroutine | sirius_get_total_magnetization (handler, mag, error_code) |
Get the total magnetization of the system. More... | |
subroutine | sirius_get_num_kpoints (handler, num_kpoints, error_code) |
Get the total number of kpoints. More... | |
subroutine | sirius_get_kpoint_properties (handler, ik, weight, coordinates, error_code) |
Get the kpoint properties. More... | |
subroutine | sirius_set_callback_function (handler, label, fptr, error_code) |
Set callback function to compute various radial integrals. More... | |
subroutine | sirius_nlcg (handler, ks_handler, error_code) |
Robust wave function optimizer. More... | |
subroutine | sirius_nlcg_params (handler, ks_handler, temp, smearing, kappa, tau, tol, maxiter, restart, processing_unit, converged, error_code) |
Robust wave function optimizer. More... | |
subroutine | sirius_add_hubbard_atom_pair (handler, atom_pair, translation, n, l, coupling, error_code) |
Add a non-local Hubbard interaction V for a pair of atoms. More... | |
subroutine | sirius_create_h0 (handler, error_code) |
Generate H0. More... | |
subroutine | sirius_linear_solver (handler, vkq, num_gvec_kq_loc, gvec_kq_loc, dpsi, psi, eigvals, dvpsi, ld, num_spin_comp, alpha_pv, spin, nbnd_occ, tol, niter, error_code) |
Interface to linear solver. More... | |
subroutine | sirius_generate_d_operator_matrix (handler, error_code) |
Generate D-operator matrix. More... | |
subroutine | sirius_save_state (gs_handler, file_name, error_code) |
Save DFT ground state (density and potential) More... | |
subroutine | sirius_load_state (handler, file_name, error_code) |
Save DFT ground state (density and potential) More... | |
subroutine | sirius_set_density_matrix (handler, ia, dm, ld, error_code) |
Set density matrix. More... | |
subroutine | sirius_free_handler_ctx (handler, error_code) |
subroutine | sirius_free_handler_ks (handler, error_code) |
subroutine | sirius_free_handler_dft (handler, error_code) |
void | create_beta_gk_gpu (int num_atoms, int num_gkvec, int const *beta_desc, std::complex< float > const *beta_gk_t, double const *gkvec, double const *atom_pos, std::complex< float > *beta_gk) |
void | create_beta_gk_gpu (int num_atoms, int num_gkvec, int const *beta_desc, std::complex< double > const *beta_gk_t, double const *gkvec, double const *atom_pos, std::complex< double > *beta_gk) |
void | create_beta_gk_gpu_float (int num_atoms, int num_gkvec, int const *beta_desc, std::complex< float > const *beta_gk_t, double const *gkvec, double const *atom_pos, std::complex< float > *beta_gk) |
void | create_beta_gk_gpu_double (int num_atoms, int num_gkvec, int const *beta_desc, std::complex< double > const *beta_gk_t, double const *gkvec, double const *atom_pos, std::complex< double > *beta_gk) |
template<typename F , typename T > | |
std::enable_if_t< std::is_same< T, real_type< F > >::value, la::dmatrix< F > > | inner_prod_beta (spla::Context &spla_ctx, sddk::memory_t mem__, sddk::memory_t host_mem__, bool result_on_device, beta_projectors_coeffs_t< T > &beta_coeffs__, wf::Wave_functions< T > const &phi__, wf::spin_index ispn__, wf::band_range br__) |
template<class T > | |
sddk::matrix< std::complex< T > > | inner_beta (const Beta_projectors_base< T > &beta, const Simulation_context &ctx) |
computes <beta|beta> and returns result on ctx.processing_unit_memory_t More... | |
template<class T , class Op > | |
sddk::matrix< std::complex< T > > | inner_beta (const Beta_projectors_base< T > &beta, const Simulation_context &ctx, Op &&op) |
inner product <beta|Op|beta>, return resulting dmatrix<complex> in ctx.processing_unit_memory_t More... | |
std::string const | locked_msg ("parameters are locked") |
template<typename OUT > | |
void | print_memory_usage (OUT &&out__, std::string file_and_line__="") |
template<typename T > | |
static std::ostringstream | option_print_vector__ (const std::vector< T > &vec) |
void | compose_default_json (nlohmann::json const &schema__, nlohmann::json &output__) |
Compose JSON dictionary with default parameters based on input schema. More... | |
void | compose_json (nlohmann::json const &schema__, nlohmann::json const &in__, nlohmann::json &inout__) |
Append the input dictionary to the existing dictionary. More... | |
nlohmann::json const & | get_options_dictionary () |
Get all possible options for initializing sirius. It is a json dictionary. More... | |
nlohmann::json const & | get_section_options (std::string const §ion__) |
Get all possible options of a given input section. It is a json dictionary. More... | |
void | scale_matrix_rows_gpu (int nrow, int ncol, acc_complex_double_t *mtrx, double const *v) |
void | scale_matrix_elements_gpu (acc_complex_double_t *ptr__, int ld__, int nrow__, int ncol__, double beta__) |
void | ddiagmm (const double *diag, int n, const double *X, int lda_x, int ncols, double *Y, int lda_y, double alpha) |
void | sdiagmm (const float *diag, int n, const float *X, int lda_x, int ncols, float *Y, int lda_y, float alpha) |
void | zdiagmm (const std::complex< double > *diag, int n, const std::complex< double > *X, int lda_x, int ncols, std::complex< double > *Y, int lda_y, std::complex< double > alpha) |
template<> | |
std::string | cmd_args::value< std::string > (const std::string key__) const |
template<> | |
std::string | cmd_args::value< std::string > (const std::string key__, const std::string default_val__) const |
template<> | |
std::vector< double > | cmd_args::value< std::vector< double > > (const std::string key__) const |
template<> | |
std::vector< int > | cmd_args::value< std::vector< int > > (const std::string key__) const |
auto | confined_polynomial (double r, double R, int p1, int p2, int dm) |
template<typename T > | |
int | sign (T val) |
Sign of the variable. More... | |
template<typename T > | |
bool | is_int (T val__, T eps__) |
Checks if number is integer with a given tolerance. More... | |
template<typename T > | |
T | factorial (int n) |
Compute a factorial. More... | |
auto | round (double a__, int n__) |
auto | round (std::complex< double > a__, int n__) |
auto | hash (void const *buff, size_t size, uint64_t h=5381) |
Simple hash function. More... | |
uint32_t | random_uint32 (bool reset=false) |
Simple random number generator. More... | |
template<typename T > | |
T | random () |
template<> | |
int | random< int > () |
template<> | |
double | random< double > () |
template<> | |
std::complex< double > | random< std::complex< double > > () |
template<> | |
float | random< float > () |
template<> | |
std::complex< float > | random< std::complex< float > > () |
template<typename T > | |
auto | abs_diff (T a, T b) |
template<typename T > | |
auto | rel_diff (T a, T b) |
auto | conj (double x__) |
Return complex conjugate of a number. For a real value this is the number itself. More... | |
auto | conj (std::complex< double > x__) |
Return complex conjugate of a number. More... | |
template<typename T > | |
T | zero_if_not_complex (T x__) |
template<typename T > | |
T | zero_if_not_complex (std::complex< T > x__) |
null_stream_t & | null_stream () |
std::string | boolstr (bool b__) |
std::ostream & | operator<< (std::ostream &out, hbar &&b) |
Inject horisontal bar to ostream. More... | |
std::ostream & | operator<< (std::ostream &out, ffmt &&f) |
Inject floating point format to ostream. More... | |
template<typename T > | |
std::ostream & | operator<< (std::ostream &out, std::vector< T > &v) |
Print std::vector to ostream. More... | |
std::string | double_to_string (double val, int precision=-1) |
Convert double to a string with a given precision. More... | |
template<typename T , typename OUT > | |
void | print_checksum (std::string label__, T value__, OUT &&out__) |
template<typename OUT > | |
void | print_hash (std::string label__, unsigned long long int hash__, OUT &&out__) |
int | packed_index (int i__, int j__) |
Pack two indices into one for symmetric matrices. More... | |
template<typename T , int N> | |
nlohmann::json | serialize (sddk::mdarray< T, N > const &a__) |
template<typename T , int N> | |
nlohmann::json | serialize (sddk::mdarray< std::complex< T >, N > const &a__) |
template<typename T , int N> | |
void | write_to_json_file (sddk::mdarray< T, N > const &a__, std::string const &fname__) |
template<typename T > | |
void | serialize (serializer &s__, T var__) |
Serialize a single element. More... | |
template<typename T > | |
void | deserialize (serializer &s__, T &var__) |
Deserialize a single element. More... | |
template<typename T > | |
void | serialize (serializer &s__, std::vector< T > const &vec__) |
Serialize a vector. More... | |
template<typename T > | |
void | deserialize (serializer &s__, std::vector< T > &vec__) |
Deserialize a vector. More... | |
template<typename T , int N> | |
void | serialize (serializer &s__, sddk::mdarray< T, N > const &array__) |
Serialize multidimentional array. More... | |
template<typename T , int N> | |
void | deserialize (serializer &s__, sddk::mdarray< T, N > &array__) |
Deserialize multidimentional array. More... | |
void | serialize (serializer &s__, mpi::block_data_descriptor const &dd__) |
Serialize block data descriptor. More... | |
void | deserialize (serializer &s__, mpi::block_data_descriptor &dd__) |
Deserialize block data descriptor. More... | |
template<> | |
void | SHT::backward_transform< std::complex< double > > (int ld, std::complex< double > const *flm, int nr, int lmmax, std::complex< double > *ftp) const |
template<> | |
void | SHT::forward_transform< std::complex< double > > (std::complex< double > const *ftp, int nr, int lmmax, int ld, std::complex< double > *flm) const |
int | major_version () |
int | minor_version () |
int | revision () |
std::string | git_hash () |
std::string | git_branchname () |
std::string | build_date () |
int | num_blocks (int length__, int block_size__) |
Return the maximum number of blocks (with size 'block_size') needed to split the 'length' elements. More... | |
auto | split_in_blocks (int length__, int block_size__) |
Split the 'length' elements into blocks with the initial block size. More... | |
template<typename Index_t > | |
auto | begin_global (splindex< Index_t > const &a__) |
template<typename Index_t > | |
auto | end_global (splindex< Index_t > const &a__) |
template<typename Index_t > | |
auto | begin (splindex< Index_t > const &a__) |
template<typename Index_t > | |
auto | end (splindex< Index_t > const &a__) |
auto | split (std::string const str__, char delim__) |
Split multi-line string into a list of strings. More... | |
std::string & | ltrim (std::string &str, const std::string &chars="\t\n\v\f\r ") |
std::string & | rtrim (std::string &str, const std::string &chars="\t\n\v\f\r ") |
std::string & | trim (std::string &str, const std::string &chars="\t\n\v\f\r ") |
bool | file_exists (std::string file_name) |
Check if file exists. More... | |
auto | hostname () |
Get host name. More... | |
long | get_page_size () |
long | get_num_pages () |
long | get_total_memory () |
auto | get_proc_status () |
int | get_proc_threads () |
auto | timestamp (std::string fmt) |
Return the timestamp string in a specified format. More... | |
double | wtime () |
Wall-clock time in seconds. More... | |
auto | time_now () |
double | time_interval (std::chrono::high_resolution_clock::time_point t0) |
relativity_t | get_relativity_t (std::string name__) |
std::ostream & | operator<< (std::ostream &out, radial_solution_descriptor const &rsd) |
void | add_square_sum_gpu_double (std::complex< double > const *wf__, int num_rows_loc__, int nwf__, int reduced__, int mpi_rank__, double *result__) |
void | add_square_sum_gpu_float (std::complex< float > const *wf__, int num_rows_loc__, int nwf__, int reduced__, int mpi_rank__, float *result__) |
void | scale_matrix_columns_gpu_double (int nrow__, int ncol__, std::complex< double > *mtrx__, double *a__) |
void | scale_matrix_columns_gpu_float (int nrow__, int ncol__, std::complex< float > *mtrx__, float *a__) |
void | add_checksum_gpu_double (void const *wf__, int ld__, int num_rows_loc__, int nwf__, void *result__) |
void | add_checksum_gpu_float (void const *wf__, int ld__, int num_rows_loc__, int nwf__, void *result__) |
void | inner_diag_local_gpu_double_complex_double (void const *wf1__, int ld1__, void const *wf2__, int ld2__, int ngv_loc__, int nwf__, void *result__) |
void | inner_diag_local_gpu_double_double (void const *wf1__, int ld1__, void const *wf2__, int ld2__, int ngv_loc__, int nwf__, int reduced__, void *result__) |
void | axpby_gpu_double_complex_double (int nwf__, void const *alpha__, void const *x__, int ld1__, void const *beta__, void *y__, int ld2__, int ngv_loc__) |
void | axpby_gpu_double_double (int nwf__, void const *alpha__, void const *x__, int ld1__, void const *beta__, void *y__, int ld2__, int ngv_loc__) |
void | axpy_scatter_gpu_double_complex_double (int nwf__, void const *alpha__, void const *x__, int ld1__, void const *idx__, void *y__, int ld2__, int ngv_loc__) |
void | axpy_scatter_gpu_double_double (int nwf__, void const *alpha__, void const *x__, int ld1__, void const *idx__, void *y__, int ld2__, int ngv_loc__) |
template<typename T > | |
auto | checksum_gpu (std::complex< T > const *wf__, int ld__, int num_rows_loc__, int nwf__) |
Add checksum for the arrays on GPUs. More... | |
template<typename F > | |
void | iterate_aug_atom_types (Unit_cell const &uc__, F &&f__) |
auto | max_l_aug (Unit_cell const &uc__) |
auto | max_na_aug (Unit_cell const &uc__) |
auto | max_nb_aug (Unit_cell const &uc__) |
void | update_density_rg_1_real_gpu (int size__, float const *psi_rg__, float wt__, float *density_rg__) |
void | update_density_rg_1_real_gpu (int size__, double const *psi_rg__, double wt__, double *density_rg__) |
void | update_density_rg_1_complex_gpu (int size__, std::complex< float > const *psi_rg__, float wt__, float *density_rg__) |
void | update_density_rg_1_complex_gpu (int size__, std::complex< double > const *psi_rg__, double wt__, double *density_rg__) |
void | update_density_rg_2_gpu (int size__, std::complex< float > const *psi_rg_up__, std::complex< float > const *psi_rg_dn__, float wt__, float *density_x_rg__, float *density_y_rg__) |
void | update_density_rg_2_gpu (int size__, std::complex< double > const *psi_rg_up__, std::complex< double > const *psi_rg_dn__, double wt__, double *density_x_rg__, double *density_y_rg__) |
template<typename T > | |
static void | add_k_point_contribution_rg_collinear (fft::spfft_transform_type< T > &fft__, int ispn__, T w__, T const *inp_wf__, int nr__, bool gamma__, sddk::mdarray< T, 2 > &density_rg__) |
Compute non-magnetic or up- or dn- contribution of the wave-functions to the charge density. More... | |
template<typename T > | |
static void | add_k_point_contribution_rg_noncollinear (fft::spfft_transform_type< T > &fft__, T w__, T const *inp_wf_up__, T const *inp_wf_dn__, int nr__, sddk::mdarray< std::complex< T >, 1 > &psi_r_up__, sddk::mdarray< T, 2 > &density_rg__) |
Compute contribution to density and megnetisation from the 2-component spinor wave-functions. More... | |
template<typename T > | |
static void | add_k_point_contribution_dm_fplapw (Simulation_context const &ctx__, K_point< T > const &kp__, density_matrix_t &density_matrix__) |
template<typename T , typename F > | |
static void | add_k_point_contribution_dm_pwpp_collinear (Simulation_context &ctx__, K_point< T > &kp__, beta_projectors_coeffs_t< T > &bp_coeffs__, density_matrix_t &density_matrix__) |
template<typename T , typename F > | |
static void | add_k_point_contribution_dm_pwpp_noncollinear (Simulation_context &ctx__, K_point< T > &kp__, beta_projectors_coeffs_t< T > &bp_coeffs__, density_matrix_t &density_matrix__) |
template<typename T , typename F > | |
static void | add_k_point_contribution_dm_pwpp (Simulation_context &ctx__, K_point< T > &kp__, density_matrix_t &density_matrix__) |
auto | get_rho_up_dn (int num_mag_dims__, double rho__, r3::vector< double > mag__) |
Use Kuebler's trick to get rho_up and rho_dn from density and magnetisation. More... | |
void | copy (Density const &src__, Density &dest__) |
template<bool add_pseudo_core__> | |
std::array< std::unique_ptr< Smooth_periodic_function< double > >, 2 > | get_rho_up_dn (Density const &density__, double add_delta_rho_xc__=0.0, double add_delta_mag_xc__=0.0) |
void | copy (density_matrix_t const &src__, density_matrix_t &dest__) |
void | copy (Occupation_matrix const &src__, Occupation_matrix &dest__) |
double | ewald_energy (const Simulation_context &ctx, const fft::Gvec &gvec, const Unit_cell &unit_cell) |
Compute the ion-ion electrostatic energy using Ewald method. More... | |
double | energy_vxc (Density const &density, Potential const &potential) |
Returns exchange correlation potential. More... | |
double | energy_exc (Density const &density, Potential const &potential) |
Returns exchange correlation energy. More... | |
double | energy_vha (Potential const &potential) |
Returns Hatree potential. More... | |
double | energy_bxc (const Density &density, const Potential &potential) |
TODO doc. More... | |
double | energy_enuc (Simulation_context const &ctx, Potential const &potential) |
Return nucleus energy in the electrostatic field. More... | |
double | energy_vloc (Density const &density, Potential const &potential) |
TODO doc. More... | |
double | core_eval_sum (Unit_cell const &unit_cell) |
Return eigen-value sum of core states. More... | |
double | eval_sum (Unit_cell const &unit_cell, K_point_set const &kset) |
TODO doc. More... | |
double | energy_veff (Density const &density, Potential const &potential) |
TODO doc. More... | |
double | energy_kin (Simulation_context const &ctx, K_point_set const &kset, Density const &density, Potential const &potential) |
Return kinetic energy. More... | |
double | ks_energy (Simulation_context const &ctx, const std::map< std::string, double > &energies) |
double | ks_energy (Simulation_context const &ctx, K_point_set const &kset, Density const &density, Potential const &potential, double ewald_energy) |
double | total_energy (Simulation_context const &ctx, K_point_set const &kset, Density const &density, Potential const &potential, double ewald_energy) |
Total energy of the electronic subsystem. More... | |
std::map< std::string, double > | total_energy_components (Simulation_context const &ctx, const K_point_set &kset, Density const &density, Potential const &potential, double ewald_energy) |
double | hubbard_energy (Density const &density) |
double | one_electron_energy (Density const &density, Potential const &potential) |
double | one_electron_energy_hubbard (Density const &density, Potential const &potential) |
double | energy_potential (Density const &density, Potential const &potential) |
double | valence_eval_sum (K_point_set const &kset) |
TODO doc. | |
auto | energy_dict (Simulation_context const &ctx__, K_point_set const &kset__, Density const &density__, Potential const &potential__, double ewald_energy__, double scf_correction__=0) |
template<index_domain_t index_domain, typename F > | |
auto | make_periodic_function (Unit_cell const &uc__, fft::Gvec const &gv__, sddk::mdarray< std::complex< double >, 2 > const &phase_factors_t__, F &&form_factors__) |
Make periodic function out of form factors. More... | |
template<index_domain_t index_domain> | |
auto | make_periodic_function (Unit_cell const &uc__, fft::Gvec const &gv__, sddk::mdarray< std::complex< double >, 2 > const &phase_factors_t__, sddk::mdarray< double, 2 > const &form_factors__) |
Make periodic out of form factors computed for G-shells. More... | |
template<typename T > | |
T | inner (PAW_field4D< T > const &x__, PAW_field4D< T > const &y__) |
template<typename T > | |
T | inner (Periodic_function< T > const &f__, Periodic_function< T > const &g__) |
template<typename T > | |
void | copy (Periodic_function< T > const &src__, periodic_function_ptr_t< T > dest__) |
Copy values of the function to the external location. More... | |
template<typename T > | |
void | copy (periodic_function_ptr_t< T > const src__, Periodic_function< T > &dest__) |
Copy the values of the function from the external location. More... | |
template<typename T > | |
void | check_smooth_periodic_function_ptr (smooth_periodic_function_ptr_t< T > const &ptr__, fft::spfft_transform_type< T > const &spfft__) |
template<typename T > | |
Smooth_periodic_vector_function< T > | gradient (Smooth_periodic_function< T > &f__) |
Gradient of the function in the plane-wave domain. More... | |
template<typename T > | |
Smooth_periodic_function< T > | divergence (Smooth_periodic_vector_function< T > &g__) |
Divergence of the vecor function. More... | |
template<typename T > | |
Smooth_periodic_function< T > | laplacian (Smooth_periodic_function< T > &f__) |
Laplacian of the function in the plane-wave domain. More... | |
template<typename T > | |
Smooth_periodic_function< T > | dot (Smooth_periodic_vector_function< T > &vf__, Smooth_periodic_vector_function< T > &vg__) |
template<typename T , typename F > | |
T | inner_local (Smooth_periodic_function< T > const &f__, Smooth_periodic_function< T > const &g__, F &&theta__) |
Compute local contribution to inner product <f|g> More... | |
template<typename T > | |
T | inner_local (Smooth_periodic_function< T > const &f__, Smooth_periodic_function< T > const &g__) |
template<typename T , typename F > | |
T | inner (Smooth_periodic_function< T > const &f__, Smooth_periodic_function< T > const &g__, F &&theta__) |
template<typename T > | |
T | inner (Smooth_periodic_function< T > const &f__, Smooth_periodic_function< T > const &g__) |
Compute inner product <f|g> More... | |
template<typename T > | |
void | copy (Smooth_periodic_function< T > const &src__, smooth_periodic_function_ptr_t< T > dest__) |
Copy real-space values from the function to external pointer. More... | |
template<typename T > | |
void | copy (smooth_periodic_function_ptr_t< T > const src__, Smooth_periodic_function< T > &dest__) |
Copy real-space values from the external pointer to function. More... | |
template<typename T > | |
void | copy (Smooth_periodic_function< T > const &src__, Smooth_periodic_function< T > &dest__) |
template<typename T > | |
void | scale (T alpha__, Smooth_periodic_function< T > &x__) |
template<typename T > | |
void | axpy (T alpha__, Smooth_periodic_function< T > const &x__, Smooth_periodic_function< T > &y__) |
template<typename T > | |
auto | operator* (Spheric_function< function_domain_t::spatial, T > const &a__, Spheric_function< function_domain_t::spatial, T > const &b__) |
Multiplication of two functions in spatial domain. More... | |
auto | operator* (Spheric_vector_function< function_domain_t::spatial, double > const &f, Spheric_vector_function< function_domain_t::spatial, double > const &g) |
Dot product of two gradiensts of real functions in spatial domain. More... | |
template<function_domain_t domain_t, typename T > | |
auto | operator+ (Spheric_function< domain_t, T > const &a__, Spheric_function< domain_t, T > const &b__) |
Summation of two functions. More... | |
template<function_domain_t domain_t, typename T > | |
auto | operator- (Spheric_function< domain_t, T > const &a__, Spheric_function< domain_t, T > const &b__) |
Subtraction of functions. More... | |
template<function_domain_t domain_t, typename T > | |
auto | operator* (T a__, Spheric_function< domain_t, T > const &b__) |
Multiply function by a scalar. More... | |
template<function_domain_t domain_t, typename T > | |
auto | operator* (Spheric_function< domain_t, T > const &b__, T a__) |
Multiply function by a scalar (inverse order). More... | |
template<function_domain_t domain_t, typename T > | |
auto | inner (Spheric_function< domain_t, T > const &f1, Spheric_function< domain_t, T > const &f2) |
Inner product of two spherical functions. More... | |
template<typename T > | |
auto | laplacian (Spheric_function< function_domain_t::spectral, T > const &f__) |
Compute Laplacian of the spheric function. More... | |
void | convert (Spheric_function< function_domain_t::spectral, std::complex< double > > const &f__, Spheric_function< function_domain_t::spectral, double > &g__) |
Convert from Ylm to Rlm representation. More... | |
auto | convert (Spheric_function< function_domain_t::spectral, std::complex< double > > const &f__) |
Convert from Ylm to Rlm representation. More... | |
void | convert (Spheric_function< function_domain_t::spectral, double > const &f__, Spheric_function< function_domain_t::spectral, std::complex< double > > &g__) |
Convert from Rlm to Ylm representation. More... | |
auto | convert (Spheric_function< function_domain_t::spectral, double > const &f__) |
Convert from Rlm to Ylm representation. More... | |
template<typename T > | |
void | transform (SHT const &sht__, Spheric_function< function_domain_t::spectral, T > const &f__, Spheric_function< function_domain_t::spatial, T > &g__) |
template<typename T > | |
auto | transform (SHT const &sht__, Spheric_function< function_domain_t::spectral, T > const &f__) |
Transform to spatial domain (to r, \theta, \phi coordinates). More... | |
template<typename T > | |
void | transform (SHT const &sht__, Spheric_function< function_domain_t::spatial, T > const &f__, Spheric_function< function_domain_t::spectral, T > &g__) |
template<typename T > | |
auto | transform (SHT const &sht__, Spheric_function< function_domain_t::spatial, T > const &f__) |
Transform to spectral domain. More... | |
auto | gradient (Spheric_function< function_domain_t::spectral, std::complex< double > > const &f) |
Gradient of the function in complex spherical harmonics. More... | |
auto | gradient (Spheric_function< function_domain_t::spectral, double > const &f__) |
Gradient of the function in real spherical harmonics. More... | |
auto | divergence (Spheric_vector_function< function_domain_t::spectral, std::complex< double > > const &vf__) |
Divergence of the vector function in complex spherical harmonics. More... | |
auto | divergence (Spheric_vector_function< function_domain_t::spectral, double > const &vf) |
template<typename T , typename I > | |
T | inner (Spheric_function_set< T, I > const &f1__, Spheric_function_set< T, I > const &f2__) |
template<typename T , typename I > | |
void | copy (Spheric_function_set< T, I > const &src__, spheric_function_set_ptr_t< T > dest__) |
Copy from Spheric_function_set to external pointer. More... | |
template<typename T , typename I > | |
void | copy (spheric_function_set_ptr_t< T > const src__, Spheric_function_set< T, I > &dest__) |
Copy from external pointer to Spheric_function_set. More... | |
template<typename T , typename I > | |
void | copy (Spheric_function_set< T, I > const &src__, Spheric_function_set< T, I > &dest__) |
template<typename T , typename I > | |
void | scale (T alpha__, Spheric_function_set< T, I > &x__) |
template<typename T , typename I > | |
void | axpy (T alpha__, Spheric_function_set< T, I > const &x__, Spheric_function_set< T, I > &y__) |
template<typename T , typename F > | |
void | add_k_point_contribution_nonlocal (Simulation_context &ctx__, Beta_projectors_base< T > &bp_base__, K_point< T > &kp__, sddk::mdarray< real_type< F >, 2 > &collect_res__) |
void | wavefunctions_strain_deriv (Simulation_context const &ctx__, K_point< double > &kp__, wf::Wave_functions< double > &dphi__, sddk::mdarray< double, 2 > const &rlm_g__, sddk::mdarray< double, 3 > const &rlm_dg__, int nu__, int mu__) |
template<typename T , typename F > | |
void | check_wave_functions (Hamiltonian_k< real_type< T > > const &Hk__, wf::Wave_functions< T > &psi__, wf::spin_range sr__, wf::band_range br__, double *eval__) |
template<typename T , typename F > | |
void | project_out_subspace (::spla::Context &spla_ctx__, sddk::memory_t mem__, wf::spin_range spins__, wf::Wave_functions< T > &phi__, wf::Wave_functions< T > &sphi__, int N__, int n__, la::dmatrix< F > &o__) |
template<typename T , typename F , davidson_evp_t what> | |
auto | davidson (Hamiltonian_k< T > const &Hk__, K_point< T > &kp__, wf::num_bands num_bands__, wf::num_mag_dims num_mag_dims__, wf::Wave_functions< T > &psi__, std::function< double(int, int)> tolerance__, double res_tol__, int num_steps__, bool locking__, int subspace_size__, bool estimate_eval__, bool extra_ortho__, std::ostream &out__, int verbosity__, wf::Wave_functions< T > *phi_extra__=nullptr) |
Solve the eigen-problem using Davidson iterative method. More... | |
template<typename T , typename F > | |
auto | diagonalize (Hamiltonian0< T > const &H0__, K_point_set &kset__, double itsol_tol__) |
Diagonalize KS Hamiltonian for all k-points in the set. More... | |
void | diagonalize_fp_fv_exact (Hamiltonian_k< float > const &, K_point< float > &) |
void | diagonalize_fp_fv_exact (Hamiltonian_k< double > const &Hk__, K_point< double > &kp__) |
void | get_singular_components (Hamiltonian_k< double > const &Hk__, K_point< double > &kp__, double itsol_tol__) |
void | diagonalize_fp_fv_davidson (Hamiltonian_k< float > const &, K_point< float > &, double) |
void | diagonalize_fp_fv_davidson (Hamiltonian_k< double > const &Hk__, K_point< double > &kp__, double itsol_tol__) |
void | diagonalize_fp_sv (Hamiltonian_k< float > const &, K_point< float > &) |
void | diagonalize_fp_sv (Hamiltonian_k< double > const &Hk__, K_point< double > &kp) |
Diagonalize second-variational Hamiltonian. More... | |
template<typename T > | |
void | diagonalize_fp (Hamiltonian_k< T > const &Hk__, K_point< T > &kp__, double itsol_tol__) |
Diagonalize a full-potential LAPW Hamiltonian. More... | |
template<typename T , typename F > | |
std::enable_if_t<!std::is_same< T, real_type< F > >::value, void > | diagonalize_pp_exact (int ispn__, Hamiltonian_k< T > const &Hk__, K_point< T > &kp) |
template<typename T , typename F > | |
std::enable_if_t< std::is_same< T, real_type< F > >::value, void > | diagonalize_pp_exact (int ispn__, Hamiltonian_k< T > const &Hk__, K_point< T > &kp__) |
template<typename T , typename F > | |
sddk::mdarray< real_type< F >, 1 > | diag_S_davidson (Hamiltonian_k< T > const &Hk__, K_point< T > &kp__) |
Diagonalize S-operator of the ultrasoft or PAW methods. More... | |
template<typename T , typename F > | |
auto | diagonalize_pp (Hamiltonian_k< T > const &Hk__, K_point< T > &kp__, double itsol_tol__, double empy_tol__) |
template<typename T , typename F > | |
void | generate_subspace_matrix (Simulation_context &ctx__, int N__, int n__, int num_locked__, wf::Wave_functions< T > &phi__, wf::Wave_functions< T > &op_phi__, la::dmatrix< F > &mtrx__, la::dmatrix< F > *mtrx_old__=nullptr) |
Generate subspace matrix for the iterative diagonalization. More... | |
template<typename T , typename F > | |
void | initialize_subspace (Hamiltonian_k< T > const &Hk__, K_point< T > &kp__, int num_ao__) |
Initialize the wave-functions subspace at a given k-point. More... | |
template<typename T > | |
void | initialize_subspace (K_point_set &kset__, Hamiltonian0< T > &H0__) |
template<typename T > | |
static void | mul_by_veff (fft::spfft_transform_type< T > &spfftk__, T const *in__, std::array< std::unique_ptr< Smooth_periodic_function< T > >, 6 > const &veff_vec__, int idx_veff__, T *out__) |
Multiply FFT buffer by the effective potential. More... | |
template<typename T , typename F > | |
void | apply_non_local_D_Q (sddk::memory_t mem__, wf::spin_range spins__, wf::band_range br__, Beta_projector_generator< T > &beta__, beta_projectors_coeffs_t< T > &beta_coeffs__, wf::Wave_functions< T > const &phi__, D_operator< T > const *d_op__, wf::Wave_functions< T > *hphi__, Q_operator< T > const *q_op__, wf::Wave_functions< T > *sphi__) |
template<typename T , typename F > | |
void | apply_S_operator (sddk::memory_t mem__, wf::spin_range spins__, wf::band_range br__, Beta_projector_generator< T > &beta__, beta_projectors_coeffs_t< T > &beta_coeffs__, wf::Wave_functions< T > const &phi__, Q_operator< T > const *q_op__, wf::Wave_functions< T > &sphi__) |
Compute |sphi> = (1 + Q)|phi> More... | |
template<typename T > | |
void | apply_U_operator (Simulation_context &ctx__, wf::spin_range spins__, wf::band_range br__, wf::Wave_functions< T > const &hub_wf__, wf::Wave_functions< T > const &phi__, U_operator< T > const &um__, wf::Wave_functions< T > &hphi__) |
void | apply_S_operator_strain_deriv (sddk::memory_t mem__, int comp__, Beta_projector_generator< double > &bp__, beta_projectors_coeffs_t< double > &bp_coeffs__, Beta_projector_generator< double > &bp_strain_deriv__, beta_projectors_coeffs_t< double > &bp_strain_deriv_coeffs__, wf::Wave_functions< double > &phi__, Q_operator< double > &q_op__, wf::Wave_functions< double > &ds_phi__) |
Apply strain derivative of S-operator to all scalar functions. More... | |
template<typename T > | |
dmatrix< T > | pseudopotential_hmatrix (K_point &kp__, int ispn__, Hamiltonian &H__) |
template<typename T > | |
static void | compute_residuals (sddk::memory_t mem__, wf::spin_range spins__, wf::num_bands num_bands__, sddk::mdarray< T, 1 > const &eval__, wf::Wave_functions< T > const &hpsi__, wf::Wave_functions< T > const &opsi__, wf::Wave_functions< T > &res__) |
Compute band residuals. More... | |
template<typename T > | |
void | apply_preconditioner (sddk::memory_t mem__, wf::spin_range spins__, wf::num_bands num_bands__, wf::Wave_functions< T > &res__, sddk::mdarray< T, 2 > const &h_diag__, sddk::mdarray< T, 2 > const &o_diag__, sddk::mdarray< T, 1 > const &eval__) |
Apply preconditioner to the residuals. More... | |
template<typename T , typename F > | |
static auto | normalized_preconditioned_residuals (sddk::memory_t mem__, wf::spin_range spins__, wf::num_bands num_bands__, sddk::mdarray< T, 1 > const &eval__, wf::Wave_functions< T > const &hpsi__, wf::Wave_functions< T > const &opsi__, wf::Wave_functions< T > &res__, sddk::mdarray< T, 2 > const &h_diag__, sddk::mdarray< T, 2 > const &o_diag__, T norm_tolerance__, bool gamma__) |
template<typename T , typename F > | |
auto | residuals (Simulation_context &ctx__, sddk::memory_t mem__, wf::spin_range sr__, int N__, int num_bands__, int num_locked__, sddk::mdarray< real_type< F >, 1 > &eval__, la::dmatrix< F > &evec__, wf::Wave_functions< T > &hphi__, wf::Wave_functions< T > &ophi__, wf::Wave_functions< T > &hpsi__, wf::Wave_functions< T > &opsi__, wf::Wave_functions< T > &res__, sddk::mdarray< T, 2 > const &h_diag__, sddk::mdarray< T, 2 > const &o_diag__, bool estimate_eval__, T norm_tolerance__, std::function< bool(int, int)> is_converged__) |
Compute residuals from eigen-vectors. More... | |
template void | apply_U_operator< double > (Simulation_context &, wf::spin_range, wf::band_range, const wf::Wave_functions< double > &, const wf::Wave_functions< double > &, U_operator< double > const &, wf::Wave_functions< double > &) |
void | generate_potential (Hubbard_matrix const &om__, Hubbard_matrix &um__) |
double | energy (Hubbard_matrix const &om__) |
double | one_electron_energy_hubbard (Hubbard_matrix const &om__, Hubbard_matrix const &pm__) |
void | copy (Hubbard_matrix const &src__, Hubbard_matrix &dest__) |
static void | update_density_matrix_deriv (la::lib_t la__, sddk::memory_t mt__, int nwfh__, int nbnd__, std::complex< double > *alpha__, la::dmatrix< std::complex< double > > const &phi_hub_s_psi_deriv__, la::dmatrix< std::complex< double > > const &psi_s_phi_hub__, std::complex< double > *dn__, int ld__) |
static void | build_phi_hub_s_psi_deriv (Simulation_context const &ctx__, int nbnd__, int nawf__, la::dmatrix< std::complex< double > > const &ovlp__, la::dmatrix< std::complex< double > > const &inv_sqrt_O__, la::dmatrix< std::complex< double > > const &phi_atomic_s_psi__, la::dmatrix< std::complex< double > > const &phi_atomic_ds_psi__, std::vector< int > const &atomic_wf_offset__, std::vector< int > const &hubbard_wf_offset__, la::dmatrix< std::complex< double > > &phi_hub_s_psi_deriv__) |
static void | compute_inv_sqrt_O_deriv (la::dmatrix< std::complex< double > > &O_deriv__, la::dmatrix< std::complex< double > > &evec_O__, std::vector< double > &eval_O__, int nawf__) |
static void | generate_potential_collinear_nonlocal (Simulation_context const &ctx__, const int index__, sddk::mdarray< std::complex< double >, 3 > const &om__, sddk::mdarray< std::complex< double >, 3 > &um__) |
static void | generate_potential_collinear_local (Simulation_context const &ctx__, Atom_type const &atom_type__, const int idx_hub_wf, sddk::mdarray< std::complex< double >, 3 > const &om__, sddk::mdarray< std::complex< double >, 3 > &um__) |
static double | calculate_energy_collinear_nonlocal (Simulation_context const &ctx__, const int index__, sddk::mdarray< std::complex< double >, 3 > const &om__) |
static double | calculate_energy_collinear_local (Simulation_context const &ctx__, Atom_type const &atom_type__, const int idx_hub_wf, sddk::mdarray< std::complex< double >, 3 > const &om__) |
static void | generate_potential_non_collinear_local (Simulation_context const &ctx__, Atom_type const &atom_type__, const int idx_hub_wf, sddk::mdarray< std::complex< double >, 3 > const &om__, sddk::mdarray< std::complex< double >, 3 > &um__) |
static double | calculate_energy_non_collinear_local (Simulation_context const &ctx__, Atom_type const &atom_type__, const int idx_hub_wf, sddk::mdarray< std::complex< double >, 3 > const &om__) |
template<typename T > | |
auto | wave_function_factory (Simulation_context const &ctx__, K_point< T > const &kp__, wf::num_bands num_wf__, wf::num_mag_dims num_md__, bool mt_part__) |
template void | K_point_set::sync_band< double, sync_band_t::energy > () |
template void | K_point_set::sync_band< double, sync_band_t::occupancy > () |
template<class F > | |
double | bisection_search (F &&f, double a, double b, double tol, int maxstep=1000) |
template<class Nt , class DNt , class D2Nt > | |
auto | newton_minimization_chemical_potential (Nt &&N, DNt &&dN, D2Nt &&ddN, double mu0, double ne, double tol, int maxstep=1000) |
template<bool conjugate, typename T > | |
auto | generate_alm_block (Simulation_context const &ctx__, int atom_begin__, int num_atoms__, Matching_coefficients const &alm__) |
Generate matching coefficients for a block of atoms. More... | |
auto | generate_gvec_ylm (Simulation_context const &ctx__, int lmax__) |
Generate complex spherical harmonics for the local set of G-vectors. More... | |
auto | generate_sbessel_mt (Simulation_context const &ctx__, int lmax__) |
Compute values of spherical Bessel functions at MT boundary. More... | |
double | unit_step_function_form_factors (double R__, double g__) |
Utility function to generate LAPW unit step function. More... | |
auto | init_step_function (Unit_cell const &uc__, fft::Gvec const &gv__, fft::Gvec_fft const &gvec_fft__, sddk::mdarray< std::complex< double >, 2 > const &phase_factors_t__, fft::spfft_transform_type< double > spfft__) |
Unit step function is defined to be 1 in the interstitial and 0 inside muffin-tins. More... | |
auto | sum_fg_fl_yg (Simulation_context const &ctx__, int lmax__, std::complex< double > const *fpw__, sddk::mdarray< double, 3 > &fl__, sddk::matrix< std::complex< double > > &gvec_ylm__) |
template<class numeric_t > | |
auto | make_matrix_view (nlcglib::buffer_protocol< numeric_t, 2 > &buf) |
void | apply_hamiltonian (Hamiltonian0< double > &H0, K_point< double > &kp, wf::Wave_functions< double > &wf_out, wf::Wave_functions< double > &wf, std::shared_ptr< wf::Wave_functions< double > > swf) |
void | call_nlcg (Simulation_context &ctx, config_t::nlcg_t const &nlcg_params, Energy &energy, K_point_set &kset, Potential &potential) |
void | check_xc_potential (Density const &rho__) |
void | mul_veff_with_phase_factors_gpu (int num_atoms__, int num_gvec_loc__, std::complex< double > const *veff__, int const *gvx__, int const *gvy__, int const *gvz__, double const *atom_pos__, double *veff_a__, int ld__, int stream_id__) |
double | xc_mt_paw (std::vector< XC_functional > const &xc_func__, int lmax__, int num_mag_dims__, SHT const &sht__, Radial_grid< double > const &rgrid__, std::vector< Flm const * > rho__, std::vector< double > const &rho_core__, std::vector< Flm > &vxc__, Flm &exclm__) |
double | density_residual_hartree_energy (Density const &rho1__, Density const &rho2__) |
double | xc_mt (Radial_grid< double > const &rgrid__, SHT const &sht__, std::vector< XC_functional > const &xc_func__, int num_mag_dims__, std::vector< Flm const * > rho__, std::vector< Flm * > vxc__, Flm *exc__) |
void | xc_mt_nonmagnetic (Radial_grid< double > const &rgrid__, SHT const &sht__, std::vector< XC_functional > const &xc_func__, Flm const &rho_lm__, Ftp &rho_tp__, Flm &vxc_lm__, Flm &exc_lm__) |
void | xc_mt_magnetic (Radial_grid< double > const &rgrid__, SHT const &sht__, int num_mag_dims__, std::vector< XC_functional > const &xc_func__, std::vector< Ftp > const &rho_tp__, std::vector< Flm * > vxc__, Flm &exc__) |
template<typename T > | |
Radial_grid< T > | Radial_grid_factory (radial_grid_t grid_type__, int num_points__, T rmin__, T rmax__, double p__) |
std::pair< radial_grid_t, double > | get_radial_grid_t (std::string str__) |
template<typename T , typename U = double> | |
Spline< T, U > | operator* (Spline< T, U > const &a__, Spline< T, U > const &b__) |
void | spline_inner_product_gpu_v3 (int const *idx_ri__, int num_ri__, int num_points__, double const *x__, double const *dx__, double const *f__, double const *g__, double *result__) |
template<typename T > | |
T | inner (Spline< T > const &f__, Spline< T > const &g__, int m__, int num_points__) |
template<typename T > | |
T | inner (Spline< T > const &f__, Spline< T > const &g__, int m__) |
static bool & | is_initialized () |
Return the status of the library (initialized or not). More... | |
void | initialize (bool call_mpi_init__=true) |
Initialize the library. More... | |
void | finalize (bool call_mpi_fin__=true, bool reset_device__=true, bool fftw_cleanup__=true) |
Shut down the library. More... | |
void | check_gvec (fft::Gvec const &gvec__, Crystal_symmetry const &sym__) |
void | check_gvec (fft::Gvec_shells const &gvec_shells__, Crystal_symmetry const &sym__) |
static std::pair< std::vector< int >, std::vector< r3::vector< int > > > | find_sym_atom (int num_atoms__, sddk::mdarray< double, 2 > const &positions__, r3::matrix< int > const &R__, r3::vector< double > const &t__, double tolerance__, bool inverse__=false) |
static space_group_symmetry_descriptor | get_spg_sym_op (int isym_spg__, SpglibDataset *spg_dataset__, r3::matrix< double > const &lattice_vectors__, int num_atoms__, sddk::mdarray< double, 2 > const &positions__, double tolerance__) |
static space_group_symmetry_descriptor | get_identity_spg_sym_op (int num_atoms__) |
std::tuple< int, std::vector< double >, std::vector< std::array< double, 3 > > > | get_irreducible_reciprocal_mesh (Crystal_symmetry const &sym__, r3::vector< int > k_mesh__, r3::vector< int > is_shift__) |
auto | metric_tensor (r3::matrix< double > const &lat_vec__) |
Compute a metric tensor. More... | |
double | metric_tensor_error (r3::matrix< double > const &lat_vec__, r3::matrix< int > const &R__) |
Compute error of the symmetry-transformed metric tensor. More... | |
auto | find_lat_sym (r3::matrix< double > const &lat_vec__, double tol__, double *mt_error__=nullptr) |
double | phi_by_sin_cos (double sinp, double cosp) |
Return angle phi in the range [0, 2Pi) by its values of sin(phi) and cos(phi). More... | |
auto | rotation_matrix_su2 (std::array< double, 3 > u__, double theta__) |
Generate SU(2) rotation matrix from the axes and angle. More... | |
auto | rotation_matrix_su2 (r3::matrix< double > R__) |
Generate SU2(2) rotation matrix from a 3x3 rotation matrix in Cartesian coordinates. More... | |
auto | axis_angle (r3::matrix< double > R__) |
Get axis and angle from rotation matrix. More... | |
auto | rot_mtrx_cart (r3::vector< double > euler_angles__) |
Generate rotation matrix from three Euler angles. More... | |
auto | euler_angles (r3::matrix< double > const &rot__, double tolerance__) |
Compute Euler angles corresponding to the proper rotation matrix. More... | |
void | apply_symmetry_to_density_matrix (sddk::mdarray< std::complex< double >, 3 > const &dm_ia__, basis_functions_index const &indexb__, const int num_mag_comp__, std::vector< sddk::mdarray< double, 2 > > const &rotm__, sddk::mdarray< std::complex< double >, 2 > const &spin_rot_su2__, sddk::mdarray< std::complex< double >, 3 > &dm_ja__) |
void | symmetrize_density_matrix (Unit_cell const &uc__, density_matrix_t &dm__, int num_mag_comp__) |
Symmetrize density matrix. More... | |
void | symmetrize_field4d (Field4D &f__) |
void | symmetrize_forces (Unit_cell const &uc__, sddk::mdarray< double, 2 > &f__) |
template<typename Index_t > | |
void | symmetrize_mt_function (Crystal_symmetry const &sym__, mpi::Communicator const &comm__, int num_mag_dims__, std::vector< Spheric_function_set< double, Index_t > * > frlm__) |
void | symmetrize_occupation_matrix (Occupation_matrix &om__) |
void | symmetrize_pw_function (Crystal_symmetry const &sym__, fft::Gvec_shells const &gvec_shells__, sddk::mdarray< std::complex< double >, 3 > const &sym_phase_factors__, int num_mag_dims__, std::vector< Smooth_periodic_function< double > * > frg__) |
Symmetrize scalar or vector function. More... | |
void | symmetrize_stress_tensor (Crystal_symmetry const &sym__, r3::matrix< double > &s__) |
template<typename F > | |
int | call_test (std::string label__, F &&f__) |
template<typename F > | |
int | call_test (std::string label__, F &&f__, cmd_args const &args__) |
template<typename T > | |
auto | random_symmetric (int N__, int bs__, la::BLACS_grid const &blacs_grid__) |
template<typename T > | |
auto | random_positive_definite (int N__, int bs__=16, la::BLACS_grid const *blacs_grid__=nullptr) |
auto | create_simulation_context (nlohmann::json const &conf__, r3::matrix< double > L__, int num_atoms__, std::vector< r3::vector< double > > coord__, bool add_vloc__, bool add_dion__) |
template<typename T > | |
void | randomize (wf::Wave_functions< T > &wf__) |
std::ostream & | operator<< (std::ostream &out, ps_atomic_wf_descriptor const &wfd) |
auto | begin (basis_functions_index const &idx__) |
auto | end (basis_functions_index const &idx__) |
std::ostream & | operator<< (std::ostream &out, hubbard_orbital_descriptor const &ho) |
bool | operator== (angular_momentum lhs__, angular_momentum rhs__) |
bool | operator!= (angular_momentum lhs__, angular_momentum rhs__) |
std::ostream & | operator<< (std::ostream &out, angular_momentum am) |
Output angular momentum to a stream. More... | |
auto | begin (radial_functions_index const &idx__) |
auto | end (radial_functions_index const &idx__) |
Variables | |
integer, parameter, public | sirius_integer_type = 1 |
integer, parameter, public | sirius_logical_type = 2 |
integer, parameter, public | sirius_string_type = 3 |
integer, parameter, public | sirius_number_type = 4 |
integer, parameter, public | sirius_object_type = 5 |
integer, parameter, public | sirius_array_type = 6 |
integer, parameter, public | sirius_integer_array_type = 7 |
integer, parameter, public | sirius_logical_array_type = 8 |
integer, parameter, public | sirius_number_array_type = 9 |
integer, parameter, public | sirius_string_array_type = 10 |
integer, parameter, public | sirius_object_array_type = 11 |
integer, parameter, public | sirius_array_array_type = 12 |
const double | speed_of_light = 137.035999139 |
NIST value for the inverse fine structure (http://physics.nist.gov/cuu/Constants/index.html) More... | |
const double | bohr_radius = 0.52917721067 |
Bohr radius in angstroms. More... | |
const double | pi = 3.1415926535897932385 |
\( \pi \) More... | |
const double | twopi = 6.2831853071795864769 |
\( 2\pi \) More... | |
const double | fourpi = 12.566370614359172954 |
\( 4\pi \) More... | |
const double | y00 = 0.28209479177387814347 |
First spherical harmonic \( Y_{00} = \frac{1}{\sqrt{4\pi}} \). More... | |
const double | ha2ev = 27.21138505 |
Hartree in electron-volt units. More... | |
const char *const | storage_file_name = "sirius.h5" |
const std::complex< double > | pauli_matrix [4][2][2] |
Pauli matrices in {I, Z, X, Y} order. More... | |
::rt_graph::Timer | global_rtgraph_timer |
template<class T > | |
constexpr bool | is_real_v = std::is_same<T, real_type<T>>::value |
const std::map< std::string, int > | libxc_functionals |
json | sirius_options_parser_ |
Namespace of the SIRIUS library.
using sirius::gpu_complex_type = typedef typename GPU_Complex<T>::type |
using sirius::real_type = typedef typename Real<T>::type |
Definition at line 48 of file acc_common.hpp.
using sirius::n_blocks = typedef strong_type<int, struct __n_blocks_tag> |
Number of blocks to which the global index is split.
Definition at line 105 of file splindex.hpp.
using sirius::block_id = typedef strong_type<int, struct __block_id_tag> |
ID of the block.
The id of the block has the range [0, n_blocks)
Definition at line 108 of file splindex.hpp.
using sirius::time_point_t = typedef std::chrono::high_resolution_clock::time_point |
Definition at line 54 of file time_tools.hpp.
using sirius::identity_t = typedef typename identity<X>::type |
Definition at line 37 of file traits.hpp.
typedef std::vector<radial_solution_descriptor> sirius::radial_solution_descriptor_set |
Set of radial solution descriptors, used to construct augmented waves or local orbitals.
Definition at line 155 of file typedefs.hpp.
using sirius::Flm = typedef Spheric_function<function_domain_t::spectral, double> |
Definition at line 205 of file spheric_function.hpp.
using sirius::Ftp = typedef Spheric_function<function_domain_t::spatial, double> |
Definition at line 206 of file spheric_function.hpp.
using sirius::lmax_t = typedef strong_type<int, struct __lmax_t_tag> |
Definition at line 9 of file spheric_function_set.hpp.
using sirius::rf_index = typedef strong_type<int, struct __rf_index_tag> |
Radial function index.
Definition at line 34 of file radial_functions_index.hpp.
using sirius::rf_aw_index = typedef strong_type<int, struct __rf_aw_index_tag> |
Augmented wave radial function index.
Definition at line 36 of file radial_functions_index.hpp.
using sirius::rf_lo_index = typedef strong_type<int, struct __rf_lo_index_tag> |
Local orbital radial function index.
Definition at line 38 of file radial_functions_index.hpp.
using sirius::bf_index = typedef strong_type<int, struct __bf_index_tag> |
Basis function index.
Definition at line 40 of file radial_functions_index.hpp.
using sirius::bf_aw_index = typedef strong_type<int, struct __bf_aw_index_tag> |
Augmented wave basis function index.
Definition at line 42 of file radial_functions_index.hpp.
using sirius::bf_lo_index = typedef strong_type<int, struct __bf_lo_index_tag> |
Local orbital basis function index.
Definition at line 44 of file radial_functions_index.hpp.
using sirius::json = typedef nlohmann::json |
Definition at line 36 of file unit_cell.hpp.
|
strong |
Definition at line 38 of file hdf5_tree.hpp.
|
strong |
Enumerator | |
---|---|
global | Global index. |
local | Local index. |
Definition at line 110 of file splindex.hpp.
|
strong |
Spin-blocks of the Hamiltonian.
Enumerator | |
---|---|
nm | Non-magnetic case. |
uu | Up-up block. |
dd | Down-donw block. |
ud | Up-down block. |
du | Down-up block. |
Definition at line 56 of file typedefs.hpp.
|
strong |
Type of electronic structure methods.
Enumerator | |
---|---|
full_potential_lapwlo | Full potential linearized augmented plane waves with local orbitals. |
pseudopotential | Pseudopotential (ultrasoft, norm-conserving, PAW). |
Definition at line 75 of file typedefs.hpp.
|
strong |
Type of a function domain.
Enumerator | |
---|---|
spatial | Spatial domain. |
spectral | Spectral domain. |
Definition at line 85 of file typedefs.hpp.
|
strong |
Type of relativity treatment in the case of LAPW.
Definition at line 94 of file typedefs.hpp.
|
strong |
Definition at line 48 of file davidson.hpp.
|
strong |
Definition at line 33 of file k_point_set.hpp.
|
strong |
Types of radial grid.
Definition at line 34 of file radial_grid.hpp.
character(kind=c_char,len=1) function, dimension(len_trim(f_string) + 1) sirius::string_f2c | ( | character(kind=c_char,len=*), intent(in) | f_string | ) |
Internal function that adds trailing null character to the string to make it C-style.
Definition at line 46 of file sirius.f90.
character(kind=c_char,len=size(c_string) - 1) function sirius::string_c2f | ( | character(kind=c_char,len=1), dimension(:), intent(in) | c_string | ) |
Internal function that converts C-string (with trailing null character) to the Fortran string.
Definition at line 58 of file sirius.f90.
subroutine sirius::sirius_initialize | ( | logical, intent(in), target | call_mpi_init, |
integer, intent(out), optional, target | error_code | ||
) |
Initialize the SIRIUS library.
[in] | call_mpi_init | If .true. then MPI_Init must be called prior to initialization. |
[out] | error_code | Error code. |
Definition at line 77 of file sirius.f90.
subroutine sirius::sirius_finalize | ( | logical, intent(in), optional, target | call_mpi_fin, |
logical, intent(in), optional, target | call_device_reset, | ||
logical, intent(in), optional, target | call_fftw_fin, | ||
integer, intent(out), optional, target | error_code | ||
) |
Shut down the SIRIUS library.
[in] | call_mpi_fin | If .true. then MPI_Finalize must be called after the shutdown. |
[in] | call_device_reset | If .true. then cuda device is reset after shutdown. |
[in] | call_fftw_fin | If .true. then fft_cleanup must be called after the shutdown. |
[out] | error_code | Error code. |
Definition at line 112 of file sirius.f90.
subroutine sirius::sirius_start_timer | ( | character(*), intent(in), target | name, |
integer, intent(out), optional, target | error_code | ||
) |
Start the timer.
[in] | name | Timer label. |
[out] | error_code | Error code. |
Definition at line 172 of file sirius.f90.
subroutine sirius::sirius_stop_timer | ( | character(*), intent(in), target | name, |
integer, intent(out), optional, target | error_code | ||
) |
Stop the running timer.
[in] | name | Timer label. |
[out] | error_code | Error code. |
Definition at line 207 of file sirius.f90.
subroutine sirius::sirius_print_timers | ( | logical, intent(in), target | flatten, |
integer, intent(out), optional, target | error_code | ||
) |
Print all timers.
[in] | flatten | If true, flat list of timers is printed. |
[out] | error_code | Error code. |
Definition at line 242 of file sirius.f90.
subroutine sirius::sirius_serialize_timers | ( | character(*), intent(in), target | fname, |
integer, intent(out), optional, target | error_code | ||
) |
Save all timers to JSON file.
[in] | fname | Name of the output JSON file. |
[out] | error_code | Error code. |
Definition at line 275 of file sirius.f90.
subroutine sirius::sirius_context_initialized | ( | type(sirius_context_handler), intent(in), target | handler, |
logical, intent(out), target | status, | ||
integer, intent(out), optional, target | error_code | ||
) |
Check if the simulation context is initialized.
[in] | handler | Simulation context handler. |
[out] | status | Status of the library (true if initialized) |
[out] | error_code | Error code. |
Definition at line 311 of file sirius.f90.
subroutine sirius::sirius_create_context | ( | integer, intent(in), value | fcomm, |
type(sirius_context_handler), intent(out), target | handler, | ||
integer, intent(in), optional, target | fcomm_k, | ||
integer, intent(in), optional, target | fcomm_band, | ||
integer, intent(out), optional, target | error_code | ||
) |
Create context of the simulation.
Simulation context is the complex data structure that holds all the parameters of the individual simulation. The context must be created, populated with the correct parameters and initialized before using all subsequent SIRIUS functions.
[in] | fcomm | Entire communicator of the simulation. |
[out] | handler | New empty simulation context. |
[in] | fcomm_k | Communicator for k-point parallelization. |
[in] | fcomm_band | Communicator for band parallelization. |
[out] | error_code | Error code. |
Definition at line 355 of file sirius.f90.
subroutine sirius::sirius_import_parameters | ( | type(sirius_context_handler), intent(in), target | handler, |
character(*), intent(in), target | str, | ||
integer, intent(out), optional, target | error_code | ||
) |
Import parameters of simulation from a JSON string.
[in] | handler | Simulation context handler. |
[in] | str | JSON string with parameters or a JSON file. |
[out] | error_code | Error code |
Definition at line 403 of file sirius.f90.
subroutine sirius::sirius_set_parameters | ( | type(sirius_context_handler), intent(in), target | handler, |
integer, intent(in), optional, target | lmax_apw, | ||
integer, intent(in), optional, target | lmax_rho, | ||
integer, intent(in), optional, target | lmax_pot, | ||
integer, intent(in), optional, target | num_fv_states, | ||
integer, intent(in), optional, target | num_bands, | ||
integer, intent(in), optional, target | num_mag_dims, | ||
real(8), intent(in), optional, target | pw_cutoff, | ||
real(8), intent(in), optional, target | gk_cutoff, | ||
integer, dimension(3), intent(in), optional, target | fft_grid_size, | ||
integer, intent(in), optional, target | auto_rmt, | ||
logical, intent(in), optional, target | gamma_point, | ||
logical, intent(in), optional, target | use_symmetry, | ||
logical, intent(in), optional, target | so_correction, | ||
character(*), intent(in), optional, target | valence_rel, | ||
character(*), intent(in), optional, target | core_rel, | ||
real(8), intent(in), optional, target | iter_solver_tol_empty, | ||
character(*), intent(in), optional, target | iter_solver_type, | ||
integer, intent(in), optional, target | verbosity, | ||
logical, intent(in), optional, target | hubbard_correction, | ||
integer, intent(in), optional, target | hubbard_correction_kind, | ||
logical, intent(in), optional, target | hubbard_full_orthogonalization, | ||
character(*), intent(in), optional, target | hubbard_orbitals, | ||
integer, intent(in), optional, target | sht_coverage, | ||
real(8), intent(in), optional, target | min_occupancy, | ||
character(*), intent(in), optional, target | smearing, | ||
real(8), intent(in), optional, target | smearing_width, | ||
real(8), intent(in), optional, target | spglib_tol, | ||
character(*), intent(in), optional, target | electronic_structure_method, | ||
integer, intent(out), optional, target | error_code | ||
) |
Set parameters of the simulation.
[in] | handler | Simulation context handler |
[in] | lmax_apw | Maximum orbital quantum number for APW functions. |
[in] | lmax_rho | Maximum orbital quantum number for density. |
[in] | lmax_pot | Maximum orbital quantum number for potential. |
[in] | num_fv_states | Number of first-variational states. |
[in] | num_bands | Number of bands. |
[in] | num_mag_dims | Number of magnetic dimensions. |
[in] | pw_cutoff | Cutoff for G-vectors. |
[in] | gk_cutoff | Cutoff for G+k-vectors. |
[in] | fft_grid_size | Size of the fine-grain FFT grid. |
[in] | auto_rmt | Set the automatic search of muffin-tin radii. |
[in] | gamma_point | True if this is a Gamma-point calculation. |
[in] | use_symmetry | True if crystal symmetry is taken into account. |
[in] | so_correction | True if spin-orbit correnctio is enabled. |
[in] | valence_rel | Valence relativity treatment. |
[in] | core_rel | Core relativity treatment. |
[in] | iter_solver_tol_empty | Tolerance for the empty states. |
[in] | iter_solver_type | Type of iterative solver. |
[in] | verbosity | Verbosity level. |
[in] | hubbard_correction | True if LDA+U correction is enabled. |
[in] | hubbard_correction_kind | Type of LDA+U implementation (simplified or full). |
[in] | hubbard_full_orthogonalization | Use all atomic orbitals found in all ps potentials to compute the orthogonalization operator. |
[in] | hubbard_orbitals | Type of localized orbitals. |
[in] | sht_coverage | Type of spherical coverage (0 for Lebedev-Laikov, 1 for uniform). |
[in] | min_occupancy | Minimum band occupancy to trat is as "occupied". |
[in] | smearing | Type of occupancy smearing. |
[in] | smearing_width | Smearing width |
[in] | spglib_tol | Tolerance for the spglib symmetry search. |
[in] | electronic_structure_method | Type of electronic structure method. |
[out] | error_code | Error code. |
Definition at line 471 of file sirius.f90.
subroutine sirius::sirius_get_parameters | ( | type(sirius_context_handler), intent(in), target | handler, |
integer, intent(out), optional, target | lmax_apw, | ||
integer, intent(out), optional, target | lmax_rho, | ||
integer, intent(out), optional, target | lmax_pot, | ||
integer, intent(out), optional, target | num_fv_states, | ||
integer, intent(out), optional, target | num_bands, | ||
integer, intent(out), optional, target | num_spins, | ||
integer, intent(out), optional, target | num_mag_dims, | ||
real(8), intent(out), optional, target | pw_cutoff, | ||
real(8), intent(out), optional, target | gk_cutoff, | ||
integer, dimension(3), intent(out), optional, target | fft_grid_size, | ||
integer, intent(out), optional, target | auto_rmt, | ||
logical, intent(out), optional, target | gamma_point, | ||
logical, intent(out), optional, target | use_symmetry, | ||
logical, intent(out), optional, target | so_correction, | ||
real(8), intent(out), optional, target | iter_solver_tol, | ||
real(8), intent(out), optional, target | iter_solver_tol_empty, | ||
integer, intent(out), optional, target | verbosity, | ||
logical, intent(out), optional, target | hubbard_correction, | ||
real(8), intent(out), optional, target | evp_work_count, | ||
integer, intent(out), optional, target | num_loc_op_applied, | ||
integer, intent(out), optional, target | num_sym_op, | ||
character(*), intent(out), optional, target | electronic_structure_method, | ||
integer, intent(out), optional, target | error_code | ||
) |
Get parameters of the simulation.
[in] | handler | Simulation context handler |
[out] | lmax_apw | Maximum orbital quantum number for APW functions. |
[out] | lmax_rho | Maximum orbital quantum number for density. |
[out] | lmax_pot | Maximum orbital quantum number for potential. |
[out] | num_fv_states | Number of first-variational states. |
[out] | num_bands | Number of bands. |
[out] | num_spins | Number of spins. |
[out] | num_mag_dims | Number of magnetic dimensions. |
[out] | pw_cutoff | Cutoff for G-vectors. |
[out] | gk_cutoff | Cutoff for G+k-vectors. |
[out] | fft_grid_size | Size of the fine-grain FFT grid. |
[out] | auto_rmt | Set the automatic search of muffin-tin radii. |
[out] | gamma_point | True if this is a Gamma-point calculation. |
[out] | use_symmetry | True if crystal symmetry is taken into account. |
[out] | so_correction | True if spin-orbit correnctio is enabled. |
[out] | iter_solver_tol | Tolerance of the iterative solver (deprecated). |
[out] | iter_solver_tol_empty | Tolerance for the empty states. |
[out] | verbosity | Verbosity level. |
[out] | hubbard_correction | True if LDA+U correction is enabled. |
[out] | evp_work_count | Internal counter of total eigen-value problem work. |
[out] | num_loc_op_applied | Internal counter of the number of wave-functions to which Hamiltonian was applied. |
[out] | num_sym_op | Number of symmetry operations discovered by spglib |
[out] | electronic_structure_method | Type of electronic structure method. |
[out] | error_code | Error code. |
Definition at line 792 of file sirius.f90.
subroutine sirius::sirius_add_xc_functional | ( | type(sirius_context_handler), intent(in), target | handler, |
character(*), intent(in), target | name, | ||
integer, intent(out), optional, target | error_code | ||
) |
Add one of the XC functionals.
[in] | handler | Simulation context handler |
[in] | name | LibXC label of the functional. |
[out] | error_code | Error code. |
Definition at line 1011 of file sirius.f90.
subroutine sirius::sirius_set_mpi_grid_dims | ( | type(sirius_context_handler), intent(in), target | handler, |
integer, intent(in), target | ndims, | ||
integer, dimension(ndims), intent(in), target | dims, | ||
integer, intent(out), optional, target | error_code | ||
) |
Set dimensions of the MPI grid.
[in] | handler | Simulation context handler |
[in] | ndims | Number of dimensions. |
[in] | dims | Size of each dimension. |
[out] | error_code | Error code. |
Definition at line 1053 of file sirius.f90.
subroutine sirius::sirius_set_lattice_vectors | ( | type(sirius_context_handler), intent(in), target | handler, |
real(8), dimension(3), intent(in), target | a1, | ||
real(8), dimension(3), intent(in), target | a2, | ||
real(8), dimension(3), intent(in), target | a3, | ||
integer, intent(out), optional, target | error_code | ||
) |
Set vectors of the unit cell.
[in] | handler | Simulation context handler |
[in] | a1 | 1st vector |
[in] | a2 | 2nd vector |
[in] | a3 | 3rd vector |
[out] | error_code | Error code. |
Definition at line 1097 of file sirius.f90.
subroutine sirius::sirius_initialize_context | ( | type(sirius_context_handler), intent(in), target | handler, |
integer, intent(out), optional, target | error_code | ||
) |
Initialize simulation context.
[in] | handler | Simulation context handler. |
[out] | error_code | Error code. |
Definition at line 1143 of file sirius.f90.
subroutine sirius::sirius_update_context | ( | type(sirius_context_handler), intent(in), target | handler, |
integer, intent(out), optional, target | error_code | ||
) |
Update simulation context after changing lattice or atomic positions.
[in] | handler | Simulation context handler. |
[out] | error_code | Error code. |
Definition at line 1174 of file sirius.f90.
subroutine sirius::sirius_print_info | ( | type(sirius_context_handler), intent(in), target | handler, |
integer, intent(out), optional, target | error_code | ||
) |
Print basic info.
[in] | handler | Simulation context handler. |
[out] | error_code | Error code. |
Definition at line 1205 of file sirius.f90.
subroutine sirius::sirius_free_object_handler | ( | type(c_ptr), intent(inout), target | handler, |
integer, intent(out), optional, target | error_code | ||
) |
Free any object handler created by SIRIUS.
This is an internal function. Use sirius_free_handler() in your code.
[in,out] | handler | Handler of the object. |
[out] | error_code | Error code |
Definition at line 1238 of file sirius.f90.
subroutine sirius::sirius_set_periodic_function_ptr | ( | type(sirius_context_handler), intent(in), target | handler, |
character(*), intent(in), target | label, | ||
real(8), dimension(:,:,:), intent(in), optional, target | f_mt, | ||
integer, intent(in), optional, target | lmmax, | ||
integer, intent(in), optional, target | nrmtmax, | ||
integer, intent(in), optional, target | num_atoms, | ||
real(8), dimension(:), intent(in), optional, target | f_rg, | ||
integer, intent(in), optional, target | size_x, | ||
integer, intent(in), optional, target | size_y, | ||
integer, intent(in), optional, target | size_z, | ||
integer, intent(in), optional, target | offset_z, | ||
integer, intent(out), optional, target | error_code | ||
) |
Set pointer to density or magnetization.
[in] | handler | Simulation context handler. |
[in] | label | Label of the function. |
[in] | f_mt | Pointer to the muffin-tin part of the function. |
[in] | lmmax | Number of lm components. |
[in] | nrmtmax | Maximum number of muffin-tin points. |
[in] | num_atoms | Total number of atoms. |
[in] | f_rg | Pointer to the regular-grid part of the function. |
[in] | size_x | Size of X-dimension of FFT grid. |
[in] | size_y | Size of Y-dimension of FFT grid. |
[in] | size_z | Local or global size of Z-dimension of FFT grid depending on offset_z |
[in] | offset_z | Offset in the Z-dimension of FFT grid for this MPI rank. |
[out] | error_code | Error code |
Definition at line 1279 of file sirius.f90.
subroutine sirius::sirius_set_periodic_function | ( | type(sirius_ground_state_handler), intent(in), target | handler, |
character(*), intent(in), target | label, | ||
real(8), dimension(:,:,:), intent(in), optional, target | f_mt, | ||
integer, intent(in), optional, target | lmmax, | ||
integer, intent(in), optional, target | nrmtmax, | ||
integer, intent(in), optional, target | num_atoms, | ||
real(8), dimension(:), intent(in), optional, target | f_rg, | ||
integer, intent(in), optional, target | size_x, | ||
integer, intent(in), optional, target | size_y, | ||
integer, intent(in), optional, target | size_z, | ||
integer, intent(in), optional, target | offset_z, | ||
integer, intent(out), optional, target | error_code | ||
) |
Set values of the periodic function.
[in] | handler | Handler of the DFT ground state object. |
[in] | label | Label of the function. |
[in] | f_mt | Pointer to the muffin-tin part of the function. |
[in] | lmmax | Number of lm components. |
[in] | nrmtmax | Maximum number of muffin-tin points. |
[in] | num_atoms | Total number of atoms. |
[in] | f_rg | Pointer to the regular-grid part of the function. |
[in] | size_x | Size of X-dimension of FFT grid. |
[in] | size_y | Size of Y-dimension of FFT grid. |
[in] | size_z | Local or global size of Z-dimension of FFT grid depending on offset_z |
[in] | offset_z | Offset in the Z-dimension of FFT grid for this MPI rank. |
[out] | error_code | Error code. |
Definition at line 1396 of file sirius.f90.
subroutine sirius::sirius_get_periodic_function | ( | type(sirius_ground_state_handler), intent(in), target | handler, |
character(*), intent(in), target | label, | ||
real(8), dimension(:,:,:), intent(in), optional, target | f_mt, | ||
integer, intent(in), optional, target | lmmax, | ||
integer, intent(in), optional, target | nrmtmax, | ||
integer, intent(in), optional, target | num_atoms, | ||
real(8), dimension(:), intent(in), optional, target | f_rg, | ||
integer, intent(in), optional, target | size_x, | ||
integer, intent(in), optional, target | size_y, | ||
integer, intent(in), optional, target | size_z, | ||
integer, intent(in), optional, target | offset_z, | ||
integer, intent(out), optional, target | error_code | ||
) |
Get values of the periodic function.
[in] | handler | Handler of the DFT ground state object. |
[in] | label | Label of the function. |
[in] | f_mt | Pointer to the muffin-tin part of the function. |
[in] | lmmax | Number of lm components. |
[in] | nrmtmax | Maximum number of muffin-tin points. |
[in] | num_atoms | Total number of atoms. |
[in] | f_rg | Pointer to the regular-grid part of the function. |
[in] | size_x | Size of X-dimension of FFT grid. |
[in] | size_y | Size of Y-dimension of FFT grid. |
[in] | size_z | Local or global size of Z-dimension of FFT grid depending on offset_z |
[in] | offset_z | Offset in the Z-dimension of FFT grid for this MPI rank. |
[out] | error_code | Error code |
Definition at line 1512 of file sirius.f90.
subroutine sirius::sirius_create_kset | ( | type(sirius_context_handler), intent(in), target | handler, |
integer, intent(in), target | num_kpoints, | ||
real(8), dimension(3,num_kpoints), intent(in), target | kpoints, | ||
real(8), dimension(num_kpoints), intent(in), target | kpoint_weights, | ||
logical, intent(in), target | init_kset, | ||
type(sirius_kpoint_set_handler), intent(out), target | kset_handler, | ||
integer, intent(out), optional, target | error_code | ||
) |
Create k-point set from the list of k-points.
[in] | handler | Simulation context handler. |
[in] | num_kpoints | Total number of k-points in the set. |
[in] | kpoints | List of k-points in lattice coordinates. |
[in] | kpoint_weights | Weights of k-points. |
[in] | init_kset | If .true. k-set will be initialized. |
[out] | kset_handler | Handler of the newly created k-point set. |
[out] | error_code | Error code. |
Definition at line 1623 of file sirius.f90.
subroutine sirius::sirius_create_kset_from_grid | ( | type(sirius_context_handler), intent(in), target | handler, |
integer, dimension(3), intent(in), target | k_grid, | ||
integer, dimension(3), intent(in), target | k_shift, | ||
logical, intent(in), target | use_symmetry, | ||
type(sirius_kpoint_set_handler), intent(out), target | kset_handler, | ||
integer, intent(out), optional, target | error_code | ||
) |
Create k-point set from a grid.
[in] | handler | Simulation context handler. |
[in] | k_grid | dimensions of the k points grid. |
[in] | k_shift | k point shifts. |
[in] | use_symmetry | If .true. k-set will be generated using symmetries. |
[out] | kset_handler | Handler of the newly created k-point set. |
[out] | error_code | Error code. |
Definition at line 1688 of file sirius.f90.
subroutine sirius::sirius_create_ground_state | ( | type(sirius_kpoint_set_handler), intent(in), target | ks_handler, |
type(sirius_ground_state_handler), intent(out), target | gs_handler, | ||
integer, intent(out), optional, target | error_code | ||
) |
Create a ground state object.
[in] | ks_handler | Handler of the k-point set. |
[out] | gs_handler | Handler of the newly created ground state object. |
[out] | error_code | Error code. |
Definition at line 1745 of file sirius.f90.
subroutine sirius::sirius_initialize_kset | ( | type(sirius_kpoint_set_handler), intent(in), target | ks_handler, |
integer, dimension(:), intent(in), optional, target | count, | ||
integer, intent(out), optional, target | error_code | ||
) |
Initialize k-point set.
[in] | ks_handler | K-point set handler. |
[in] | count | Local number of k-points for each MPI rank. |
[out] | error_code | Error code. |
Definition at line 1782 of file sirius.f90.
subroutine sirius::sirius_find_ground_state | ( | type(sirius_ground_state_handler), intent(in), target | gs_handler, |
real(8), intent(in), optional, target | density_tol, | ||
real(8), intent(in), optional, target | energy_tol, | ||
real(8), intent(in), optional, target | iter_solver_tol, | ||
logical, intent(in), optional, target | initial_guess, | ||
integer, intent(in), optional, target | max_niter, | ||
logical, intent(in), optional, target | save_state, | ||
logical, intent(out), optional, target | converged, | ||
integer, intent(out), optional, target | niter, | ||
real(8), intent(out), optional, target | rho_min, | ||
integer, intent(out), optional, target | error_code | ||
) |
Find the ground state.
[in] | gs_handler | Handler of the ground state. |
[in] | density_tol | Tolerance on RMS in density. |
[in] | energy_tol | Tolerance in total energy difference. |
[in] | iter_solver_tol | Initial tolerance of the iterative solver. |
[in] | initial_guess | Boolean variable indicating if we want to start from the initial guess or from previous state. |
[in] | max_niter | Maximum number of SCF iterations. |
[in] | save_state | Boolean variable indicating if we want to save the ground state. |
[out] | converged | Boolean variable indicating if the calculation has converged |
[out] | niter | Actual number of SCF iterations. |
[out] | rho_min | Minimum value of density on the real-space grid. If negative, total energy can't be trusted. Valid only if SCF calculation is converged. |
[out] | error_code | Error code. |
Definition at line 1829 of file sirius.f90.
subroutine sirius::sirius_check_scf_density | ( | type(sirius_ground_state_handler), intent(in), target | gs_handler, |
integer, intent(out), optional, target | error_code | ||
) |
Check the self-consistent density.
[in] | gs_handler | Handler of the ground state. |
[out] | error_code | Error code |
Definition at line 1939 of file sirius.f90.
subroutine sirius::sirius_update_ground_state | ( | type(sirius_ground_state_handler), intent(in), target | gs_handler, |
integer, intent(out), optional, target | error_code | ||
) |
Update a ground state object after change of atomic coordinates or lattice vectors.
[in] | gs_handler | Ground-state handler. |
[out] | error_code | Error code |
Definition at line 1970 of file sirius.f90.
subroutine sirius::sirius_add_atom_type | ( | type(sirius_context_handler), intent(in), target | handler, |
character(*), intent(in), target | label, | ||
character(*), intent(in), optional, target | fname, | ||
integer, intent(in), optional, target | zn, | ||
character(*), intent(in), optional, target | symbol, | ||
real(8), intent(in), optional, target | mass, | ||
logical, intent(in), optional, target | spin_orbit, | ||
integer, intent(out), optional, target | error_code | ||
) |
Add new atom type to the unit cell.
[in] | handler | Simulation context handler. |
[in] | label | Atom type unique label. |
[in] | fname | Species file name (in JSON format). |
[in] | zn | Nucleus charge. |
[in] | symbol | Atomic symbol. |
[in] | mass | Atomic mass. |
[in] | spin_orbit | True if spin-orbit correction is enabled for this atom type. |
[out] | error_code | Error code. |
Definition at line 2007 of file sirius.f90.
subroutine sirius::sirius_set_atom_type_radial_grid | ( | type(sirius_context_handler), intent(in), target | handler, |
character(*), intent(in), target | label, | ||
integer, intent(in), target | num_radial_points, | ||
real(8), dimension(num_radial_points), intent(in), target | radial_points, | ||
integer, intent(out), optional, target | error_code | ||
) |
Set radial grid of the atom type.
[in] | handler | Simulation context handler. |
[in] | label | Atom type label. |
[in] | num_radial_points | Number of radial grid points. |
[in] | radial_points | List of radial grid points. |
[out] | error_code | Error code. |
Definition at line 2103 of file sirius.f90.
subroutine sirius::sirius_set_atom_type_radial_grid_inf | ( | type(sirius_context_handler), intent(in), target | handler, |
character(*), intent(in), target | label, | ||
integer, intent(in), target | num_radial_points, | ||
real(8), dimension(num_radial_points), intent(in), target | radial_points, | ||
integer, intent(out), optional, target | error_code | ||
) |
Set radial grid of the free atom (up to effectice infinity).
[in] | handler | Simulation context handler. |
[in] | label | Atom type label. |
[in] | num_radial_points | Number of radial grid points. |
[in] | radial_points | List of radial grid points. |
[out] | error_code | Error code. |
Definition at line 2159 of file sirius.f90.
subroutine sirius::sirius_add_atom_type_radial_function | ( | type(sirius_context_handler), intent(in), target | handler, |
character(*), intent(in), target | atom_type, | ||
character(*), intent(in), target | label, | ||
real(8), dimension(num_points), intent(in), target | rf, | ||
integer, intent(in), target | num_points, | ||
integer, intent(in), optional, target | n, | ||
integer, intent(in), optional, target | l, | ||
integer, intent(in), optional, target | idxrf1, | ||
integer, intent(in), optional, target | idxrf2, | ||
real(8), intent(in), optional, target | occ, | ||
integer, intent(out), optional, target | error_code | ||
) |
Add one of the radial functions.
[in] | handler | Simulation context handler. |
[in] | atom_type | Label of the atom type. |
[in] | label | Label of the radial function. |
[in] | rf | Array with radial function values. |
[in] | num_points | Length of radial function array. |
[in] | n | Orbital quantum number. |
[in] | l | angular momentum. |
[in] | idxrf1 | First index of radial function (for Q-operator). Indices start from 1. |
[in] | idxrf2 | Second index of radial function (for Q-operator). Indices start form 1. |
[in] | occ | Occupancy of the wave-function. |
[out] | error_code | Error code. |
Definition at line 2221 of file sirius.f90.
subroutine sirius::sirius_set_atom_type_hubbard | ( | type(sirius_context_handler), intent(in), target | handler, |
character(*), intent(in), target | label, | ||
integer, intent(in), target | l, | ||
integer, intent(in), target | n, | ||
real(8), intent(in), target | occ, | ||
real(8), intent(in), target | U, | ||
real(8), intent(in), target | J, | ||
real(8), intent(in), target | alpha, | ||
real(8), intent(in), target | beta, | ||
real(8), intent(in), target | J0, | ||
integer, intent(out), optional, target | error_code | ||
) |
Set the hubbard correction for the atomic type.
[in] | handler | Simulation context handler. |
[in] | label | Atom type label. |
[in] | l | Orbital quantum number. |
[in] | n | principal quantum number (s, p, d, f) |
[in] | occ | Atomic shell occupancy. |
[in] | U | Hubbard U parameter. |
[in] | J | Exchange J parameter for the full interaction treatment. |
[in] | alpha | J_alpha for the simple interaction treatment. |
[in] | beta | J_beta for the simple interaction treatment. |
[in] | J0 | J0 for the simple interaction treatment. |
[out] | error_code | Error code. |
Definition at line 2327 of file sirius.f90.
subroutine sirius::sirius_set_atom_type_dion | ( | type(sirius_context_handler), intent(in), target | handler, |
character(*), intent(in), target | label, | ||
integer, intent(in), target | num_beta, | ||
real(8), dimension(num_beta, num_beta), intent(in), target | dion, | ||
integer, intent(out), optional, target | error_code | ||
) |
Set ionic part of D-operator matrix.
[in] | handler | Simulation context handler. |
[in] | label | Atom type label. |
[in] | num_beta | Number of beta-projectors. |
[in] | dion | Ionic part of D-operator matrix. |
[out] | error_code | Error code. |
Definition at line 2413 of file sirius.f90.
subroutine sirius::sirius_set_atom_type_paw | ( | type(sirius_context_handler), intent(in), target | handler, |
character(*), intent(in), target | label, | ||
real(8), intent(in), target | core_energy, | ||
real(8), dimension(num_occ), intent(in), target | occupations, | ||
integer, intent(in), target | num_occ, | ||
integer, intent(out), optional, target | error_code | ||
) |
Set PAW related data.
[in] | handler | Simulation context handler. |
[in] | label | Atom type label. |
[in] | core_energy | Core-electrons energy contribution. |
[in] | occupations | array of orbital occupancies |
[in] | num_occ | size of the occupations array |
[out] | error_code | Error code. |
Definition at line 2467 of file sirius.f90.
subroutine sirius::sirius_add_atom | ( | type(sirius_context_handler), intent(in), target | handler, |
character(*), intent(in), target | label, | ||
real(8), dimension(3), intent(in), target | position, | ||
real(8), dimension(3), intent(in), optional, target | vector_field, | ||
integer, intent(out), optional, target | error_code | ||
) |
Add atom to the unit cell.
[in] | handler | Simulation context handler. |
[in] | label | Atom type label. |
[in] | position | Atom position in lattice coordinates. |
[in] | vector_field | Starting magnetization. |
[out] | error_code | Error code. |
Definition at line 2528 of file sirius.f90.
subroutine sirius::sirius_set_atom_position | ( | type(sirius_context_handler), intent(in), target | handler, |
integer, intent(in), target | ia, | ||
real(8), dimension(3), intent(in), target | position, | ||
integer, intent(out), optional, target | error_code | ||
) |
Set new atomic position.
[in] | handler | Simulation context handler. |
[in] | ia | Index of atom; index starts form 1 |
[in] | position | Atom position in lattice coordinates. |
[out] | error_code | Error code. |
Definition at line 2582 of file sirius.f90.
subroutine sirius::sirius_set_pw_coeffs | ( | type(sirius_ground_state_handler), intent(in), target | handler, |
character(*), intent(in), target | label, | ||
complex(8), dimension(:), intent(in), target | pw_coeffs, | ||
logical, intent(in), optional, target | transform_to_rg, | ||
integer, intent(in), optional, target | ngv, | ||
integer, dimension(:,:), intent(in), optional, target | gvl, | ||
integer, intent(in), optional, target | comm, | ||
integer, intent(out), optional, target | error_code | ||
) |
Set plane-wave coefficients of a periodic function.
[in] | handler | Ground state handler. |
[in] | label | Label of the function. |
[in] | pw_coeffs | Local array of plane-wave coefficients. |
[in] | transform_to_rg | True if function has to be transformed to real-space grid. |
[in] | ngv | Local number of G-vectors. |
[in] | gvl | List of G-vectors in lattice coordinates (Miller indices). |
[in] | comm | MPI communicator used in distribution of G-vectors |
[out] | error_code | Error code. |
Definition at line 2629 of file sirius.f90.
subroutine sirius::sirius_get_pw_coeffs | ( | type(sirius_ground_state_handler), intent(in), target | handler, |
character(*), intent(in), target | label, | ||
complex(8), dimension(:), intent(in), target | pw_coeffs, | ||
integer, intent(in), optional, target | ngv, | ||
integer, dimension(:,:), intent(in), optional, target | gvl, | ||
integer, intent(in), optional, target | comm, | ||
integer, intent(out), optional, target | error_code | ||
) |
Get plane-wave coefficients of a periodic function.
[in] | handler | Ground state handler. |
[in] | label | Label of the function. |
[in] | pw_coeffs | Local array of plane-wave coefficients. |
[in] | ngv | Local number of G-vectors. |
[in] | gvl | List of G-vectors in lattice coordinates (Miller indices). |
[in] | comm | MPI communicator used in distribution of G-vectors |
[out] | error_code | Error code. |
Definition at line 2714 of file sirius.f90.
subroutine sirius::sirius_initialize_subspace | ( | type(sirius_ground_state_handler), intent(in), target | gs_handler, |
type(sirius_kpoint_set_handler), intent(in), target | ks_handler, | ||
integer, intent(out), optional, target | error_code | ||
) |
Initialize the subspace of wave-functions.
[in] | gs_handler | Ground state handler. |
[in] | ks_handler | K-point set handler. |
[out] | error_code | Error code. |
Definition at line 2782 of file sirius.f90.
subroutine sirius::sirius_find_eigen_states | ( | type(sirius_ground_state_handler), intent(in), target | gs_handler, |
type(sirius_kpoint_set_handler), intent(in), target | ks_handler, | ||
logical, intent(in), optional, target | precompute_pw, | ||
logical, intent(in), optional, target | precompute_rf, | ||
logical, intent(in), optional, target | precompute_ri, | ||
real(8), intent(in), optional, target | iter_solver_tol, | ||
integer, intent(out), optional, target | error_code | ||
) |
Find eigen-states of the Hamiltonian.
[in] | gs_handler | Ground state handler. |
[in] | ks_handler | K-point set handler. |
[in] | precompute_pw | Generate plane-wave coefficients of the potential |
[in] | precompute_rf | Generate radial functions |
[in] | precompute_ri | Generate radial integrals |
[in] | iter_solver_tol | Iterative solver tolerance. |
[out] | error_code | Error code. |
Definition at line 2823 of file sirius.f90.
subroutine sirius::sirius_generate_initial_density | ( | type(sirius_ground_state_handler), intent(in), target | handler, |
integer, intent(out), optional, target | error_code | ||
) |
Generate initial density.
[in] | handler | Ground state handler. |
[out] | error_code | Error code. |
Definition at line 2902 of file sirius.f90.
subroutine sirius::sirius_generate_effective_potential | ( | type(sirius_ground_state_handler), intent(in), target | handler, |
integer, intent(out), optional, target | error_code | ||
) |
Generate effective potential and magnetic field.
[in] | handler | Ground state handler. |
[out] | error_code | Error code. |
Definition at line 2933 of file sirius.f90.
subroutine sirius::sirius_generate_density | ( | type(sirius_ground_state_handler), intent(in), target | gs_handler, |
logical, intent(in), optional, target | add_core, | ||
logical, intent(in), optional, target | transform_to_rg, | ||
logical, intent(in), optional, target | paw_only, | ||
integer, intent(out), optional, target | error_code | ||
) |
Generate charge density and magnetization.
[in] | gs_handler | Ground state handler. |
[in] | add_core | Add core charge density in the muffin-tins. |
[in] | transform_to_rg | If true, density and magnetization are transformed to real-space grid. |
[in] | paw_only | it true, only local PAW density is generated |
[out] | error_code | Error code. |
Definition at line 2967 of file sirius.f90.
subroutine sirius::sirius_set_band_occupancies | ( | type(sirius_kpoint_set_handler), intent(in), target | ks_handler, |
integer, intent(in), target | ik, | ||
integer, intent(in), target | ispn, | ||
real(8), dimension(:), intent(in), target | band_occupancies, | ||
integer, intent(out), optional, target | error_code | ||
) |
Set band occupancies.
[in] | ks_handler | K-point set handler. |
[in] | ik | Global index of k-point. |
[in] | ispn | Spin component index. |
[in] | band_occupancies | Array of band occupancies. |
[out] | error_code | Error code. |
Definition at line 3037 of file sirius.f90.
subroutine sirius::sirius_get_band_occupancies | ( | type(sirius_kpoint_set_handler), intent(in), target | ks_handler, |
integer, intent(in), target | ik, | ||
integer, intent(in), target | ispn, | ||
real(8), dimension(:), intent(out), target | band_occupancies, | ||
integer, intent(out), optional, target | error_code | ||
) |
Set band occupancies.
[in] | ks_handler | K-point set handler. |
[in] | ik | Global index of k-point. |
[in] | ispn | Spin component. |
[out] | band_occupancies | Array of band occupancies. |
[out] | error_code | Error code. |
Definition at line 3087 of file sirius.f90.
subroutine sirius::sirius_get_band_energies | ( | type(sirius_kpoint_set_handler), intent(in), target | ks_handler, |
integer, intent(in), target | ik, | ||
integer, intent(in), target | ispn, | ||
real(8), dimension(:), intent(out), target | band_energies, | ||
integer, intent(out), optional, target | error_code | ||
) |
Get band energies.
[in] | ks_handler | K-point set handler. |
[in] | ik | Global index of k-point. |
[in] | ispn | Spin component. |
[out] | band_energies | Array of band energies. |
[out] | error_code | Error code. |
Definition at line 3137 of file sirius.f90.
subroutine sirius::sirius_get_energy | ( | type(sirius_ground_state_handler), intent(in), target | handler, |
character(*), intent(in), target | label, | ||
real(8), intent(out), target | energy, | ||
integer, intent(out), optional, target | error_code | ||
) |
Get one of the total energy components.
[in] | handler | DFT ground state handler. |
[in] | label | Label of the energy component to get. |
[out] | energy | Total energy component. |
[out] | error_code | Error code. |
Definition at line 3186 of file sirius.f90.
subroutine sirius::sirius_get_forces | ( | type(sirius_ground_state_handler), intent(in), target | handler, |
character(*), intent(in), target | label, | ||
real(8), dimension(:,:), intent(out), target | forces, | ||
integer, intent(out), optional, target | error_code | ||
) |
Get one of the total force components.
[in] | handler | DFT ground state handler. |
[in] | label | Label of the force component to get. |
[out] | forces | Total force component for each atom. |
[out] | error_code | Error code. |
Definition at line 3233 of file sirius.f90.
subroutine sirius::sirius_get_stress_tensor | ( | type(sirius_ground_state_handler), intent(in), target | handler, |
character(*), intent(in), target | label, | ||
real(8), dimension(3, 3), intent(out), target | stress_tensor, | ||
integer, intent(out), optional, target | error_code | ||
) |
Get one of the stress tensor components.
[in] | handler | DFT ground state handler. |
[in] | label | Label of the stress tensor component to get. |
[out] | stress_tensor | Component of the total stress tensor. |
[out] | error_code | Error code. |
Definition at line 3280 of file sirius.f90.
subroutine sirius::sirius_get_num_beta_projectors | ( | type(sirius_context_handler), intent(in), target | handler, |
character(*), intent(in), target | label, | ||
integer, intent(out), target | num_bp, | ||
integer, intent(out), optional, target | error_code | ||
) |
Get the number of beta-projectors for an atom type.
[in] | handler | Simulation context handler. |
[in] | label | Atom type label. |
[out] | num_bp | Number of beta projectors for each atom type. |
[out] | error_code | Error code. |
Definition at line 3327 of file sirius.f90.
subroutine sirius::sirius_get_wave_functions | ( | type(sirius_kpoint_set_handler), intent(in), target | ks_handler, |
real(8), dimension(3), intent(in), optional, target | vkl, | ||
integer, intent(in), optional, target | spin, | ||
integer, intent(in), optional, target | num_gvec_loc, | ||
integer, dimension(:,:), intent(in), optional, target | gvec_loc, | ||
complex(8), dimension(:,:), intent(out), optional, target | evec, | ||
integer, intent(in), optional, target | ld, | ||
integer, intent(in), optional, target | num_spin_comp, | ||
integer, intent(out), optional, target | error_code | ||
) |
Get wave-functions.
[in] | ks_handler | K-point set handler. |
[in] | vkl | Latttice coordinates of the k-point. |
[in] | spin | Spin index in case of collinear magnetism. |
[in] | num_gvec_loc | Local number of G-vectors for a k-point. |
[in] | gvec_loc | List of G-vectors. |
[out] | evec | Wave-functions. |
[in] | ld | Leading dimension of evec array. |
[in] | num_spin_comp | Number of spin components. |
[out] | error_code | Error code |
Definition at line 3379 of file sirius.f90.
subroutine sirius::sirius_add_atom_type_aw_descriptor | ( | type(sirius_context_handler), intent(in), target | handler, |
character(*), intent(in), target | label, | ||
integer, intent(in), target | n, | ||
integer, intent(in), target | l, | ||
real(8), intent(in), target | enu, | ||
integer, intent(in), target | dme, | ||
logical, intent(in), target | auto_enu, | ||
integer, intent(out), optional, target | error_code | ||
) |
Add descriptor of the augmented wave radial function.
[in] | handler | Simulation context handler. |
[in] | label | Atom type label. |
[in] | n | Principal quantum number. |
[in] | l | Orbital quantum number. |
[in] | enu | Linearization energy. |
[in] | dme | Order of energy derivative. |
[in] | auto_enu | True if automatic search of linearization energy is allowed for this radial solution. |
[out] | error_code | Error code |
Definition at line 3468 of file sirius.f90.
subroutine sirius::sirius_add_atom_type_lo_descriptor | ( | type(sirius_context_handler), intent(in), target | handler, |
character(*), intent(in), target | label, | ||
integer, intent(in), target | ilo, | ||
integer, intent(in), target | n, | ||
integer, intent(in), target | l, | ||
real(8), intent(in), target | enu, | ||
integer, intent(in), target | dme, | ||
logical, intent(in), target | auto_enu, | ||
integer, intent(out), optional, target | error_code | ||
) |
Add descriptor of the local orbital radial function.
[in] | handler | Simulation context handler. |
[in] | label | Atom type label. |
[in] | ilo | Index of the local orbital to which the descriptor is added. |
[in] | n | Principal quantum number. |
[in] | l | Orbital quantum number. |
[in] | enu | Linearization energy. |
[in] | dme | Order of energy derivative. |
[in] | auto_enu | True if automatic search of linearization energy is allowed for this radial solution. |
[out] | error_code | Error code |
Definition at line 3545 of file sirius.f90.
subroutine sirius::sirius_set_atom_type_configuration | ( | type(sirius_context_handler), intent(in), target | handler, |
character(*), intent(in), target | label, | ||
integer, intent(in), target | n, | ||
integer, intent(in), target | l, | ||
integer, intent(in), target | k, | ||
real(8), intent(in), target | occupancy, | ||
logical, intent(in), target | core, | ||
integer, intent(out), optional, target | error_code | ||
) |
Set configuration of atomic levels.
[in] | handler | Simulation context handler. |
[in] | label | Atom type label. |
[in] | n | Principal quantum number. |
[in] | l | Orbital quantum number. |
[in] | k | kappa (used in relativistic solver). |
[in] | occupancy | Level occupancy. |
[in] | core | Tru if this is a core state. |
[out] | error_code | Error code |
Definition at line 3626 of file sirius.f90.
subroutine sirius::sirius_generate_coulomb_potential | ( | type(sirius_ground_state_handler), intent(in), target | handler, |
real(8), dimension(:), intent(out), optional, target | vh_el, | ||
integer, intent(out), optional, target | error_code | ||
) |
Generate Coulomb potential by solving Poisson equation.
[in] | handler | DFT ground state handler |
[out] | vh_el | Electronic part of Hartree potential at each atom's origin. |
[out] | error_code | Error code |
Definition at line 3697 of file sirius.f90.
subroutine sirius::sirius_generate_xc_potential | ( | type(sirius_ground_state_handler), intent(in), target | handler, |
integer, intent(out), optional, target | error_code | ||
) |
Generate XC potential using LibXC.
[in] | handler | Ground state handler |
[out] | error_code | Error code |
Definition at line 3735 of file sirius.f90.
subroutine sirius::sirius_get_kpoint_inter_comm | ( | type(sirius_context_handler), intent(in), target | handler, |
integer, intent(out), target | fcomm, | ||
integer, intent(out), optional, target | error_code | ||
) |
Get communicator which is used to split k-points.
[in] | handler | Simulation context handler |
[out] | fcomm | Fortran communicator |
[out] | error_code | Error code |
Definition at line 3767 of file sirius.f90.
subroutine sirius::sirius_get_kpoint_inner_comm | ( | type(sirius_context_handler), intent(in), target | handler, |
integer, intent(out), target | fcomm, | ||
integer, intent(out), optional, target | error_code | ||
) |
Get communicator which is used to parallise band problem.
[in] | handler | Simulation context handler |
[out] | fcomm | Fortran communicator |
[out] | error_code | Error code |
Definition at line 3804 of file sirius.f90.
subroutine sirius::sirius_get_fft_comm | ( | type(sirius_context_handler), intent(in), target | handler, |
integer, intent(out), target | fcomm, | ||
integer, intent(out), optional, target | error_code | ||
) |
Get communicator which is used to parallise FFT.
[in] | handler | Simulation context handler |
[out] | fcomm | Fortran communicator |
[out] | error_code | Error code |
Definition at line 3841 of file sirius.f90.
subroutine sirius::sirius_get_num_gvec | ( | type(sirius_context_handler), intent(in), target | handler, |
integer, intent(out), target | num_gvec, | ||
integer, intent(out), optional, target | error_code | ||
) |
Get total number of G-vectors on the fine grid.
[in] | handler | Simulation context handler |
[out] | num_gvec | Total number of G-vectors |
[out] | error_code | Error code |
Definition at line 3878 of file sirius.f90.
subroutine sirius::sirius_get_gvec_arrays | ( | type(sirius_context_handler), intent(in), target | handler, |
integer, dimension(:,:), intent(in), optional, target | gvec, | ||
real(8), dimension(:,:), intent(in), optional, target | gvec_cart, | ||
real(8), dimension(:), intent(in), optional, target | gvec_len, | ||
integer, dimension(:,:,:), intent(in), optional, target | index_by_gvec, | ||
integer, intent(out), optional, target | error_code | ||
) |
Get G-vector arrays.
[in] | handler | Simulation context handler |
[in] | gvec | G-vectors in lattice coordinates. |
[in] | gvec_cart | G-vectors in Cartesian coordinates. |
[in] | gvec_len | Length of G-vectors. |
[in] | index_by_gvec | G-vector index by lattice coordinates. |
[out] | error_code | Error code |
Definition at line 3918 of file sirius.f90.
subroutine sirius::sirius_get_num_fft_grid_points | ( | type(sirius_context_handler), intent(in), target | handler, |
integer, intent(out), target | num_fft_grid_points, | ||
integer, intent(out), optional, target | error_code | ||
) |
Get local number of FFT grid points.
[in] | handler | Simulation context handler |
[out] | num_fft_grid_points | Local number of FFT grid points in the real-space mesh. |
[out] | error_code | Error code. |
Definition at line 3981 of file sirius.f90.
subroutine sirius::sirius_get_fft_index | ( | type(sirius_context_handler), intent(in), target | handler, |
integer, dimension(:), intent(out), target | fft_index, | ||
integer, intent(out), optional, target | error_code | ||
) |
Get mapping between G-vector index and FFT index.
[in] | handler | Simulation context handler |
[out] | fft_index | Index inside FFT buffer |
[out] | error_code | Error code. |
Definition at line 4018 of file sirius.f90.
subroutine sirius::sirius_get_max_num_gkvec | ( | type(sirius_kpoint_set_handler), intent(in), target | ks_handler, |
integer, intent(out), target | max_num_gkvec, | ||
integer, intent(out), optional, target | error_code | ||
) |
Get maximum number of G+k vectors across all k-points in the set.
[in] | ks_handler | K-point set handler. |
[out] | max_num_gkvec | Maximum number of G+k vectors |
[out] | error_code | Error code. |
Definition at line 4055 of file sirius.f90.
subroutine sirius::sirius_get_gkvec_arrays | ( | type(sirius_kpoint_set_handler), intent(in), target | ks_handler, |
integer, intent(in), target | ik, | ||
integer, intent(out), target | num_gkvec, | ||
integer, dimension(:), intent(out), target | gvec_index, | ||
real(8), dimension(:,:), intent(out), target | gkvec, | ||
real(8), dimension(:,:), intent(out), target | gkvec_cart, | ||
real(8), dimension(:), intent(out), target | gkvec_len, | ||
real(8), dimension(:,:), intent(out), target | gkvec_tp, | ||
integer, intent(out), optional, target | error_code | ||
) |
Get all G+k vector related arrays.
[in] | ks_handler | K-point set handler. |
[in] | ik | Global index of k-point |
[out] | num_gkvec | Number of G+k vectors. |
[out] | gvec_index | Index of the G-vector part of G+k vector. |
[out] | gkvec | G+k vectors in fractional coordinates. |
[out] | gkvec_cart | G+k vectors in Cartesian coordinates. |
[out] | gkvec_len | Length of G+k vectors. |
[out] | gkvec_tp | Theta and Phi angles of G+k vectors. |
[out] | error_code | Error code. |
Definition at line 4098 of file sirius.f90.
subroutine sirius::sirius_get_step_function | ( | type(sirius_context_handler), intent(in), target | handler, |
complex(8), dimension(:), intent(out), target | cfunig, | ||
real(8), dimension(:), intent(out), target | cfunrg, | ||
integer, intent(in), target | num_rg_points, | ||
integer, intent(out), optional, target | error_code | ||
) |
Get the unit-step function.
[in] | handler | Simulation context handler |
[out] | cfunig | Plane-wave coefficients of step function. |
[out] | cfunrg | Values of the step function on the regular grid. |
[in] | num_rg_points | Number of real-space points. |
[out] | error_code | Error code. |
Definition at line 4170 of file sirius.f90.
subroutine sirius::sirius_set_h_radial_integrals | ( | type(sirius_context_handler), intent(in), target | handler, |
integer, intent(in), target | ia, | ||
integer, intent(in), target | lmmax, | ||
real(8), intent(in), target | val, | ||
integer, intent(in), optional, target | l1, | ||
integer, intent(in), optional, target | o1, | ||
integer, intent(in), optional, target | ilo1, | ||
integer, intent(in), optional, target | l2, | ||
integer, intent(in), optional, target | o2, | ||
integer, intent(in), optional, target | ilo2, | ||
integer, intent(out), optional, target | error_code | ||
) |
Set LAPW Hamiltonian radial integrals.
[in] | handler | Simulation context handler. |
[in] | ia | Index of atom. |
[in] | lmmax | Number of lm-component of the potential. |
[in] | val | Values of the radial integrals. |
[in] | l1 | 1st index of orbital quantum number. |
[in] | o1 | 1st index of radial function order for l1. |
[in] | ilo1 | 1st index or local orbital. |
[in] | l2 | 2nd index of orbital quantum number. |
[in] | o2 | 2nd index of radial function order for l2. |
[in] | ilo2 | 2nd index or local orbital. |
[out] | error_code | Error code. |
Definition at line 4226 of file sirius.f90.
subroutine sirius::sirius_set_o_radial_integral | ( | type(sirius_context_handler), intent(in), target | handler, |
integer, intent(in), target | ia, | ||
real(8), intent(in), target | val, | ||
integer, intent(in), target | l, | ||
integer, intent(in), optional, target | o1, | ||
integer, intent(in), optional, target | ilo1, | ||
integer, intent(in), optional, target | o2, | ||
integer, intent(in), optional, target | ilo2, | ||
integer, intent(out), optional, target | error_code | ||
) |
Set LAPW overlap radial integral.
[in] | handler | Simulation context handler. |
[in] | ia | Index of atom. |
[in] | val | Value of the radial integral. |
[in] | l | Orbital quantum number. |
[in] | o1 | 1st index of radial function order. |
[in] | ilo1 | 1st index or local orbital. |
[in] | o2 | 2nd index of radial function order. |
[in] | ilo2 | 2nd index or local orbital. |
[out] | error_code | Error code. |
Definition at line 4324 of file sirius.f90.
subroutine sirius::sirius_set_o1_radial_integral | ( | type(sirius_context_handler), intent(in), target | handler, |
integer, intent(in), target | ia, | ||
real(8), intent(in), target | val, | ||
integer, intent(in), optional, target | l1, | ||
integer, intent(in), optional, target | o1, | ||
integer, intent(in), optional, target | ilo1, | ||
integer, intent(in), optional, target | l2, | ||
integer, intent(in), optional, target | o2, | ||
integer, intent(in), optional, target | ilo2, | ||
integer, intent(out), optional, target | error_code | ||
) |
Set a correction to LAPW overlap radial integral.
[in] | handler | Simulation context handler. |
[in] | ia | Index of atom. |
[in] | val | Value of the radial integral. |
[in] | l1 | 1st index of orbital quantum number. |
[in] | o1 | 1st index of radial function order for l1. |
[in] | ilo1 | 1st index or local orbital. |
[in] | l2 | 2nd index of orbital quantum number. |
[in] | o2 | 2nd index of radial function order for l2. |
[in] | ilo2 | 2nd index or local orbital. |
[out] | error_code | Error code. |
Definition at line 4407 of file sirius.f90.
subroutine sirius::sirius_set_radial_function | ( | type(sirius_context_handler), intent(in), target | handler, |
integer, intent(in), target | ia, | ||
integer, intent(in), target | deriv_order, | ||
real(8), dimension(:), intent(in), target | f, | ||
integer, intent(in), optional, target | l, | ||
integer, intent(in), optional, target | o, | ||
integer, intent(in), optional, target | ilo, | ||
integer, intent(out), optional, target | error_code | ||
) |
Set LAPW radial functions.
[in] | handler | Simulation context handler. |
[in] | ia | Index of atom. |
[in] | deriv_order | Radial derivative order. |
[in] | f | Values of the radial function. |
[in] | l | Orbital quantum number. |
[in] | o | Order of radial function for l. |
[in] | ilo | Local orbital index. |
[out] | error_code | Error code. |
Definition at line 4498 of file sirius.f90.
subroutine sirius::sirius_set_equivalent_atoms | ( | type(sirius_context_handler), intent(in), target | handler, |
integer, dimension(:), intent(in), target | equivalent_atoms, | ||
integer, intent(out), optional, target | error_code | ||
) |
Set equivalent atoms.
[in] | handler | Simulation context handler. |
[in] | equivalent_atoms | Array with equivalent atom IDs. |
[out] | error_code | Error code. |
Definition at line 4567 of file sirius.f90.
subroutine sirius::sirius_update_atomic_potential | ( | type(sirius_ground_state_handler), intent(in), target | handler, |
integer, intent(out), optional, target | error_code | ||
) |
Set the new spherical potential.
[in] | handler | Ground state handler. |
[out] | error_code | Error code. |
Definition at line 4603 of file sirius.f90.
subroutine sirius::sirius_option_get_number_of_sections | ( | integer, intent(out), target | length, |
integer, intent(out), optional, target | error_code | ||
) |
Return the total number of sections defined in the input JSON schema.
[out] | length | Number of sections. |
[out] | error_code | Error code. |
Definition at line 4634 of file sirius.f90.
subroutine sirius::sirius_option_get_section_name | ( | integer, intent(in), value | elem, |
character(*), intent(out), target | section_name, | ||
integer, intent(in), value | section_name_length, | ||
integer, intent(out), optional, target | error_code | ||
) |
Return the name of a given section.
[in] | elem | Index of the section (starting from 1). |
[out] | section_name | Name of the section |
[in] | section_name_length | Maximum length of the output string. Enough capacity should be provided. |
[out] | error_code | Error code. |
Definition at line 4667 of file sirius.f90.
subroutine sirius::sirius_option_get_section_length | ( | character(*), intent(in), target | section, |
integer, intent(out), target | length, | ||
integer, intent(out), optional, target | error_code | ||
) |
Return the number of options in a given section.
[in] | section | Name of the seciton. |
[out] | length | Number of options contained in the section. |
[out] | error_code | Error code. |
Definition at line 4710 of file sirius.f90.
subroutine sirius::sirius_option_get_info | ( | character(*), intent(in), target | section, |
integer, intent(in), value | elem, | ||
character(*), intent(out), target | key_name, | ||
integer, intent(in), value | key_name_len, | ||
integer, intent(out), target | type, | ||
integer, intent(out), target | length, | ||
integer, intent(out), target | enum_size, | ||
character(*), intent(out), target | title, | ||
integer, intent(in), value | title_len, | ||
character(*), intent(out), target | description, | ||
integer, intent(in), value | description_len, | ||
integer, intent(out), optional, target | error_code | ||
) |
Return information about the option.
[in] | section | Name of the section. |
[in] | elem | Index of the option (starting from 1) |
[out] | key_name | Name of the option. |
[in] | key_name_len | Maximum length for the string (on the caller side). No allocation is done. |
[out] | type | Type of the option (real, integer, boolean, string, or array of the same types). |
[out] | length | Length of the default value (1 for the scalar types, otherwise the lenght of the array). |
[out] | enum_size | Number of elements in the enum type, zero otherwise. |
[out] | title | Short description of the option (can be empty). |
[in] | title_len | Maximum length for the short description. |
[out] | description | Detailed description of the option (can be empty). |
[in] | description_len | Maximum length for the detailed description. |
[out] | error_code | Error code. |
Definition at line 4760 of file sirius.f90.
subroutine sirius::sirius_option_get | ( | character(*), intent(in), target | section, |
character(*), intent(in), target | name, | ||
integer, intent(in), target | type, | ||
type(c_ptr), intent(in), value | data_ptr, | ||
integer, intent(in), optional, target | max_length, | ||
integer, intent(in), optional, target | enum_idx, | ||
integer, intent(out), optional, target | error_code | ||
) |
Return the default value of the option as defined in the JSON schema.
[in] | section | Name of the section of interest. |
[in] | name | Name of the element |
[in] | type | Type of the option (real, integer, boolean) |
[in] | data_ptr | Output buffer for the default value or list of values. |
[in] | max_length | Maximum length of the buffer containing the default values. |
[in] | enum_idx | Index of the element in case of the enum type. |
[out] | error_code | Error code. |
Definition at line 4853 of file sirius.f90.
subroutine sirius::sirius_option_set | ( | type(sirius_context_handler), intent(in), target | handler, |
character(*), intent(in), target | section, | ||
character(*), intent(in), target | name, | ||
integer, intent(in), target | type, | ||
type(c_ptr), intent(in), value | data_ptr, | ||
integer, intent(in), optional, target | max_length, | ||
logical, intent(in), optional, target | append, | ||
integer, intent(out), optional, target | error_code | ||
) |
Set the value of the option name in a (internal) json dictionary.
[in] | handler | Simulation context handler. |
[in] | section | string containing the options in json format |
[in] | name | name of the element to pick |
[in] | type | Type of the option (real, integer, boolean) |
[in] | data_ptr | Buffer for the value or list of values. |
[in] | max_length | Maximum length of the buffer containing the default values. |
[in] | append | If true then value is appended to the list of values. |
[out] | error_code | Error code. |
Definition at line 4926 of file sirius.f90.
subroutine sirius::sirius_dump_runtime_setup | ( | type(sirius_context_handler), intent(in), target | handler, |
character(*), intent(in), target | filename, | ||
integer, intent(out), optional, target | error_code | ||
) |
Dump the runtime setup in a file.
[in] | handler | Simulation context handler. |
[in] | filename | String containing the name of the file. |
[out] | error_code | Error code |
Definition at line 5004 of file sirius.f90.
subroutine sirius::sirius_get_fv_eigen_vectors | ( | type(sirius_kpoint_set_handler), intent(in), target | handler, |
integer, intent(in), target | ik, | ||
complex(8), dimension(:,:), intent(out), target | fv_evec, | ||
integer, intent(in), target | ld, | ||
integer, intent(in), target | num_fv_states, | ||
integer, intent(out), optional, target | error_code | ||
) |
Get the first-variational eigen vectors.
[in] | handler | K-point set handler |
[in] | ik | Global index of the k-point |
[out] | fv_evec | Output first-variational eigenvector array |
[in] | ld | Leading dimension of fv_evec |
[in] | num_fv_states | Number of first-variational states |
[out] | error_code | Error code |
Definition at line 5048 of file sirius.f90.
subroutine sirius::sirius_get_fv_eigen_values | ( | type(sirius_kpoint_set_handler), intent(in), target | handler, |
integer, intent(in), target | ik, | ||
real(8), dimension(:), intent(out), target | fv_eval, | ||
integer, intent(in), target | num_fv_states, | ||
integer, intent(out), optional, target | error_code | ||
) |
Get the first-variational eigen values.
[in] | handler | K-point set handler |
[in] | ik | Global index of the k-point |
[out] | fv_eval | Output first-variational eigenvector array |
[in] | num_fv_states | Number of first-variational states |
[out] | error_code | Error code |
Definition at line 5103 of file sirius.f90.
subroutine sirius::sirius_get_sv_eigen_vectors | ( | type(sirius_kpoint_set_handler), intent(in), target | handler, |
integer, intent(in), target | ik, | ||
complex(8), dimension(:,:), intent(out), target | sv_evec, | ||
integer, intent(in), target | num_bands, | ||
integer, intent(out), optional, target | error_code | ||
) |
Get the second-variational eigen vectors.
[in] | handler | K-point set handler |
[in] | ik | Global index of the k-point |
[out] | sv_evec | Output second-variational eigenvector array |
[in] | num_bands | Number of second-variational bands. |
[out] | error_code | Error code |
Definition at line 5153 of file sirius.f90.
subroutine sirius::sirius_set_rg_values | ( | type(sirius_ground_state_handler), intent(in), target | handler, |
character(*), intent(in), target | label, | ||
integer, dimension(3), intent(in), target | grid_dims, | ||
integer, dimension(:,:), intent(in), target | local_box_origin, | ||
integer, dimension(:,:), intent(in), target | local_box_size, | ||
integer, intent(in), target | fcomm, | ||
real(8), intent(in), target | values, | ||
logical, intent(in), optional, target | transform_to_pw, | ||
integer, intent(out), optional, target | error_code | ||
) |
Set the values of the function on the regular grid.
[in] | handler | DFT ground state handler. |
[in] | label | Label of the function. |
[in] | grid_dims | Dimensions of the FFT grid. |
[in] | local_box_origin | Coordinates of the local box origin for each MPI rank |
[in] | local_box_size | Dimensions of the local box for each MPI rank. |
[in] | fcomm | Fortran communicator used to partition FFT grid into local boxes. |
[in] | values | Values of the function (local buffer for each MPI rank). |
[in] | transform_to_pw | If true, transform function to PW domain. |
[out] | error_code | Error code |
Definition at line 5207 of file sirius.f90.
subroutine sirius::sirius_get_rg_values | ( | type(sirius_ground_state_handler), intent(in), target | handler, |
character(*), intent(in), target | label, | ||
integer, dimension(3), intent(in), target | grid_dims, | ||
integer, dimension(:,:), intent(in), target | local_box_origin, | ||
integer, dimension(:,:), intent(in), target | local_box_size, | ||
integer, intent(in), target | fcomm, | ||
real(8), intent(out), target | values, | ||
logical, intent(in), optional, target | transform_to_rg, | ||
integer, intent(out), optional, target | error_code | ||
) |
Get the values of the function on the regular grid.
[in] | handler | DFT ground state handler. |
[in] | label | Label of the function. |
[in] | grid_dims | Dimensions of the FFT grid. |
[in] | local_box_origin | Coordinates of the local box origin for each MPI rank |
[in] | local_box_size | Dimensions of the local box for each MPI rank. |
[in] | fcomm | Fortran communicator used to partition FFT grid into local boxes. |
[out] | values | Values of the function (local buffer for each MPI rank). |
[in] | transform_to_rg | If true, transform function to regular grid before fetching the values. |
[out] | error_code | Error code |
Definition at line 5293 of file sirius.f90.
subroutine sirius::sirius_get_total_magnetization | ( | type(sirius_ground_state_handler), intent(in), target | handler, |
real(8), intent(out), target | mag, | ||
integer, intent(out), optional, target | error_code | ||
) |
Get the total magnetization of the system.
[in] | handler | DFT ground state handler. |
[out] | mag | 3D magnetization vector (x,y,z components). |
[out] | error_code | Error code |
Definition at line 5373 of file sirius.f90.
subroutine sirius::sirius_get_num_kpoints | ( | type(sirius_kpoint_set_handler), intent(in), target | handler, |
integer, intent(out), target | num_kpoints, | ||
integer, intent(out), optional, target | error_code | ||
) |
Get the total number of kpoints.
[in] | handler | Kpoint set handler |
[out] | num_kpoints | number of kpoints in the set |
[out] | error_code | Error code. |
Definition at line 5410 of file sirius.f90.
subroutine sirius::sirius_get_kpoint_properties | ( | type(sirius_kpoint_set_handler), intent(in), target | handler, |
integer, intent(in), target | ik, | ||
real(8), intent(out), target | weight, | ||
real(8), intent(out), optional, target | coordinates, | ||
integer, intent(out), optional, target | error_code | ||
) |
Get the kpoint properties.
[in] | handler | Kpoint set handler |
[in] | ik | Index of the kpoint |
[out] | weight | Weight of the kpoint |
[out] | coordinates | Coordinates of the kpoint |
[out] | error_code | Error code. |
Definition at line 5449 of file sirius.f90.
subroutine sirius::sirius_set_callback_function | ( | type(sirius_context_handler), intent(in), target | handler, |
character(*), intent(in), target | label, | ||
type(c_funptr), intent(in), value | fptr, | ||
integer, intent(out), optional, target | error_code | ||
) |
Set callback function to compute various radial integrals.
[in] | handler | Simulation context handler. |
[in] | label | Lable of the callback function. |
[in] | fptr | Pointer to callback function. |
[out] | error_code | Error code. |
Definition at line 5500 of file sirius.f90.
subroutine sirius::sirius_nlcg | ( | type(sirius_ground_state_handler), intent(in), target | handler, |
type(sirius_kpoint_set_handler), intent(in), target | ks_handler, | ||
integer, intent(out), optional, target | error_code | ||
) |
Robust wave function optimizer.
[in] | handler | Ground state handler. |
[in] | ks_handler | K-point set handler. |
[out] | error_code | Error code. |
Definition at line 5543 of file sirius.f90.
subroutine sirius::sirius_nlcg_params | ( | type(sirius_ground_state_handler), intent(in), target | handler, |
type(sirius_kpoint_set_handler), intent(in), target | ks_handler, | ||
real(8), intent(in), target | temp, | ||
character(*), intent(in), target | smearing, | ||
real(8), intent(in), target | kappa, | ||
real(8), intent(in), target | tau, | ||
real(8), intent(in), target | tol, | ||
integer, intent(in), target | maxiter, | ||
integer, intent(in), target | restart, | ||
character(*), intent(in), target | processing_unit, | ||
logical, intent(out), target | converged, | ||
integer, intent(out), optional, target | error_code | ||
) |
Robust wave function optimizer.
[in] | handler | Ground state handler. |
[in] | ks_handler | K-point set handler. |
[in] | temp | Temperature in Kelvin |
[in] | smearing | smearing label |
[in] | kappa | pseudo-Hamiltonian scalar preconditioner |
[in] | tau | backtracking search reduction parameter |
[in] | tol | CG tolerance |
[in] | maxiter | CG maxiter |
[in] | restart | CG restart |
[in] | processing_unit | processing_unit = ["cpu"|"gpu"|"none"] |
[out] | converged | None |
[out] | error_code | Error code. |
Definition at line 5589 of file sirius.f90.
subroutine sirius::sirius_add_hubbard_atom_pair | ( | type(sirius_context_handler), intent(in), target | handler, |
integer, dimension(2), intent(in), target | atom_pair, | ||
integer, dimension(3), intent(in), target | translation, | ||
integer, dimension(2), intent(in), target | n, | ||
integer, dimension(2), intent(in), target | l, | ||
real(8), intent(in), target | coupling, | ||
integer, intent(out), optional, target | error_code | ||
) |
Add a non-local Hubbard interaction V for a pair of atoms.
[in] | handler | Simulation context handler. |
[in] | atom_pair | atom pair for the V term |
[in] | translation | translation vector between the two unit cells containing the atoms |
[in] | n | principal quantum number of the atomic levels involved in the V correction |
[in] | l | angular momentum of the atomic levels |
[in] | coupling | value of the V constant |
[out] | error_code | Error code. |
Definition at line 5688 of file sirius.f90.
subroutine sirius::sirius_create_h0 | ( | type(sirius_ground_state_handler), intent(in), target | handler, |
integer, intent(out), optional, target | error_code | ||
) |
Generate H0.
[in] | handler | Ground state handler. |
[out] | error_code | Error code |
Definition at line 5747 of file sirius.f90.
subroutine sirius::sirius_linear_solver | ( | type(sirius_ground_state_handler), intent(in), target | handler, |
real(8), dimension(3), intent(in), target | vkq, | ||
integer, intent(in), target | num_gvec_kq_loc, | ||
integer, dimension(3, num_gvec_kq_loc), intent(in), target | gvec_kq_loc, | ||
complex(8), dimension(ld, num_spin_comp), intent(inout), target | dpsi, | ||
complex(8), dimension(ld, num_spin_comp), intent(in), target | psi, | ||
real(8), dimension(*), intent(in), target | eigvals, | ||
complex(8), dimension(ld, num_spin_comp), intent(inout), target | dvpsi, | ||
integer, intent(in), target | ld, | ||
integer, intent(in), target | num_spin_comp, | ||
real(8), intent(in), target | alpha_pv, | ||
integer, intent(in), target | spin, | ||
integer, intent(in), target | nbnd_occ, | ||
real(8), intent(in), target | tol, | ||
integer, intent(out), target | niter, | ||
integer, intent(out), optional, target | error_code | ||
) |
Interface to linear solver.
[in] | handler | DFT ground state handler. |
[in] | vkq | K+q-point in lattice coordinates |
[in] | num_gvec_kq_loc | Local number of G-vectors for k+q-point |
[in] | gvec_kq_loc | Local list of G-vectors for k+q-point. |
[in,out] | dpsi | Left-hand side of the linear equation. |
[in] | psi | Unperturbed eigenvectors. |
[in] | eigvals | Unperturbed eigenvalues. |
[in,out] | dvpsi | Right-hand side of the linear equation (dV * psi) |
[in] | ld | Leading dimension of dpsi, psi, dvpsi. |
[in] | num_spin_comp | Number of spin components. |
[in] | alpha_pv | Constant for the projector. |
[in] | spin | Current spin channel. |
[in] | nbnd_occ | Number of occupied bands. |
[in] | tol | Tolerance for the unconverged residuals (residual L2-norm should be below this value). |
[out] | niter | Average number of iterations. |
[out] | error_code | Error code |
Definition at line 5792 of file sirius.f90.
subroutine sirius::sirius_generate_d_operator_matrix | ( | type(sirius_ground_state_handler), intent(in), target | handler, |
integer, intent(out), optional, target | error_code | ||
) |
Generate D-operator matrix.
[in] | handler | Ground state handler. |
[out] | error_code | Error code |
Definition at line 5897 of file sirius.f90.
subroutine sirius::sirius_save_state | ( | type(sirius_ground_state_handler), intent(in), target | gs_handler, |
character(*), intent(in), target | file_name, | ||
integer, intent(out), optional, target | error_code | ||
) |
Save DFT ground state (density and potential)
[in] | gs_handler | Ground-state handler. |
[in] | file_name | Name of the file that stores the saved data. |
[out] | error_code | Error code |
Definition at line 5929 of file sirius.f90.
subroutine sirius::sirius_load_state | ( | type(sirius_ground_state_handler), intent(in), target | handler, |
character(*), intent(in), target | file_name, | ||
integer, intent(out), optional, target | error_code | ||
) |
Save DFT ground state (density and potential)
[in] | handler | Ground-state handler. |
[in] | file_name | Name of the file that stores the saved data. |
[out] | error_code | Error code |
Definition at line 5970 of file sirius.f90.
subroutine sirius::sirius_set_density_matrix | ( | type(sirius_ground_state_handler), intent(in), target | handler, |
integer, intent(in), target | ia, | ||
complex(8), dimension(ld, ld, 3), intent(in), target | dm, | ||
integer, intent(in), target | ld, | ||
integer, intent(out), optional, target | error_code | ||
) |
Set density matrix.
[in] | handler | Ground-state handler. |
[in] | ia | Index of atom. |
[in] | dm | Input density matrix. |
[in] | ld | Leading dimension of the density matrix. |
[out] | error_code | Error code. |
Definition at line 6013 of file sirius.f90.
subroutine sirius::sirius_free_handler_ctx | ( | type(sirius_context_handler), intent(inout) | handler, |
integer, intent(out), optional, target | error_code | ||
) |
Definition at line 6056 of file sirius.f90.
subroutine sirius::sirius_free_handler_ks | ( | type(sirius_kpoint_set_handler), intent(inout) | handler, |
integer, intent(out), optional, target | error_code | ||
) |
Definition at line 6063 of file sirius.f90.
subroutine sirius::sirius_free_handler_dft | ( | type(sirius_ground_state_handler), intent(inout) | handler, |
integer, intent(out), optional, target | error_code | ||
) |
Definition at line 6070 of file sirius.f90.
void sirius::create_beta_gk_gpu | ( | int | num_atoms, |
int | num_gkvec, | ||
int const * | beta_desc, | ||
std::complex< float > const * | beta_gk_t, | ||
double const * | gkvec, | ||
double const * | atom_pos, | ||
std::complex< float > * | beta_gk | ||
) |
Definition at line 36 of file beta_projectors_base.cpp.
void sirius::create_beta_gk_gpu | ( | int | num_atoms, |
int | num_gkvec, | ||
int const * | beta_desc, | ||
std::complex< double > const * | beta_gk_t, | ||
double const * | gkvec, | ||
double const * | atom_pos, | ||
std::complex< double > * | beta_gk | ||
) |
Definition at line 43 of file beta_projectors_base.cpp.
std::enable_if_t< std::is_same< T, real_type< F > >::value, la::dmatrix< F > > sirius::inner_prod_beta | ( | spla::Context & | spla_ctx, |
sddk::memory_t | mem__, | ||
sddk::memory_t | host_mem__, | ||
bool | result_on_device, | ||
beta_projectors_coeffs_t< T > & | beta_coeffs__, | ||
wf::Wave_functions< T > const & | phi__, | ||
wf::spin_index | ispn__, | ||
wf::band_range | br__ | ||
) |
The following is matrix computed: <beta|phi>
F | Type of the resulting inner product matrix (float, double, complex<float> or complex<double>). |
T | precision type |
[in] | spla_ctx | Context of the SPLA library |
[in] | mem | Location of the input arrays (wfc and beta-projectors) |
[in] | host_mem | Host memory type for result allocation (pinned, non-pinned memory) |
[in] | result_on_device | Copy result to device if true |
[in] | beta_coeffs | Beta-projector coefficient array |
[in] | phi | Wave-function |
[in] | ispn | Spin index (wfc) |
[in] | br | Band range |
Definition at line 426 of file beta_projectors_base.hpp.
sddk::matrix< std::complex< T > > sirius::inner_beta | ( | const Beta_projectors_base< T > & | beta, |
const Simulation_context & | ctx | ||
) |
computes <beta|beta> and returns result on ctx.processing_unit_memory_t
Definition at line 446 of file beta_projectors_base.hpp.
sddk::matrix< std::complex< T > > sirius::inner_beta | ( | const Beta_projectors_base< T > & | beta, |
const Simulation_context & | ctx, | ||
Op && | op | ||
) |
inner product <beta|Op|beta>, return resulting dmatrix<complex> in ctx.processing_unit_memory_t
Definition at line 496 of file beta_projectors_base.hpp.
void sirius::print_memory_usage | ( | OUT && | out__, |
std::string | file_and_line__ = "" |
||
) |
Definition at line 53 of file simulation_context.hpp.
|
static |
Definition at line 36 of file simulation_parameters.cpp.
void sirius::compose_default_json | ( | nlohmann::json const & | schema__, |
nlohmann::json & | output__ | ||
) |
Compose JSON dictionary with default parameters based on input schema.
Traverse the JSON schema and add nodes with default parameters to the output dictionary. The nodes without default parameters are ignored. Still, user has a possibility to add the missing nodes later by providing a corresponding input JSON dictionary. See compose_json() function.
Definition at line 53 of file simulation_parameters.cpp.
void sirius::compose_json | ( | nlohmann::json const & | schema__, |
nlohmann::json const & | in__, | ||
nlohmann::json & | inout__ | ||
) |
Append the input dictionary to the existing dictionary.
Use JSON schema to traverse the existing dictionary and add on top the values from the input dictionary. In this way we can add missing nodes which were not defined in the existing dictionary.
Definition at line 78 of file simulation_parameters.cpp.
nlohmann::json const & sirius::get_options_dictionary | ( | ) |
Get all possible options for initializing sirius. It is a json dictionary.
Definition at line 136 of file simulation_parameters.cpp.
nlohmann::json const & sirius::get_section_options | ( | std::string const & | section__ | ) |
Get all possible options of a given input section. It is a json dictionary.
Definition at line 146 of file simulation_parameters.cpp.
|
inline |
Definition at line 179 of file cmd_args.hpp.
|
inline |
Definition at line 185 of file cmd_args.hpp.
|
inline |
Definition at line 185 of file cmd_args.hpp.
|
inline |
Definition at line 185 of file cmd_args.hpp.
|
inline |
Definition at line 30 of file math_tools.hpp.
|
inline |
Sign of the variable.
Definition at line 52 of file math_tools.hpp.
|
inline |
Checks if number is integer with a given tolerance.
Definition at line 59 of file math_tools.hpp.
|
inline |
Compute a factorial.
Definition at line 70 of file math_tools.hpp.
|
inline |
Definition at line 81 of file math_tools.hpp.
|
inline |
Definition at line 88 of file math_tools.hpp.
|
inline |
Simple hash function.
Example: std::printf("hash: %16llX\n", hash());
Definition at line 95 of file math_tools.hpp.
|
inline |
Simple random number generator.
Definition at line 105 of file math_tools.hpp.
|
inline |
Definition at line 123 of file math_tools.hpp.
|
inline |
Definition at line 129 of file math_tools.hpp.
|
inline |
Definition at line 129 of file math_tools.hpp.
|
inline |
Definition at line 141 of file math_tools.hpp.
|
inline |
Definition at line 141 of file math_tools.hpp.
auto sirius::abs_diff | ( | T | a, |
T | b | ||
) |
Definition at line 153 of file math_tools.hpp.
auto sirius::rel_diff | ( | T | a, |
T | b | ||
) |
Definition at line 159 of file math_tools.hpp.
|
inline |
Return complex conjugate of a number. For a real value this is the number itself.
Definition at line 165 of file math_tools.hpp.
|
inline |
Return complex conjugate of a number.
Definition at line 172 of file math_tools.hpp.
|
inline |
Definition at line 178 of file math_tools.hpp.
|
inline |
Definition at line 184 of file math_tools.hpp.
null_stream_t & sirius::null_stream | ( | ) |
Definition at line 29 of file ostream_tools.cpp.
|
inline |
Definition at line 48 of file ostream_tools.hpp.
|
inline |
Inject horisontal bar to ostream.
Definition at line 79 of file ostream_tools.hpp.
|
inline |
Inject floating point format to ostream.
Definition at line 109 of file ostream_tools.hpp.
|
inline |
Print std::vector to ostream.
Definition at line 120 of file ostream_tools.hpp.
|
inline |
Convert double to a string with a given precision.
Definition at line 136 of file ostream_tools.hpp.
|
inline |
Definition at line 167 of file ostream_tools.hpp.
|
inline |
Definition at line 173 of file ostream_tools.hpp.
|
inline |
Pack two indices into one for symmetric matrices.
Definition at line 31 of file packed_index.hpp.
|
inline |
Definition at line 35 of file serialize_mdarray.hpp.
|
inline |
Definition at line 55 of file serialize_mdarray.hpp.
void sirius::write_to_json_file | ( | sddk::mdarray< T, N > const & | a__, |
std::string const & | fname__ | ||
) |
Definition at line 76 of file serialize_mdarray.hpp.
|
inline |
Serialize a single element.
Definition at line 100 of file serializer.hpp.
|
inline |
Deserialize a single element.
Definition at line 107 of file serializer.hpp.
|
inline |
Serialize a vector.
Definition at line 114 of file serializer.hpp.
|
inline |
Deserialize a vector.
Definition at line 122 of file serializer.hpp.
void sirius::serialize | ( | serializer & | s__, |
sddk::mdarray< T, N > const & | array__ | ||
) |
Serialize multidimentional array.
Definition at line 132 of file serializer.hpp.
void sirius::deserialize | ( | serializer & | s__, |
sddk::mdarray< T, N > & | array__ | ||
) |
Deserialize multidimentional array.
Definition at line 147 of file serializer.hpp.
|
inline |
Serialize block data descriptor.
Definition at line 167 of file serializer.hpp.
|
inline |
Deserialize block data descriptor.
Definition at line 175 of file serializer.hpp.
void sirius::SHT::backward_transform< std::complex< double > > | ( | int | ld, |
std::complex< double > const * | flm, | ||
int | nr, | ||
int | lmmax, | ||
std::complex< double > * | ftp | ||
) | const |
void sirius::SHT::forward_transform< std::complex< double > > | ( | std::complex< double > const * | ftp, |
int | nr, | ||
int | lmmax, | ||
int | ld, | ||
std::complex< double > * | flm | ||
) | const |
int sirius::major_version | ( | ) |
Definition at line 30 of file sirius_version.cpp.
int sirius::minor_version | ( | ) |
Definition at line 35 of file sirius_version.cpp.
int sirius::revision | ( | ) |
Definition at line 40 of file sirius_version.cpp.
std::string sirius::git_hash | ( | ) |
Definition at line 45 of file sirius_version.cpp.
std::string sirius::git_branchname | ( | ) |
Definition at line 50 of file sirius_version.cpp.
std::string sirius::build_date | ( | ) |
Definition at line 55 of file sirius_version.cpp.
|
inline |
Return the maximum number of blocks (with size 'block_size') needed to split the 'length' elements.
Definition at line 36 of file splindex.hpp.
|
inline |
Split the 'length' elements into blocks with the initial block size.
Return vector of block sizes that sum up to the initial 'length'.
Definition at line 43 of file splindex.hpp.
auto sirius::begin_global | ( | splindex< Index_t > const & | a__ | ) |
Definition at line 506 of file splindex.hpp.
auto sirius::end_global | ( | splindex< Index_t > const & | a__ | ) |
Definition at line 512 of file splindex.hpp.
auto sirius::begin | ( | splindex< Index_t > const & | a__ | ) |
Definition at line 518 of file splindex.hpp.
auto sirius::end | ( | splindex< Index_t > const & | a__ | ) |
Definition at line 526 of file splindex.hpp.
|
inline |
Split multi-line string into a list of strings.
Definition at line 31 of file string_tools.hpp.
|
inline |
Definition at line 44 of file string_tools.hpp.
|
inline |
Definition at line 50 of file string_tools.hpp.
|
inline |
Definition at line 56 of file string_tools.hpp.
|
inline |
Check if file exists.
[in] | file_name | Full path to the file being checked. |
Definition at line 34 of file system_tools.hpp.
|
inline |
Get host name.
Definition at line 41 of file system_tools.hpp.
|
inline |
Definition at line 50 of file system_tools.hpp.
|
inline |
Definition at line 55 of file system_tools.hpp.
|
inline |
Definition at line 60 of file system_tools.hpp.
|
inline |
Definition at line 65 of file system_tools.hpp.
|
inline |
Definition at line 113 of file system_tools.hpp.
|
inline |
Return the timestamp string in a specified format.
Typical format strings: "%Y%m%d_%H%M%S", "%Y-%m-%d %H:%M:%S", "%H:%M:%S"
Definition at line 34 of file time_tools.hpp.
|
inline |
Wall-clock time in seconds.
Definition at line 47 of file time_tools.hpp.
|
inline |
Definition at line 56 of file time_tools.hpp.
|
inline |
Definition at line 61 of file time_tools.hpp.
|
inline |
Definition at line 107 of file typedefs.hpp.
|
inline |
Definition at line 147 of file typedefs.hpp.
auto sirius::checksum_gpu | ( | std::complex< T > const * | wf__, |
int | ld__, | ||
int | num_rows_loc__, | ||
int | nwf__ | ||
) |
Add checksum for the arrays on GPUs.
Definition at line 95 of file wave_functions.hpp.
|
inline |
Definition at line 55 of file augmentation_operator.hpp.
|
inline |
Definition at line 67 of file augmentation_operator.hpp.
|
inline |
Definition at line 80 of file augmentation_operator.hpp.
|
inline |
Definition at line 94 of file augmentation_operator.hpp.
void sirius::update_density_rg_1_real_gpu | ( | int | size__, |
float const * | psi_rg__, | ||
float | wt__, | ||
float * | density_rg__ | ||
) |
Definition at line 43 of file density.cpp.
void sirius::update_density_rg_1_real_gpu | ( | int | size__, |
double const * | psi_rg__, | ||
double | wt__, | ||
double * | density_rg__ | ||
) |
Definition at line 49 of file density.cpp.
void sirius::update_density_rg_1_complex_gpu | ( | int | size__, |
std::complex< float > const * | psi_rg__, | ||
float | wt__, | ||
float * | density_rg__ | ||
) |
Definition at line 55 of file density.cpp.
void sirius::update_density_rg_1_complex_gpu | ( | int | size__, |
std::complex< double > const * | psi_rg__, | ||
double | wt__, | ||
double * | density_rg__ | ||
) |
Definition at line 61 of file density.cpp.
void sirius::update_density_rg_2_gpu | ( | int | size__, |
std::complex< float > const * | psi_rg_up__, | ||
std::complex< float > const * | psi_rg_dn__, | ||
float | wt__, | ||
float * | density_x_rg__, | ||
float * | density_y_rg__ | ||
) |
Definition at line 67 of file density.cpp.
void sirius::update_density_rg_2_gpu | ( | int | size__, |
std::complex< double > const * | psi_rg_up__, | ||
std::complex< double > const * | psi_rg_dn__, | ||
double | wt__, | ||
double * | density_x_rg__, | ||
double * | density_y_rg__ | ||
) |
Definition at line 74 of file density.cpp.
|
static |
Compute non-magnetic or up- or dn- contribution of the wave-functions to the charge density.
Definition at line 569 of file density.cpp.
|
static |
Compute contribution to density and megnetisation from the 2-component spinor wave-functions.
Definition at line 612 of file density.cpp.
|
static |
Definition at line 770 of file density.cpp.
|
static |
Definition at line 819 of file density.cpp.
|
static |
Definition at line 876 of file density.cpp.
|
static |
Definition at line 1011 of file density.cpp.
|
inline |
Use Kuebler's trick to get rho_up and rho_dn from density and magnetisation.
Definition at line 80 of file density.hpp.
Definition at line 746 of file density.hpp.
|
inline |
Definition at line 764 of file density.hpp.
|
inline |
Definition at line 49 of file density_matrix.hpp.
|
inline |
Definition at line 131 of file occupation_matrix.hpp.
double sirius::ewald_energy | ( | const Simulation_context & | ctx, |
const fft::Gvec & | gvec, | ||
const Unit_cell & | unit_cell | ||
) |
Compute the ion-ion electrostatic energy using Ewald method.
The following contribution (per unit cell) to the total energy has to be computed:
\[ E^{ion-ion} = \frac{1}{N} \frac{1}{2} \sum_{i \neq j} \frac{Z_i Z_j}{|{\bf r}_i - {\bf r}_j|} = \frac{1}{2} \sideset{}{'} \sum_{\alpha \beta {\bf T}} \frac{Z_{\alpha} Z_{\beta}}{|{\bf r}_{\alpha} - {\bf r}_{\beta} + {\bf T}|} \]
where \( N \) is the number of unit cells in the crystal. Following the idea of Ewald the Coulomb interaction is split into two terms:
\[ \frac{1}{|{\bf r}_{\alpha} - {\bf r}_{\beta} + {\bf T}|} = \frac{{\rm erf}(\sqrt{\lambda} |{\bf r}_{\alpha} - {\bf r}_{\beta} + {\bf T}|)}{|{\bf r}_{\alpha} - {\bf r}_{\beta} + {\bf T}|} + \frac{{\rm erfc}(\sqrt{\lambda} |{\bf r}_{\alpha} - {\bf r}_{\beta} + {\bf T}|)}{|{\bf r}_{\alpha} - {\bf r}_{\beta} + {\bf T}|} \]
Second term is computed directly. First term is computed in the reciprocal space. Remembering that
\[ \frac{1}{\Omega} \sum_{\bf G} e^{i{\bf Gr}} = \sum_{\bf T} \delta({\bf r - T}) \]
we rewrite the first term as
\[ \frac{1}{2} \sideset{}{'} \sum_{\alpha \beta {\bf T}} Z_{\alpha} Z_{\beta} \frac{{\rm erf}(\sqrt{\lambda} |{\bf r}_{\alpha} - {\bf r}_{\beta} + {\bf T}|)}{|{\bf r}_{\alpha} - {\bf r}_{\beta} + {\bf T}|} = \frac{1}{2} \sum_{\alpha \beta {\bf T}} Z_{\alpha} Z_{\beta} \frac{{\rm erf}(\sqrt{\lambda} |{\bf r}_{\alpha} - {\bf r}_{\beta} + {\bf T}|)} {|{\bf r}_{\alpha} - {\bf r}_{\beta} + {\bf T}|} - \frac{1}{2} \sum_{\alpha} Z_{\alpha}^2 2 \sqrt{\frac{\lambda}{\pi}} = \\ \frac{1}{2} \sum_{\alpha \beta} Z_{\alpha} Z_{\beta} \frac{1}{\Omega} \sum_{\bf G} \int e^{i{\bf Gr}} \frac{{\rm erf}(\sqrt{\lambda} |{\bf r}_{\alpha\beta} + {\bf r}|)}{|{\bf r}_{\alpha\beta} + {\bf r}|} d{\bf r} - \sum_{\alpha} Z_{\alpha}^2 \sqrt{\frac{\lambda}{\pi}} \]
The integral is computed using the \( \ell=0 \) term of the spherical expansion of the plane-wave:
\[ \int e^{i{\bf Gr}} \frac{{\rm erf}(\sqrt{\lambda} |{\bf r}_{\alpha\beta} + {\bf r}|)}{|{\bf r}_{\alpha\beta} + {\bf r}|} d{\bf r} = \int e^{-i{\bf r}_{\alpha \beta}{\bf G}} e^{i{\bf Gr}} \frac{{\rm erf}(\sqrt{\lambda} |{\bf r}|)}{|{\bf r}|} d{\bf r} = e^{-i{\bf r}_{\alpha \beta}{\bf G}} 4 \pi \int_0^{\infty} \frac{\sin({G r})}{G} {\rm erf}(\sqrt{\lambda} r ) dr \]
We will split integral in two parts:
\[ \int_0^{\infty} \sin({G r}) {\rm erf}(\sqrt{\lambda} r ) dr = \int_0^{b} \sin({G r}) {\rm erf}(\sqrt{\lambda} r ) dr + \int_b^{\infty} \sin({G r}) dr = \frac{1}{G} e^{-\frac{G^2}{4 \lambda}} \]
where \( b \) is sufficiently large. To reproduce in Mathrmatica:
Limit[Limit[ Integrate[Sin[g*x]*Erf[Sqrt[nu] * x], {x, 0, b}, Assumptions -> {nu > 0, g >= 0, b > 0}] + Integrate[Sin[g*(x + I*a)], {x, b, \[Infinity]}, Assumptions -> {a > 0, nu > 0, g >= 0, b > 0}], a -> 0], b -> \[Infinity], Assumptions -> {nu > 0, g >= 0}]
The first term of the Ewald sum thus becomes:
\[ \frac{2 \pi}{\Omega} \sum_{{\bf G}} \frac{e^{-\frac{G^2}{4 \lambda}}}{G^2} \Big| \sum_{\alpha} Z_{\alpha} e^{-i{\bf r}_{\alpha}{\bf G}} \Big|^2 - \sum_{\alpha} Z_{\alpha}^2 \sqrt{\frac{\lambda}{\pi}} \]
For \( G=0 \) the following is done:
\[ \frac{e^{-\frac{G^2}{4 \lambda}}}{G^2} \approx \frac{1}{G^2}-\frac{1}{4 \lambda } \]
The term \( \frac{1}{G^2} \) is compensated together with the corresponding Hartree terms in electron-electron and electron-ion interactions (cell should be neutral) and we are left with the following conribution:
\[ -\frac{2\pi}{\Omega}\frac{N_{el}^2}{4 \lambda} \]
Final expression for the Ewald energy:
\[ E^{ion-ion} = \frac{1}{2} \sideset{}{'} \sum_{\alpha \beta {\bf T}} Z_{\alpha} Z_{\beta} \frac{{\rm erfc}(\sqrt{\lambda} |{\bf r}_{\alpha} - {\bf r}_{\beta} + {\bf T}|)}{|{\bf r}_{\alpha} - {\bf r}_{\beta} + {\bf T}|} + \frac{2 \pi}{\Omega} \sum_{{\bf G}\neq 0} \frac{e^{-\frac{G^2}{4 \lambda}}}{G^2} \Big| \sum_{\alpha} Z_{\alpha} e^{-i{\bf r}_{\alpha}{\bf G}} \Big|^2 - \sum_{\alpha} Z_{\alpha}^2 \sqrt{\frac{\lambda}{\pi}} - \frac{2\pi}{\Omega} \frac{N_{el}^2}{4 \lambda} \]
Definition at line 30 of file energy.cpp.
Returns exchange correlation potential.
Definition at line 76 of file energy.cpp.
Returns exchange correlation energy.
Definition at line 82 of file energy.cpp.
double sirius::energy_vha | ( | Potential const & | potential | ) |
Returns Hatree potential.
Definition at line 88 of file energy.cpp.
TODO doc.
Definition at line 94 of file energy.cpp.
double sirius::energy_enuc | ( | Simulation_context const & | ctx, |
Potential const & | potential | ||
) |
Return nucleus energy in the electrostatic field.
Compute energy of nucleus in the electrostatic potential generated by the total (electrons + nuclei) j* charge density. Diverging self-interaction term z*z/|r=0| is excluded.
Definition at line 104 of file energy.cpp.
TODO doc.
Definition at line 119 of file energy.cpp.
double sirius::core_eval_sum | ( | Unit_cell const & | unit_cell | ) |
Return eigen-value sum of core states.
Definition at line 125 of file energy.cpp.
double sirius::eval_sum | ( | Unit_cell const & | unit_cell, |
K_point_set const & | kset | ||
) |
TODO doc.
Definition at line 135 of file energy.cpp.
TODO doc.
Definition at line 141 of file energy.cpp.
double sirius::energy_kin | ( | Simulation_context const & | ctx, |
K_point_set const & | kset, | ||
Density const & | density, | ||
Potential const & | potential | ||
) |
Return kinetic energy.
Definition at line 147 of file energy.cpp.
double sirius::ks_energy | ( | Simulation_context const & | ctx, |
const std::map< std::string, double > & | energies | ||
) |
Definition at line 153 of file energy.cpp.
double sirius::ks_energy | ( | Simulation_context const & | ctx, |
K_point_set const & | kset, | ||
Density const & | density, | ||
Potential const & | potential, | ||
double | ewald_energy | ||
) |
Definition at line 179 of file energy.cpp.
double sirius::total_energy | ( | Simulation_context const & | ctx, |
K_point_set const & | kset, | ||
Density const & | density, | ||
Potential const & | potential, | ||
double | ewald_energy | ||
) |
Total energy of the electronic subsystem.
Full potential total energy
From the definition of the density functional we have:
\[ E[\rho] = T[\rho] + E^{H}[\rho] + E^{XC}[\rho] + E^{ext}[\rho] \]
where \( T[\rho] \) is the kinetic energy, \( E^{H}[\rho] \) - electrostatic energy of electron-electron density interaction, \( E^{XC}[\rho] \) - exchange-correlation energy and \( E^{ext}[\rho] \) - energy in the external field of nuclei.
Electrostatic and external field energies are grouped in the following way:
\[ \frac{1}{2} \int \int \frac{\rho({\bf r})\rho({\bf r'}) d{\bf r} d{\bf r'}}{|{\bf r} - {\bf r'}|} + \int \rho({\bf r}) V^{nuc}({\bf r}) d{\bf r} = \frac{1}{2} \int V^{H}({\bf r})\rho({\bf r})d{\bf r} + \frac{1}{2} \int \rho({\bf r}) V^{nuc}({\bf r}) d{\bf r} \]
Here \( V^{H}({\bf r}) \) is the total (electron + nuclei) electrostatic potential returned by the poisson solver. Next we transform the remaining term:
\[ \frac{1}{2} \int \rho({\bf r}) V^{nuc}({\bf r}) d{\bf r} = \frac{1}{2} \int \int \frac{\rho({\bf r})\rho^{nuc}({\bf r'}) d{\bf r} d{\bf r'}}{|{\bf r} - {\bf r'}|} = \frac{1}{2} \int V^{H,el}({\bf r}) \rho^{nuc}({\bf r}) d{\bf r} \]
Pseudopotential total energy
Total energy in PW-PP method has the following expression:
\[ E_{tot} = \sum_{i} f_i \sum_{\sigma \sigma'} \langle \psi_i^{\sigma'} | \Big( \hat T + \sum_{\xi \xi'} |\beta_{\xi} \rangle D_{\xi \xi'}^{ion} \delta_{\sigma \sigma'} \langle \beta_{\xi'} |\Big) | \psi_i^{\sigma} \rangle + \int V^{ion}({\bf r})\rho({\bf r})d{\bf r} + \frac{1}{2} \int V^{H}({\bf r})\rho({\bf r})d{\bf r} + E^{XC}[\rho + \rho_{core}, |{\bf m}|] \]
Ionic contribution to the non-local part of pseudopotential is diagonal in spin. The following rearrangement is performed next:
\[ \int \rho({\bf r}) \Big( V^{ion}({\bf r}) + \frac{1}{2} V^{H}({\bf r}) \Big) d{\bf r} = \\ \int \rho({\bf r}) \Big( V^{ion}({\bf r}) + V^{H}({\bf r}) + V^{XC}({\bf r}) \Big) d{\bf r} + \int {\bf m}({\bf r}) {\bf B}^{XC}({\bf r}) d{\bf r} - \frac{1}{2} \int V^{H}({\bf r})\rho({\bf r})d{\bf r} - \int V^{XC}({\bf r})\rho({\bf r})d{\bf r} - \int {\bf m}({\bf r}) {\bf B}^{XC}({\bf r}) d{\bf r} = \\ \sum_{\sigma \sigma'}\int \rho_{\sigma \sigma'}({\bf r}) V_{\sigma' \sigma}^{eff}({\bf r}) d{\bf r} - \frac{1}{2} \int V^{H}({\bf r})\rho({\bf r})d{\bf r} - \int V^{XC}({\bf r})\rho({\bf r})d{\bf r} - \int {\bf m}({\bf r}) {\bf B}^{XC}({\bf r}) d{\bf r} \]
Where
\[ \rho_{\sigma \sigma'}({\bf r}) = \sum_{i}^{occ} f_{i} \psi_{i}^{\sigma' *}({\bf r})\psi_{i}^{\sigma}({\bf r}) \]
is a \( 2 \times 2 \) density matrix and
\[ V_{\sigma\sigma'}^{eff}({\bf r})=\Big({\bf I}V^{eff}({\bf r})+{\boldsymbol \sigma}{\bf B}^{XC}({\bf r}) \Big) = \left( \begin{array}{cc} V^{eff}({\bf r})+B_z^{XC}({\bf r}) & B_x^{XC}({\bf r})-iB_y^{XC}({\bf r}) \\ B_x^{XC}({\bf r})+iB_y^{XC}({\bf r}) & V^{eff}({\bf r})-B_z^{XC}({\bf r}) \end{array} \right) \]
is a \( 2 \times 2 \) matrix potential (see Spin-polarized DFT for the full derivation).
We are interested in this term:
\[ \sum_{\sigma \sigma'}\int \rho_{\sigma \sigma'}({\bf r}) V_{\sigma' \sigma}^{eff}({\bf r}) d{\bf r} = \int V^{eff}({\bf r})\rho({\bf r})d{\bf r} + \int {\bf m}({\bf r}) {\bf B}^{XC}({\bf r}) d{\bf r} \]
We are going to split density into two contributions (sum of occupied bands \( \rho^{ps} \) and augmented charge \( \rho^{aug} \)) and use the definition of \( \rho^{aug} \):
\[ \sum_{\sigma \sigma'}\int \rho_{\sigma \sigma'}^{aug}({\bf r}) V_{\sigma' \sigma}^{eff}({\bf r}) d{\bf r} = \sum_{\sigma \sigma'}\int \sum_{i} \sum_{\xi \xi'} f_i \langle \psi_i^{\sigma'} | \beta_{\xi} \rangle Q_{\xi \xi'}({\bf r}) \langle \beta_{\xi'} | \psi_i^{\sigma} \rangle V_{\sigma' \sigma}^{eff}({\bf r}) d{\bf r} = \sum_{\sigma \sigma'} \sum_{i}\sum_{\xi \xi'} f_i \langle \psi_i^{\sigma'} | \beta_{\xi} \rangle D_{\xi \xi', \sigma' \sigma}^{aug} \langle \beta_{\xi'} | \psi_i^{\sigma} \rangle \]
Now we can rewrite the total energy expression:
\[ E_{tot} = \sum_{i} f_i \sum_{\sigma \sigma'} \langle \psi_i^{\sigma'} | \Big( \hat T + \sum_{\xi \xi'} |\beta_{\xi} \rangle D_{\xi \xi'}^{ion} \delta_{\sigma \sigma'} + D_{\xi \xi', \sigma' \sigma}^{aug} \langle \beta_{\xi'} |\Big) | \psi_i^{\sigma} \rangle + \sum_{\sigma \sigma} \int V^{eff}_{\sigma' \sigma}({\bf r})\rho^{ps}_{\sigma \sigma'}({\bf r})d{\bf r} - \frac{1}{2} \int V^{H}({\bf r})\rho({\bf r})d{\bf r} - \int V^{XC}({\bf r})\rho({\bf r}) d{\bf r} - \int {\bf m}({\bf r}) {\bf B}^{XC}({\bf r}) d{\bf r} + E^{XC}[\rho + \rho_{core}, |{\bf m}|] \]
From the Kohn-Sham equations
\[ \hat T |\psi_i^{\sigma} \rangle + \sum_{\sigma'} \sum_{\xi \xi'} \Big( |\beta_{\xi} \rangle D_{\xi \xi', \sigma' \sigma} \langle \beta_{\xi'}| + \hat V^{eff}_{\sigma' \sigma} \Big) | \psi_i^{\sigma'} \rangle = \varepsilon_i \Big( 1+\hat S \Big) |\psi_i^{\sigma} \rangle \]
we immediately obtain that
\[ \sum_{i} f_i \varepsilon_i = \sum_{i} f_i \sum_{\sigma \sigma'} \langle \psi_i^{\sigma'} | \Big( \hat T + \sum_{\xi \xi'} |\beta_{\xi} \rangle D_{\xi \xi', \sigma' \sigma} \langle \beta_{\xi'} |\Big) | \psi_i^{\sigma} \rangle + \sum_{\sigma \sigma} \int V^{eff}_{\sigma' \sigma}({\bf r})\rho^{ps}_{\sigma \sigma'}({\bf r})d{\bf r} \]
and the total energy expression simplifies to:
\[ E_{tot} = \sum_{i} f_i \varepsilon_i - \frac{1}{2} \int V^{H}({\bf r})\rho({\bf r})d{\bf r} - \int V^{XC}({\bf r})\rho({\bf r}) d{\bf r} - \int {\bf m}({\bf r}) {\bf B}^{XC}({\bf r}) d{\bf r} + E^{XC}[\rho + \rho_{core}, |{\bf m}|] \]
Definition at line 186 of file energy.cpp.
std::map< std::string, double > sirius::total_energy_components | ( | Simulation_context const & | ctx, |
const K_point_set & | kset, | ||
Density const & | density, | ||
Potential const & | potential, | ||
double | ewald_energy | ||
) |
Definition at line 212 of file energy.cpp.
double sirius::hubbard_energy | ( | Density const & | density | ) |
Definition at line 249 of file energy.cpp.
Definition at line 259 of file energy.cpp.
Definition at line 266 of file energy.cpp.
Definition at line 276 of file energy.cpp.
|
inline |
Definition at line 270 of file energy.hpp.
|
inline |
Make periodic function out of form factors.
Return vector of plane-wave coefficients
Definition at line 34 of file make_periodic_function.hpp.
|
inline |
Make periodic out of form factors computed for G-shells.
Definition at line 67 of file make_periodic_function.hpp.
T sirius::inner | ( | PAW_field4D< T > const & | x__, |
PAW_field4D< T > const & | y__ | ||
) |
Definition at line 126 of file paw_field4d.hpp.
|
inline |
Definition at line 288 of file periodic_function.hpp.
|
inline |
Copy values of the function to the external location.
Definition at line 304 of file periodic_function.hpp.
|
inline |
Copy the values of the function from the external location.
Definition at line 314 of file periodic_function.hpp.
|
inline |
Definition at line 39 of file smooth_periodic_function.hpp.
|
inline |
Gradient of the function in the plane-wave domain.
Input functions is expected in the plane wave domain, output function is also in the plane-wave domain
Definition at line 426 of file smooth_periodic_function.hpp.
|
inline |
Divergence of the vecor function.
Input and output functions are in plane-wave domain
Definition at line 445 of file smooth_periodic_function.hpp.
|
inline |
Laplacian of the function in the plane-wave domain.
Definition at line 464 of file smooth_periodic_function.hpp.
|
inline |
Definition at line 481 of file smooth_periodic_function.hpp.
|
inline |
Compute local contribution to inner product <f|g>
Definition at line 503 of file smooth_periodic_function.hpp.
|
inline |
Definition at line 521 of file smooth_periodic_function.hpp.
|
inline |
Definition at line 528 of file smooth_periodic_function.hpp.
|
inline |
Compute inner product <f|g>
Definition at line 541 of file smooth_periodic_function.hpp.
|
inline |
Copy real-space values from the function to external pointer.
Definition at line 549 of file smooth_periodic_function.hpp.
|
inline |
Copy real-space values from the external pointer to function.
Definition at line 576 of file smooth_periodic_function.hpp.
|
inline |
Definition at line 596 of file smooth_periodic_function.hpp.
|
inline |
Definition at line 604 of file smooth_periodic_function.hpp.
|
inline |
Definition at line 616 of file smooth_periodic_function.hpp.
|
inline |
Multiplication of two functions in spatial domain.
The result of the operation is a scalar function in spatial domain
Definition at line 249 of file spheric_function.hpp.
|
inline |
Dot product of two gradiensts of real functions in spatial domain.
The result of the operation is the real scalar function in spatial domain
Definition at line 273 of file spheric_function.hpp.
auto sirius::operator+ | ( | Spheric_function< domain_t, T > const & | a__, |
Spheric_function< domain_t, T > const & | b__ | ||
) |
Summation of two functions.
Definition at line 303 of file spheric_function.hpp.
auto sirius::operator- | ( | Spheric_function< domain_t, T > const & | a__, |
Spheric_function< domain_t, T > const & | b__ | ||
) |
Subtraction of functions.
Definition at line 326 of file spheric_function.hpp.
auto sirius::operator* | ( | T | a__, |
Spheric_function< domain_t, T > const & | b__ | ||
) |
Multiply function by a scalar.
Definition at line 349 of file spheric_function.hpp.
auto sirius::operator* | ( | Spheric_function< domain_t, T > const & | b__, |
T | a__ | ||
) |
Multiply function by a scalar (inverse order).
Definition at line 365 of file spheric_function.hpp.
|
inline |
Inner product of two spherical functions.
The result of the operation is a scalar value.
Definition at line 374 of file spheric_function.hpp.
|
inline |
Compute Laplacian of the spheric function.
Laplacian in spherical coordinates has the following expression:
\[ \Delta = \frac{1}{r^2}\frac{\partial}{\partial r}\Big( r^2 \frac{\partial}{\partial r} \Big) + \frac{1}{r^2}\Delta_{\theta, \phi} \]
Definition at line 401 of file spheric_function.hpp.
|
inline |
Convert from Ylm to Rlm representation.
Definition at line 434 of file spheric_function.hpp.
|
inline |
Convert from Ylm to Rlm representation.
Definition at line 468 of file spheric_function.hpp.
|
inline |
Convert from Rlm to Ylm representation.
Definition at line 477 of file spheric_function.hpp.
|
inline |
Convert from Rlm to Ylm representation.
Definition at line 511 of file spheric_function.hpp.
|
inline |
Definition at line 520 of file spheric_function.hpp.
|
inline |
Transform to spatial domain (to r, \theta, \phi coordinates).
Definition at line 530 of file spheric_function.hpp.
|
inline |
Definition at line 539 of file spheric_function.hpp.
|
inline |
Transform to spectral domain.
Definition at line 548 of file spheric_function.hpp.
|
inline |
Gradient of the function in complex spherical harmonics.
Definition at line 557 of file spheric_function.hpp.
|
inline |
Gradient of the function in real spherical harmonics.
Definition at line 612 of file spheric_function.hpp.
|
inline |
Divergence of the vector function in complex spherical harmonics.
Definition at line 627 of file spheric_function.hpp.
|
inline |
Definition at line 640 of file spheric_function.hpp.
|
inline |
Definition at line 176 of file spheric_function_set.hpp.
|
inline |
Copy from Spheric_function_set to external pointer.
External pointer is assumed to be global.
Definition at line 209 of file spheric_function_set.hpp.
|
inline |
Copy from external pointer to Spheric_function_set.
External pointer is assumed to be global.
Definition at line 237 of file spheric_function_set.hpp.
|
inline |
Definition at line 258 of file spheric_function_set.hpp.
|
inline |
Definition at line 269 of file spheric_function_set.hpp.
|
inline |
Definition at line 280 of file spheric_function_set.hpp.
void sirius::add_k_point_contribution_nonlocal | ( | Simulation_context & | ctx__, |
Beta_projectors_base< T > & | bp_base__, | ||
K_point< T > & | kp__, | ||
sddk::mdarray< real_type< F >, 2 > & | collect_res__ | ||
) |
T | Precision type of the wave-functions |
Definition at line 38 of file non_local_functor.hpp.
void sirius::wavefunctions_strain_deriv | ( | Simulation_context const & | ctx__, |
K_point< double > & | kp__, | ||
wf::Wave_functions< double > & | dphi__, | ||
sddk::mdarray< double, 2 > const & | rlm_g__, | ||
sddk::mdarray< double, 3 > const & | rlm_dg__, | ||
int | nu__, | ||
int | mu__ | ||
) |
Definition at line 9 of file wavefunction_strain_deriv.hpp.
void sirius::check_wave_functions | ( | Hamiltonian_k< real_type< T > > const & | Hk__, |
wf::Wave_functions< T > & | psi__, | ||
wf::spin_range | sr__, | ||
wf::band_range | br__, | ||
double * | eval__ | ||
) |
Definition at line 34 of file check_wave_functions.hpp.
|
inline |
Definition at line 55 of file davidson.hpp.
|
inline |
Solve the eigen-problem using Davidson iterative method.
T | Precision type of wave-functions (float or double). |
F | Type of the subspace matrices (fload or duble for Gamma case, complex<float> or complex<doouble> for general k-point case. |
what | What to solve: H|psi> = e*S|psi> or S|psi> = o|psi> |
[in] | Hk | Hamiltonian for a given k-point. |
[in] | num_bands | Number of eigen-states (bands) to compute. |
[in] | num_mag_dims | Number of magnetic dimensions (0, 1 or 3). |
[in,out] | psi | Wave-functions. On input they are used for the starting guess of the subspace basis. On output they are the solutions of Hk|psi> = e S|psi> eigen-problem. |
[in] | tolerance | Lambda-function for the band energy tolerance. |
[in] | res_tol | Residual tolerance. |
[in] | num_stpes | Number of iterative steps. |
[in] | locking | Lock and do not update of the converged wave-functions. |
[in] | subspace_size | Size of the diagonalziation subspace. |
[in] | estimate_eval | Estimate eigen-values to get the converrged rersiduals. |
[in] | extra_ortho | Orthogonalize new subspace basis one extra time. |
[out] | out | Output stream. |
[in] | verbosity | Verbosity level. |
[in] | phi_extra | Pointer to the additional (fixed) auxiliary basis functions (used in LAPW). |
Definition at line 141 of file davidson.hpp.
|
inline |
Diagonalize KS Hamiltonian for all k-points in the set.
T | Precision type of the wave-functions |
F | Precition type of the Hamiltonian matrix |
Definition at line 46 of file diagonalize.hpp.
|
inline |
Definition at line 34 of file diagonalize_fp.hpp.
|
inline |
Definition at line 40 of file diagonalize_fp.hpp.
|
inline |
Definition at line 244 of file diagonalize_fp.hpp.
|
inline |
Definition at line 271 of file diagonalize_fp.hpp.
|
inline |
Definition at line 277 of file diagonalize_fp.hpp.
|
inline |
Definition at line 347 of file diagonalize_fp.hpp.
|
inline |
Diagonalize second-variational Hamiltonian.
Definition at line 354 of file diagonalize_fp.hpp.
|
inline |
Diagonalize a full-potential LAPW Hamiltonian.
Definition at line 502 of file diagonalize_fp.hpp.
|
inline |
Definition at line 35 of file diagonalize_pp.hpp.
|
inline |
Definition at line 42 of file diagonalize_pp.hpp.
|
inline |
Diagonalize S-operator of the ultrasoft or PAW methods.
Sometimes this is needed to check the quality of pseudopotential.
Definition at line 218 of file diagonalize_pp.hpp.
|
inline |
Definition at line 294 of file diagonalize_pp.hpp.
void sirius::generate_subspace_matrix | ( | Simulation_context & | ctx__, |
int | N__, | ||
int | n__, | ||
int | num_locked__, | ||
wf::Wave_functions< T > & | phi__, | ||
wf::Wave_functions< T > & | op_phi__, | ||
la::dmatrix< F > & | mtrx__, | ||
la::dmatrix< F > * | mtrx_old__ = nullptr |
||
) |
Generate subspace matrix for the iterative diagonalization.
Compute \( O_{ii'} = \langle \phi_i | \hat O | \phi_{i'} \rangle \) operator matrix for the subspace spanned by the wave-functions \( \phi_i \). The matrix is always returned in the CPU pointer because most of the standard math libraries start from the CPU.
T | Precision type of the wave-functions |
F | Type of the output subspace matrix. |
[in] | ctx | Simulation context |
[in] | N | Number of existing (old) states phi. |
[in] | n | Number of new states phi. |
[in] | num_locked | Number of locked states phi. Locked states are excluded from the subspace basis. |
[in] | phi | Subspace basis functions phi. |
[in] | op_phi | Operator (H, S or overlap) applied to phi. |
[out] | mtrx | New subspace matrix. |
[in,out] | mtrx_old | Pointer to old subpsace matrix. It is used to store and reuse the subspace matrix of the previous step. |
Definition at line 51 of file generate_subspace_matrix.hpp.
|
inline |
Initialize the wave-functions subspace at a given k-point.
If the number of atomic orbitals is smaller than the number of bands, the rest of the initial wave-functions are created from the random numbers.
Definition at line 38 of file initialize_subspace.hpp.
void sirius::initialize_subspace | ( | K_point_set & | kset__, |
Hamiltonian0< T > & | H0__ | ||
) |
Definition at line 290 of file initialize_subspace.hpp.
|
inlinestatic |
Multiply FFT buffer by the effective potential.
Definition at line 210 of file local_operator.cpp.
void sirius::apply_non_local_D_Q | ( | sddk::memory_t | mem__, |
wf::spin_range | spins__, | ||
wf::band_range | br__, | ||
Beta_projector_generator< T > & | beta__, | ||
beta_projectors_coeffs_t< T > & | beta_coeffs__, | ||
wf::Wave_functions< T > const & | phi__, | ||
D_operator< T > const * | d_op__, | ||
wf::Wave_functions< T > * | hphi__, | ||
Q_operator< T > const * | q_op__, | ||
wf::Wave_functions< T > * | sphi__ | ||
) |
T | Precision of the wave-functions. |
F | Type of the subspace. |
[in] | spins | Range of the spin index. |
[in] | N | Starting index of the wave-functions. |
[in] | n | Number of wave-functions to which D and Q are applied. |
[in] | beta | Beta-projector generator |
[in] | beta_coeffs | Beta-projector coefficients |
[in] | phi | Wave-functions. |
[in] | d_op | Pointer to D-operator. |
[out] | hphi | Resulting |beta>D<beta|phi> |
[in] | q_op | Pointer to Q-operator. |
[out] | sphi | Resulting |beta>Q<beta|phi> |
Definition at line 126 of file non_local_operator.hpp.
void sirius::apply_S_operator | ( | sddk::memory_t | mem__, |
wf::spin_range | spins__, | ||
wf::band_range | br__, | ||
Beta_projector_generator< T > & | beta__, | ||
beta_projectors_coeffs_t< T > & | beta_coeffs__, | ||
wf::Wave_functions< T > const & | phi__, | ||
Q_operator< T > const * | q_op__, | ||
wf::Wave_functions< T > & | sphi__ | ||
) |
Compute |sphi> = (1 + Q)|phi>
Definition at line 172 of file non_local_operator.hpp.
void sirius::apply_U_operator | ( | Simulation_context & | ctx__, |
wf::spin_range | spins__, | ||
wf::band_range | br__, | ||
wf::Wave_functions< T > const & | hub_wf__, | ||
wf::Wave_functions< T > const & | phi__, | ||
U_operator< T > const & | um__, | ||
wf::Wave_functions< T > & | hphi__ | ||
) |
Apply Hubbard U correction
T | Precision type of wave-functions (flat or double). |
[in] | hub_wf | Hubbard atomic wave-functions. |
[in] | phi | Set of wave-functions to which Hubbard correction is applied. |
[out] | hphi | Output wave-functions to which the result is added. |
Definition at line 110 of file s_u_operator.cpp.
void sirius::apply_S_operator_strain_deriv | ( | sddk::memory_t | mem__, |
int | comp__, | ||
Beta_projector_generator< double > & | bp__, | ||
beta_projectors_coeffs_t< double > & | bp_coeffs__, | ||
Beta_projector_generator< double > & | bp_strain_deriv__, | ||
beta_projectors_coeffs_t< double > & | bp_strain_deriv_coeffs__, | ||
wf::Wave_functions< double > & | phi__, | ||
Q_operator< double > & | q_op__, | ||
wf::Wave_functions< double > & | ds_phi__ | ||
) |
Apply strain derivative of S-operator to all scalar functions.
Definition at line 193 of file s_u_operator.cpp.
|
inline |
Definition at line 6 of file pseudopotential_hmatrix.hpp.
|
static |
Compute band residuals.
T | Precision type of the wave-functions (float or double). |
Definition at line 128 of file residuals.hpp.
void sirius::apply_preconditioner | ( | sddk::memory_t | mem__, |
wf::spin_range | spins__, | ||
wf::num_bands | num_bands__, | ||
wf::Wave_functions< T > & | res__, | ||
sddk::mdarray< T, 2 > const & | h_diag__, | ||
sddk::mdarray< T, 2 > const & | o_diag__, | ||
sddk::mdarray< T, 1 > const & | eval__ | ||
) |
Apply preconditioner to the residuals.
Definition at line 166 of file residuals.hpp.
|
static |
Definition at line 194 of file residuals.hpp.
auto sirius::residuals | ( | Simulation_context & | ctx__, |
sddk::memory_t | mem__, | ||
wf::spin_range | sr__, | ||
int | N__, | ||
int | num_bands__, | ||
int | num_locked__, | ||
sddk::mdarray< real_type< F >, 1 > & | eval__, | ||
la::dmatrix< F > & | evec__, | ||
wf::Wave_functions< T > & | hphi__, | ||
wf::Wave_functions< T > & | ophi__, | ||
wf::Wave_functions< T > & | hpsi__, | ||
wf::Wave_functions< T > & | opsi__, | ||
wf::Wave_functions< T > & | res__, | ||
sddk::mdarray< T, 2 > const & | h_diag__, | ||
sddk::mdarray< T, 2 > const & | o_diag__, | ||
bool | estimate_eval__, | ||
T | norm_tolerance__, | ||
std::function< bool(int, int)> | is_converged__ | ||
) |
Compute residuals from eigen-vectors.
T | Precision type of the wave-functions (float or double). |
F | Type of the subspace (float or double for Gamma-point calculation, complex<float> or complex<double> otherwise. |
The residuals of wave-functions are defined as:
\[ R_{i} = \hat H \psi_{i} - \epsilon_{i} \hat S \psi_{i} \]
Definition at line 277 of file residuals.hpp.
void sirius::generate_potential | ( | Hubbard_matrix const & | om__, |
Hubbard_matrix & | um__ | ||
) |
Definition at line 523 of file hubbard_potential_energy.cpp.
double sirius::energy | ( | Hubbard_matrix const & | om__ | ) |
Definition at line 551 of file hubbard_potential_energy.cpp.
double sirius::one_electron_energy_hubbard | ( | Hubbard_matrix const & | om__, |
Hubbard_matrix const & | pm__ | ||
) |
Definition at line 593 of file hubbard_potential_energy.cpp.
|
inline |
Definition at line 149 of file hubbard_matrix.hpp.
|
static |
Definition at line 43 of file hubbard_occupancies_derivatives.cpp.
|
static |
Definition at line 59 of file hubbard_occupancies_derivatives.cpp.
|
static |
Definition at line 112 of file hubbard_occupancies_derivatives.cpp.
|
static |
Definition at line 32 of file hubbard_potential_energy.cpp.
|
static |
Definition at line 54 of file hubbard_potential_energy.cpp.
|
static |
Definition at line 165 of file hubbard_potential_energy.cpp.
|
static |
Definition at line 192 of file hubbard_potential_energy.cpp.
|
static |
Definition at line 327 of file hubbard_potential_energy.cpp.
|
static |
Definition at line 417 of file hubbard_potential_energy.cpp.
|
inline |
Definition at line 766 of file k_point.hpp.
double sirius::bisection_search | ( | F && | f, |
double | a, | ||
double | b, | ||
double | tol, | ||
int | maxstep = 1000 |
||
) |
Definition at line 165 of file k_point_set.cpp.
auto sirius::newton_minimization_chemical_potential | ( | Nt && | N, |
DNt && | dN, | ||
D2Nt && | ddN, | ||
double | mu0, | ||
double | ne, | ||
double | tol, | ||
int | maxstep = 1000 |
||
) |
Newton minimization to determine the chemical potential.
N | number of electrons as a function of \(\mu\) |
dN | \(\partial_\mu N(\mu)\) |
ddN | \(\partial^2_\mu N(\mu)\) |
mu0 | initial guess |
ne | target number of electrons |
tol | tolerance |
maxstep | max number of Newton iterations |
Definition at line 207 of file k_point_set.cpp.
auto sirius::generate_alm_block | ( | Simulation_context const & | ctx__, |
int | atom_begin__, | ||
int | num_atoms__, | ||
Matching_coefficients const & | alm__ | ||
) |
Generate matching coefficients for a block of atoms.
Definition at line 11 of file generate_alm_block.hpp.
|
inline |
Generate complex spherical harmonics for the local set of G-vectors.
Definition at line 32 of file generate_gvec_ylm.hpp.
|
inline |
Compute values of spherical Bessel functions at MT boundary.
Definition at line 32 of file generate_sbessel_mt.hpp.
|
inline |
Utility function to generate LAPW unit step function.
Definition at line 34 of file step_function.hpp.
|
inline |
Unit step function is defined to be 1 in the interstitial and 0 inside muffin-tins.
Unit step function is constructed from it's plane-wave expansion coefficients which are computed analytically:
\[ \Theta({\bf r}) = \sum_{\bf G} \Theta({\bf G}) e^{i{\bf Gr}}, \]
where
\[ \Theta({\bf G}) = \frac{1}{\Omega} \int \Theta({\bf r}) e^{-i{\bf Gr}} d{\bf r} = \frac{1}{\Omega} \int_{\Omega} e^{-i{\bf Gr}} d{\bf r} - \frac{1}{\Omega} \int_{MT} e^{-i{\bf Gr}} d{\bf r} = \delta_{\bf G, 0} - \sum_{\alpha} \frac{1}{\Omega} \int_{MT_{\alpha}} e^{-i{\bf Gr}} d{\bf r} \]
Integralof a plane-wave over the muffin-tin volume is taken using the spherical expansion of the plane-wave around central point \( \tau_{\alpha} \):
\[ \int_{MT_{\alpha}} e^{-i{\bf Gr}} d{\bf r} = e^{-i{\bf G\tau_{\alpha}}} \int_{MT_{\alpha}} 4\pi \sum_{\ell m} (-i)^{\ell} j_{\ell}(Gr) Y_{\ell m}(\hat {\bf G}) Y_{\ell m}^{*}(\hat {\bf r}) r^2 \sin \theta dr d\phi d\theta \]
In the above integral only \( \ell=m=0 \) term survives. So we have:
\[ \int_{MT_{\alpha}} e^{-i{\bf Gr}} d{\bf r} = 4\pi e^{-i{\bf G\tau_{\alpha}}} \Theta(\alpha, G) \]
where
\[ \Theta(\alpha, G) = \int_{0}^{R_{\alpha}} \frac{\sin(Gr)}{Gr} r^2 dr = \left\{ \begin{array}{ll} \displaystyle R_{\alpha}^3 / 3 & G=0 \\ \Big( \sin(GR_{\alpha}) - GR_{\alpha}\cos(GR_{\alpha}) \Big) / G^3 & G \ne 0 \end{array} \right. \]
are the so-called step function form factors. With this we have a final expression for the plane-wave coefficients of the unit step function:
\[ \Theta({\bf G}) = \delta_{\bf G, 0} - \sum_{\alpha} \frac{4\pi}{\Omega} e^{-i{\bf G\tau_{\alpha}}} \Theta(\alpha, G) \]
Definition at line 87 of file step_function.hpp.
|
inline |
Compute sum over plane-wave coefficients and spherical harmonics that apperas in Poisson solver and finding of the MT boundary values. The following operation is performed:
\[ q_{\ell m}^{\alpha} = \sum_{\bf G} 4\pi \rho({\bf G}) e^{i{\bf G}{\bf r}_{\alpha}}i^{\ell}f_{\ell}^{\alpha}(G) Y_{\ell m}^{*}(\hat{\bf G}) \]
Definition at line 39 of file sum_fg_fl_yg.hpp.
auto sirius::make_matrix_view | ( | nlcglib::buffer_protocol< numeric_t, 2 > & | buf | ) |
Definition at line 228 of file adaptor.hpp.
|
inline |
Definition at line 38 of file apply_hamiltonian.hpp.
|
inline |
Definition at line 39 of file call_nlcg.hpp.
void sirius::check_xc_potential | ( | Density const & | rho__ | ) |
Definition at line 30 of file check_xc_potential.cpp.
double sirius::xc_mt_paw | ( | std::vector< XC_functional > const & | xc_func__, |
int | lmax__, | ||
int | num_mag_dims__, | ||
SHT const & | sht__, | ||
Radial_grid< double > const & | rgrid__, | ||
std::vector< Flm const * > | rho__, | ||
std::vector< double > const & | rho_core__, | ||
std::vector< Flm > & | vxc__, | ||
Flm & | exclm__ | ||
) |
Definition at line 123 of file paw_potential.cpp.
Definition at line 31 of file poisson.cpp.
double sirius::xc_mt | ( | Radial_grid< double > const & | rgrid__, |
SHT const & | sht__, | ||
std::vector< XC_functional > const & | xc_func__, | ||
int | num_mag_dims__, | ||
std::vector< Flm const * > | rho__, | ||
std::vector< Flm * > | vxc__, | ||
Flm * | exc__ | ||
) |
void sirius::xc_mt_nonmagnetic | ( | Radial_grid< double > const & | rgrid__, |
SHT const & | sht__, | ||
std::vector< XC_functional > const & | xc_func__, | ||
Flm const & | rho_lm__, | ||
Ftp & | rho_tp__, | ||
Flm & | vxc_lm__, | ||
Flm & | exc_lm__ | ||
) |
void sirius::xc_mt_magnetic | ( | Radial_grid< double > const & | rgrid__, |
SHT const & | sht__, | ||
int | num_mag_dims__, | ||
std::vector< XC_functional > const & | xc_func__, | ||
std::vector< Ftp > const & | rho_tp__, | ||
std::vector< Flm * > | vxc__, | ||
Flm & | exc__ | ||
) |
Radial_grid< T > sirius::Radial_grid_factory | ( | radial_grid_t | grid_type__, |
int | num_points__, | ||
T | rmin__, | ||
T | rmax__, | ||
double | p__ | ||
) |
Definition at line 321 of file radial_grid.hpp.
|
inline |
Definition at line 349 of file radial_grid.hpp.
|
inline |
Definition at line 623 of file spline.hpp.
T sirius::inner | ( | Spline< T > const & | f__, |
Spline< T > const & | g__, | ||
int | m__, | ||
int | num_points__ | ||
) |
Definition at line 657 of file spline.hpp.
Definition at line 786 of file spline.hpp.
|
inlinestatic |
Return the status of the library (initialized or not).
Definition at line 61 of file sirius.hpp.
|
inline |
Initialize the library.
Definition at line 82 of file sirius.hpp.
|
inline |
Shut down the library.
Definition at line 143 of file sirius.hpp.
|
inline |
Definition at line 32 of file check_gvec.hpp.
|
inline |
Definition at line 87 of file check_gvec.hpp.
|
static |
Definition at line 34 of file crystal_symmetry.cpp.
|
static |
Definition at line 83 of file crystal_symmetry.cpp.
|
static |
Definition at line 157 of file crystal_symmetry.cpp.
|
inline |
Definition at line 33 of file get_irreducible_reciprocal_mesh.hpp.
|
inline |
Compute a metric tensor.
Definition at line 36 of file lattice.hpp.
|
inline |
Compute error of the symmetry-transformed metric tensor.
Definition at line 43 of file lattice.hpp.
|
inline |
Definition at line 58 of file lattice.hpp.
|
inline |
Return angle phi in the range [0, 2Pi) by its values of sin(phi) and cos(phi).
Definition at line 36 of file rotation.hpp.
|
inline |
Generate SU(2) rotation matrix from the axes and angle.
Definition at line 48 of file rotation.hpp.
|
inline |
Generate SU2(2) rotation matrix from a 3x3 rotation matrix in Cartesian coordinates.
Create quaternion components from the 3x3 matrix. The components are just a w = Cos(\Omega/2) and {x,y,z} = unit rotation vector multiplied by Sin(\Omega/2)
See https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation and https://en.wikipedia.org/wiki/Rotation_group_SO(3)#Quaternions_of_unit_norm
Definition at line 70 of file rotation.hpp.
|
inline |
Get axis and angle from rotation matrix.
Definition at line 100 of file rotation.hpp.
|
inline |
Generate rotation matrix from three Euler angles.
Euler angles \( \alpha, \beta, \gamma \) define the general rotation as three consecutive rotations:
The total rotation matrix is defined as a product of three rotation matrices:
\[ R(\alpha, \beta, \gamma) = \left( \begin{array}{ccc} \cos(\alpha) & -\sin(\alpha) & 0 \\ \sin(\alpha) & \cos(\alpha) & 0 \\ 0 & 0 & 1 \end{array} \right) \left( \begin{array}{ccc} \cos(\beta) & 0 & \sin(\beta) \\ 0 & 1 & 0 \\ -\sin(\beta) & 0 & \cos(\beta) \end{array} \right) \left( \begin{array}{ccc} \cos(\gamma) & -\sin(\gamma) & 0 \\ \sin(\gamma) & \cos(\gamma) & 0 \\ 0 & 0 & 1 \end{array} \right) = \left( \begin{array}{ccc} \cos(\alpha) \cos(\beta) \cos(\gamma) - \sin(\alpha) \sin(\gamma) & -\sin(\alpha) \cos(\gamma) - \cos(\alpha) \cos(\beta) \sin(\gamma) & \cos(\alpha) \sin(\beta) \\ \sin(\alpha) \cos(\beta) \cos(\gamma) + \cos(\alpha) \sin(\gamma) & \cos(\alpha) \cos(\gamma) - \sin(\alpha) \cos(\beta) \sin(\gamma) & \sin(\alpha) \sin(\beta) \\ -\sin(\beta) \cos(\gamma) & \sin(\beta) \sin(\gamma) & \cos(\beta) \end{array} \right) \]
Definition at line 174 of file rotation.hpp.
|
inline |
Compute Euler angles corresponding to the proper rotation matrix.
Definition at line 196 of file rotation.hpp.
|
inline |
Definition at line 33 of file symmetrize_density_matrix.hpp.
|
inline |
Symmetrize density matrix.
Density matrix arises in LAPW or PW methods. In PW it is computed in the basis of beta-projectors. Occupancy matrix is computed for the Hubbard-U correction. In both cases the matrix has the same structure and is symmetrized in the same way The symmetrization does depend explicitly on the beta or wfc. The last parameter is on when the atom has spin-orbit coupling and hubbard correction in that case, we must skip half of the indices because of the averaging of the radial integrals over the total angular momentum
We start from the spectral represntation of the occupancy operator defined for the irreducible Brillouin zone:
\[ \hat N_{IBZ} = \sum_{j} \sum_{{\bf k}}^{IBZ} | \Psi_{j{\bf k}}^{\sigma} \rangle w_{\bf k} n_{j{\bf k}} \langle \Psi_{j{\bf k}}^{\sigma'} | \]
and a set of localized orbitals with the pure angular character (this can be LAPW functions, beta-projectors or localized Hubbard orbitals) :
\[ |\phi_{\ell m}^{\alpha {\bf T}}\rangle \]
The orbitals are labeled by the angular and azimuthal quantum numbers ( \( \ell m \)), atom index ( \( \alpha \)) and a lattice translation vector ( \( {\bf T} \)) such that:
\[ \langle {\bf r} | \phi_{\ell m}^{\alpha {\bf T}} \rangle = \phi_{\ell m}({\bf r - r_{\alpha} - T}) \]
There might be several localized orbitals per atom. We wish to compute the symmetrized occupation matrix:
\[ n_{\ell m \alpha {\bf T} \sigma, \ell' m' \alpha' {\bf T}' \sigma'} = \langle \phi_{\ell m}^{\alpha {\bf T}} | \hat N | \phi_{\ell' m'}^{\alpha' {\bf T'}} \rangle = \sum_{\bf P} \sum_{j} \sum_{{\bf k}}^{IBZ} \langle \phi_{\ell m}^{\alpha {\bf T}} | \hat{\bf P} \Psi_{j{\bf k}}^{\sigma} \rangle w_{\bf k} n_{j{\bf k}} \langle \hat{\bf P} \Psi_{j{\bf k}}^{\sigma'} | \phi_{\ell' m'}^{\alpha' {\bf T'}} \rangle \]
Let's now label the overlap integrals between localized orbitals and KS wave-functions:
\[ A_{\ell m j{\bf k}}^{\alpha {\bf T} \sigma} = \langle \Psi_{j{\bf k}}^{\sigma} | \phi_{\ell m}^{\alpha {\bf T}} \rangle = \int \Psi_{j{\bf k}}^{\sigma *}({\bf r}) \phi_{\ell m}({\bf r} - {\bf r}_{\alpha} - {\bf T}) d{\bf r} \]
and check how it transforms under the symmetry operation \( \hat {\bf P} = \{ {\bf R} | {\bf t} \} \) applied to the KS states.
\[ \int \big( \hat {\bf P}\Psi_{j {\bf k}}^{\sigma *}({\bf r}) \big) \phi_{\ell m}({\bf r} - {\bf r}_{\alpha} - {\bf T}) d{\bf r} = \int \Psi_{j {\bf k}}^{\sigma *}({\bf r}) \big( \hat {\bf P}^{-1} \phi_{\ell m}({\bf r} - {\bf r}_{\alpha} - {\bf T}) \big) d{\bf r} \]
Let's first derive how the inverse symmetry operation acts on the localized orbital centered on the atom inside a unit cell (no T):
\[ \hat {\bf P}^{-1} \phi\big( {\bf r} - {\bf r}_{\alpha} \big) = \phi\big( {\bf R} {\bf r} + {\bf t} - {\bf r}_{\alpha} \big) = \\ \phi\big( {\bf R}({\bf r} - {\bf R}^{-1}({\bf r}_{\alpha} - {\bf t})) \big) = \tilde \phi \big( {\bf r} - {\bf R}^{-1}({\bf r}_{\alpha} - {\bf t}) \big) \]
This operation rotates the orbital and centers it at the position
\[ {\bf r}_{\beta} = {\bf R}^{-1}{\bf r}_{\alpha} - {\bf R}^{-1}{\bf t} = \hat {\bf P}^{-1}{\bf r}_{\alpha} \]
For example, suppose thar we have y-orbital centered at \( {\bf r}_{\alpha} = [1, 0] \) (black dot) and a symmetry operation \( \hat {\bf P} = \{ {\bf R} | {\bf t} \} \) that rotates by \( \pi/2 \) counterclockwise and translates by [1/2, 1/2]:
Under this symmetry operation the atom coordinate will transform into [1/2, 3/2] (red dot), but this is not(!) how the orbital is transformed. The origin of the atom will transform according to the inverse of \( \hat {\bf P} \) into \( {\bf r}_{\beta} = [-1/2, -1/2] \) (blue dot) such that \( \hat {\bf P} {\bf r}_{\beta} = {\bf r}_{\alpha} \):
To be more precise, we should highlight that the transformed atom coordinate can go out of the original unit cell and can be brought back with a translation vector:
\[ \hat {\bf P}^{-1}{\bf r}_{\alpha} = {\bf r}_{\beta} + {\bf T}_{P\alpha\beta} \]
Now let's derive how the inverse symmetry operation acts on the localized orbital \( \phi({\bf r}) \) centered on atom in the arbitrary unit cell:
\[ \hat {\bf P}^{-1} \phi\big( {\bf r} - {\bf r}_{\alpha} - {\bf T} \big) = \phi\big( {\bf R} {\bf r} + {\bf t} - {\bf r}_{\alpha} - {\bf T} \big) = \\ \phi\big( {\bf R}({\bf r} - {\bf R}^{-1}({\bf r}_{\alpha} + {\bf T} - {\bf t})) \big) = \tilde \phi\big( {\bf r} - {\bf R}^{-1}({\bf r}_{\alpha} + {\bf T} - {\bf t}) \big) = \tilde \phi\big( {\bf r} - {\bf r}_{\beta} - {\bf T}_{P\alpha\beta} - {\bf R}^{-1}{\bf T} \big) \]
Now let's check how the atomic orbitals transfrom under the rotational part of the symmetry operation. The atomic functions of ( \( \ell m \)) character is expressed as a product of radial function and a spherical harmonic:
\[ \phi_{\ell m}({\bf r}) = \phi_{\ell}(r) Y_{\ell m}(\theta, \phi) \]
Under rotation the spherical harmonic is transformed as:
\[ Y_{\ell m}({\bf P} \hat{\bf r}) = {\bf P}^{-1}Y_{\ell m}(\hat {\bf r}) = \sum_{m'} D_{m'm}^{\ell}({\bf P}^{-1}) Y_{\ell m'}(\hat {\bf r}) = \sum_{m'} D_{mm'}^{\ell}({\bf P}) Y_{\ell m'}(\hat {\bf r}) \]
so
\[ \tilde \phi_{\ell m}({\bf r}) =\hat {\bf P}^{-1} \phi_{\ell}(r) Y_{\ell m}(\theta, \phi) = \sum_{m'} D_{mm'}^{\ell}({\bf P}) \phi_{\ell}(r) Y_{\ell m'}(\theta, \phi) \]
We will use Bloch theorem to get rid of the translations in the argument of \( \tilde \phi \):
\[ \int \Psi_{j {\bf k}}^{\sigma *}({\bf r}) \tilde \phi_{\ell m} \big( {\bf r} - {\bf r}_{\beta} - {\bf T}_{P\alpha\beta} - {\bf R}^{-1}{\bf T} \big) d{\bf r} = e^{-i{\bf k}({\bf T}_{P\alpha\beta} + {\bf R}^{-1}{\bf T})} \int \Psi_{j {\bf k}}^{\sigma *}({\bf r}) \tilde \phi_{\ell m} \big( {\bf r} - {\bf r}_{\beta} \big) d{\bf r} \]
(the "-" in the phase factor appears because KS wave-functions are complex conjugate) and now we can write
\[ A_{\ell m j\hat {\bf P}{\bf k}}^{\alpha {\bf T} \sigma} = e^{-i{\bf k}({\bf T}_{P\alpha\beta} + {\bf R}^{-1}{\bf T})} \sum_{m'} D_{mm'}^{\ell}({\bf P}) A_{\ell m' j{\bf k}}^{\beta \sigma} \]
The final expression for the symmetrized matrix is then
\[ n_{\ell m \alpha {\bf T} \sigma, \ell' m' \alpha' {\bf T}' \sigma'} = \sum_{\bf P} \sum_{j} \sum_{{\bf k}}^{IBZ} A_{\ell m j\hat {\bf P}{\bf k}}^{\alpha {\bf T} \sigma *} w_{\bf k} n_{j{\bf k}} A_{\ell' m' j\hat {\bf P}{\bf k}}^{\alpha' {\bf T'} \sigma'} = \\ = \sum_{\bf P} \sum_{j} \sum_{{\bf k}}^{IBZ} e^{i{\bf k}({\bf T}_{P\alpha\beta} + {\bf R}^{-1}{\bf T})} e^{-i{\bf k}({\bf T}_{P\alpha'\beta'} + {\bf R}^{-1}{\bf T'})} \sum_{m_1 m_2} D_{mm_1}^{\ell *}({\bf P}) D_{m'm_2}^{\ell'}({\bf P}) A_{\ell m_1 j{\bf k}}^{\beta \sigma *} A_{\ell' m_2 j{\bf k}}^{\beta' \sigma'} w_{\bf k} n_{j{\bf k}} \]
In the case of \( \alpha = \alpha' \) and \( {\bf T}={\bf T}' \) all the phase-factor exponents disappear and we get an expression for the "on-site" occupation matrix:
\[ n_{\ell m \sigma, \ell' m' \sigma'}^{\alpha} = \sum_{\bf P} \sum_{j} \sum_{{\bf k}}^{IBZ} \sum_{m_1 m_2} D_{mm_1}^{\ell *}({\bf P}) D_{m'm_2}^{\ell'}({\bf P}) A_{\ell m_1 j{\bf k}}^{\beta \sigma *} A_{\ell' m_2 j{\bf k}}^{\beta \sigma'} w_{\bf k} n_{j{\bf k}} = \\ = \sum_{\bf P} \sum_{m_1 m_2} D_{mm_1}^{\ell *}({\bf P}) D_{m'm_2}^{\ell'}({\bf P}) \tilde n_{\ell m_1 \sigma, \ell' m_2 \sigma'}^{\beta} \]
To compute the overlap integrals between KS wave-functions and localized Hubbard orbitals we insert resolution of identity (in \( {\bf G+k} \) planve-waves) between bra and ket:
\[ \langle \phi_{\ell m}^{\alpha} | \Psi_{j{\bf k}}^{\sigma} \rangle = \sum_{\bf G} \phi_{\ell m}^{\alpha *}({\bf G+k}) \Psi_{j}^{\sigma}({\bf G+k}) \]
Definition at line 258 of file symmetrize_density_matrix.hpp.
|
inline |
Definition at line 35 of file symmetrize_field4d.hpp.
|
inline |
Definition at line 33 of file symmetrize_forces.hpp.
|
inline |
Definition at line 35 of file symmetrize_mt_function.hpp.
|
inline |
Definition at line 33 of file symmetrize_occupation_matrix.hpp.
|
inline |
Symmetrize scalar or vector function.
The following operation is performed:
\[ f_{\mathrm{sym}}({\bf r}) = \frac{1}{N_{\mathrm{sym}}} \sum_{\hat{\bf S}\hat{\bf P}} \hat {\bf S} \hat {\bf P}f({\bf r}) \]
where \( f({\bf r}) \) has to be understood as an unsymmetrized scalar or vector function. In the case of a scalar function \( \hat {\bf S} = 1 \). In the case of vector function \( \hat {\bf S} \) is rotation matrix acting on the Cartesian components of the function. \( \hat {\bf P} = \{{\bf R}|{\bf t}\} \) is a spacial part of the full magentic symmetry operatoin acting on the real-space coordinates.
For the function expanded in plane-waves we have:
\[ f_{\mathrm{sym}}({\bf r}) = \frac{1}{N_{\mathrm{sym}}} \sum_{\hat{\bf S}\hat{\bf P}} \hat {\bf S} \hat {\bf P}f({\bf r}) = \frac{1}{N_{\mathrm{sym}}} \sum_{\hat{\bf S}\hat{\bf P}} \hat {\bf S} \sum_{\bf G} f({\bf G}) e^{i{\bf G}\hat{\bf P}^{-1}{\bf r}} = \\ \frac{1}{N_{\mathrm{sym}}} \sum_{\hat{\bf S}\hat{\bf P}} \sum_{\bf G} \hat {\bf S} f({\bf G}) e^{i{\bf G}({\bf R}^{-1}{\bf r} - {\bf R}^{-1}{\bf t})} = \frac{1}{N_{\mathrm{sym}}} \sum_{\hat{\bf S}\hat{\bf P}} \sum_{\bf G} \hat {\bf S} f({\bf G}) e^{i{\bf G}'{\bf r}} e^{-i{\bf G}'{\bf t}} \]
where \( {\bf G}' = {\bf G}{\bf R}^{-1} = {\bf R}^{-T}{\bf G} \). The last expression establishes the link between unsymmetrized plane-wave coefficient at G-vector and symmetrized coefficient at G'. We will rewrite the expression using inverse relation \( {\bf G} = {\bf R}^{T}{\bf G'} \) and summing over G' (which is just a permutaion of G):
\[ f_{\mathrm{sym}}({\bf r}) = \sum_{\bf G'} e^{i{\bf G}'{\bf r}} \frac{1}{N_{\mathrm{sym}}} \sum_{\hat{\bf S}\hat{\bf P}} \hat {\bf S} f({\bf R}^{T}{\bf G'}) e^{-i{\bf G}'{\bf t}} \]
That gives an expression for the symmetrized plane-wave coefficient at G':
\[ f_{\mathrm{sym}}({\bf G}') = \frac{1}{N_{\mathrm{sym}}} \sum_{\hat{\bf S}\hat{\bf P}} \hat {\bf S} f({\bf R}^{T}{\bf G'}) e^{-i{\bf G}'{\bf t}} \]
Once \( f_{\mathrm{sym}}({\bf G}) \) has been calculated for a single G, its values at a star of G can be calculated using the following relation:
\[ f_{\mathrm{sym}}({\bf r}) = \hat{\bf S}\hat{\bf P} f_{\mathrm{sym}}({\bf r}) = \hat{\bf S} f_{\mathrm{sym}}(\hat {\bf P}^{-1}{\bf r}) \]
which leads to the following relation for the plane-wave coefficient:
\[ \sum_{\bf G} f_{\mathrm{sym}}({\bf G})e^{i{\bf G}{\bf r}} = \sum_{\bf G} \hat{\bf S}f_{\mathrm{sym}}({\bf G})e^{i{\bf G}\hat{\bf P}^{-1}{\bf r}} = \sum_{\bf G} \hat{\bf S}f_{\mathrm{sym}}({\bf G})e^{i{\bf G}{\bf R}^{-1}{\bf r}} e^{-i{\bf G}{\bf R}^{-1}{\bf t}} = \sum_{\bf G'} \hat{\bf S}f_{\mathrm{sym}}({\bf G})e^{i{\bf G}'{\bf r}} e^{-i{\bf G}'{\bf t}} = \sum_{\bf G'} \hat{\bf S}f_{\mathrm{sym}}({\bf G'})e^{i{\bf G}'{\bf r}} \]
and so
\[ f_{\mathrm{sym}}({\bf G}') = \hat{\bf S}f_{\mathrm{sym}}({\bf G})e^{-i{\bf G'}{\bf t}} \]
[in] | sym | Description of the crystal symmetry. |
[in] | gvec_shells | Description of the G-vector shells. |
[in] | sym_phase_factors | Phase factors associated with fractional translations. |
[in] | num_mag_dims | Number of magnetic dimensions. |
[in,out] | frg | Array of pointers to scalar and vector parts of the filed being symmetrized. |
Definition at line 99 of file symmetrize_pw_function.hpp.
|
inline |
Definition at line 33 of file symmetrize_stress_tensor.hpp.
|
inline |
Definition at line 43 of file testing.hpp.
|
inline |
Definition at line 71 of file testing.hpp.
|
inline |
Definition at line 111 of file testing.hpp.
|
inline |
Definition at line 148 of file testing.hpp.
|
inline |
Definition at line 181 of file testing.hpp.
|
inline |
Definition at line 262 of file testing.hpp.
|
inline |
Definition at line 80 of file atom_type.hpp.
|
inline |
Definition at line 195 of file basis_functions_index.hpp.
|
inline |
Definition at line 200 of file basis_functions_index.hpp.
|
inline |
Definition at line 353 of file hubbard_orbitals_descriptor.hpp.
|
inline |
Definition at line 120 of file radial_functions_index.hpp.
|
inline |
Definition at line 125 of file radial_functions_index.hpp.
|
inline |
Output angular momentum to a stream.
Definition at line 131 of file radial_functions_index.hpp.
|
inline |
Definition at line 437 of file radial_functions_index.hpp.
|
inline |
Definition at line 442 of file radial_functions_index.hpp.
integer, parameter, public sirius::sirius_integer_type = 1 |
Definition at line 9 of file sirius.f90.
integer, parameter, public sirius::sirius_logical_type = 2 |
Definition at line 10 of file sirius.f90.
integer, parameter, public sirius::sirius_string_type = 3 |
Definition at line 11 of file sirius.f90.
integer, parameter, public sirius::sirius_number_type = 4 |
Definition at line 12 of file sirius.f90.
integer, parameter, public sirius::sirius_object_type = 5 |
Definition at line 13 of file sirius.f90.
integer, parameter, public sirius::sirius_array_type = 6 |
Definition at line 14 of file sirius.f90.
integer, parameter, public sirius::sirius_integer_array_type = 7 |
Definition at line 16 of file sirius.f90.
integer, parameter, public sirius::sirius_logical_array_type = 8 |
Definition at line 17 of file sirius.f90.
integer, parameter, public sirius::sirius_number_array_type = 9 |
Definition at line 18 of file sirius.f90.
integer, parameter, public sirius::sirius_string_array_type = 10 |
Definition at line 19 of file sirius.f90.
integer, parameter, public sirius::sirius_object_array_type = 11 |
Definition at line 20 of file sirius.f90.
integer, parameter, public sirius::sirius_array_array_type = 12 |
Definition at line 21 of file sirius.f90.
const double sirius::speed_of_light = 137.035999139 |
NIST value for the inverse fine structure (http://physics.nist.gov/cuu/Constants/index.html)
Definition at line 33 of file constants.hpp.
const double sirius::bohr_radius = 0.52917721067 |
Bohr radius in angstroms.
Definition at line 39 of file constants.hpp.
const double sirius::pi = 3.1415926535897932385 |
\( \pi \)
Definition at line 42 of file constants.hpp.
const double sirius::twopi = 6.2831853071795864769 |
\( 2\pi \)
Definition at line 45 of file constants.hpp.
const double sirius::fourpi = 12.566370614359172954 |
\( 4\pi \)
Definition at line 48 of file constants.hpp.
const double sirius::y00 = 0.28209479177387814347 |
First spherical harmonic \( Y_{00} = \frac{1}{\sqrt{4\pi}} \).
Definition at line 51 of file constants.hpp.
const double sirius::ha2ev = 27.21138505 |
Hartree in electron-volt units.
Definition at line 54 of file constants.hpp.
const char* const sirius::storage_file_name = "sirius.h5" |
Definition at line 56 of file constants.hpp.
const std::complex<double> sirius::pauli_matrix[4][2][2] |
Pauli matrices in {I, Z, X, Y} order.
Definition at line 59 of file constants.hpp.
extern::rt_graph::Timer sirius::global_rtgraph_timer |
Definition at line 28 of file profiler.cpp.
|
constexpr |
Definition at line 53 of file typedefs.hpp.
const std::map<std::string, int> sirius::libxc_functionals |
Definition at line 39 of file xc_functional_base.hpp.