Compare commits
No commits in common. "409ec8b4c2b7aa9f9e209c53b39f64557402f4e8" and "a0eaa76b272884ec9058e7ada9e36270f541d63a" have entirely different histories.
409ec8b4c2
...
a0eaa76b27
3
experiments/.gitignore
vendored
3
experiments/.gitignore
vendored
@ -1,5 +1,2 @@
|
|||||||
venv
|
venv
|
||||||
.ipynb_checkpoints
|
.ipynb_checkpoints
|
||||||
logs
|
|
||||||
__pycache__
|
|
||||||
generated/*
|
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
VARIED_FILLINGS_IS := $(shell seq -w 0 10 100)
|
|
||||||
VARIED_FILLINGS_JOBS := $(addprefix generated/varied-fillings-, $(addsuffix .json, ${VARIED_FILLINGS_IS}))
|
|
||||||
|
|
||||||
varied-fillings: ${VARIED_FILLINGS_JOBS}
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f generated/*
|
|
||||||
|
|
||||||
clean-logs:
|
|
||||||
rm -f logs/*
|
|
||||||
|
|
||||||
generated/varied-fillings-%.json: scripts/gen/varied_fillings.py templates/varied-fillings.json
|
|
||||||
python scripts/gen/varied_fillings.py $* > $@
|
|
||||||
|
|
||||||
.PHONY: varied-fillings clean clean-logs
|
|
BIN
experiments/__pycache__/collatz.cpython-310.pyc
Normal file
BIN
experiments/__pycache__/collatz.cpython-310.pyc
Normal file
Binary file not shown.
@ -5,11 +5,11 @@
|
|||||||
#SBATCH --account=hkf6
|
#SBATCH --account=hkf6
|
||||||
#SBATCH --partition=develbooster
|
#SBATCH --partition=develbooster
|
||||||
#SBATCH --nodes=1
|
#SBATCH --nodes=1
|
||||||
#SBATCH --ntasks=1
|
#SBATCH --ntasks-per-node=1
|
||||||
#SBATCH --cpus-per-task=48
|
#SBATCH --cpus-per-task=48
|
||||||
#SBATCH --time=01:00:00
|
#SBATCH --time=01:00:00
|
||||||
#SBATCH --output=logs/build-cuda-%j.log
|
#SBATCH --output=build-cuda-%j.out
|
||||||
#SBATCH --error=logs/build-cuda-%j.log
|
#SBATCH --error=build-cuda-%j.err
|
||||||
|
|
||||||
SOURCE_DIR=/p/project/cellsinsilico/paulslustigebude
|
SOURCE_DIR=/p/project/cellsinsilico/paulslustigebude
|
||||||
|
|
||||||
|
@ -5,11 +5,11 @@
|
|||||||
#SBATCH --account=hkf6
|
#SBATCH --account=hkf6
|
||||||
#SBATCH --partition=develbooster
|
#SBATCH --partition=develbooster
|
||||||
#SBATCH --nodes=1
|
#SBATCH --nodes=1
|
||||||
#SBATCH --ntasks=1
|
#SBATCH --ntasks-per-node=1
|
||||||
#SBATCH --cpus-per-task=48
|
#SBATCH --cpus-per-task=48
|
||||||
#SBATCH --time=01:00:00
|
#SBATCH --time=01:00:00
|
||||||
#SBATCH --output=logs/build-nocuda-%j.log
|
#SBATCH --output=build-nocuda-%j.out
|
||||||
#SBATCH --error=logs/build-nocuda-%j.log
|
#SBATCH --error=build-nocuda-%j.err
|
||||||
|
|
||||||
SOURCE_DIR=/p/project/cellsinsilico/paulslustigebude
|
SOURCE_DIR=/p/project/cellsinsilico/paulslustigebude
|
||||||
|
|
||||||
|
@ -1,32 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
#SBATCH --job-name=cuda
|
|
||||||
# Forschergruppe Schug
|
|
||||||
#SBATCH --account=hkf6
|
|
||||||
# 48 Cores, 512GiB RAM, 4x NVIDIA A100 GPUs
|
|
||||||
#SBATCH --partition=booster
|
|
||||||
# Right now we're using a single node
|
|
||||||
#SBATCH --nodes=1
|
|
||||||
# Number of MPI processes
|
|
||||||
# TODO: Change the config and set to this the maximum of 48
|
|
||||||
#SBATCH --ntasks=16
|
|
||||||
#SBATCH --cpus-per-task=1
|
|
||||||
# For now, we are using a single GPU only
|
|
||||||
#SBATCH --gres=gpu:1
|
|
||||||
#SBATCH --time=01:00:00
|
|
||||||
#SBATCH --output=logs/cuda-%j.log
|
|
||||||
#SBATCH --error=logs/cuda-%j.log
|
|
||||||
|
|
||||||
SOURCE_DIR=/p/project/cellsinsilico/paulslustigebude
|
|
||||||
OUTPUT_DIR=/p/scratch/cellsinsilico/paul/nastja-out/cuda
|
|
||||||
|
|
||||||
mkdir -p "${OUTPUT_DIR}"
|
|
||||||
source "${SOURCE_DIR}/activate-nastja-modules"
|
|
||||||
|
|
||||||
# This is actually the default behavior for a single task anyways
|
|
||||||
# However I'm leaving this here for documentation reasons
|
|
||||||
export CUDA_VISIBLE_DEVICES=0
|
|
||||||
|
|
||||||
srun "${SOURCE_DIR}/nastja/build-cuda/nastja" \
|
|
||||||
-c "${SOURCE_DIR}/ma/experiments/configs/genesis.json" \
|
|
||||||
-o "${OUTPUT_DIR}"
|
|
@ -9,11 +9,11 @@
|
|||||||
#SBATCH --nodes=1
|
#SBATCH --nodes=1
|
||||||
# Number of MPI processes
|
# Number of MPI processes
|
||||||
# TODO: Change the config and set to this the maximum of 48
|
# TODO: Change the config and set to this the maximum of 48
|
||||||
#SBATCH --ntasks=16
|
#SBATCH --ntasks-per-node=16
|
||||||
#SBATCH --cpus-per-task=1
|
#SBATCH --cpus-per-task=1
|
||||||
#SBATCH --time=01:00:00
|
#SBATCH --time=01:00:00
|
||||||
#SBATCH --output=logs/nocuda-%j.log
|
#SBATCH --output=nocuda-%j.out
|
||||||
#SBATCH --error=logs/nocuda-%j.log
|
#SBATCH --error=nocuda-%j.err
|
||||||
|
|
||||||
SOURCE_DIR=/p/project/cellsinsilico/paulslustigebude
|
SOURCE_DIR=/p/project/cellsinsilico/paulslustigebude
|
||||||
OUTPUT_DIR=/p/scratch/cellsinsilico/paul/nastja-out/nocuda
|
OUTPUT_DIR=/p/scratch/cellsinsilico/paul/nastja-out/nocuda
|
||||||
|
@ -1,26 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
#SBATCH --job-name=nocuda-noecm
|
|
||||||
# Forschergruppe Schug
|
|
||||||
#SBATCH --account=hkf6
|
|
||||||
# 48 Cores, 512GiB RAM, 4x NVIDIA A100 GPUs
|
|
||||||
#SBATCH --partition=booster
|
|
||||||
# Right now we're using a single node
|
|
||||||
#SBATCH --nodes=1
|
|
||||||
# Number of MPI processes
|
|
||||||
# TODO: Change the config and set to this the maximum of 48
|
|
||||||
#SBATCH --ntasks-per-node=16
|
|
||||||
#SBATCH --cpus-per-task=1
|
|
||||||
#SBATCH --time=01:00:00
|
|
||||||
#SBATCH --output=logs/nocuda-noecm-%j.log
|
|
||||||
#SBATCH --error=logs/nocuda-noecm-%j.log
|
|
||||||
|
|
||||||
SOURCE_DIR=/p/project/cellsinsilico/paulslustigebude
|
|
||||||
OUTPUT_DIR=/p/scratch/cellsinsilico/paul/nastja-out/nocuda-noecm
|
|
||||||
|
|
||||||
mkdir -p "${OUTPUT_DIR}"
|
|
||||||
source "${SOURCE_DIR}/activate-nastja-modules"
|
|
||||||
|
|
||||||
srun "${SOURCE_DIR}/nastja/build-nocuda/nastja" \
|
|
||||||
-c "${SOURCE_DIR}/ma/experiments/configs/genesis-noecm.json" \
|
|
||||||
-o "${OUTPUT_DIR}"
|
|
@ -1,26 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
#SBATCH --job-name=varied-fillings-nocuda
|
|
||||||
# Forschergruppe Schug
|
|
||||||
#SBATCH --account=hkf6
|
|
||||||
# 48 Cores, 512GiB RAM, 4x NVIDIA A100 GPUs
|
|
||||||
#SBATCH --partition=booster
|
|
||||||
# Right now we're using a single node
|
|
||||||
#SBATCH --nodes=1
|
|
||||||
#SBATCH --ntasks=48
|
|
||||||
#SBATCH --cpus-per-task=1
|
|
||||||
#SBATCH --time=02:00:00
|
|
||||||
#SBATCH --output=logs/varied-fillings-nocuda-%A-%3a.log
|
|
||||||
#SBATCH --error=logs/varied-fillings-nocuda-%A-%3a.log
|
|
||||||
#SBATCH --array=0-100:10
|
|
||||||
|
|
||||||
IDENT=$(printf "%03d" "${SLURM_ARRAY_TASK_ID}")
|
|
||||||
SOURCE_DIR=/p/project/cellsinsilico/paulslustigebude
|
|
||||||
OUTPUT_DIR="/p/scratch/cellsinsilico/paul/nastja-out/varied-fillings-nocuda-${IDENT}"
|
|
||||||
|
|
||||||
mkdir -p "${OUTPUT_DIR}"
|
|
||||||
source "${SOURCE_DIR}/activate-nastja-modules"
|
|
||||||
|
|
||||||
srun "${SOURCE_DIR}/nastja/build-nocuda/nastja" \
|
|
||||||
-c "${SOURCE_DIR}/ma/experiments/generated/varied-fillings-${IDENT}.json" \
|
|
||||||
-o "${OUTPUT_DIR}"
|
|
@ -1,109 +0,0 @@
|
|||||||
{
|
|
||||||
"#Testing": {
|
|
||||||
"description": "Cellular Potts Model with dynamic ECM"
|
|
||||||
},
|
|
||||||
"Application": "Cells",
|
|
||||||
"Geometry": {
|
|
||||||
"blocksize": [20, 40, 40],
|
|
||||||
"blockcount": [4, 2, 2]
|
|
||||||
},
|
|
||||||
"Settings": {
|
|
||||||
"timesteps": 250,
|
|
||||||
"randomseed": 42
|
|
||||||
},
|
|
||||||
"Filling": {
|
|
||||||
"cells": [
|
|
||||||
{
|
|
||||||
"_comment": "This is for the dynamic ECM",
|
|
||||||
"shape": "cube",
|
|
||||||
"box": [
|
|
||||||
[0, 0, 0],
|
|
||||||
[79, 79, 79]
|
|
||||||
],
|
|
||||||
"value": 0,
|
|
||||||
"celltype": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"shape": "cube",
|
|
||||||
"box": [
|
|
||||||
[41, 35, 10],
|
|
||||||
[45, 39, 15]
|
|
||||||
],
|
|
||||||
"celltype": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"shape": "cube",
|
|
||||||
"box": [
|
|
||||||
[40, 15, 14],
|
|
||||||
[47, 22, 20]
|
|
||||||
],
|
|
||||||
"celltype": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"shape": "cube",
|
|
||||||
"box": [
|
|
||||||
[40, 20, 20],
|
|
||||||
[47, 27, 26]
|
|
||||||
],
|
|
||||||
"celltype": 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"shape": "cube",
|
|
||||||
"box": [
|
|
||||||
[38, 20, 60],
|
|
||||||
[45, 27, 66]
|
|
||||||
],
|
|
||||||
"celltype": 3
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"CellsInSilico": {
|
|
||||||
"liquid": 1,
|
|
||||||
"adhesion": {
|
|
||||||
"matrix": [
|
|
||||||
[0, 0, 0, 0],
|
|
||||||
[0, 0, 0, 0],
|
|
||||||
[0, 0, 10, 5],
|
|
||||||
[0, 0, 5, 5]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"temperature": 15,
|
|
||||||
"volume": {
|
|
||||||
"default": {
|
|
||||||
"storage": "const",
|
|
||||||
"value": 2000
|
|
||||||
},
|
|
||||||
"lambda": {
|
|
||||||
"storage": "const",
|
|
||||||
"value": 10
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"surface": {
|
|
||||||
"default": {
|
|
||||||
"storage": "const",
|
|
||||||
"value": 800
|
|
||||||
},
|
|
||||||
"lambda": {
|
|
||||||
"storage": "const",
|
|
||||||
"value": 10
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"cleaner": {
|
|
||||||
"killdistance": 100
|
|
||||||
},
|
|
||||||
"checkerboard": "00",
|
|
||||||
"energyfunctions": ["Volume00", "Surface00", "Adhesion00"],
|
|
||||||
"centerofmass": {
|
|
||||||
"steps": 10
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Writers": {
|
|
||||||
"ParallelVTK_Cells": {
|
|
||||||
"writer": "ParallelVtkImage",
|
|
||||||
"outputtype": "UInt32",
|
|
||||||
"field": "cells",
|
|
||||||
"steps": 1
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"WriteActions": ["ParallelVTK_Cells"]
|
|
||||||
}
|
|
@ -1,54 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
|
|
||||||
import json
|
|
||||||
import sys
|
|
||||||
|
|
||||||
from functools import reduce
|
|
||||||
from operator import mul
|
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
percent_filled = float(sys.argv[1])
|
|
||||||
template_path = Path("templates/varied-fillings.json")
|
|
||||||
|
|
||||||
initial_cell_size = 4200
|
|
||||||
|
|
||||||
with template_path.open(encoding="utf-8") as template_file:
|
|
||||||
config = json.load(template_file)
|
|
||||||
|
|
||||||
dims = [
|
|
||||||
size * count
|
|
||||||
for size, count
|
|
||||||
in zip(config["Geometry"]["blocksize"], config["Geometry"]["blockcount"])
|
|
||||||
]
|
|
||||||
total_volume = reduce(mul, dims, 1)
|
|
||||||
target_volume = total_volume * percent_filled / 100
|
|
||||||
n_cells = int(target_volume // initial_cell_size)
|
|
||||||
# If n_cells is odd, second type gets one more cell
|
|
||||||
n_cells_first_type = n_cells // 2
|
|
||||||
n_cells_second_type = n_cells - n_cells_first_type
|
|
||||||
edge_length = int(target_volume ** (1 / 3))
|
|
||||||
offsets = [
|
|
||||||
(dims[0] - edge_length) // 2,
|
|
||||||
(dims[1] - edge_length) // 2,
|
|
||||||
(dims[2] - edge_length) // 2
|
|
||||||
]
|
|
||||||
|
|
||||||
print(f"Target volume: {target_volume} ({percent_filled}%, edge length: {edge_length}), # of cells: {n_cells}", file=sys.stderr)
|
|
||||||
|
|
||||||
if target_volume > 0:
|
|
||||||
config["Filling"]["cells"].append({
|
|
||||||
"shape": "cube",
|
|
||||||
"pattern": "voronoi",
|
|
||||||
"box": [
|
|
||||||
offsets,
|
|
||||||
[
|
|
||||||
min(offsets[0] + edge_length, dims[0] - 1),
|
|
||||||
min(offsets[1] + edge_length, dims[1] - 1),
|
|
||||||
min(offsets[2] + edge_length, dims[2] - 1)
|
|
||||||
]
|
|
||||||
],
|
|
||||||
"count": n_cells,
|
|
||||||
"celltype": [0, 0, n_cells_first_type, n_cells_second_type]
|
|
||||||
})
|
|
||||||
|
|
||||||
json.dump(config, sys.stdout, indent=2)
|
|
@ -1,99 +0,0 @@
|
|||||||
{
|
|
||||||
"#Testing": {
|
|
||||||
"description": "Cellular Potts Model with dynamic ECM"
|
|
||||||
},
|
|
||||||
"Application": "Cells",
|
|
||||||
"Geometry": {
|
|
||||||
"blocksize": [30, 30, 40],
|
|
||||||
"blockcount": [4, 4, 3]
|
|
||||||
},
|
|
||||||
"Settings": {
|
|
||||||
"timesteps": 500,
|
|
||||||
"randomseed": 42
|
|
||||||
},
|
|
||||||
"Filling": {
|
|
||||||
"cells": [
|
|
||||||
{
|
|
||||||
"_comment": "This is for the dynamic ECM",
|
|
||||||
"shape": "cube",
|
|
||||||
"box": [
|
|
||||||
[0, 0, 0],
|
|
||||||
[119, 119, 119]
|
|
||||||
],
|
|
||||||
"value": 0,
|
|
||||||
"celltype": 0
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"CellsInSilico": {
|
|
||||||
"liquid": 1,
|
|
||||||
"adhesion": {
|
|
||||||
"matrix": [
|
|
||||||
[ 0, 0, 0, 10],
|
|
||||||
[ 0, 0, 0, 10],
|
|
||||||
[10, 0, 40, 5],
|
|
||||||
[10, 0, 5, 40]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"temperature": 15,
|
|
||||||
"volume": {
|
|
||||||
"default": {
|
|
||||||
"storage": "const",
|
|
||||||
"value": 5000
|
|
||||||
},
|
|
||||||
"lambda": {
|
|
||||||
"storage": "const",
|
|
||||||
"value": 10
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"surface": {
|
|
||||||
"default": {
|
|
||||||
"storage": "const",
|
|
||||||
"value": 1000
|
|
||||||
},
|
|
||||||
"lambda": {
|
|
||||||
"storage": "const",
|
|
||||||
"value": 10
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"cleaner": {
|
|
||||||
"killdistance": 100
|
|
||||||
},
|
|
||||||
"checkerboard": "00",
|
|
||||||
"energyfunctions": ["Volume00", "Surface00", "Adhesion00", "DynamicECM00"],
|
|
||||||
"centerofmass": {
|
|
||||||
"steps": 10
|
|
||||||
},
|
|
||||||
"dynamicecm": {
|
|
||||||
"enabled": true,
|
|
||||||
"stepsPerMcs": 200,
|
|
||||||
"pushSteps": 10,
|
|
||||||
"pushWeight": 2,
|
|
||||||
"ecmCellID": 0,
|
|
||||||
"deltat": 0.1,
|
|
||||||
"eta": 0.25,
|
|
||||||
"k0": 0.1,
|
|
||||||
"k1": 0.1,
|
|
||||||
"c": 4,
|
|
||||||
"alpha": 2,
|
|
||||||
"d": 0.3,
|
|
||||||
"phi": 1
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Writers": {
|
|
||||||
"ParallelVTK_Cells": {
|
|
||||||
"writer": "ParallelVtkImage",
|
|
||||||
"outputtype": "UInt32",
|
|
||||||
"field": "cells",
|
|
||||||
"steps": 5
|
|
||||||
},
|
|
||||||
"ParallelVTK_Displacement": {
|
|
||||||
"writer": "ParallelVtkImage",
|
|
||||||
"outputtype": "Float32",
|
|
||||||
"field": "dynamicecm",
|
|
||||||
"components": [0, 1, 2],
|
|
||||||
"steps": 5
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"WriteActions": ["ParallelVTK_Cells", "ParallelVTK_Displacement"]
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user