GBTOlib: library for evaluation of molecular integrals in mixed Gaussian / B-spline basis  111
Public Member Functions | Public Attributes | List of all members
integral_storage_gbl::integral_storage_obj Module Reference

This object provides access to the results of an integral calculation. The object must be associated with the data which can be either in memory or on the disk. The association with the target is performed calling 'init' with the appropriate arguments. If the results are stored in memory then the array pointed to by the variable 'integral' must be associated with a target. If the integrals are stored on the disk then the object integral_file is used to provide access to the data. Note that neither integral_file nor integral are private variables. This is neccessary so that the integral routines can have direct (i.e. fast access) to the data. More...

Collaboration diagram for integral_storage_gbl::integral_storage_obj:
Collaboration graph
[legend]

Public Member Functions

procedure init => init_integral_storage_obj
 This routines initializes the object. Depending on whether the pointer to the output array or a file name are given on input the variable 'integral' or 'integral_file' is set. The routine returns 0 on successful initialization. Non-zero result means an error. More...
 
procedure final => final_integral_storage_obj
 This routine restores the state of the object to the default state, i.e. if the storage is in memory it nullifies the association of the 'integral' pointer. If the storage is on disk then the integral file is closed. More...
 
procedure check => check_integral_storage_obj
 This function checks if the data have meaningful values. More...
 
procedure, non_overridable read => read_integrals
 This routine reads into memory the integrals with the given header and the integral options from the integral_storage_obj given. There is a good reason why the integral file is not given directly but via the integral_storage_obj - see the object description. Note that by default the integral arrays are read-in using the shared-memory feature so in the MPI mode there will be only one copy of the integral array PER NODE. If the shared-memory capability is not available then the code will resort to the local mode where each MPI task keeps its own copy of the integral array. More...
 
procedure, non_overridable write => write_integrals
 This routine writes the integrals and the integral options to the disk. There is a good reason why the path to the integral file is not given directly as an argument but indirectly via the integral_storage_obj - see the object description. More...
 
procedure, non_overridable in_memory => get_memory
 Returns the value of 'memory'. More...
 
procedure, non_overridable on_disk => get_disk
 Returns the value of 'disk'. More...
 
procedure, non_overridable contruct_header_string
 Given the string defining a basis set and a string defining the integral type it returns a single string which merges these two together without additional spaces in between. More...
 

Public Attributes

type(data_file_objintegral_file
 Object used to manage access to the data stored on the disk. More...
 
class(p2d_array_obj), pointer integral => null()
 Pointer to the array where the integrals are stored. The second dimension is used to distinguish integrals of different type. E.g. we usually calculate the overlap and the kinetic energy integrals at once, so the first column may be used for the overlap integrals, while the second one for the kinetic energy ones. More...
 
type(data_header_objdata_header
 Header for the data stored in memory. More...
 

Detailed Description

This object provides access to the results of an integral calculation. The object must be associated with the data which can be either in memory or on the disk. The association with the target is performed calling 'init' with the appropriate arguments. If the results are stored in memory then the array pointed to by the variable 'integral' must be associated with a target. If the integrals are stored on the disk then the object integral_file is used to provide access to the data. Note that neither integral_file nor integral are private variables. This is neccessary so that the integral routines can have direct (i.e. fast access) to the data.

Warning
The type-bound methods which require on input/output an integral file (or integrals in memory) should always pass the reference to this file (memory location) via the integral_storage_obj associated with this file (memory). The file name or integral array for input/output should never be passed directly to the methods. The reason is that the input/output may be associated with another integral_storage_obj. Modifying the file (memory) without involving the associated integral_storage_obj in the process can result in the associated integral_storage_obj getting confused at some point or even corrupting the data on the file! In any case it is strongly reccommended that all interaction with the stored data is performed implementing or extending type-bound methods for this object rather than accessing the disk file directly.

Member Function/Subroutine Documentation

◆ check()

procedure integral_storage_gbl::integral_storage_obj::check

This function checks if the data have meaningful values.

◆ contruct_header_string()

procedure, non_overridable integral_storage_gbl::integral_storage_obj::contruct_header_string

Given the string defining a basis set and a string defining the integral type it returns a single string which merges these two together without additional spaces in between.

◆ final()

procedure integral_storage_gbl::integral_storage_obj::final

This routine restores the state of the object to the default state, i.e. if the storage is in memory it nullifies the association of the 'integral' pointer. If the storage is on disk then the integral file is closed.

◆ in_memory()

procedure, non_overridable integral_storage_gbl::integral_storage_obj::in_memory

Returns the value of 'memory'.

◆ init()

procedure integral_storage_gbl::integral_storage_obj::init

This routines initializes the object. Depending on whether the pointer to the output array or a file name are given on input the variable 'integral' or 'integral_file' is set. The routine returns 0 on successful initialization. Non-zero result means an error.

◆ on_disk()

procedure, non_overridable integral_storage_gbl::integral_storage_obj::on_disk

Returns the value of 'disk'.

◆ read()

procedure, non_overridable integral_storage_gbl::integral_storage_obj::read

This routine reads into memory the integrals with the given header and the integral options from the integral_storage_obj given. There is a good reason why the integral file is not given directly but via the integral_storage_obj - see the object description. Note that by default the integral arrays are read-in using the shared-memory feature so in the MPI mode there will be only one copy of the integral array PER NODE. If the shared-memory capability is not available then the code will resort to the local mode where each MPI task keeps its own copy of the integral array.

◆ write()

procedure, non_overridable integral_storage_gbl::integral_storage_obj::write

This routine writes the integrals and the integral options to the disk. There is a good reason why the path to the integral file is not given directly as an argument but indirectly via the integral_storage_obj - see the object description.

Member Data Documentation

◆ data_header

type(data_header_obj) integral_storage_gbl::integral_storage_obj::data_header

Header for the data stored in memory.

◆ integral

class(p2d_array_obj), pointer integral_storage_gbl::integral_storage_obj::integral => null()

Pointer to the array where the integrals are stored. The second dimension is used to distinguish integrals of different type. E.g. we usually calculate the overlap and the kinetic energy integrals at once, so the first column may be used for the overlap integrals, while the second one for the kinetic energy ones.

◆ integral_file

type(data_file_obj) integral_storage_gbl::integral_storage_obj::integral_file

Object used to manage access to the data stored on the disk.


The documentation for this module was generated from the following file: