Quasigraph is an open-source toolkit designed for generating chemical and geometric descriptors to be used in machine learning models.
The easiest method to install quasigraph is by utilizing pip:
$ pip install quasigraph
from ase.build import molecule
from quasigraph import QuasiGraph
# Initialize an Atoms object for methanol (CH3OH) using ASE's molecule function
atoms = molecule('CH3OH')
# Instantiate a QuasiGraph object containing chemical and coordination numbers
qgr = QuasiGraph(atoms)
# Convert the QuasiGraph object into a pandas DataFrame
df = qgr.get_dataframe()
# Convert the QuasiGraph object into a vector
vector = qgr.get_vector()
The descriptor can be separated into two parts, a chemical part and a geometric part.
The chemical part of the descriptor employs the Mendeleev library, incorporating atomic details like the valence electron concentration, covalent radius, atomic radius, Pauling electronegativity and electron affinitity for every element within the object.
For example, for methanol (CH3OH) we have the table:
VEC | covalent_radius | en_pauling | |
---|---|---|---|
0 | 4 | 0.75 | 2.55 |
1 | 6 | 0.63 | 3.44 |
2 | 1 | 0.32 | 2.2 |
3 | 1 | 0.32 | 2.2 |
4 | 1 | 0.32 | 2.2 |
5 | 1 | 0.32 | 2.2 |
The geometric part involves identifying all bonds and computing the coordination numbers for each atom, indicated as CN. Additionally, the generalized coordination number (GCN)1 is determined by summing the coordination numbers of the neighboring ligands for each atom and normalizing this sum by the highest coordination number found in the molecule.
Figure 1 - Schematic representation of the methanol molecule, indicating the chemical symbol and coordination number (CN) for every atom.
For example, for methanol (CH3OH) we have the geometric data, as shown in Fig. 1.
CN | GCN |
---|---|
4 | 1.25 |
2 | 1.25 |
1 | 1.00 |
1 | 0.50 |
1 | 1.00 |
1 | 1.00 |
This is an open source code under MIT License.
We thank financial support from FAPESP (Grant No. 2022/14549-3), INCT Materials Informatics (Grant No. 406447/2022-5), and CNPq (Grant No. 311324/2020-7).
Footnotes
-
Calle-Vallejo, F., Martínez, J. I., García-Lastra, J. M., Sautet, P. & Loffreda, D. Fast Prediction of Adsorption Properties for Platinum Nanocatalysts with Generalized Coordination Numbers, Angew. Chem. Int. Ed. 53, 8316-8319 (2014). ↩