This project provides a streamlined pipeline for visualizing collision events simulated in UrQMD (Ultra-relativistic Quantum Molecular Dynamics) v3.4.
The pipeline consists of four primary stages:
- File Reduction: Processes the
filename.f14output file from UrQMD, removes unnecessary whitespace, and saves it asfilename_reduced.csv. - Data Parsing: Extracts detailed event information, calculates necessary parameters, and stores the processed data in Parquet format (default
outputs/parquet). - Conversion to CSV: Converts the Parquet data by grouping it into time snapshots, with each snapshot saved as a separate CSV file.
- Visualization: Uses the generated CSV files as input for the ParaView template
assets/paraview/paraViewState-massVar.pvsmto visualize the events.
urqmdvis/: Core pipeline modules.gui.py: Desktop UI for running the pipeline and launching ParaView.run.py: CLI entry point for the pipeline.assets/paraview/paraViewState-massVar.pvsm: Default ParaView state template.outputs/: Default output folder (CSV/Parquet and generated ParaView states).
The primary entry point is run.py, which orchestrates the reduction, parsing, and conversion stages. To run the pipeline:
-
Install dependencies:
- Install requirements:
pip install -r requirements.txt
- Install requirements:
-
Run the Script:
- Execute the following command from the terminal to initiate the pipeline:
python run.py ../files/urqmd_AuAu_0-3fm/urqmd_1_14.dat 9 --event-name event
- Optional flags:
--parquet-folderand--csv-folderto change output locations (defaults:outputs/parquet,outputs/csv).--skip-reduce,--skip-parse,--skip-convertto skip steps.
- Execute the following command from the terminal to initiate the pipeline:
-
Output:
- The pipeline will output the CSV files into a specified folder (
outputs/csv). Each CSV file contains data for an individual time slice.
- The pipeline will output the CSV files into a specified folder (
For a local desktop UI to run the full pipeline:
python gui.pyThe UI lets you set the input file, event number, output folders, select which steps to run, and launch ParaView with a generated state file.
Here’s an example of the expected output in the terminal during the process:
Starting file reduction for: ../files/urqmd_AuAu_0-3fm/urqmd_1_14.dat
Finished processing 1702856 lines.
Reduction complete.
Output saved to: ../files/urqmd_AuAu_0-3fm/urqmd_1_14_reduced.csv
File reduction completed successfully.
Starting parsing...
Loading data from: ../files/urqmd_AuAu_0-3fm/urqmd_1_14_reduced.csv...
Data loaded successfully.
Collision Parameters:
Total Time (tottime): 25.0
Delta Time (dtime): 0.1
Impact parameter: 2.79 fm
Mass and Charge of Particles:
Particle A - Mass: 197, Charge: 79
Particle B - Mass: 197, Charge: 79
Total slices to process: 250
Data saved to ./outputs/parquet/event_2.parquet
Parsing completed, memory cleaned up.
Parsing and Parquet file creation completed successfully.
Parquet file loaded successfully.
Starting CSV conversion...
Conversion completed: 250 files created, 0 failed.
CSV conversion completed successfully.
To visualize the output in ParaView:
-
Open ParaView:
- Run ParaView and navigate to
File -> Load State. - Load the
assets/paraview/paraViewState-massVar.pvsmtemplate.
- Run ParaView and navigate to
-
Load the CSV File Sequence:
- Right-click on
event3_frame_0.csv*in the pipeline and selectChange File. - Navigate to the
csv_folder(defaultoutputs/csv) and select your event file. - Right-click again on the file sequence in the pipeline and select
Reload Filesto refresh the list with the new files (Find new files).
- Right-click on
-
Adjust Event Info and Time Annotation:
- Update the event information in
UrQMD-text. - Set the
TimeAnnotationscaling based on your simulation step size withscale = step.
- Update the event information in
-
Enable Ray Tracing:
- In the properties tab, enable ray tracing.
-
Save the Animation:
- Go to
File -> Save Animation. - Select a folder to save the PNG files for the animation.
- Set the image resolution to 1920 x 1080 and choose a compression level (0 is recommended for no compression).
- Go to