1
- '''
2
- Author: puzhichen.996 [email protected]
3
- Date: 2025-04-23 00:43:36
4
- LastEditors: puzhichen.996 [email protected]
5
- LastEditTime: 2025-04-23 00:43:07
6
- FilePath: /playground/root/gpu4pysc/gpu4pyscf/examples/31-ir_intensity.py
7
- Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
8
- '''
9
1
#!/usr/bin/env python
10
2
# Copyright 2021-2025 The PySCF Developers. All Rights Reserved.
11
3
#
21
13
# See the License for the specific language governing permissions and
22
14
# limitations under the License.
23
15
24
- ###################################
25
- # Example of IR intensity
26
- ###################################
16
+ '''
17
+ IR intensity
18
+ '''
27
19
28
20
import pyscf
29
21
from gpu4pyscf .dft import rks
37
29
38
30
bas = '631g'
39
31
40
- mol = pyscf .M (atom = atom , basis = bas , max_memory = 32000 )
41
- mol .build ()
32
+ mol = pyscf .M (atom = atom , basis = bas )
42
33
43
- mf = rks .RKS (mol , xc = 'b3lyp' )
34
+ mf = mol .RKS (xc = 'b3lyp' ). to_gpu ( )
44
35
e_gpu = mf .kernel () # -76.3849465432042
45
36
46
37
h = mf .Hessian ()
47
38
freq , intensity = ir .eval_ir_freq_intensity (mf , h )
48
39
print ('------------------- IR frequncy and intensity -----------------------------' )
49
40
for i in range (freq .shape [0 ]):
50
- print (f"IR frequency|intensity for { i } -th mode is { freq [i ]:.4f} |{ intensity [i ]:.4f} " )
41
+ print (f"IR frequency|intensity for { i } -th mode is { freq [i ]:.4f} (cm^-1) |{ intensity [i ]:.4f} (km/mol)" )
42
+ """
43
+ IR frequency|intensity for 0-th mode is 1613.0866 (cm^-1) |62.3982 (km/mol)
44
+ IR frequency|intensity for 1-th mode is 3874.9540 (cm^-1) |3.7823 (km/mol)
45
+ IR frequency|intensity for 2-th mode is 4006.0173 (cm^-1) |5.0603 (km/mol)
51
46
"""
52
- IR frequency|intensity for 0-th mode is 1613.0866|62.3982
53
- IR frequency|intensity for 1-th mode is 3874.9540|3.7823
54
- IR frequency|intensity for 2-th mode is 4006.0173|5.0603
55
- """
0 commit comments