forked from timbernat/WaSP_simulations
-
Notifications
You must be signed in to change notification settings - Fork 1
/
charge.job
45 lines (38 loc) · 2.07 KB
/
charge.job
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
#!/bin/bash
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --time=02:00:00
#SBATCH --partition=blanca-shirts
#SBATCH --qos=blanca-shirts
#SBATCH --gres=gpu
#SBATCH --job-name=polycharge
#SBATCH --output=slurm_logs/polycharge.log
#SBATCH --mail-user=tibe3324@colorado.edu
#SBATCH --mail-type=END
# ============================================================================================================================
# DESC : assigns charges to parameterized molecules (from SDF structure) using method of choice
# Primary outputs : molecule SDF, library charge JSON along with accompanying log files
# Secondary output : reduced-molecule SDF with original charges and reduced-molecule SDF with original charges (for benchmark)
# ============================================================================================================================
# ============================================================================================================================
# module config
# ============================================================================================================================
module purge
ml anaconda
conda activate openff-polymers
# ============================================================================================================================
# argument aliases
# ============================================================================================================================
working_dir=$1
logging_dir=$2
inpaths=$3
outpaths=$4
charge_method=$5
vars=($(cat $inpaths))
sdf_path=${vars[0]}
lib_charge_path=${vars[1]}
# ===========================================================================================================================================
# code execution
# ===========================================================================================================================================
charge_path=$(python -m components.charge_mol -wdir $working_dir -ldir $logging_dir -sdf $sdf_path -cmet $charge_method -lc $lib_charge_path)
echo $charge_path >> $outpaths # write output to shared file