Create PPE
CreatePPEConfig
dataclass
CreatePPEConfig(
verbose: int = 0,
log_dir: Path | str = "",
log_mode: str = "w",
*,
simulation_setup_path: Path,
build_base_only: bool = False,
build_only: bool = False,
frozen_base_case: bool = False,
keepexe: bool = False,
overwrite_base_case: bool = False,
overwrite_ppe: bool = True
)
Bases: BaseConfig
get_checked_and_derived_config
get_checked_and_derived_config() -> CheckedCreatePPEConfig
Check and handle arguments for the PPE configuration.
Source code in tinkertool/scripts/create_ppe/config.py
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 | |
SubmitPPEConfig
dataclass
SubmitPPEConfig(
verbose: int = 0,
log_dir: Path | str = "",
log_mode: str = "w",
*,
cases: Union[str, Path, list[str], list[Path]]
)
Bases: BaseConfig
get_checked_and_derived_config
get_checked_and_derived_config() -> CheckedSubmitPPEConfig
Check and handle arguments for the PPE configuration.
Source code in tinkertool/scripts/create_ppe/config.py
237 238 239 240 241 242 243 244 | |
CheckBuildConfig
dataclass
CheckBuildConfig(
verbose: int = 0,
log_dir: Path | str = "",
log_mode: str = "w",
*,
cases: Union[str, Path, list[str], list[Path]]
)
Bases: SubmitPPEConfig
Configuration for checking build status of PPE cases.
Functionally identical to SubmitPPEConfig but with a name that clearly indicates its purpose: checking if ensemble member cases have been built successfully.
get_checked_and_derived_config
get_checked_and_derived_config() -> CheckedCheckBuildConfig
Check and handle arguments for the build check configuration.
Source code in tinkertool/scripts/create_ppe/config.py
275 276 277 278 279 280 | |
CheckedCheckBuildConfig
dataclass
CheckedCheckBuildConfig(
verbose: int = 0,
log_dir: Path | str = "",
log_mode: str = "w",
*,
log_file: Path = (
lambda: joinpath(
"output",
f"tinkertool.{strftime('%Y%m%d-%H%M%S')}.log",
)
)(),
cases: list[Path] = list(),
)
Bases: CheckedSubmitPPEConfig
Checked configuration for checking build status of PPE cases.
The validated and processed version of CheckBuildConfig with all fields verified and cases converted to Path objects.
PrestageEnsembleConfig
dataclass
PrestageEnsembleConfig(
verbose: int = 0,
log_dir: Path | str = "",
log_mode: str = "w",
*,
cases: Union[str, Path, list[str], list[Path]]
)
Bases: SubmitPPEConfig
Configuration for prestaging PPE ensemble cases.
Functionally identical to SubmitPPEConfig but with a name that clearly indicates its purpose: preparing ensemble member cases by copying restart files and setting up the run environment before job submission.
get_checked_and_derived_config
get_checked_and_derived_config() -> (
CheckedPrestageEnsembleConfig
)
Check and handle arguments for the prestage configuration.
Source code in tinkertool/scripts/create_ppe/config.py
301 302 303 304 305 306 | |
CheckedPrestageEnsembleConfig
dataclass
CheckedPrestageEnsembleConfig(
verbose: int = 0,
log_dir: Path | str = "",
log_mode: str = "w",
*,
log_file: Path = (
lambda: joinpath(
"output",
f"tinkertool.{strftime('%Y%m%d-%H%M%S')}.log",
)
)(),
cases: list[Path] = list(),
)
Bases: CheckedSubmitPPEConfig
Checked configuration for prestaging PPE ensemble cases.
The validated and processed version of PrestageEnsembleConfig with all fields verified and cases converted to Path objects.
check_build
check_build(config: CheckBuildConfig) -> bool
Check if the build was successful by checking for case.build success in each case directories CaseStatus
Parameters
config : SubmitPPEConfig Configuration object containing the cases to check and logging settings. Returns
bool True if all cases have a successful build, False otherwise.
Source code in tinkertool/scripts/create_ppe/create_ppe.py
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 | |
prestage_ensemble
prestage_ensemble(config: PrestageEnsembleConfig) -> bool
Prestage the ensemble members by copying the base case input files to each member's input directory.
Parameters
config : PrestageEnsembleConfig Configuration object containing the cases to prestage and logging settings.
Source code in tinkertool/scripts/create_ppe/create_ppe.py
250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 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 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 | |
bulk_xmlchange
bulk_xmlchange(
cases: list[Path] | list[str],
xml_changes: (
dict[str, str | dict[str, str]]
| list[dict[str, str | dict[str, str]]]
),
) -> None
Apply bulk XML changes to a list of cases.
Parameters
cases : list[Path] List of case directories to apply the XML changes to. xml_changes : dict[str, str | dict[str, str]] | list[dict[str, str | dict[str, str]]] Dictionary (or list of dictionaries) of XML changes to apply. Keys are XML variable names. Values can either be a string (for global changes) or a dictionary with subgroups as keys and values to apply.
Source code in tinkertool/scripts/create_ppe/create_ppe.py
428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 | |