occ
Loading...
Searching...
No Matches
occ::crystal::StandardBondLengths Class Reference

Standard hydrogen bond lengths for various elements. More...

#include <standard_bonds.h>

Static Public Member Functions

static double get_hydrogen_bond_length (int atomic_number)
 Get standard hydrogen bond length for a given element.
static bool has_standard_length (int atomic_number)
 Check if a standard bond length is available for an element.
static void set_custom_bond_length (int atomic_number, double length)
 Set a custom bond length for runtime configuration.
static void clear_custom_lengths ()
 Clear all custom bond lengths.

Static Public Attributes

static constexpr double C_H = 1.083
static constexpr double N_H = 1.009
static constexpr double O_H = 0.983
static constexpr double B_H = 1.180

Detailed Description

Standard hydrogen bond lengths for various elements.

This class provides standard X-H bond lengths commonly used for normalizing hydrogen positions in crystal structures, particularly those determined by X-ray diffraction where hydrogen positions are less accurate.

Bond lengths from: Allen, F. H. Acta Cryst. (2010). B66, 380–386

Member Function Documentation

◆ clear_custom_lengths()

void occ::crystal::StandardBondLengths::clear_custom_lengths ( )
static

Clear all custom bond lengths.

◆ get_hydrogen_bond_length()

double occ::crystal::StandardBondLengths::get_hydrogen_bond_length ( int atomic_number)
static

Get standard hydrogen bond length for a given element.

Parameters
atomic_numberThe atomic number of the heavy atom bonded to hydrogen
Returns
The standard bond length in Angstroms, or -1.0 if not available

◆ has_standard_length()

bool occ::crystal::StandardBondLengths::has_standard_length ( int atomic_number)
static

Check if a standard bond length is available for an element.

Parameters
atomic_numberThe atomic number of the heavy atom
Returns
True if a standard bond length is defined

◆ set_custom_bond_length()

void occ::crystal::StandardBondLengths::set_custom_bond_length ( int atomic_number,
double length )
static

Set a custom bond length for runtime configuration.

Parameters
atomic_numberThe atomic number of the heavy atom
lengthThe bond length in Angstroms

Member Data Documentation

◆ B_H

double occ::crystal::StandardBondLengths::B_H = 1.180
staticconstexpr

◆ C_H

double occ::crystal::StandardBondLengths::C_H = 1.083
staticconstexpr

◆ N_H

double occ::crystal::StandardBondLengths::N_H = 1.009
staticconstexpr

◆ O_H

double occ::crystal::StandardBondLengths::O_H = 0.983
staticconstexpr

The documentation for this class was generated from the following file: