Databases

The modules molmod.periodic, molmod.bonds and molmod.isotopes are not loaded automatically with the import statement from molmod import *, but have to be imported explicitely due to their long loading time, i.e.

>>> from molmod.periodic import periodic
>>> from molmod.bonds import bonds
>>> from molmod.isotopes import ame2003, nubtab03

molmod.periodic – The periodic system

An object of the PeriodicData class centralizes information about the periodic system. The data is loaded during initialization of this module and accessiable through the periodic instance, which acts like a container:

>>> from molmod.periodic import periodic
>>> print periodic[1].mass
>>> print periodic["C"].vdw_radius
>>> print len(periodic)
class molmod.periodic.AtomInfo

Data structure for info about an atom

class molmod.periodic.PeriodicData

The entire periodic system

This object is created when importing this module. There is no need to do it a second time manually.

iter_numbers()

Iterate over all atom numbers in the periodic system

Usage:

>>> from molmod.periodic import periodic
>>> for number in periodic.iter_numbers():
...     print number, periodic[number].mass

molmod.bonds – The bond length database

An object bonds of the class BondData is created upon importing this module. It loads information about average bond lengths from a csv file when it is initialized. Missing data points in the csv file are estimated by adding Van der Waals radii of the two atoms of the given bond.

This module also defines a few constants for different bond types:

Name Value
BOND_SINGLE 0
BOND_DOUBLE 1
BOND_TRIPLE 2
BOND_HYBRID 3
BOND_HYDROGEN 4
class molmod.bonds.BondData

Database with bond lengths

This object is created when importing this module. There is no need to do it a second time manually.

bond_tolerance = 1.2
bonded(n1, n2, distance)

Return the estimated bond type

Arguments:
n1 – the atom number of the first atom in the bond
n2 – the atom number of the second atom the bond
distance – the distance between the two atoms

This method checks whether for the given pair of atom numbers, the given distance corresponds to a certain bond length. The best matching bond type will be returned. If the distance is a factor self.bond_tolerance larger than a tabulated distance, the algorithm will not relate them.

get_length(n1, n2, bond_type=1)

Return the length of a bond between n1 and n2 of type bond_type

Arguments:
n1 – the atom number of the first atom in the bond
n2 – the atom number of the second atom the bond
Optional argument:
bond_type – the type of bond [default=BOND_SINGLE]

This is a safe method for querying a bond_length. If no answer can be found, this get_length returns None.

molmod.isotopes – The isotope database

This module defines two database interfaces: ame2003 and nubtab03. The AME2003 [1], [2] database contains all the isotope masses and can be used as follows:

>>> from molmod.isotopes import ame2003
>>> print ame2003.masses[7][15]

This would print the mass of nitrogen 15. The abundances are provided by the NUBTAB03 database [3]. Use it as follows:

>>> from molmod.isotopes import nubtab03
>>> print nubtab.abundances[6][12]

This would print the abundance of the carbon 12 isotope.

References:

[1]The AME2003 atomic mass evaluation (I). Evaluation of input data, adjustment procedures. A.H. Wapstra, G. Audi, and C. Thibault. Nuclear Physics A729, 129 (2003).
[2]The AME2003 atomic mass evaluation (II). Tables, graphs, and references. G. Audi, A.H. Wapstra, and C. Thibault. Nuclear Physics A729, 337 (2003).
[3]The NUBASE evaluation of nuclear and decay properties. G. Audi, O. Bersillon, J. Blachot and A.H. Wapstra, Nuclear Physics A729, 3-128 (2003)
class molmod.isotopes.Ame2003

An interface to a subset of the data from Ame2003.

This object contains an attribute masses. This is a dictionary whose keys are the proton numbers (Z) and values are the corresponding values are again dictionaries. The latter dictionaries have the mass number (A) as keys and the corresponding isotope masses in atomic units as values. E.g. self.masses[6][12] is the mass of carbon 12.

If you use this interface, cite the following references:

The AME2003 atomic mass evaluation (I). Evaluation of input data, adjustment procedures. A.H. Wapstra, G. Audi, and C. Thibault. Nuclear Physics A729, 129 (2003).

The AME2003 atomic mass evaluation (II). Tables, graphs, and references. G. Audi, A.H. Wapstra, and C. Thibault. Nuclear Physics A729, 337 (2003).

An object of this type is created in this module, so there is not need to construct it manually.

class molmod.isotopes.NubTab03

An interface to a subset of the data that from NubTab03.

This object contains an attribute abundances. This is a dictionary whose keys are the proton numbers (Z) and values are the corresponding values are again dictionaries. The latter dictionaries have the mass number (A) as keys and the corresponding isotope abundances as values. E.g. self.masses[6][12] is the abundance of carbon 12.

If you use this interface, cite the following reference:

The NUBASE evaluation of nuclear and decay properties. G. Audi, O. Bersillon, J. Blachot and A.H. Wapstra, Nuclear Physics A729, 3-128 (2003)

Argument:
filename – the nubtab03 data file

An object of this type is created in this module, so there is not need to construct it externally.