https://github.com/link89/oh-my-batch
A toolkit to manipulate batch tasks with command line. Designed for scientific computing community.
https://github.com/link89/oh-my-batch
bash batch command-line-tool hpc job-scheduler pipeline python3 scientific-computing shell slurm workflow
Last synced: 9 months ago
JSON representation
A toolkit to manipulate batch tasks with command line. Designed for scientific computing community.
- Host: GitHub
- URL: https://github.com/link89/oh-my-batch
- Owner: link89
- License: gpl-3.0
- Created: 2024-10-15T14:25:09.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-10T09:26:16.000Z (9 months ago)
- Last Synced: 2025-04-10T10:47:34.626Z (9 months ago)
- Topics: bash, batch, command-line-tool, hpc, job-scheduler, pipeline, python3, scientific-computing, shell, slurm, workflow
- Language: Python
- Homepage:
- Size: 707 KB
- Stars: 16
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# oh-my-batch
[](https://badge.fury.io/py/oh-my-batch)
[](https://pypi.org/project/oh-my-batch/)
[](https://pypi.org/project/oh-my-batch/)
A toolkit to manipulate batch tasks with command line. Designed for scientific computing community.
## Features
* `omb combo`: generate folders/files from different combinations of parameters
* `omb batch`: generate batch scripts from multiple working directories
* `omb job`: track the state of job in job scheduler
* `omb misc`: miscellaneous commands
## Install
```bash
pip install oh-my-batch
```
## Examples
* [TESLA workflow](./examples/tesla/): A customizable active learning workflow for training machine learning potentials.
* [TESLA PIMD workflow](./examples/tesla-pimd/): A customizable active learning workflow for training machine learning potentials with path integral molecular dynamics.
* [LAMMPS benchmark](./examples/lammps-benchmark/): Find out the best MPI and OpenMP setup for LAMMPS through benchmarking.
## Use cases
### Generate files from different combinations of parameters
It's common to generate files with different combinations of parameters in scientific computing.
For example, you have 3 LAMMPS data files in `tmp` directory: `tmp/1.data`, `tmp/2.data`, `tmp/3.data`.
And you want to generate a series of input files with different parameters,
for example, different temperatures 300K, 400K, 500K, against each data file.
In this case, you can use `omb combo` command to generate a series of input files for you.
```bash
# prepare fake data files
mkdir -p tmp/
touch tmp/1.data tmp/2.data tmp/3.data
# prepare a lammps input file template
cat > tmp/in.lmp.tmp < tmp/run.sh.tmp < tmp/lammps_header.sh <