Output Data¶
Output is controlled by the frequency variables already introduced in Global Control, together with the writer operators below. This page only covers particle-level output (the species/positions/velocities you defined earlier) — see the tip at the end for grid-level output.
Thermodynamic state (screen & file)¶
Printing the thermodynamic state to the screen and writing it to a .csv file are both enabled by default; only their frequency and format need to be set from global:
log_mode selects which columns print_thermodynamic_state prints to screen (mechanical, default/thermo_basic, thermo/thermo_full, vol_fluct_ortho[_basic], vol_fluct_tricl[_basic], or a custom ;-separated list of item names). The file writer (dump_thermodynamic_state) always writes the same fixed set of columns (step, time, energies, temperature, stress tensor, box, volume, density) to thermostate_file.
Binary restart file¶
write_restart is nop by default; assign it one of the predefined aggregates from config_restart.msp (see Restarts) to activate restart writing, at the frequency set by simulation_restart_frequency:
This writes an exaNBody-native, MPI-IO binary dump (particles, velocities, domain, species and timestep) through write_dump_atoms, which can later be re-read with read_dump_atoms (see Reading an atoms restart file). It also accepts compression_level (zlib level, default 6) and max_part_size (file partition size, default: system value).
write_restart_atoms definition (config_restart.msp)
Snapshot file¶
write_snapshot is likewise nop by default; assign it a predefined aggregate to write snapshots for visualization, at the frequency set by simulation_snapshot_frequency. Two common formats:
write_snapshot_xyz writes a plain-text .xyz file (species name and position per atom) through write_xyz_file.
write_snapshot_xyz definition (config_snapshot.msp)
write_snapshot_paraview writes a Paraview/VTK file through write_paraview, including every available per-particle field (position, velocity, force, type, MPI rank, ...) by default — narrow it down with the fields: list of regular expressions if needed (e.g. fields: [ "type", "vx|vy|vz" ]).
write_snapshot_paraview definition (config_snapshot.msp)
Tip
Both writers above output raw particle data. exaNBody can also project particle properties onto the parallelization grid and write that out instead (write_grid_vtk), which is much cheaper for large-scale, on-the-fly visualization — see Output in the Grids Features section.