-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·57 lines (52 loc) · 1.73 KB
/
run.sh
File metadata and controls
executable file
·57 lines (52 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
# Helper script to run Proteus
# Usage Legacy: ./run.sh <SMILES> <NAME> [STEPS] [COUNT] [EXTRA_ARGS...]
# Usage Advanced: ./run.sh --smiles <SMILES> --name <NAME> ...
if [ "$#" -eq 0 ]; then
echo "Usage Legacy: $0 <SMILES> <NAME> [STEPS] [COUNT]"
echo "Usage Advanced: $0 --smiles <SMILES> ... (Pass any main.py flags)"
echo "New Variables available: --temp, --damp, --epsilon, --sigma, --timestep, --padding"
echo "HTS Screening: --hts <path_to_csv> --rank-by <rg|efficiency>"
echo "Solvent Profiles: --solvent <water|ethanol|dmso|custom>"
echo "Payload Variables: --payload <SMILES>, --payload_count <N>"
echo "Outputs: polymer.data, simulation.log, stability.png, (animation.gif if --render used)"
exit 1
fi
# Check if first argument is a flag (Advanced Mode)
if [[ "$1" == --* ]]; then
echo "Running in Advanced Mode (Pass-through)..."
./venv/bin/python main.py "$@"
else
# Legacy Mode with optional extras
SMILES=$1
NAME=$2
# Check if $3 is a number (STEPS)
if [[ "$3" =~ ^[0-9]+$ ]]; then
STEPS=$3
shift 3
# Check if $1 (originally $4) is a number (COUNT)
if [[ "$1" =~ ^[0-9]+$ ]]; then
COUNT=$1
shift
else
COUNT=1
fi
else
STEPS=10000
COUNT=1
shift 2
fi
# Remaining arguments in $@ are passed as extra flags
echo "Running Proteus (Legacy Mode):"
echo " Polymer: $SMILES"
echo " Job Name: $NAME"
echo " Duration: $STEPS steps"
echo " Copies: $COUNT"
echo " Extra Args: $@"
./venv/bin/python main.py \
--smiles "$SMILES" \
--name "$NAME" \
--steps "$STEPS" \
--count "$COUNT" \
"$@"
fi