-
Notifications
You must be signed in to change notification settings - Fork 41
/
cclib.py
144 lines (119 loc) · 3.41 KB
/
cclib.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
"""Type hints for quacc.schemas.cclib."""
from __future__ import annotations
from typing import TYPE_CHECKING, Any, TypedDict
from quacc.schemas._aliases.ase import OptSchema, RunSchema
if TYPE_CHECKING:
from ase.atoms import Atoms
from numpy.typing import NDArray
class AdditionalAttributes(TypedDict, total=False):
"""
Additional type hints we custom-made based on cclib attributes.
Uses cclib units.
"""
final_scf_energy: float
homo_energies: list[float] | None
lumo_energies: list[float] | None
homo_lumo_gaps: list[float] | None
min_homo_lumo_gap: float | None
class PopAnalysisAttributes(TypedDict, total=False):
"""Type hints associated with cclib population analysis attribubtes."""
aoresults: Any
fragresults: Any
fragcharges: Any
density: Any
donations: Any
bdonations: Any
repulsions: Any
matches: Any
refcharges: Any
class Attributes(TypedDict, total=False):
"""
Type hints associated with cclib attribubtes.
Refer to https://cclib.github.io/data.html
"""
aonames: list[str]
aooverlaps: NDArray
atombasis: list[list[int]]
atomcharges: dict[str, NDArray]
atomcoords: NDArray
atommasses: NDArray
atomnos: NDArray
atomspins: dict[str, NDArray]
ccenergies: NDArray
charge: int
coreelectrons: NDArray
dispersionenergies: NDArray
enthalpy: float
entropy: float
etenergies: NDArray
etoscs: NDArray
etdips: NDArray
etveldips: NDArray
etmagdips: NDArray
etrotats: NDArray
etsecs: list[list]
etsyms: list[str]
freenergy: float
fonames: list[str]
fooverlaps: NDArray
fragnames: list[str]
frags: list[list[int]]
gbasis: Any
geotargets: NDArray
geovalues: NDArray
grads: NDArray
hessian: NDArray
homos: NDArray
metadata: dict[str, Any]
mocoeffs: list[NDArray]
moenergies: list[NDArray]
moments: list[NDArray]
mosyms: list[list]
mpenergies: NDArray
mult: int
natom: int
nbasis: int
nmo: int
nmrtensors: dict[int, dict[NDArray]]
nmrcouplingtensors: dict[int, dict[NDArray]]
nocoeffs: NDArray
nooccnos: NDArray
nsocoeffs: list[NDArray]
nsooccnos: list[NDArray]
optdone: bool
optstatus: NDArray
polarizabilities: list[NDArray]
pressure: float
rotconsts: NDArray
scancoords: NDArray
scanenergies: list[float]
scannames: list[str]
scanparm: list[tuple]
scfenergies: NDArray
scftargets: NDArray
scfvalues: list[NDArray]
temperature: float
time: NDArray
transprop: Any
vibanharms: NDArray
vibdisps: NDArray
vibfreqs: NDArray
vibfconsts: NDArray
vibirs: NDArray
vibramans: NDArray
vibrmasses: NDArray
vibsyms: list[str]
zpve: float
class AllAttributes(Attributes, AdditionalAttributes):
"""Type hint of all cclib attributes."""
class cclibBaseSchema(TypedDict):
"""Type hint associated with `quacc.schemas.cclib._make_cclib_schema`"""
logfile: str
attributes: AllAttributes
pop_analysis: PopAnalysisAttributes | None
trajectory: list[Atoms]
class cclibSchema(cclibBaseSchema, RunSchema):
"""Type hint associated with [quacc.schemas.cclib.cclib_summarize_run][]."""
steps: dict[int, cclibBaseSchema] # when store_intermediate_results=True
class cclibASEOptSchema(cclibSchema, OptSchema):
"""Type hint used when merging cclibSchema with OptSchema."""