/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. Units
  4. =====
  5. Physical units are defined in the :trac:`ase/units.py` module. Electron volts
  6. (``eV``) and angstroms (``Ang``) are defined as 1.0.
  7. Other units are
  8. ``nm``, ``Bohr``, ``Hartree`` or ``Ha``, ``kJ``, ``kcal``, ``mol``,
  9. ``Rydberg`` or ``Ry``, ``second``, ``fs`` and ``kB``.
  10. .. note::
  11. All constants are taken from the 1986 CODATA_.
  12. .. _CODATA: http://physics.nist.gov/cuu/Constants/archive1986.html
  13. Examples:
  14. >>> from ase.units import *
  15. >>> 2 * Bohr
  16. 1.0583545150138329
  17. >>> 25 * Rydberg
  18. 340.14244569396635
  19. >>> 100 * kJ/mol
  20. 1.0364272141304978
  21. >>> 300 * kB
  22. 0.025852157076770025
  23. >>> 0.1 * fs
  24. 0.009822693531550318
  25. >>> print '1 Hartree = '+str(Hartree*mol/kcal)+' kcal/mol'
  26. =======================
  27. The ``ase.data`` module
  28. =======================
  29. This module defines the following variables: ``atomic_masses``,
  30. ``atomic_names``, ``chemical_symbols``, ``covalent_radii``,
  31. ``cpk_colors`` and ``reference_states``. All of these are lists that
  32. should be indexed with an atomic number:
  33. >>> from ase.data import atomic_names, atomic_masses
  34. >>> atomic_names[92]
  35. 'Uranium'
  36. >>> atomic_masses[2]
  37. 4.0026000000000002
  38. If you don't know the atomic number of some element, then you can look
  39. it up in the ``atomic_numbers`` dictionary:
  40. >>> from ase.data import atomic_numbers, covalent_radii
  41. >>> atomic_numbers['Cu']
  42. 29
  43. >>> covalent_radii[29]
  44. 1.1699999999999999