Avogadro::Core::AtomUtilities#

class AtomUtilities#

Public Static Functions

static AtomHybridization perceiveHybridization(const Atom &atom)#

Perceive the geometry / hybridization bonded to atom. Ideally, the client should cache the hybridization number by calling setHybridization() later

static Vector3 generateNewBondVector(const Atom &atom, const std::vector<Vector3> &currentVectors, AtomHybridization hybridization)#

Generate a new bond vector (unit length)

static Real idealBondLength(unsigned char atomicNumber1, unsigned char atomicNumber2, unsigned char bondOrder = 1)#

The default is the sum of the Pyykko covalent radii, scaled down for double and triple bonds. That estimate is within a few percent for most element pairs, but it is systematically wrong for strongly polar bonds (Si-F, B-F, P-O) and for bonds between lone-pair rich atoms (O-O, F-F), so a table of measured lengths overrides it for common bonds.

Intended for building and editing geometries, not for structure validation: the returned value is a single representative length and ignores hybridization, formal charge, and neighboring substituents.

Returns:

the ideal length in Angstroms of a bond of order bondOrder between elements atomicNumber1 and atomicNumber2.