tblite
Light-weight tight-binding framework
Loading...
Searching...
No Matches
tblite_adjlist Module Reference

Implementation of a sparse neighbour map in compressed sparse row format. More...

Data Types

module  adjacency_list
 Neighbourlist in CSR format. More...
 

Functions/Subroutines

subroutine, public new_adjacency_list (self, mol, trans, cutoff, complete)
 Create new neighbourlist for a given geometry and cutoff.
 

Detailed Description

Implementation of a sparse neighbour map in compressed sparse row format.

A symmetric neighbour map given in dense format like

1 2 3 4 5 6
1 x x x
2 x x x x
3 x x x
4 x x x x
5 x x x
6 x x x

Is stored in two compressed array identifying the neighbouring atom nlat and its cell index nltr. Two index arrays inl for the offset and nnl for the number of entries map the atomic index to the row index.

inl = 0, 3, 7, 10, 14, 17, 20
nnl = | 2 -> | 3 -> | 2 -> | 3 -> | 2 -> | |
nlat = 2, 4, 5, 1, 3, 5, 6, 2, 4, 6, 1, 3, 5, 6, 1, 2, 4, 2, 3, 4
nltr = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1

An alternative representation would be to store just the offsets in inl and additional beyond the last element the total number of neighbors. However, the indexing is from inl(i) to inl(i+1)-1 could be confusing, therefore two arrays are used for clarity.

Function/Subroutine Documentation

◆ new_adjacency_list()

subroutine, public tblite_adjlist::new_adjacency_list ( type(adjacency_list), intent(out) self,
type(structure_type), intent(in) mol,
real(wp), dimension(:, :), intent(in) trans,
real(wp), intent(in) cutoff,
logical, intent(in), optional complete )

Create new neighbourlist for a given geometry and cutoff.

Parameters
[out]selfInstance of the neighbourlist
[in]molMolecular structure data
[in]transTranslation vectors for all images
[in]cutoffRealspace cutoff for neighbourlist generation
[in]completeWhether a complete or a symmetrical reduced map should be generated