diff --git a/Models/README.md b/Models/README.md index c9d5acaa..710a0aab 100644 --- a/Models/README.md +++ b/Models/README.md @@ -2,101 +2,31 @@ ## Overview -To run specific models, each folder contains a -Makefile that can simply be run inside a specific model folder. -The workflow includes running WolframScript to generate matrix elements, using Python to generate collision data, and finally processing the data with the main Python script. +This folder contains individual model directories, each equipped with a Python script to calculate the wall velocity specific to that model. Additional files within each model directory support the computation of matrix elements and collision integrations. ## Directory Structure -- `MatrixElements/` - Contains the script and data files for matrix element generation. -- `CollisionOutput/` - Directory where collision data files are stored. +Each model directory includes the following files and subdirectories: +- `.py` - Contains the model definition and the commands for finding the wall velocity. +- `Config.ini` - An optional configuration file containing model-specific configuration settings. (Note: This file is not included for the Yukawa model.) +- `exampleCollisionDefs.py` - Defines collision generation settings specific to the model. +- `MatrixElements/` - A subdirectory holding scripts (with .m extensions) used for generating matrix elements, as well as a .json file containing the computed matrix elements. +- `CollisionOutput_N/` - Subdirectories for storing collision data files for each pair of out-of-equilibrium particles, with each folder corresponding to a specific spatial grid size. +Additionally, the Models folder contains a common utility file: -## Makefile Targets +- `wallGoExampleBase.py` - This script provides a shared template for wall velocity computations. It is used by all models except the Yukawa model. -### `all` +## Running a model -This is the default target which runs the `model` target. +The examples can be run directly with e.g. -### `generateMatrixElements` -Generates matrix Elements at `MatrixElements.txt` from -`MatrixElements/.m` -as sometimes only the matrix elements need to be generated. + python3 Models/SingletStandardModel_Z2/singletStandardModelZ2.py + +For models that use the common `wallGoExampleBase.py', additional command line arguments are available to (re)calculate matrix elements and collisions, and adjust the momentum grid size e.g. -### `model` -Runs only the model file -`.py` -as sometimes no new matrix elements or collision integrals need to be generated. + python3 Models/SingletStandardModel_Z2/singletStandardModelZ2.py --recalculateMatrixElements --recalculateCollisions --momentumGridSize 5 -### `generate_collisions` +## Requirements -Generates collision data files using the matrix elements. This target depends on `MatrixElements.txt`, which is generated by running a WolframScript file. - -### `clean` - -Removes the `CollisionOutput` and `MatrixElements` directories and all their contents. - -## Dependencies - -- `python3` - Required for running Python scripts. -- `wolframscript` - Required for running the WolframScript file to generate matrix elements. - - -- `matrixElements.m` - - MatrixElement script based on DRalgo. - See [https://github.com/Wall-Go/MatrixElements](https://github.com/Wall-Go/MatrixElements). -- `DRalgo` - See [https://github.com/DR-algo/DRalgo](https://github.com/DR-algo/DRalgo). - -Both `matrixElements.m` and the `DRalgo` folder should be placed in a directory visible to Mathematica. The best options are to place it in the Applications subfolder of -`$BaseDirectory` or `$UserBaseDirectory`. -Often, the paths are the following: - -### For Linux - - /usr/share/Mathematica/Applications - /home//.Mathematica/Applications - -### For Windows - - C:\ProgramData\Mathematica\Applications - C:\Users\\AppData\Roaming\Mathematica\Applications - -## Usage - -### Full pipeline -1. **Generate Collisions**: - Ensure that the matrix elements data file `MatrixElements.txt` exists, then generate collision data by running: - ```sh - make generate_collisions - ``` - -2. **Run Main (Model) Script**: - Once collision data files are generated, run the main Python script: - ```sh - make model - ``` - -4. **Clean Up**: - To clean up the generated collision data files and matrix elements: - ```sh - make clean - ``` - -### Matrix Elements -1. **Generate Matrix Elements**: - In that case it suffices to run: - ```sh - make generateMatrixElements - ``` - -## File Descriptions - -- `MatrixElements/matrixElements.qcd.m` - WolframScript file for generating matrix elements. -- `MatrixElements.txt` - Output data file containing matrix elements. -- `collisionGenerator.py` - Python script for generating collision data. -- `.py` - Main Python Model script that uses the collision data e.g. `SingletStandardModel_Z2.py` - -## Notes - -- Ensure that the necessary Python and WolframScript dependencies are installed and properly configured in your environment. -- The `CollisionOutput` directory is automatically created if it does not exist when running the `generate_collisions` target. \ No newline at end of file +Running the model files requires a valid installation of [**WallGo**](https://github.com/Wall-Go/WallGo) . Generation of new matrix elements and collisions furthermore requires installations of [**WallGoMatrix**](https://github.com/Wall-Go/WallGoMatrix) and [**WallGoCollision**](https://github.com/Wall-Go/WallGoCollision) respectively.