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)

source: qs_linres_current.FLoading...

SUBROUTINE

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, retain_rsgrid)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

...

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

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

TYPE(dbcsr_type), |
POINTER |
:: | mat_d0 | ... | |

TYPE(dbcsr_type), |
POINTER |
:: | mat_jp | ... | |

TYPE(dbcsr_type), |
POINTER |
:: | mat_jp_rii | ... | |

TYPE(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 | ... |

LOGICAL, |
INTENT(in), |
OPTIONAL |
:: | retain_rsgrid | ... |

...

TYPE(current_env_type) |
:: | current_env | ... | ||

TYPE(qs_environment_type), |
POINTER |
:: | qs_env | ... | |

INTEGER, |
INTENT(in) |
:: | ib | ... |

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

TYPE(current_env_type) |
:: | current_env | ... | ||

TYPE(qs_environment_type), |
POINTER |
:: | qs_env | ... | |

INTEGER, |
INTENT(in) |
:: | ib | ... |