The aim of this class is preserving all information of the grid bonds.
Although the search can be parallelized, still multiple iterations are needed to cover the surface preparations. Additionally, due to machine inaccuracy there is the risk of bonds not being detected as such, leading to artefacts. Also, it is not possible to ensure that all bonds were found when deleting atoms, because all systems are shaped differently. Therefore, another optimization, or rather supporting algorithm, was implemented to bypass these issues.
The idea was reducing the number of iterations to a single search by creating a connectivity matrix of all grid atoms. The result is a dictionary that has atoms \(1\dots n\) as keys and their corresponding value is a list of bonded atoms \(1\dots m\)
Using this implementation, it is no longer required to physically delete atoms when carving out a structure, it is enough to remove binding partners from the matrix. For example, conditions for the surface preparation only need to consider the number of bonds remaining in each entry and thereby determine whether an atom needs to be removed or not, resulting into a negligible computational effort scaling linear with the number of atoms
In addtition, for further processing, the original amount of bonds is saved in the same dictionary.
List of all pairwise bonds in the grid with only two different atom types
Methods
|
Add atom between given atom ids. |
|
Return a list of atoms with the specified number of bonds. |
Return the connectivity matrix. |
|
|
Remove the bond between two atoms from the connectivity matrix. |
|
Remove all bonds of a specified atom from the connection matrix. |