forked from timbernat/WaSP_simulations
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathparam.job
55 lines (45 loc) · 2.68 KB
/
param.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
46
47
48
49
50
51
52
53
54
55
#!/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 --mail-user=tibe3324@colorado.edu
#SBATCH --mail-type=END
# ============================================================================================================================
# DESC : builds chemically-valid SDF files from PDB and monomer JSON starting structures.
# Carries out RCT library charge generation procedure up to specified chain length with charging method of choice
# Primary outputs : molecule SDF, library charge JSON
# Secondary output : reduced-molecule SDF with original charges and reduced-molecule SDF with original charges (for benchmark)
# ============================================================================================================================
# ============================================================================================================================
# argument aliases
# ============================================================================================================================
working_dir=$1
logging_dir=$2
outpaths=$3
mol_name=$4
pdb_path=$5
mono_path=$6
N_max=$7
rct_charge_method=$8
# ============================================================================================================================
# module config
# ============================================================================================================================
module purge
ml anaconda
conda activate openff-polymers
# ============================================================================================================================
# code execution
# ============================================================================================================================
sdf_path=$( python -m components.assign_chem -wdir $working_dir -ldir $logging_dir -pdb $pdb_path -mono $mono_path -n $mol_name)
rct_paths=$(python -m components.rct_protocol -wdir $working_dir -ldir $logging_dir -mono $mono_path -n $mol_name -cmet $rct_charge_method -N $N_max)
rct_paths=($rct_paths) # convert to array so each of multiple components can be read off one-by-one
lib_chg_path=${rct_paths[0]} # path to cached library charges
redux_path=${rct_paths[1]} # path to reduced-size molecule used to generate library charges
# also charge reduction w/ RCT charges for validation; output catching unused, simply done to avoid terminal output clutter
redux_RCT_path=$(python -m components.charge_mol -wdir $working_dir -ldir $logging_dir -sdf $redux_path -cmet 'RCT' -lc $lib_chg_path)
# write output to shared file
echo $sdf_path >> $outpaths
echo $lib_chg_path >> $outpaths