File: plot_radii.py

package info (click to toggle)
python-ase 3.26.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,484 kB
  • sloc: python: 148,112; xml: 2,728; makefile: 110; javascript: 47
file content (21 lines) | stat: -rw-r--r-- 720 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# creates: atomic_radii.png

import matplotlib.pyplot as plt
import numpy as np

from ase.data import chemical_symbols, covalent_radii
from ase.data.vdw import vdw_radii as vdw1
from ase.data.vdw_alvarez import vdw_radii as vdw2

plt.grid(ls=':')
c1 = covalent_radii.copy()
c1[c1 < 0.2001] = np.nan  # Remove 'false' values which are all 0.2
plt.plot(vdw2, marker='.', label='vdw_radii [ase.data.vdw_alvarez]')
plt.plot(vdw1, marker='.', label='vdw_radii [ase.data.vdw]')
plt.plot(c1, marker='.', label='covalent_radii [ase.data]')
nobles = [2, 10, 18, 36, 54, 86]
plt.xticks(nobles, [chemical_symbols[Z] for Z in nobles])
plt.xlabel('Z')
plt.ylabel('radius [Å]')
plt.legend(loc='best')
plt.savefig('atomic_radii.png')