-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdebug_overlap_test.py
More file actions
71 lines (60 loc) · 1.72 KB
/
debug_overlap_test.py
File metadata and controls
71 lines (60 loc) · 1.72 KB
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
70
71
#!/usr/bin/env python3
"""
Test overlap between basis functions with different exponents
"""
import numpy as np
from pymultiwfn.integrals.overlap import _calculate_primitive_overlap
# Test two S-type Gaussians on the same center with different exponents
alpha1 = 33.87
alpha2 = 5.095
overlap = _calculate_primitive_overlap(
0,
0, # Both S-type
(0.0, 0.0, 0.0),
(0.0, 0.0, 0.0), # Same center
alpha1,
alpha2, # Different exponents
use_cache=False,
)
print(f"S-S overlap (same center, exponents {alpha1} and {alpha2}): {overlap:.10f}")
print(f"Should be < 1.0 and > 0")
# Test two S-type Gaussians on different centers
R = 1.4 # Distance between centers (in Bohr)
overlap_diff_center = _calculate_primitive_overlap(
0,
0, # Both S-type
(0.0, 0.0, 0.0),
(R, 0.0, 0.0), # Different centers
alpha1,
alpha1, # Same exponent
use_cache=False,
)
print(
f"\nS-S overlap (different centers, distance {R} Bohr, exponent {alpha1}): {overlap_diff_center:.10f}"
)
print(f"Should be < 1.0 and > 0")
# Test Px-Px overlap
alpha = 1.407
overlap_PxPx = _calculate_primitive_overlap(
1,
1, # Both Px-type
(0.0, 0.0, 0.0),
(0.0, 0.0, 0.0), # Same center
alpha,
alpha, # Same exponent
use_cache=False,
)
print(f"\nPx-Px overlap (same center, exponent {alpha}): {overlap_PxPx:.10f}")
print(f"Should be 1.0 for normalized functions")
# Test Px-Py overlap (should be 0)
overlap_PxPy = _calculate_primitive_overlap(
1,
2, # Px and Py
(0.0, 0.0, 0.0),
(0.0, 0.0, 0.0), # Same center
alpha,
alpha, # Same exponent
use_cache=False,
)
print(f"\nPx-Py overlap (same center, exponent {alpha}): {overlap_PxPy:.10f}")
print(f"Should be 0.0 (orthogonal)")