/
pymodule.py
86 lines (60 loc) · 1.94 KB
/
pymodule.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
import psi4
import re
import os
import inputparser
import math
import warnings
from driver import *
from wrappers import *
from molutil import *
import p4util
from p4xcpt import *
def run_cdft(name, **kwargs):
r"""Function encoding sequence of PSI module and plugin calls so that
CDFT can be called via :py:func:`~driver.energy`.
>>> energy('cdft')
"""
lowername = name.lower()
kwargs = p4util.kwargs_lower(kwargs)
# Run CDFT
psi4.set_local_option('CDFT','METHOD','CDFT')
returnvalue = psi4.plugin('cdft.so')
return returnvalue
def run_noci(name, **kwargs):
r"""Function encoding sequence of PSI module and plugin calls so that
NOCI can be called via :py:func:`~driver.energy`.
>>> energy('noci')
"""
lowername = name.lower()
kwargs = p4util.kwargs_lower(kwargs)
# Run CDFT
psi4.set_local_option('CDFT','METHOD','NOCI')
returnvalue = psi4.plugin('cdft.so')
return returnvalue
def run_ocdft(name, **kwargs):
r"""Function encoding sequence of PSI module and plugin calls so that
OCDFT can be called via :py:func:`~driver.energy`.
>>> energy('ocdft')
"""
lowername = name.lower()
kwargs = p4util.kwargs_lower(kwargs)
# Run OCDFT
psi4.set_local_option('CDFT','METHOD','OCDFT')
returnvalue = psi4.plugin('cdft.so')
return returnvalue
def run_fasnocis(name, **kwargs):
r"""Function encoding sequence of PSI module and plugin calls so that
OCDFT can be called via :py:func:`~driver.energy`.
>>> energy('fasnocis')
"""
lowername = name.lower()
kwargs = p4util.kwargs_lower(kwargs)
# Run OCDFT
psi4.set_local_option('CDFT','METHOD','FASNOCIS')
returnvalue = psi4.plugin('cdft.so')
return returnvalue
# Integration with driver routines
procedures['energy']['cdft'] = run_cdft
procedures['energy']['ocdft'] = run_ocdft
procedures['energy']['fasnocis'] = run_fasnocis
procedures['energy']['noci'] = run_noci