Skip to content

Commit

Permalink
Fix h5 file creation.
Browse files Browse the repository at this point in the history
  • Loading branch information
joaander committed Nov 6, 2023
1 parent b54cfad commit 2a89643
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions hoomd_validation/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,28 +121,27 @@ def make_simulation(
output=file)
sim.operations.add(table_writer)

# write particle trajectory to a h5 file
trajectory_writer = hoomd.write.HDF5Log(
# write particle trajectory to a gsd file
trajectory_writer = hoomd.write.GSD(
filename=job.fn(get_job_filename(sim_mode, device, 'trajectory',
'h5')),
'gsd')),
trigger=hoomd.trigger.And([
hoomd.trigger.Periodic(trajectory_write_period),
hoomd.trigger.After(log_start_step)
]),
logger=trajectory_logger,
mode='w')
mode='ab')
sim.operations.add(trajectory_writer)

# write logged quantities to gsd file
quantity_writer = hoomd.write.GSD(
filter=hoomd.filter.Null(),
# write logged quantities to h5 file
quantity_writer = hoomd.write.HDF5Log(
filename=job.fn(get_job_filename(sim_mode, device, 'quantities',
'gsd')),
'h5')),
trigger=hoomd.trigger.And([
hoomd.trigger.Periodic(log_write_period),
hoomd.trigger.After(log_start_step)
]),
mode='ab',
mode='w',
logger=logger)
sim.operations.add(quantity_writer)

Expand Down

0 comments on commit 2a89643

Please sign in to comment.