/usr/share/pyshared/ase/data/molecules.py is in python-ase 3.6.0.2515-1.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | def get_ionization_energy(name, vertical=True):
"Deprecated, use ase.data.g2.get_ionization_energy instead."
import warnings
warnings.warn('ase.data.molecules.get_ionization_energy is deprecated. '
' Please use from ase.data.g2 import get_ionization_energy' \
' instead.', DeprecationWarning, stacklevel=2)
from ase.data.g2 import get_ionization_energy
return get_ionization_energy(name, vertical)
def get_atomization_energy(name):
"Deprecated, use ase.data.g2.get_atomization_energy instead."
import warnings
warnings.warn('ase.data.molecules.get_atomization_energy is deprecated. '
' Please use from ase.data.g2 import get_atomization_energy' \
' instead.', DeprecationWarning, stacklevel=2)
from ase.data.g2 import get_atomization_energy
return get_atomization_energy(name)
def molecule(name, **kwargs):
"Deprecated."
import warnings
warnings.warn('ase.data.molecules.molecule is deprecated. '
'Please use:' \
' from ase.structure import molecule' \
' instead.', DeprecationWarning, stacklevel=2)
from ase.structure import molecule
return molecule(name, **kwargs)
def latex(name):
"""Convert name to LaTeX"""
s = '$'
last = False
for i in name:
if i.isalpha():
if not last:
s = s + r'\rm{'
last = True
elif last:
s = s + '}'
last = False
s = s + i
if i.isalpha():
s = s + '}'
s = s.replace(' ', r'\ ') + '$'
return s
def rest(name):
"""Convert name to reStructuredText."""
s = ''
while name:
c = name[0]
if c == '_':
s += r'\ :sub:`%s`\ ' % name[1]
name = name[2:]
elif c == '^':
s += r'\ :sup:`%s`\ ' % name[1]
name = name[2:]
else:
s += c
name = name[1:]
return s
|