Distance matrix
Descriptor Category : topological
c++ entity: member
Description
The distance 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. It
summarizes in matrix form the topological distance information between all
the atom pairs. The topological distance dij is the number of edges
in the shortest path between vertices vi and vj. If the
bond does not exist, a value of 0 is assigned to that position.
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 distance matrix:
typedef molecule<> M;
morpho::cdl::nail_juice<M> j;
morpho::cdl::get_juice_from_stream(std::cin, j, 0, sdf_formatT());
M mol(j);
const MolProperty<distance_matrixS,M>& DM = MolProperty<distance_matrixS,M>::get(mol);
for (int i=0; i<DM.size1(); ++i) {
for (int j=0; j<DM.size2(); ++j) {
std::cout << DM(i,j) << '\t';
}
std::cout << '\n';
}
Related Items
Schultz molecular topological index
References
- 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