mordred.ZagrebIndex module

class mordred.ZagrebIndex.ZagrebIndex(version=1, variable=1)[source]

Bases: mordred._base.descriptor.Descriptor

Zagreb index descriptor.

\[ \begin{align}\begin{aligned}{}^\lambda M_1 = \sum_{atoms} d_i^\lambda\\{}^\lambda M_2 = \sum_{edges} \left(d_i \cdot d_j \right)^\lambda\end{aligned}\end{align} \]

where \(d_i\) is degree of i-th atom

Parameters
  • version (int) – Zagreb index version. 1 or 2.

  • variable (int) – lambda value.

Returns

NaN when valence of any atoms are 0

since = StrictVersion ('1.0')
explicit_hydrogens = False
description()[source]
rtype

alias of builtins.float

config
classmethod from_json(obj)

Create Descriptor instance from json dict.

Parameters

obj (dict) – descriptor dict

Returns

descriptor

Return type

Descriptor

get_3D_mol()
get_parameter_dict()
kekulize = False
parameter_names = ('version', 'variable')
require_3D = False
require_connected = False
to_json()

Convert to json serializable dictionary.

Returns

dictionary of descriptor

Return type

dict