e0 Dispatcher
AtomEnergies
¶
Manager class for interface with the isolated atom energies classes and providing the generals function to retrieve the data
Source code in openqdc/datasets/energies.py
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 157 158 159 160 161 162 163 |
|
e0s_dict: Dict[AtomSpecies, AtomEnergy]
property
¶
Return the isolated atom energies dictionary
Returns:
Type | Description |
---|---|
Dict[AtomSpecies, AtomEnergy]
|
Dictionary with the isolated atom energies |
e0s_matrix: np.ndarray
property
¶
Return the isolated atom energies dictionary
Returns:
Type | Description |
---|---|
ndarray
|
Matrix Array with the isolated atom energies |
__getitem__(item)
¶
Retrieve a key from the isolated atom dictionary. Item can be written as tuple(Symbol, charge), tuple(Chemical number, charge). If no charge is passed, it will be automatically set to 0.
Examples:
AtomEnergies[6], AtomEnergies[6,1],
AtomEnergies["C",1], AtomEnergies[(6,1)],
AtomEnergies[("C,1)]
Parameters:
Name | Type | Description | Default |
---|---|---|---|
item |
AtomSpecies
|
AtomSpecies object or tuple with the atom symbol and charge |
required |
Returns:
Type | Description |
---|---|
AtomEnergy
|
AtomEnergy object with the isolated atom energy |
Source code in openqdc/datasets/energies.py
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
|
AtomEnergy
dataclass
¶
Datastructure to store isolated atom energies and the std deviation associated to the value. By default the std will be 1 if no value was calculated or not available (formation energy case)
Source code in openqdc/datasets/energies.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
|
append(other)
¶
Append the mean and std of another atom energy
Source code in openqdc/datasets/energies.py
90 91 92 93 94 95 |
|
AtomSpecies
dataclass
¶
Structure that defines a tuple of chemical specie and charge and provide hash and automatic conversion from atom number to checmical symbol
Source code in openqdc/datasets/energies.py
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
|
IsolatedEnergyInterface
¶
Bases: ABC
Abstract class that defines the interface for the different implementation of an isolated atom energy value
Source code in openqdc/datasets/energies.py
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 |
|
e0_dict: Dict
property
¶
Return the isolated atom energies dict
Returns:
Type | Description |
---|---|
Dict
|
Dictionary with the isolated atom energies |
e0_matrix: np.ndarray
property
¶
Return the isolated atom energies matrixes
Returns:
Type | Description |
---|---|
ndarray
|
Matrix Array with the isolated atom energies |
__init__(data, **kwargs)
¶
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
openqdc.datasets.Dataset Dataset object that contains the information about the isolated atom energies. Info will be passed by references |
required | |
kwargs |
dict Additional arguments that will be passed to the selected energy class. Mostly used for regression to pass the regressor_kwargs. |
{}
|
Source code in openqdc/datasets/energies.py
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
|
NullEnergy
¶
Bases: IsolatedEnergyInterface
Class that returns a null (zeros) matrix for the isolated atom energies in case of no energies are available.
Source code in openqdc/datasets/energies.py
252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 |
|
PhysicalEnergy
¶
Bases: IsolatedEnergyInterface
Class that returns a physical (SE,DFT,etc) isolated atom energies.
Source code in openqdc/datasets/energies.py
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 |
|
RegressionEnergy
¶
Bases: IsolatedEnergyInterface
Class that compute and returns the regressed isolated atom energies.
Source code in openqdc/datasets/energies.py
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 |
|
preprocess_path
property
¶
Return the path to the object pickle file.
attempt_load()
¶
Try to load the regressed isolated atom energies from the object pickle file and return the success of the operation.
Source code in openqdc/datasets/energies.py
336 337 338 339 340 341 342 343 344 345 346 347 |
|
save_e0s()
¶
Save the regressed isolated atom energies in a pickle file.
Source code in openqdc/datasets/energies.py
330 331 332 333 334 |
|
dispatch_factory(data, **kwargs)
¶
Factory function that select the correct energy class for the fetching/calculation of isolated atom energies.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
openqdc.datasets.Dataset Dataset object that contains the information about the isolated atom energies. Info will be passed by references |
required | |
kwargs |
dict Additional arguments that will be passed to the selected energy class. Mostly used for regression to pass the regressor_kwargs. |
{}
|
Returns:
Type | Description |
---|---|
IsolatedEnergyInterface
|
Initialized IsolatedEnergyInterface-like object |
Source code in openqdc/datasets/energies.py
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 |
|