Learn R Programming

QuACN (version 1.8.0)

atomBondConnectivity: Atom-bond connectivity (ABC) index

Description

This method calculates the atom-bond connectivity index.

Usage

atomBondConnectivity(g, deg = NULL)

Arguments

g
a graph as a graphNEL object.
deg
the degree of each node of g. Will be automatically calculated if not supplied.

Value

as a double-precision floating point value.

References

E. Estrada and L. Torres and L. Rodriguez and I. Gutman: An atom-bond connectivity index: Modelling the enthalpy of formation of alkanes. Indian Journal of Chemistry 37A, 1998, 849-855.

Examples

Run this code

library(graph)
set.seed(123)
g <- randomEGraph(as.character(1:9), 0.5)

# optional: pre-calculate degree of nodes in g
vec.degree <- graph::degree(g)

atomBondConnectivity(g, vec.degree)

Run the code above in your browser using DataLab