Skip to content

Commit

Permalink
pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
lmseidler committed Jan 17, 2025
1 parent 7ab2873 commit 8494ba9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/mindlessgen/generator/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,15 @@ def generator(config: ConfigManager) -> tuple[list[Molecule], int]:
exitcode = 0
optimized_molecules: list[Molecule] = []

# Assert that parallel configuration is valid
# Assert that parallel configuration is valid
if num_cores < config.refine.ncores:
raise RuntimeError(f"Number of cores ({num_cores}) is too low to run refinement using {config.refine.ncores}.")
raise RuntimeError(
f"Number of cores ({num_cores}) is too low to run refinement using {config.refine.ncores}."
)
if config.general.postprocess and num_cores < config.postprocess.ncores:
raise RuntimeError(f"Number of cores ({num_cores}) is too low to run post-processing using {config.postprocess.ncores}.")
raise RuntimeError(
f"Number of cores ({num_cores}) is too low to run post-processing using {config.postprocess.ncores}."
)

# Initialize parallel blocks here
blocks = setup_blocks(
Expand Down

0 comments on commit 8494ba9

Please sign in to comment.