CP2K 2.4 (Revision 12889)
Classes | Functions | Variables

qs_linres_current Namespace Reference

given the response wavefunctions obtained by the application of the (rxp), p, and ((dk-dl)xp) operators, here the current density vector (jx, jy, jz) is computed for the 3 directions of the magnetic field (Bx, By, Bz) More...

Classes

struct  box_type

Functions

subroutine, public current_build_current (current_env, qs_env, iB, error)
 First calculate the density matrixes, for each component of the current they are 3 because of the r dependent terms Next it collocates on the grid to have J(r) In the GAPW case one need to collocate on the PW grid only the soft part while the rest goes on Lebedev grids The contributions to the shift and to the susceptibility will be calulated separately and added only at the end The calculation of the shift tensor is performed on the position of the atoms and on other selected points in real space summing up the contributions from the PW grid current density and the local densities Spline interpolation is used.
subroutine, public calculate_jrho_resp (mat_d0, mat_jp, mat_jp_rii, mat_jp_riii, iB, idir, current_rs, current_gs, qs_env, current_env, soft_valid, error)
 Calculation of the idir component of the response current density in the presence of a constant magnetic field in direction iB the current density is collocated on the pw grid in real space.
subroutine, public current_set_gauge (current_env, qs_env, error)
subroutine, public current_build_chi (current_env, qs_env, iB, error)
subroutine current_build_chi_many_centers (current_env, qs_env, iB, error)
subroutine current_build_chi_one_center (current_env, qs_env, iB, error)

Variables

CHARACTER(len=*), parameter,
private 
moduleN = 'qs_linres_current'
REAL(dp), dimension(3,
3, 3), parameter 
Levi_Civita = RESHAPE((/ 0.0_dp, 0.0_dp,0.0_dp,0.0_dp,0.0_dp,-1.0_dp, 0.0_dp,1.0_dp,0.0_dp, 0.0_dp, 0.0_dp,1.0_dp,0.0_dp,0.0_dp, 0.0_dp,-1.0_dp,0.0_dp,0.0_dp, 0.0_dp,-1.0_dp,0.0_dp,1.0_dp,0.0_dp, 0.0_dp, 0.0_dp,0.0_dp,0.0_dp/), (/3,3,3/))

Detailed Description

given the response wavefunctions obtained by the application of the (rxp), p, and ((dk-dl)xp) operators, here the current density vector (jx, jy, jz) is computed for the 3 directions of the magnetic field (Bx, By, Bz)

History
created 02-2006 [MI]
Author:
MI

Function Documentation

subroutine,public qs_linres_current::calculate_jrho_resp ( TYPE(cp_dbcsr_type),pointer  mat_d0,
TYPE(cp_dbcsr_type),pointer  mat_jp,
TYPE(cp_dbcsr_type),pointer  mat_jp_rii,
TYPE(cp_dbcsr_type),pointer  mat_jp_riii,
INTEGER,intent(in)  iB,
INTEGER,intent(in)  idir,
TYPE(pw_p_type),intent(inout)  current_rs,
TYPE(pw_p_type),intent(inout)  current_gs,
TYPE(qs_environment_type),pointer  qs_env,
TYPE(current_env_type)  current_env,
LOGICAL,intent(in),optional  soft_valid,
TYPE(cp_error_type),intent(inout)  error 
)

Calculation of the idir component of the response current density in the presence of a constant magnetic field in direction iB the current density is collocated on the pw grid in real space.

Note:
The collocate is done in three parts, one for each density matrix In all cases the density matrices and therefore the collocation are not symmetric, that means that all the pairs (ab and ba) have to be considered separately

mat_jp_{} is multiplied by f_{} = {} (d{}/dr)_{idir} - (d{}/dr)_{idir} {}

mat_jp_rii_{} is multiplied by f_{} = {} (r - R_{})_{iiiB} (d{}/dr)_{idir} - (d{}/dr)_{idir} (r - R_{})_{iiiB} {} + {} {} (last term only if iiiB=idir)

mat_jp_riii_{} is multiplied by (be careful: change in sign with respect to previous) f_{} = -{} (r - R_{})_{iiB} (d{}/dr)_{idir} + (d{}/dr)_{idir} (r - R_{})_{iiB} {} - {} {} (last term only if iiB=idir)

All the terms sum up to the same grid

Definition at line 605 of file qs_linres_current.f90.

