Skip to main content

Python API with a database of atomic properties for elements in the periodic table

Project description

Documentation Status

This package provides a convenient python API for accessing various properties of elements, ions and isotopes in the periodic table of elements.

Moreover it provides an easy to use interface to pandas and convenient visualization functionality through bokeh that enables you to create customized periodic tables displaying various properties.

alternate text

The mendeleev package also supplies convenient tools for dealing with electronic configurations, calculating functions of atomic properties, exploring the periodic trends in the periodic tables. If you want to look at some examples there are a few tutorials available as jupyter notebooks.

Interactive web app

If you would like to explore the data available in mendeleev check out the interactive web app at mendeleev.herokuapp.com where you can create your own periodic tables and visualize the relations between various properties of elements.

Data

Following electronegativity scales are available either as stored values or computed on request from other properties:

  • Allen

  • Allred & Rochow

  • Cottrell & Sutton

  • Ghosh

  • Gordy

  • Li & Xue

  • Nagle

  • Martynov & Batsanov

  • Mulliken

  • Pauling

  • Sanderson

The following data are currently available:

Name

Type

Comment

Unit

Data Source

abundance_crust

float

Abundance in the Earth’s crust

mg/kg

[8]

abundance_sea

float

Abundance in the seas

mg/L

[8]

annotation

str

Annotations regarding the data

atomic_number

int

Atomic number

atomic_radius

float

Atomic radius

pm

atomic_radius_rahm

float

Atomic radius by Rahm et al.

pm

[42]

atomic_volume

float

Atomic volume

cm3/mol

atomic_weight

float

Atomic weight

[36], [37]

atomic_weight_uncertainty

float

Atomic weight uncertainty

[36], [37]

block

int

Block in periodic table

boiling_point

float

Boiling temperature

K

c6

float

C_6 dispersion coefficient in a.u.

a.u.

[1], [2]

c6_gb

float

C_6 dispersion coefficient in a.u. (Gould & Bučko)

a.u.

[35]

cas

str

Chemical Abstracts Serice identifier

covalent_radius_bragg

float

Covalent radius by Bragg

pm

[3]

covalent_radius_cordero

float

Covalent radius by Cerdero et al.

pm

[4]

covalent_radius_pyykko

float

Single bond covalent radius by Pyykko et al.

pm

[5]

covalent_radius_pyykko_double

float

Double bond covalent radius by Pyykko et al.

pm

[46]

covalent_radius_pyykko_triple

float

Triple bond covalent radius by Pyykko et al.

pm

[47]

covalent_radius_slater

float

Covalent radius by Slater

pm

[6]

cpk_color

str

Element color in CPK convention

HEX

[24]

density

float

Density at 295K

g/cm3

description

str

Short description of the element

dipole_polarizability

float

Dipole polarizability

a.u.

[7]

discoverers

str

The discoverers of the element

discovery_location

str

The location where the element was discovered

dipole_year

int

The year the element was discovered

electron_affinity

float

Electron affinity

eV

[8], [9]

electrons

int

Number of electrons

en_allen

float

Allen’s scale of electronegativity

eV

[10], [11]

en_ghosh

float

Ghosh’s scale of electronegativity

[32]

en_mulliken

float

Mulliken’s scale of electronegativity

eV

[12]

en_pauling

float

Pauling’s scale of electronegativity

[8]

econf

str

Ground state electron configuration

evaporation_heat

float

Evaporation heat

kJ/mol

fusion_heat

float

Fusion heat

kJ/mol

gas_basicity

float

Gas basicity

kJ/mol

[8]

geochemical_class

str

Geochemical classification

[43]

goldschmidt_class

str

Goldschmidt classification

[43], [44]

group

int

Group in periodic table

heat_of_formation

float

Heat of formation

kJ/mol

[8]

ionenergy

tuple

Ionization energies

eV

[13]

ionic_radii

list

Ionic and crystal radii in pm

pm

[14]

is_monoisotopic

bool

Is the element monoisotopic

is_radioactive

bool

Is the element radioactive

isotopes

list

Isotopes

jmol_color

str

Element color in Jmol convention

HEX

[25]

lattice_constant

float

Lattice constant

Angstrom

lattice_structure

str

Lattice structure code

mass_number

int

Mass number (most abundant isotope)

melting_point

float

Melting temperature

K

metallic_radius

float

Single-bond metallic radius

pm

[45]

metallic_radius_c12

float

Metallic radius with 12 nearest neighbors

pm

[45]

molcas_gv_color

str

Element color in MOCAS GV convention

HEX

[26]

name

str

Name in English

name_origin

str

Origin of the name

neutrons

int

Number of neutrons (most abundant isotope)

oxistates

list

Oxidation states

period

int

Period in periodic table

proton_affinity

float

Proton affinity

kJ/mol

[8]

protons

int

Number of protons

sconst

float

Nuclear charge screening constants

[15], [16]

series

int

Index to chemical series

sources

str

Sources of the element

specific_heat

float

Specific heat @ 20 C

J/(g mol)

symbol

str

Chemical symbol

thermal_conductivity

float

Thermal conductivity @25 C

W/(m K)

uses

str

Applications of the element

vdw_radius

float

Van der Waals radius

pm

[8]

vdw_radius_alvarez

float

Van der Waals radius according to Alvarez

pm

[33], [34]

vdw_radius_batsanov

float

Van der Waals radius according to Batsanov

pm

[17]

vdw_radius_bondi

float

Van der Waals radius according to Bondi

pm

[18]

vdw_radius_dreiding

float

Van der Waals radius from the DREIDING FF

pm

[19]

vdw_radius_mm3

float

Van der Waals radius from the MM3 FF

pm

[20]

vdw_radius_rt

float

Van der Waals radius according to Rowland and Taylor

pm

[21]

vdw_radius_truhlar

float

Van der Waals radius according to Truhlar

pm

[22]

vdw_radius_uff

float

Van der Waals radius from the UFF

pm

[23]

Isotopes

Name

Type

Comment

Unit

Data Source

abundance

float

Relative Abundance

[38]

g_factor

float

Nuclear g-factor

[40]

half_life

float

Half life of the isotope

[36]

half_life_unit

str

Unit in which the half life is given

[36]

is_radioactive

bool

Is the isotope radioactive

[39]

mass

float

Atomic mass

Da

[39]

mass_number

int

Mass number of the isotope

[39]

mass_uncertainty

float

Uncertainty of the atomic mass

[39]

spin

float

Nuclear spin quantum number

quadrupole_moment

float

Nuclear electric quadrupole moment

b [100 fm^2]

[41]

Installation

The package can be installed using pip

pip install mendeleev

You can also install the most recent version from the repository:

pip install https://bitbucket.org/lukaszmentel/mendeleev/get/tip.tar.gz

If you use conda you can install the package from my anaconda channel by

conda install -c lmmentel mendeleev=0.4.0

Usage

The simple interface to the data is through the element method that returns the Element objects:

>>> from mendeleev import element

The element method accepts unique identifiers: atomic number, atomic symbol or element’s name in english. To retrieve the entries on Silicon by symbol type

>>> si = element('Si')
>>> si.name
'Silicon'

Similarly to access the data by atomic number or element names type

>>> al = element(13)
>>> al.name
'Aluminium'
>>> o = element('Oxygen')
>>> o.atomic_number
8

Lists of elements

The element method also accepts list or tuple of identifiers and then returns a list of Element objects

>>> c, h, o = element(['C', 'Hydrogen', 8])
>>> c.name, h.name, o.name
('Carbon', 'Hydrogen', 'Oxygen')

Composite Attributes

Currently four of the attributes are more complex object than str, int or float, those are:

  • oxistates, returns a list of oxidation states

  • ionenergies, returns a dictionary of ionization energies

  • isotopes, returns a list of Isotope objects

  • ionic_radii returns a list of IonicRadius objects

Oxidation states

For examples oxistates returns a list of oxidation states for a given element

>>> fe = element('Fe')
>>> fe.oxistates
[6, 3, 2, 0, -2]

Ionization energies

The ionenergies returns a dictionary with ionization energies as values and degrees of ionization as keys.

>>> fe = element('Fe')
>>> fe.ionenergies
{1: 7.9024678,
 2: 16.1992,
 3: 30.651,
 4: 54.91,
 5: 75.0,
 6: 98.985,
 7: 125.0,
 8: 151.06,
 9: 233.6,
 10: 262.1,
 11: 290.9,
 12: 330.81,
 13: 361.0,
 14: 392.2,
 15: 456.2,
 16: 489.312,
 17: 1262.7,
 18: 1357.8,
 19: 1460.0,
 20: 1575.6,
 21: 1687.0,
 22: 1798.43,
 23: 1950.4,
 24: 2045.759,
 25: 8828.1875,
 26: 9277.681}

Isotopes

The isotopes attribute returns a list of Isotope objects with the following attributes per isotope

  • atomic_number

  • mass

  • abundance

  • mass_number

>>> fe = element('Fe')
>>> for iso in fe.isotopes:
...     print(iso)
 26   55.93494  91.75%    56
 26   56.93540   2.12%    57
 26   57.93328   0.28%    58
 26   53.93961   5.85%    54

The columns represent the attributes atomic_number, mass, abundance and mass_number respectively.

Ionic radii

Another composite attribute is ionic_radii which returns a list of IonicRadius object with the following attributes

  • atomic_number, atomic number of the ion

  • charge, charge of the ion

  • econf, electronic configuration of the ion

  • coordination, coordination type of the ion

  • spin, spin state of the ion (HS or LS)

  • crystal_radius

  • ionic_radius

  • origin, source of the data

  • most_reliable, recommended value

>>> fe = element('Fe')
>>> for ir in fe.ionic_radii:
...     print(ir)
charge=   2, coordination=IV   , crystal_radius= 0.770, ionic_radius= 0.630
charge=   2, coordination=IVSQ , crystal_radius= 0.780, ionic_radius= 0.640
charge=   2, coordination=VI   , crystal_radius= 0.750, ionic_radius= 0.610
charge=   2, coordination=VI   , crystal_radius= 0.920, ionic_radius= 0.780
charge=   2, coordination=VIII , crystal_radius= 1.060, ionic_radius= 0.920
charge=   3, coordination=IV   , crystal_radius= 0.630, ionic_radius= 0.490
charge=   3, coordination=V    , crystal_radius= 0.720, ionic_radius= 0.580
charge=   3, coordination=VI   , crystal_radius= 0.690, ionic_radius= 0.550
charge=   3, coordination=VI   , crystal_radius= 0.785, ionic_radius= 0.645
charge=   3, coordination=VIII , crystal_radius= 0.920, ionic_radius= 0.780
charge=   4, coordination=VI   , crystal_radius= 0.725, ionic_radius= 0.585
charge=   6, coordination=IV   , crystal_radius= 0.390, ionic_radius= 0.250

CLI utility

For those who work in the terminal there is a simple command line interface (CLI) for printing the information about a given element. The script name is element.py and it accepts either the symbol or name of the element as an argument and prints the data about it. For example, to print the properties of silicon type

$ element.py Si
   _  _  _  _      _
 _(_)(_)(_)(_)_   (_)
(_)          (_)_  _
(_)_  _  _  _  (_)(_)
  (_)(_)(_)(_)_   (_)
 _           (_)  (_)
(_)_  _  _  _(_)_ (_)
  (_)(_)(_)(_) (_)(_)(_)



Description
===========

  Metalloid element belonging to group 14 of the periodic table. It is
  the second most abundant element in the Earth's crust, making up 25.7%
  of it by weight. Chemically less reactive than carbon. First
  identified by Lavoisier in 1787 and first isolated in 1823 by
  Berzelius.

Properties
==========

Annotation
Atomic number                       14
Atomic radius                      132
Atomic volume                     12.1
Block                                p
Boiling point                     2628
Covalent radius 2008               111
Covalent radius 2009               116
Cpk color                      #daa520
Density                           2.33
Dipole polarizability            37.31
Electron affinity              1.38952
Electronic configuration  [Ne] 3s2 3p2
En allen                         11.33
En pauling                         1.9
Evaporation heat                   383
Fusion heat                       50.6
Gas basicity                     814.1
Group id                            14
Heat of formation                  450
Jmol color                     #f0c8a0
Lattice constant                  5.43
Lattice structure                  DIA
Mass                           28.0855
Melting point                     1683
Name                           Silicon
Period                               3
Proton affinity                    837
Series id                            5
Specific heat                    0.703
Symbol                              Si
Thermal conductivity               149
Vdw radius                         210

Documentation

Documentation can be found here.

Citing

If you use mendeleev in a scientific publication, please consider citing the software as

L. M. Mentel, mendeleev - A Python resource for properties of chemical elements, ions and isotopes. , 2014– . Available at: https://bitbucket.org/lukaszmentel/mendeleev.

Here’s the reference in the BibLaTeX format

 @software{mendeleev2014,
    author = {Mentel, Łukasz},
    title = {{mendeleev} -- A Python resource for properties of chemical elements, ions and isotopes},
    url = {https://bitbucket.org/lukaszmentel/mendeleev},
    version = {0.4.0},
    date = {2014--},
}

or the older BibTeX format

@misc{mendeleev2014,
   auhor = {Mentel, Łukasz},
   title = {mendeleev} -- A Python resource for properties of chemical elements, ions and isotopes, ver. 0.4.0},
   howpublished = {\url{https://bitbucket.org/lukaszmentel/mendeleev}},
   year  = {2014--},
}

Funding

This project is supported by the RCN (The Research Council of Norway) project number 239193.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mendeleev-0.4.0.tar.gz (218.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mendeleev-0.4.0-py2.py3-none-any.whl (196.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file mendeleev-0.4.0.tar.gz.

File metadata

  • Download URL: mendeleev-0.4.0.tar.gz
  • Upload date:
  • Size: 218.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mendeleev-0.4.0.tar.gz
Algorithm Hash digest
SHA256 fd96e885da86f9dd88df924da4df83e1808a262c4e464beebd24d7080989158a
MD5 94bd56810bee3644d7cbb691558c037c
BLAKE2b-256 1bce9cd6b9415dbdbc2f84470487558878097a010e7d9ccc9b342f83268803ff

See more details on using hashes here.

File details

Details for the file mendeleev-0.4.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for mendeleev-0.4.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d11a000b1b9f366dd482dc5c29bdf0330b7819a1760227b162ab2f4dc39cc2dc
MD5 83a27f64782a28eb4514efb8bd9a223e
BLAKE2b-256 337e68e4fd757a3eaf0a4c7fa436be05bcbb60249c861747b116356ede9423c7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page