-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsub-tests.sh
More file actions
executable file
·77 lines (64 loc) · 2.3 KB
/
sub-tests.sh
File metadata and controls
executable file
·77 lines (64 loc) · 2.3 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/bin/bash
#$ -q hpc
#$ -pe smp 16
#$ -N SPG-Tests
## ----------------------------------------------------------
# This file runs aset of example jobs for Methane with different
# input formats and options
## ----------------------------------------------------------
## Set environment - MODIFY MODULE NAMES BEFORE RUNNING
export OMP_NUM_THREADS=${NSLOTS}
module purge
conda deactivate
conda activate spg-env
module load nwchem/7.2
## ----------------------------------------------------------
## Set up all test parameters
mol_name="Methane"
charge=0
identifier_types=("CAS-Number" "InChIKey" "SMILES" "XYZ")
identifiers=("74-82-8" "VNWKTOKETHGBQD-UHFFFAOYSA-N" "C" None)
initXYZs=(None None None "manuscript-databases/VT-2005_XYZs/VT2005-1.xyz")
## ----------------------------------------------------------
## Loop over tests
for i in {0..3}
do
# Set up molecule info
identifier_type=${identifier_types[$i]}
identifier=${identifiers[$i]}
initXYZ=${initXYZs[$i]}
job_name="${mol_name}-${identifier_type}"
# Print the test info
echo -e "----------------------------------------------------------"
echo -e "\nRunning test ${i} using ${identifier_type} input"
echo -e "\tjob name = ${job_name}"
echo -e "\tidentifier_type = ${identifier_type}"
echo -e "\tidentifier = ${identifier}"
echo -e "\txyz file path = ${initXYZ}"
## ----------------------------------------------------------
## Run current task
# Get current local directory
curr=$(pwd)
# Make a directory for all test results
mkdir ${curr}/tests/
# Create temp folder in node (tmp/XXX)
MY_TEMP=$(mktemp -d)
# Copy files to temp folder
cp -r manuscript-databases "$MY_TEMP"
cp -r Python "$MY_TEMP"
# Go into tmp/XXX/Python
cd "$MY_TEMP"
cd Python
# Run the generation script
python RunRepeats.py --idtype ${identifier_type} --id ${identifier} --charge ${charge} --name ${job_name} --nslots $NSLOTS --initialxyz ${initXYZ}
# Go back into tmp/XXX
cd ..
# Delete the unneded folders (everything except the job folder)
rm -rf Python manuscript-databases
# Copy the job folder back to the current directory
cp -r * ${curr}/tests/
# Remove temp folder (tmp/XXX)
/bin/rm -r $MY_TEMP
# Return to current directory
cd ${curr}
done