References qs_collocate_density::collocate_pgf_product_rspace(), cp_dbcsr_operations::cp_dbcsr_add_block_node(), cp_dbcsr_interface::cp_dbcsr_distribution(), cp_dbcsr_interface::cp_dbcsr_finalize(), cp_dbcsr_interface::cp_dbcsr_get_data_size(), cp_dbcsr_interface::cp_dbcsr_get_matrix_type(), cp_dbcsr_interface::cp_dbcsr_get_num_blocks(), cp_dbcsr_interface::cp_dbcsr_init(), CPPostcondition, input_constants::current_gauge_atom, current_set_gauge(), task_list_methods::distribute_tasks(), error, qs_linres_op::fac_vecp(), qs_modify_pab_block::FUNC_AB, basis_set_types::get_gto_basis_set(), qs_neighbor_list_types::get_iterator_info(), qs_environment_types::get_qs_env(), orbital_pointers::ncoset, pw_env_types::pw_env_get(), realspace_grid_types::rs_grid_create(), realspace_grid_types::rs_grid_mult_and_add(), realspace_grid_types::rs_grid_release(), realspace_grid_types::rs_grid_retain(), realspace_grid_types::rs_grid_zero(), termination::stop_program(), and timings::timeset().

Referenced by current_build_current().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine,public qs_linres_current::current_build_chi ( TYPE(current_env_type)  current_env,
TYPE(qs_environment_type),pointer  qs_env,
INTEGER,intent(in)  iB,
TYPE(cp_error_type),intent(inout)  error 
)

Definition at line 2163 of file qs_linres_current.f90.

References current_build_chi_many_centers(), and current_build_chi_one_center().

Referenced by qs_linres_module::linres_calculation().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine qs_linres_current::current_build_chi_many_centers ( TYPE(current_env_type)  current_env,
TYPE(qs_environment_type),pointer  qs_env,
INTEGER,intent(in)  iB,
TYPE(cp_error_type),intent(inout)  error 
) [private]
subroutine qs_linres_current::current_build_chi_one_center ( TYPE(current_env_type)  current_env,
TYPE(qs_environment_type),pointer  qs_env,
INTEGER,intent(in)  iB,
TYPE(cp_error_type),intent(inout)  error 
) [private]
subroutine,public qs_linres_current::current_build_current ( TYPE(current_env_type)  current_env,
TYPE(qs_environment_type),pointer  qs_env,
INTEGER,intent(in)  iB,
TYPE(cp_error_type),intent(inout)  error 
)

First calculate the density matrixes, for each component of the current they are 3 because of the r dependent terms Next it collocates on the grid to have J(r) In the GAPW case one need to collocate on the PW grid only the soft part while the rest goes on Lebedev grids The contributions to the shift and to the susceptibility will be calulated separately and added only at the end The calculation of the shift tensor is performed on the position of the atoms and on other selected points in real space summing up the contributions from the PW grid current density and the local densities Spline interpolation is used.

Parameters:
psi1, p_psi1 : scratch MOS coefficients
Note:
The susceptibility is needed to compute the G=0 term of the shift in reciprocal space. {ij} = (r x Jj)_i (where Jj id the current density generated by the field in direction j) To calculate the susceptibility on the PW grids it is necessary to apply the position operator yet another time. This cannot be done on directly on the full J(r) because it is not localized Therefore it is done state by state (see linres_nmr_shift)
Author:
MI

Definition at line 186 of file qs_linres_current.f90.

References qs_linres_atom_current::calculate_jrho_atom(), calculate_jrho_resp(), dbcsr_util::convert_offsets_to_sizes(), cp_dbcsr_interface::cp_dbcsr_copy(), cp_dbcsr_interface::cp_dbcsr_init(), cp_fm_types::cp_fm_create(), cp_fm_basic_linalg::cp_fm_scale_and_add(), cp_output_handling::cp_p_file, cp_subsys_types::cp_subsys_get(), CPPostcondition, qs_mo_types::get_mo_set(), particle_types::get_particle_set(), qs_environment_types::get_qs_env(), pw_methods::pw_axpy(), pw_env_types::pw_env_get(), pw_pool_types::pw_pool_create_pw(), realspace_grid_cube::pw_to_cube(), pw_types::REALDATA3D, input_section_types::section_get_ivals(), termination::stop_program(), timings::timeset(), and mathconstants::twopi.

Here is the call graph for this function:

subroutine,public qs_linres_current::current_set_gauge ( TYPE(current_env_type)  current_env,
TYPE(qs_environment_type),pointer  qs_env,
TYPE(cp_error_type),intent(inout)  error 
)

Variable Documentation

REAL(dp),dimension(3, 3, 3),parameter qs_linres_current::Levi_Civita = RESHAPE((/ 0.0_dp, 0.0_dp,0.0_dp,0.0_dp,0.0_dp,-1.0_dp, 0.0_dp,1.0_dp,0.0_dp, 0.0_dp, 0.0_dp,1.0_dp,0.0_dp,0.0_dp, 0.0_dp,-1.0_dp,0.0_dp,0.0_dp, 0.0_dp,-1.0_dp,0.0_dp,1.0_dp,0.0_dp, 0.0_dp, 0.0_dp,0.0_dp,0.0_dp/), (/3,3,3/))

Definition at line 155 of file qs_linres_current.f90.

Referenced by current_build_chi_one_center().

CHARACTER(len=*),parameter,private qs_linres_current::moduleN = 'qs_linres_current'

Definition at line 149 of file qs_linres_current.f90.