Morphochem

Adjacency matrix

CDL descriptor
Descriptor Category : topological
c++ entity: member

Description

The adjacency matrix by itself is not regarded as a descriptor, but is employed in the calculation of a variety of them, for example the Schultz molecular topological index.
The adjacency matrix represent the whole set of connections between adjacent pairs of atoms. The entries aij of the matrix equals one if vertex vi and vertex vj are connected; cero otherwise.
The adjacency matrix is between the default read-write molecular properties of the cdl. The property accessor selector is adjacency_matrixS.

Prototype

look example

Where defined

morpho/cdl/molecule/properties/molecule_props.hpp

Namespace

morpho::cdl

Inherits from

No inheritance

Arguments

Example

// suppose you're streaming a mol format from the stdin:
// and you want to get a const reference to the adjacency matrix:
typedef molecule<>                M;
morpho::cdl::juice<M>             j;
morpho::cdl::get_juice_from_stream(std::cin, j, 0, sdf_formatT());
M   mol(j);
const MolProperty<adjacency_matrixS,M>& AM = MolProperty<adjacency_matrixS,M>::get(mol);
for (int i=0; i<AM.size1(); ++i) {
  for (int j=0; j<AM.size2(); ++j) {
    std::cout << AM(i,j) << '\t';
  }
  std::cout << '\n';
}

Related Items

Schultz molecular topological index

References

  1. Todeschini, R.; Consonni, V. "Handbook of Molecular Descriptors". Wiley-VCH, Methods and Principles in Medicinal Chemistry. Volume 11. 2000.


Copyright (c) Vladimir Josef Sykora and Morphochem AG 2003