CP2K C/C++ interface.
More...
|
integer(c_long) function | cp2k_active_space_get_fock_sub (f_env_id, buf, buf_len) |
| Get the active space Fock sub-matrix (as a full matrix) More...
|
|
integer(c_long) function | cp2k_active_space_get_eri_nze_count (f_env_id) |
| Get the number of non-zero elements of the ERI. More...
|
|
integer(c_long) function | cp2k_active_space_get_eri (f_env_id, buf_coords, buf_coords_len, buf_values, buf_values_len) |
| Get the electron repulsion integrals (as a sparse tensor) More...
|
|
logical function | eri2array_func (this, i, j, k, l, val) |
| Copy the active space ERI to C buffers. More...
|
|
CP2K C/C++ interface.
- History
- 12.2012 created [Hossein Bani-Hashemian] 04.2016 restructured [Hossein Bani-Hashemian, Ole Schuett] 03.2018 added Active Space functions [Tiziano Mueller]
- Author
- Mohammad Hossein Bani-Hashemian
◆ cp2k_active_space_get_fock_sub()
integer(c_long) function libcp2k::cp2k_active_space_get_fock_sub |
( |
integer(c_int), value |
f_env_id, |
|
|
real(c_double), dimension(0:buf_len-1), intent(out) |
buf, |
|
|
integer(c_long), value |
buf_len |
|
) |
| |
Get the active space Fock sub-matrix (as a full matrix)
- Parameters
-
f_env_id | the force env id |
buf | C array to write the data to |
buf_len | The length of the C array to write the data to (must be at least mo_count^2) |
- Returns
- The number of elements written or -1 if unavailable or buffer too small
- Author
- Tiziano Mueller
Definition at line 510 of file libcp2k.F.
◆ cp2k_active_space_get_eri_nze_count()
integer(c_long) function libcp2k::cp2k_active_space_get_eri_nze_count |
( |
integer(c_int), value |
f_env_id | ) |
|
Get the number of non-zero elements of the ERI.
- Parameters
-
- Returns
- The number of elements or -1 if unavailable
- Author
- Tiziano Mueller
Definition at line 562 of file libcp2k.F.
◆ cp2k_active_space_get_eri()
integer(c_long) function libcp2k::cp2k_active_space_get_eri |
( |
integer(c_int), intent(in), value |
f_env_id, |
|
|
integer(c_int), dimension(1:buf_coords_len), intent(out), target |
buf_coords, |
|
|
integer(c_long), intent(in), value |
buf_coords_len, |
|
|
real(c_double), dimension(1:buf_values_len), intent(out), target |
buf_values, |
|
|
integer(c_long), intent(in), value |
buf_values_len |
|
) |
| |
Get the electron repulsion integrals (as a sparse tensor)
- Parameters
-
f_env_id | the force env id |
buf_coords | C array to write the indizes (i,j,k,l) to |
buf_coords_len | size of the buffer, must be at least 4*nze_count |
buf_values | C array to write the values to |
buf_values_len | size of the buffer, must be at least nze_count |
- Returns
- The number of elements written or -1 if unavailable or buffer too small
- Author
- Tiziano Mueller
Definition at line 599 of file libcp2k.F.
◆ eri2array_func()
logical function libcp2k::eri2array_func |
( |
class(eri2array), intent(inout) |
this, |
|
|
integer, intent(in) |
i, |
|
|
integer, intent(in) |
j, |
|
|
integer, intent(in) |
k, |
|
|
integer, intent(in) |
l, |
|
|
real(kind=dp), intent(in) |
val |
|
) |
| |
Copy the active space ERI to C buffers.
- Parameters
-
this | Class pointer |
i | The i index of the value val |
j | The j index of the value val |
k | The k index of the value val |
l | The l index of the value val |
val | The value at the given index |
- Returns
- Always true to continue with the loop
- Author
- Tiziano Mueller
Definition at line 651 of file libcp2k.F.