CovalentRadii

class qcelemental.CovalentRadii(context='ALVAREZ2008')[source]

Bases: object

Covalent radii sets.

Parameters

context (str) – {‘ALVAREZ2008’} Origin of loaded data.

cr

Each covalent radius is an entry in cr, where key is the “Fe”-cased element symbol if generic or symbol-prefixed label if specialized within element. The value is a Datum object with lbl the same as key, units, data value as Decimal object, and any uncertainty in the comment field.

Type

Dict[str, Datum]

doi

The DOI of the current context.

Type

str

name

The name of the context (‘ALVAREZ2008’)

Type

str

native_units

The units the original data was provided in.

Type

str

year

The year the context was created.

Type

int

Methods Summary

get(atom, *[, return_tuple, units, missing])

Access a covalent radius for species atom.

string_representation()

Print name, value, and units of all covalent radii.

write_c_header([filename, missing])

Write C header file defining covalent radii array.

Methods Documentation

get(atom, *, return_tuple=False, units='bohr', missing=None)[source]

Access a covalent radius for species atom.

Parameters
  • atom (Union[int, str]) – Identifier for element or nuclide, e.g., H, D, H2, He, hE4. In general, one value recommended for each element; however, certain other exact labels may be available. ALVAREZ2008: C_sp3, C_sp2, C_sp, Mn_lowspin, Mn_highspin, Fe_lowspin, Fe_highspin, Co_lowspin, Co_highspin

  • units (str) – Units of returned value. To return in native unit (ALVAREZ2008: angstrom), pass it explicitly. Only relevant for return_tuple=False since True returns underlying data structure with native units.

  • missing (Optional[float]) –

    How to handle when atom is valid but outside the available data range. When None, raises DataUnavailableError. When a float, returns that float, so supply in units units. Supplying a float is a more compact assurance that a call will work over all the periodic table than the equivalent

    try:
        rad = qcel.covalentradii.get(atom)
    except qcel.DataUnavailableError:
        rad = 4.0
    

    Only relevant for return_tuple=False.

  • return_tuple (bool) – See below.

Return type

Union[float, Datum]

Returns

  • float – When return_tuple=False, value of covalent radius. If multiple defined for element, returns largest.

  • qcelemental.Datum – When return_tuple=True, Datum with units, description, uncertainty, and value of covalent radius as Decimal (preserving significant figures). If multiple defined for element, returns largest.

Raises
  • NotAnElementError – If atom cannot be resolved into an element or nuclide or label.

  • DataUnavailableError – If atom is a valid element or nuclide but not one for which a covalent radius is available and missing=None.

string_representation()[source]

Print name, value, and units of all covalent radii.

Return type

str

write_c_header(filename='covrad.h', missing=2.0)[source]

Write C header file defining covalent radii array.

Parameters
  • filename (str) – File name for header. Note that changing this won’t change the header guard.

  • missing (float) – In order that the C array be atomic-number indexable and that it span the periodic table, this value is used anywhere data is missing.

Return type

None