Skip to content

Commit

Permalink
Add check for simulation completion
Browse files Browse the repository at this point in the history
  • Loading branch information
sivonxay committed Oct 2, 2023
1 parent e14c14a commit ae09ac1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/NanoParticleTools/flows/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,14 @@ def npmc_job(constraints: Sequence[NanoParticleConstraint],
f' Expected {npmc_args["num_sims"]} trajectories, '
f'found {len(data[0].keys())}.')

# Check that all the simulations are complete
if 'simulation_time' in npmc_args.keys():
for seed, simulation_time in data[0].items():
if simulation_time < npmc_args['simulation_time']:
raise RuntimeError(f'Run did not successfully complete.'

Check warning on line 225 in src/NanoParticleTools/flows/jobs.py

View check run for this annotation

Codecov / codecov/patch

src/NanoParticleTools/flows/jobs.py#L222-L225

Added lines #L222 - L225 were not covered by tests
f' Simulation {seed} did not complete. Simulated'
f' {simulation_time} s of {npmc_args["simulation_time"]} s')

# get population by shell

# Generate documents
Expand Down

0 comments on commit ae09ac1

Please sign in to comment.