cclib
Schemas for molecular DFT codes parsed by cclib.
cclib_summarize_run ¶
cclib_summarize_run(
final_atoms: Atoms,
logfile_extensions: str | list[str],
directory: Path | str | None = None,
pop_analyses: (
list[
Literal[
"cpsa",
"mpa",
"lpa",
"bickelhaupt",
"density",
"mbo",
"bader",
"ddec6",
"hirshfeld",
]
]
| None
) = None,
check_convergence: bool = _DEFAULT_SETTING,
additional_fields: dict[str, Any] | None = None,
store: Store | None = _DEFAULT_SETTING,
) -> cclibSchema
Get tabulated results from a molecular DFT run and store them in a database-friendly format. This is meant to be a general parser built on top of cclib.
Parameters:
-
final_atoms
(Atoms
) –ASE Atoms object following a calculation.
-
logfile_extensions
(str | list[str]
) –Possible extensions of the log file (e.g. ".log", ".out", ".txt", ".chk"). Note that only a partial match is needed. For instance,
.log
will match.log.gz
and.log.1.gz
. If multiple files with this extension are found, the one with the most recent change time will be used. For an exact match only, put in the full file name. -
directory
(Path | str | None
, default:None
) –The path to the folder containing the calculation outputs. A value of None specifies the calculator directory.
-
pop_analyses
(list[Literal['cpsa', 'mpa', 'lpa', 'bickelhaupt', 'density', 'mbo', 'bader', 'ddec6', 'hirshfeld']] | None
, default:None
) –The name(s) of any cclib post-processing analysis to run. Note that for bader, ddec6, and hirshfeld, a cube file (.cube, .cub) must reside in directory. Supports: "cpsa", "mpa", "lpa", "bickelhaupt", "density", "mbo", "bader", "ddec6", "hirshfeld".
-
check_convergence
(bool
, default:_DEFAULT_SETTING
) –Whether to throw an error if geometry optimization convergence is not reached. Defaults to True in settings.
-
additional_fields
(dict[str, Any] | None
, default:None
) –Additional fields to add to the task document.
-
store
(Store | None
, default:_DEFAULT_SETTING
) –Maggma Store object to store the results in. Defaults to
SETTINGS.STORE
Returns:
-
cclibSchema
–Dictionary representation of the task document
Source code in quacc/schemas/cclib.py
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 145 146 147 148 149 150 151 152 153 154 155 156 |
|
summarize_cclib_opt_run ¶
summarize_cclib_opt_run(
optimizer: Optimizer,
logfile_extensions: str | list[str],
trajectory: Trajectory | list[Atoms] | None = None,
directory: Path | str | None = None,
pop_analyses: (
list[
Literal[
"cpsa",
"mpa",
"lpa",
"bickelhaupt",
"density",
"mbo",
"bader",
"ddec6",
"hirshfeld",
]
]
| None
) = None,
check_convergence: bool = _DEFAULT_SETTING,
additional_fields: dict[str, Any] | None = None,
store: Store | None = _DEFAULT_SETTING,
) -> cclibASEOptSchema
Merges the results of a cclib run with the results of an ASE optimizer run.
Parameters:
-
optimizer
(Optimizer
) –The ASE optimizer object
-
logfile_extensions
(str | list[str]
) –Possible extensions of the log file (e.g. ".log", ".out", ".txt", ".chk"). Note that only a partial match is needed. For instance,
.log
will match.log.gz
and.log.1.gz
. If multiple files with this extension are found, the one with the most recent change time will be used. For an exact match only, put in the full file name. -
trajectory
(Trajectory | list[Atoms] | None
, default:None
) –ASE Trajectory object or list[Atoms] from reading a trajectory file. If None, the trajectory must be found in dyn.traj_atoms.
-
directory
(Path | str | None
, default:None
) –The path to the folder containing the calculation outputs. A value of None specifies the calculator directory.
-
pop_analyses
(list[Literal['cpsa', 'mpa', 'lpa', 'bickelhaupt', 'density', 'mbo', 'bader', 'ddec6', 'hirshfeld']] | None
, default:None
) –The name(s) of any cclib post-processing analysis to run. Note that for bader, ddec6, and hirshfeld, a cube file (.cube, .cub) must reside in directory. Supports: "cpsa", "mpa", "lpa", "bickelhaupt", "density", "mbo", "bader", "ddec6", "hirshfeld".
-
check_convergence
(bool
, default:_DEFAULT_SETTING
) –Whether to throw an error if geometry optimization convergence is not reached. Defaults to True in settings.
-
additional_fields
(dict[str, Any] | None
, default:None
) –Additional fields to add to the task document.
-
store
(Store | None
, default:_DEFAULT_SETTING
) –Maggma Store object to store the results in. Defaults to
SETTINGS.STORE
Returns:
-
cclibASEOptSchema
–Dictionary representation of the task document
Source code in quacc/schemas/cclib.py
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 |
|