(git:6a2e663)
libcp2k Module Reference

CP2K C/C++ interface. More...

Functions/Subroutines

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

Detailed Description

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

Function/Subroutine Documentation

◆ 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_idthe force env id
bufC array to write the data to
buf_lenThe 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.

Here is the call graph for this function:

◆ 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
f_env_idthe force env id
Returns
The number of elements or -1 if unavailable
Author
Tiziano Mueller

Definition at line 562 of file libcp2k.F.

Here is the call graph for this function:

◆ 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_idthe force env id
buf_coordsC array to write the indizes (i,j,k,l) to
buf_coords_lensize of the buffer, must be at least 4*nze_count
buf_valuesC array to write the values to
buf_values_lensize 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.

Here is the call graph for this function:

◆ 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
thisClass pointer
iThe i index of the value val
jThe j index of the value val
kThe k index of the value val
lThe l index of the value val
valThe value at the given index
Returns
Always true to continue with the loop
Author
Tiziano Mueller

Definition at line 651 of file libcp2k.F.