Skip to content

Pocar-Lab/Chroma-Scripts

Repository files navigation

Chroma Scripts

Chroma Scripts is a repository that hosts analysis scripts used by the Pocar Lab group for their Chroma simulations. These scripts facilitate running and analyzing simulations within a Singularity container that includes both our custom Chroma source code and its associated wrapper.

Installation & Setup

Prerequisites

  • Singularity (Apptainer) installed on your system
  • A Singularity container with:
    • Custom Chroma source code
    • Chroma wrapper

Running the Container

Ensure that your container is properly built and includes the necessary dependencies. If not, follow the Pocar Lab’s 'Chroma Installation Guide' to install Chroma and its wrapper inside a Singularity (or apptainer) container.

If you are using Singularity, start the Singularity container using:

singularity run --nv --writable-tmpfs --bind (path to this repo):/workspace --no-home (name of image file)

If you are using Apptainer, the command is almost identical:

apptainer run --nv --writable-tmpfs --bind (path to this repo):/workspace --no-home (name of image file)

Explanation of Flags:

  • --nv: Enables NVIDIA GPU support inside the container (required for GPU-based simulations).
  • --writable-tmpfs: Allows temporary writable file access inside the container without modifying the base image.
  • --bind (path to this repo):/workspace: Mounts the repository inside the container at /workspace so wrapper class can access data and output results.
  • --no-home: Prevents your home directory from being automatically mounted inside the container, ensuring a controlled environment.
  • (name of image file): The Singularity container image file that contains Chroma and its dependencies.

Once inside the container, run simulations using the following commands:

Once inside the container, run simulations using the following commands:

Repository Structure

The repository consists of three main subfolders:

  • data_files/ – Contains all necessary data files for running experiments, including:

    • .stl files defining simulation geometry
    • .csv files specifying simulation parameters
  • results/ – Stores output data from simulations when autogenerated documentation is enabled.

  • analysis/ – Houses scripts for more complex analysis that extends beyond a single simulation.

Additionally, there are two main Python scripts for running simulations:

  • ExampleAnalysis.py – A template script where you modify parameters directly in the script to run a simulation.
  • main.py – A script that allows running simulations via command-line arguments for flexibility.

Usage

After starting the Singularity container, run a simulation using main.py:

python main.py --arg1 value1 --arg2 value2 ...

To modify ExampleAnalysis.py and run a script with custom parameters:

python ExampleAnalysis.py

Maintainers

Loick Marion (June 2024 – Present) loick.marion@gmail.com

About

A Folder for Chroma Analysis Scripts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages