PageRenderTime 21ms CodeModel.GetById 14ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/doc/ase/units.rst

https://gitlab.com/vote539/ase
ReStructuredText | 57 lines | 44 code | 13 blank | 0 comment | 0 complexity | 03c233df45c4230a37298f294e719b6f MD5 | raw file
 1.. module:: ase.units
 2
 3=====
 4Units
 5=====
 6
 7Physical units are defined in the :trac:`ase/units.py` module.  Electron volts
 8(``eV``) and angstroms (``Ang``) are defined as 1.0.
 9Other units are
10``nm``, ``Bohr``, ``Hartree`` or ``Ha``, ``kJ``, ``kcal``, ``mol``,
11``Rydberg`` or ``Ry``, ``second``, ``fs`` and ``kB``.
12
13.. note::
14
15    All constants are taken from the 1986 CODATA_.
16
17.. _CODATA: http://physics.nist.gov/cuu/Constants/archive1986.html
18
19Examples:
20
21>>> from ase.units import *
22>>> 2 * Bohr
231.0583545150138329
24>>> 25 * Rydberg
25340.14244569396635
26>>> 100 * kJ/mol
271.0364272141304978
28>>> 300 * kB
290.025852157076770025
30>>> 0.1 * fs
310.009822693531550318
32>>> print '1 Hartree = '+str(Hartree*mol/kcal)+' kcal/mol'
33
34
35=======================
36The ``ase.data`` module
37=======================
38
39This module defines the following variables: ``atomic_masses``,
40``atomic_names``, ``chemical_symbols``, ``covalent_radii``,
41``cpk_colors`` and ``reference_states``.  All of these are lists that
42should be indexed with an atomic number:
43
44>>> from ase.data import atomic_names, atomic_masses
45>>> atomic_names[92]
46'Uranium'
47>>> atomic_masses[2]
484.0026000000000002
49
50If you don't know the atomic number of some element, then you can look
51it up in the ``atomic_numbers`` dictionary:
52
53>>> from ase.data import atomic_numbers, covalent_radii
54>>> atomic_numbers['Cu']
5529
56>>> covalent_radii[29]
571.1699999999999999