Laplacian matrix
Descriptor Category : topological
c++ entity: member
Description
A square AxA symmetric matrix, A being the number of vertices in the molecular
graph, where the entries are defined as:
Li : delta(i) if i = j; -1 if {i,j} belongs
to the edge list of the graph, 0 otherwise.
This matrix is part of the descriptors properties class. The selector for
the property accessors is laplacian_matrixS.
Prototype
look example
Where defined
morpho/cdl/descriptors/properties/desc_mol_properties.hpp
the selector is defined in:
morpho/cdl/descriptors/properties/desc_mol_props_selectors.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 laplacian matrix:
typedef desc_molecular_properties<> desc_mol_props_t;
typedef boost::property<mol_propsS, molecular_properties<>,
boost::property<descriptors_mol_propsS, desc_mol_props_t> > descr_props_t;
typedef molecule<double,descr_props_t> M;
morpho::cdl::nail_juice<M> j;
morpho::cdl::get_juice_from_stream(std::cin, j, 0, sdf_formatT());
M mol(j);
const MolProperty<laplacian_matrixS,M>& LM = MolProperty<laplacian_matrixS,M>::get(mol);
for (int i=0; i<LM.size1(); ++i) {
for (int j=0; j<LM.size2(); ++j) {
std::cout << LM(i,j) << '\t';
}
std::cout << '\n';
}
Related Items
Mohar indices
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