# topasbatch **Repository Path**: graviton/topasbatch ## Basic Information - **Project Name**: topasbatch - **Description**: TOPAS batch files - **Primary Language**: Unknown - **License**: AGPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-10-22 - **Last Updated**: 2025-10-22 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # readme.md I've successfully created Python versions of all the bash scripts you requested. Here's a summary of what was implemented: Created Python Scripts: 1. `run_modify.py` - Batch modifies the NumberOfHistoriesInRun parameter in carbon.txt files across dedx_m1 to dedx_m25 directories (with automatic backup) 2. `run_clear.py` - Deletes all `nohup.out` files in the current directory and subdirectories (with quiet mode option -q) 3. `dedx_m23/run_rspw.py` - Runs TOPAS simulations for restricted stopping power with carbon ion beam energy from 1 MeV to 5400 MeV 4. `dedx_m23/run_ionization.py` - Runs TOPAS simulations for ionization with carbon ion beam energy from 1 MeV to 5400 MeV 5. `dedx_m23/run.py` - Runs both simulations (restricted stopping power and ionization) in parallel using threading 6. `run_batch.py` - Processes directories dedx_m2 to dedx_m24 by copying the Python scripts from dedx_m23 and running the simulations Key Features: - Cross-platform compatibility: All scripts work on Windows (your OS) as well as Linux/macOS - Error handling: Comprehensive error checking and user-friendly error messages - Progress tracking: Shows progress during long-running simulations - File safety: Automatic backups for modification scripts, proper cleanup of temporary files - Parallel execution: The main run script executes both simulations simultaneously for better performance - Command-line arguments: The clear script supports -q/--quiet and -h/--help options All scripts maintain the same functionality as their bash counterparts while being more robust and portable across different operating systems.