The code works by loading the coordinates of the atoms composing the system under
consideration, usually these coordinates are loaded from an XYZ file or generated
programmaticaly, for instance using ASE. Once the coordinates are loaded in, the
adjacency matrix for the system is computed, this matrix is then usin as a
representation of the graph describing the bonds between nearest neighbours in the
system, then the CNA signatures for all bonds are computed as reported in \
ref{sec:comp_sig}.
We then track to what signatures each atom partecipates to build its CNA pattern,
this pattern is then compared agains a database of known CNAPs characterised by a
sequential ID and assigned that ID. If, however, the CNAP is new, it is saved in
the database and assigned a new sequential ID. Beside assigning a sequential ID,
each time a new pattern is found it can be classified with a name and a description
following a few conventions, if no description can be clearly provided the pattern
is assigned automatically a generic name and the pattern is stored in a database of
unknown patterns.
The first few IDs in the database were assigned based on previously known patterns,
for instance the first entry, corresponding to $ID=0$ corresponds to the well known
pattern $[(421)] \quad [12]$ corresponding to an atom in a bulk FCC crystal. It is
clear that systems that deviate from a simple monocrystalline bulk will present a
wider range of atoms in different arrangements, so that having a well populated
database of known patterns is an effective tool for interpreting atomic structures
and isolating interesting features for human analysis.
The database itself is structured as a JSON index file, exemplified for the entry
corresponding to the FCC bulk in fig. \ref{fig:db} which contains the pattern
itself as the list of signatures and their frequencies, the ID, the name given to
the pattern, a short description, some additional notes and an iterative list that
keeps track, for every system considered, the occurency of the pattern. The JSON
themselves are also linked to a directoy structure containing more detailed
information (e.g. a representation of the local environment’s graph).