VanderWaalsRadii

class qcelemental.VanderWaalsRadii(context: str = 'MANTINA2009')[source]

Bases: object

Van der Waals radii sets.

Parameters

context ({'MANTINA2009'}) – Origin of loaded data.

vdwr

Each van der Waals radius is an entry in vdwr, 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 and data value as Decimal object.

Type

dict of Datum

doi

The DOI of the current context.

Type

str

name

The name of the context (‘MANTINA2009’)

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 van der Waals radius for species atom.

string_representation()

Print name, value, and units of all van der Waals radii.

write_c_header([filename, missing])

Write C header file defining Van der Waals radii array.

Methods Documentation

get(atom: Union[int, str], *, return_tuple: bool = False, units: str = 'bohr', missing: float = None) → Union[float, qcelemental.datum.Datum][source]

Access a van der Waals radius for species atom.

Parameters
  • atom (int or str) – Identifier for element or nuclide, e.g., H, C, Al.

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

  • missing (float or None, optional) –

    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.vdwradii.get(atom)
    except qcel.DataUnavailableError:
        rad = 4.0
    

    Only relevant for return_tuple=False.

  • return_tuple (bool, optional) – See below.

Returns

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

  • qcelemental.Datum – When return_tuple=True, Datum with units, description, uncertainty, and value of van der Waals 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 van der Waals radius is available and missing=None.

string_representation() → str[source]

Print name, value, and units of all van der Waals radii.

write_c_header(filename: str = 'vdwrad.h', missing: float = 2.0) → None[source]

Write C header file defining Van der Waals radii array.

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

  • missing (float, optional) – 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.