tblite
Light-weight tight-binding framework
|
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. | |
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.
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.
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.
[out] | self | Instance of the neighbourlist |
[in] | mol | Molecular structure data |
[in] | trans | Translation vectors for all images |
[in] | cutoff | Realspace cutoff for neighbourlist generation |
[in] | complete | Whether a complete or a symmetrical reduced map should be generated |