Morphochem

Vertex degree

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

Description

Represent the number of sigma electrons of the atom. It is calculated on CDL's molecule simple with the member function connected_atoms().

Prototype

Is an overloaded function:
  degree_size_type
  connected_atoms(vertex_descriptor u) const;

  degree_size_type
  connected_atoms(const atom_iterator& ai);

  degree_size_type
  connected_atoms(const const_atom_iterator& ai) const;

Where defined

morpho/cdl/molecule/molecule.hpp

Namespace

morpho::cdl

Inherits from

Arguments

ArgumentModel of
u vertex_descriptor

For the first version.

ArgumentModel of
ai atom_iterator

For the second version, and:

ArgumentModel of
ai const_atom_iterator

For the third version.

Example

// suppose you're streaming a mol format from the stdin:
typedef molecule<>                M;
morpho::cdl::juice<M>             j;
morpho::cdl::get_juice_from_stream(std::cin, j, 0, sdf_formatT());
M   mol(j);
M::atom_iterator ai, ai_end;
for (tie(ai,ai_end)=mol.atoms(); ai!=ai_end; ++ai) {
  std::cout << mol.connected_atoms(ai) << '\n'; 
}

Related Items

vertex distance degree

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