File tree 1 file changed +44
-0
lines changed
1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ echo ' Batch Orca Runner, Rac Mukkamala'
3
+ echo $' Please acknowledge use of this script as follows:\n '
4
+ echo ' Mukkamala, R (2020) Batch ORCA Script (Version 1.0) [Source code].'
5
+ echo ' https://github.com/RackS103/Batch-ORCA-Script'
6
+ echo $' \n Starting batch job....\n '
7
+ cd $1
8
+ Errors=[]
9
+
10
+ orca_path=$( cat batch_orca_params.txt | head -1 | sed ' s/PATH: //' )
11
+ inp_header=$( cat batch_orca_params.txt | head -2 | tail -1 | sed ' s/HEADER: //' )
12
+
13
+ for input in * .inp
14
+ do
15
+ filename=$( echo $input | sed ' s/\.inp//' )
16
+
17
+ if grep -q " $inp_header " " $filename .inp" ;
18
+ then
19
+ mkdir " $filename "
20
+ mv " $filename .inp" $filename
21
+ echo " $filename : Correct input parameters, Starting ORCA..."
22
+ " $orca_path " " $filename /$filename .inp" > " $filename /$filename .output" &
23
+ process_id=$!
24
+ wait $process_id
25
+
26
+ if grep -q ' ORCA TERMINATED NORMALLY' " $filename /$filename .output" ;
27
+ then
28
+ echo " $filename : Success! ORCA terminated normally!"
29
+ else
30
+ echo " $filename : ERROR! ORCA had an runtime issue."
31
+ Errors+=" $filename "
32
+ fi
33
+
34
+ else
35
+ echo " $filename : ERROR! Incorrect ORCA input file parameters."
36
+ echo " The proper input header is $inp_header "
37
+ Errors+=" $filename "
38
+ fi
39
+ echo $' Moving on to the next file...\n '
40
+ done
41
+
42
+ echo ' Batch ORCA job finished'
43
+ echo ' The following files had errors:'
44
+ echo ${Errors[*]}
You can’t perform that action at this time.
0 commit comments