#!/bin/bash

# run this script inside the directory `druglogics_synergy@1.2.0/ags_cascade_1.0`

# `models` directory with (840) model directories inside!
models_dir="/pathTo/abmlog_cascade_1.0_models_fixpoints/models"
models_dirs=`ls $models_dir`

for dir in $models_dirs
do
  # Specify parameters
  model_dir=$models_dir"/"$dir
  project_name=cascade_1.0_hsa_fixpoints_${dir}
  
  # Run Drabme
  echo START: $project_name
  start=`date +%s`

  java -cp ../target/synergy-1.2.0-jar-with-dependencies.jar eu.druglogics.drabme.Launcher --project=$project_name --modelsDir=$model_dir --drugs=drugpanel --perturbations=perturbations --config=config --modeloutputs=modeloutputs > /dev/null 2>&1

  runtime=$(($(date +%s)-$start))
  echo -e Execution Time: "$(($runtime / 60)) minutes\n"
done

