Documentation for module qs_fb_atomic_halo_types

...

source: qs_fb_atomic_halo_types.F
Loading...

public Types:

fb_atomic_halo_list_obj
defines a fb_atomic_halo_list object
fb_atomic_halo_obj
defines a fb_atomic_halo object

public Subroutines/Functions:

Given a global atomic index, convert it to its index in a given atomic halo, if found. The atomic_halo object must already have been sorted
Builds halo atoms for a given (owner) atom
Estimates the computational cost with respect to the filter matrix calculation associated to an atomic halo. Given the bottle neck of the filter matrix generation will be the diagoanlisation of the atomic matrices (each consists of atoms in an atomic halo), the cost can be estimated by counting the total number of contracted gaussians in the halo
Creates and initialises an empty fb_atomic_halo object
Gets attributes from a fb_atomic_halo object, one should only access the data content in a fb_atomic_halo outside this module via this procedure.
Checks if a fb_atomic_halo object is associated with an actual data content or not
Initialises an fb_atomic_halo object, and makes it empty
Associates one fb_atomic_halo_list object to another
Creates and initialises an empty fb_atomic_halo_list object
Gets attributes from an fb_atomic_halo_list object, one should only access the data content in a fb_atomic_halo_list outside this module via this procedure.
Checks if a fb_atomic_halo_list object is associated with an actual data content or not
Nullifies a fb_atomic_halo_list object, note that it does not release the original object. This procedure is used to nullify the pointer contained in the object which is used to associate to the actual object content
Releases an fb_atomic_halo_list object
Retains an fb_atomic_halo_list object
Sets attributes from an fb_atomic_halo_list object, one should only set the data content in a fb_atomic_halo_list outside this module via this procedure.
Writes out the atomic halo list summary, no detailed neighbour lists, just average, min and max number of halo atoms in the halo list
Estimates the total number of electrons in a halo using atomic numbers
Nullifies a fb_atomic_halo object, note that it does not release the original object. This procedure is used to nullify the pointer contained in the object which is used to associate to the actual object content
Releases an fb_atomic_halo object
Sets attributes in a fb_atomic_halo object, one should only set the data content in a fb_atomic_halo from outside this module via this procedure.
Sort the list of atomic indices in the halo in accending order. The atomic_halo must not be empty
Builds the required pair_radii array required for building the halo atoms from a given set of cut off radii

public Types:

TYPE :: fb_atomic_halo_list_obj

defines a fb_atomic_halo_list object


POINTER, PRIVATE :: obj ...

TYPE :: fb_atomic_halo_obj

defines a fb_atomic_halo object


POINTER, PRIVATE :: obj ...

SUBROUTINEfb_atomic_halo_atom_global2halo(atomic_halo, iatom_global, iatom_halo, found)

Given a global atomic index, convert it to its index in a given atomic halo, if found. The atomic_halo object must already have been sorted

Arguments:
INTENT(in)
:: atomic_halo the atomic_halo object
INTEGER,
INTENT(in)
:: iatom_global the global atomic index
INTEGER,
INTENT(out)
:: iatom_halo the atomic index inside the halo
LOGICAL,
INTENT(out)
:: found returns true if given atom is in the halo, otherwise false

SUBROUTINEfb_atomic_halo_build_halo_atoms(owner_atom, particle_set, cell, pair_radii, halo_atoms, nhalo_atoms, owner_id_in_halo)

Builds halo atoms for a given (owner) atom

Arguments:
INTEGER,
INTENT(in)
:: owner_atom the atom the halo is going to be built for
INTENT(in)
:: particle_set(:) an array of cp2k particle set objects, this provides atomic information
TYPE(cell_type),
POINTER
:: cell cp2k cell object, used for resolving periodic boundary conditions
REAL(dp),
INTENT(in)
:: pair_radii(:,:) 2D array storing interaction radii between two kinds
INTEGER,
POINTER
:: halo_atoms(:) must be NULL pointer on input, and outputs an array of halo atoms corresponding to the owner atom
INTEGER,
INTENT(out)
:: nhalo_atoms outputs number of halo atoms
INTEGER,
INTENT(out)
:: owner_id_in_halo the index of the owner atom in the halo_atoms list

FUNCTIONfb_atomic_halo_cost(atomic_halo, particle_set, qs_kind_set)

Estimates the computational cost with respect to the filter matrix calculation associated to an atomic halo. Given the bottle neck of the filter matrix generation will be the diagoanlisation of the atomic matrices (each consists of atoms in an atomic halo), the cost can be estimated by counting the total number of contracted gaussians in the halo

Return Value ::
REAL(dp)
computation cost w.r.t. the filter matrix calculation for this atomic halo
Arguments:
INTENT(in)
:: atomic_halo the atomic_halo object in question
INTENT(in)
:: particle_set(:) an array of cp2k particle set objects, this provides atomic information
INTENT(in)
:: qs_kind_set(:) cp2k qs_kind objects, provides information on the number of contracted gaussian functions each kind has

SUBROUTINEfb_atomic_halo_create(atomic_halo)

Creates and initialises an empty fb_atomic_halo object

Arguments:
INTENT(inout)
:: atomic_halo the fb_atomic_halo object, its content must be NULL and cannot be UNDEFINED

SUBROUTINEfb_atomic_halo_get(atomic_halo, owner_atom, owner_id_in_halo, natoms, nelectrons, halo_atoms, sorted, cost)

Gets attributes from a fb_atomic_halo object, one should only access the data content in a fb_atomic_halo outside this module via this procedure.

Arguments:
INTENT(in)
:: atomic_halo the fb_atomic_halo object, its content must not be NULL or UNDEFINED
INTEGER,
INTENT(out),
OPTIONAL
:: owner_atom if present, outputs atmic_halo%obj%owner_atom
INTEGER,
INTENT(out),
OPTIONAL
:: owner_id_in_halo ...
INTEGER,
INTENT(out),
OPTIONAL
:: natoms if present, outputs atomic_halo%obj%natoms
INTEGER,
INTENT(out),
OPTIONAL
:: nelectrons if present, outputs atomic_halo%obj%nelectrons
INTEGER,
OPTIONAL, POINTER
:: halo_atoms(:) if present, outputs pointer atomic_halo%obj%halo_atoms
LOGICAL,
INTENT(out),
OPTIONAL
:: sorted if present, outputs atomic_halo%obj%sorted
REAL(dp),
INTENT(out),
OPTIONAL
:: cost if present, outputs atomic_halo%obj%cost

FUNCTIONfb_atomic_halo_has_data(atomic_halo)

Checks if a fb_atomic_halo object is associated with an actual data content or not

Return Value ::
LOGICAL
Arguments:
INTENT(in)
:: atomic_halo the fb_atomic_halo object

SUBROUTINEfb_atomic_halo_init(atomic_halo)

Initialises an fb_atomic_halo object, and makes it empty

Arguments:
INTENT(inout)
:: atomic_halo the fb_atomic_halo object, its content must not be NULL or UNDEFINED

SUBROUTINEfb_atomic_halo_list_associate(a, b)

Associates one fb_atomic_halo_list object to another

Arguments:
INTENT(out)
:: a the fb_atomic_halo_list object to be associated
INTENT(in)
:: b the fb_atomic_halo_list object that a is to be associated to

SUBROUTINEfb_atomic_halo_list_create(atomic_halos)

Creates and initialises an empty fb_atomic_halo_list object

Arguments:
INTENT(inout)
:: atomic_halos the fb_atomic_halo object, its content must not be NULL or UNDEFINED

SUBROUTINEfb_atomic_halo_list_get(atomic_halos, nhalos, max_nhalos, halos)

Gets attributes from an fb_atomic_halo_list object, one should only access the data content in a fb_atomic_halo_list outside this module via this procedure.

Arguments:
INTENT(in)
:: atomic_halos the fb_atomic_halo object, its content must not be NULL or UNDEFINED
INTEGER,
INTENT(out),
OPTIONAL
:: nhalos if present, gives nhalos = atomic_halos%obj%nhalos
INTEGER,
INTENT(out),
OPTIONAL
:: max_nhalos if present, gives max_nhalos = atomic_halos%obj%max_nhalos
OPTIONAL, POINTER
:: halos(:) if present, gives halos => atomic_halos%obj%halos

FUNCTIONfb_atomic_halo_list_has_data(atomic_halos)

Checks if a fb_atomic_halo_list object is associated with an actual data content or not

Return Value ::
LOGICAL
Arguments:
INTENT(in)
:: atomic_halos the fb_atomic_halo_list object

SUBROUTINEfb_atomic_halo_list_nullify(atomic_halos)

Nullifies a fb_atomic_halo_list object, note that it does not release the original object. This procedure is used to nullify the pointer contained in the object which is used to associate to the actual object content

Arguments:
INTENT(inout)
:: atomic_halos the fb_atomic_halo_list object

SUBROUTINEfb_atomic_halo_list_release(atomic_halos)

Releases an fb_atomic_halo_list object

Arguments:
INTENT(inout)
:: atomic_halos the fb_atomic_halo object, its content must not be UNDEFINED, and does nothing if it is NULL

SUBROUTINEfb_atomic_halo_list_retain(atomic_halos)

Retains an fb_atomic_halo_list object

Arguments:
INTENT(in)
:: atomic_halos the fb_atomic_halo object, its content must not be NULL or UNDEFINED

SUBROUTINEfb_atomic_halo_list_set(atomic_halos, nhalos, max_nhalos, halos)

Sets attributes from an fb_atomic_halo_list object, one should only set the data content in a fb_atomic_halo_list outside this module via this procedure.

Arguments:
INTENT(inout)
:: atomic_halos the fb_atomic_halo object, its content must not be NULL or UNDEFINED
INTEGER,
INTENT(in),
OPTIONAL
:: nhalos if present, sets atomic_halos%obj%nhalos = nhalos
INTEGER,
INTENT(in),
OPTIONAL
:: max_nhalos if present, sets atomic_halos%obj%max_nhalos = max_nhalos
OPTIONAL, POINTER
:: halos(:) if present, reallocates atomic_halos%obj%halos to the size of halos

SUBROUTINEfb_atomic_halo_list_write_info(atomic_halos, para_env, scf_section)

Writes out the atomic halo list summary, no detailed neighbour lists, just average, min and max number of halo atoms in the halo list

Arguments:
INTENT(in)
:: atomic_halos the fb_atomic_halo object
POINTER
:: para_env pointer to a para_env_type object containing MPI info
POINTER
:: scf_section pointer to the scf input section

FUNCTIONfb_atomic_halo_nelectrons_estimate_z(atomic_halo, particle_set)

Estimates the total number of electrons in a halo using atomic numbers

Return Value ::
INTEGER
estimate of electron number
Arguments:
INTENT(in)
:: atomic_halo the atomic_halo object
INTENT(in)
:: particle_set(:) an array of cp2k particle set objects (this gives atomic information)

SUBROUTINEfb_atomic_halo_nullify(atomic_halo)

Nullifies a fb_atomic_halo object, note that it does not release the original object. This procedure is used to nullify the pointer contained in the object which is used to associate to the actual object content

Arguments:
INTENT(inout)
:: atomic_halo the fb_atomic_halo object

SUBROUTINEfb_atomic_halo_release(atomic_halo)

Releases an fb_atomic_halo object

Arguments:
INTENT(inout)
:: atomic_halo the fb_atomic_halo object, its content must not be UNDEFINED, and the subroutine does nothing if the content points to NULL

SUBROUTINEfb_atomic_halo_set(atomic_halo, owner_atom, owner_id_in_halo, natoms, nelectrons, halo_atoms, sorted, cost)

Sets attributes in a fb_atomic_halo object, one should only set the data content in a fb_atomic_halo from outside this module via this procedure.

Arguments:
INTENT(inout)
:: atomic_halo the fb_atomic_halo object, its content must not be NULL or UNDEFINED
INTEGER,
INTENT(in),
OPTIONAL
:: owner_atom if present, sets atmic_halo%obj%owner_atom = owner_atom
INTEGER,
INTENT(in),
OPTIONAL
:: owner_id_in_halo ...
INTEGER,
INTENT(in),
OPTIONAL
:: natoms if present, sets atomic_halo%obj%natoms = natoms
INTEGER,
INTENT(in),
OPTIONAL
:: nelectrons if present, sets atomic_halo%obj%nelectrons = nelectrons
INTEGER,
OPTIONAL, POINTER
:: halo_atoms(:) if present, reallocates atomic_halo%obj%halo_atoms to the size of halo_atoms, and copies contents of halo_atoms to atomic_halo%obj%halo_atoms
LOGICAL,
INTENT(in),
OPTIONAL
:: sorted if present, sets atomic_halo%obj%sorted = sorted
REAL(dp),
INTENT(in),
OPTIONAL
:: cost if present, sets atomic_halo%obj%cost = cost

SUBROUTINEfb_atomic_halo_sort(atomic_halo)

Sort the list of atomic indices in the halo in accending order. The atomic_halo must not be empty

Arguments:
INTENT(inout)
:: atomic_halo the atomic_halo object

PURE SUBROUTINEfb_build_pair_radii(rcut, nkinds, pair_radii)

Builds the required pair_radii array required for building the halo atoms from a given set of cut off radii

Arguments:
REAL(dp),
INTENT(in)
:: rcut(:) rcut(ikind) is the cutoff radii for determining the halo corresponding to atomic kind ikind
INTEGER,
INTENT(in)
:: nkinds total number of atomic kinds in rcut
REAL(dp),
INTENT(out)
:: pair_radii(:,:) output array pair_radii(ikind,jkind) gives the corresponding interaction range between a pair of atoms of kinds ikind and jkind

private Parameters/Types:

private Types:

TYPE :: fb_atomic_halo_data

derived type containing the list of atoms in an atomic halo, used by filtered-basis diagonalisation method


INTEGER
:: id_nr unique id for the object
INTEGER
:: ref_count reference count on the object
INTEGER
:: owner_atom global atomic id of the atom this halo belongs to
INTEGER
:: owner_id_in_halo index of the owner_atom in the halo_atoms array
INTEGER
:: natoms number of atoms in the halo
INTEGER
:: nelectrons estimate of total number of electrons in halo
INTEGER,
DIMENSION(:), POINTER :: halo_atoms the list of global id of atoms in the halo
LOGICAL
:: sorted whether the halo_atoms list is sorted or not
REAL(dp)
:: cost computational cost for the atomic matrix associated to this atomic halo

TYPE :: fb_atomic_halo_list_data

derived type describing an atomic halo list used by filtered-basis diagonalisation method


INTEGER
:: id_nr unique id for the object
INTEGER
:: ref_count reference count on the object
INTEGER
:: nhalos number of halos in the list
INTEGER
:: max_nhalos maximum of the number of halos amongst all of the procs
DIMENSION(:), POINTER :: halos halos(ihalo) gives the ihalo-th fb_atomic_halo object