-
Notifications
You must be signed in to change notification settings - Fork 14
/
example.py
69 lines (59 loc) · 1.74 KB
/
example.py
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
63
64
65
66
67
68
69
import numgrid
radial_precision = 1.0e-12
min_num_angular_points = 86
max_num_angular_points = 302
proton_charges = [8, 1, 1]
center_coordinates_bohr = [(0.0, 0.0, 0.0), (1.43, 0.0, 1.1), (-1.43, 0.0, 1.1)]
# cc-pVDZ basis
alpha_max = [
11720.0, # O
13.01, # H
13.01, # H
]
alpha_min = [
{0: 0.3023, 1: 0.2753, 2: 1.185}, # O
{0: 0.122, 1: 0.727}, # H
{0: 0.122, 1: 0.727}, # H
]
for center_index in range(len(center_coordinates_bohr)):
# atom grid using explicit basis set parameters
coordinates, weights = numgrid.atom_grid(
alpha_min[center_index],
alpha_max[center_index],
radial_precision,
min_num_angular_points,
max_num_angular_points,
proton_charges,
center_index,
center_coordinates_bohr,
hardness=3,
)
# atom grid using basis set name
# this takes a second or two for the REST API request
coordinates, weights = numgrid.atom_grid_bse(
"cc-pVDZ",
radial_precision,
min_num_angular_points,
max_num_angular_points,
proton_charges,
center_index,
center_coordinates_bohr,
hardness=3,
)
# radial grid (LMG) using explicit basis set parameters
radii, weights = numgrid.radial_grid_lmg(
alpha_min={0: 0.3023, 1: 0.2753, 2: 1.185},
alpha_max=11720.0,
radial_precision=1.0e-12,
proton_charge=8,
)
# radial grid (LMG) using basis set name
radii, weights = numgrid.radial_grid_lmg_bse(
basis_set="cc-pVDZ",
radial_precision=1.0e-12,
proton_charge=8,
)
# radial grid with 100 points using Krack-Koster approach
radii, weights = numgrid.radial_grid_kk(num_points=100)
# angular grid with 14 points
coordinates, weights = numgrid.angular_grid(num_points=14)