burden_matrix#
- skfp.descriptors.burden_matrix(mol: Mol, descriptors: ndarray | None = None) ndarray #
Burden matrix.
Burden matrix [1] [2] is a modified connectivity matrix, aimed to combine topological structure with atomic properties. Diagonal elements are atom descriptors, e.g. atomic number, charge, polarizability. Off-diagonal elements for bonded atoms are 1/sqrt(bond order), with minimum of 0.001 in case of no bond between given pair of atoms.
Burden proposed to use vector of smallest eigenvalues of this matrix as molecule descriptors. They reflect the overall topology of the molecule, while also incorporating the functional information via atom properties. Largest eigenvalues can also be used [2].
If
descriptors
are None, default value 0.001 for non-connected atoms is used on the diagonal.We use bond orders as in RDKit, i.e. 1, 2, 3, and 1.5 for aromatic. See RDKit code for details: rdkit/rdkit
- Parameters:
mol (RDKit
Mol
object) – The molecule for which the Balaban’s J index is to be calculated.descriptors (np.ndarray, optional) – Vector of atomic descriptors, with the same length as number of atoms in the input molecule.
References
Examples
>>> from rdkit.Chem import MolFromSmiles >>> from skfp.descriptors import burden_matrix >>> mol = MolFromSmiles("C=1=C=C=C1") # cyclobutadiyne >>> burden_matrix(mol) array([[0.001 , 0.70710678, 0.001 , 0.70710678], [0.70710678, 0.001 , 0.70710678, 0.001 ], [0.001 , 0.70710678, 0.001 , 0.70710678], [0.70710678, 0.001 , 0.70710678, 0.001 ]])