-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathGVSrun
3241 lines (3131 loc) · 93 KB
/
GVSrun
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/bin/bash
#########################################################################
# GVSrun, Version 1.4.8
# 2021, ShanghaiTech University, Wang Lin
# Email: [email protected]
#########################################################################
# Defulat
#Database
if [ ! ${compound_library} ];then
echo "Warning: The GVSrun need a \$compound_library environmental variable, or you can use -d to specify a library."
fi
Database_Path=${compound_library}
for i in `ls ${Database_Path}`;do
Database_list=`echo "${Database_list}${i} "`
done
#Host and Schrodinger Path
HOST=CPU
Njobs=100
SCHRODINGER=${SCHRODINGER}
Prime=10
Glide=90
LigPrep=30
Phase=10
Qsite=10
QIKPROP=10
MACROMODEL=10
#INPUT
input=None
Running_Mode="Fast"
Database="Custom_DB"
#Setting
PH=7.0:2.0
Dock_out_conf=1
HTVS_out_num="5%"
Docking_out_num="4000"
SET_PULL_NUM="500"
QM_set="B3LYP-D3(BJ):6-311G**"
MW_range="100:400"
scalingVdW=0.8
#Ligand Filter
Ligand_Filter=true
FilterReactivegroup=false
#Docking
corse_ff="OPLS_2005"
Force_Field="OPLS4"
#Shape Screening
keep_num=10000
shape_sample_method=rapid
max_confs=100
shape_screen_default="${keep_num}:${shape_sample_method}:${max_confs}"
shape_screen_Array=(${shape_screen_default//:/ })
shape_screen_swith=false
function options(){
cat << EOF
These options are supported by this script.
-m Running Mode: <Fast>
Running Mode means a serial combination of different computing tasks.
@Available Running Mode:
Fast: Fast Virtual Screening.
"HTVS_Normal+SP_Normal"
Normal: Filter The Drug-like compounds and dock screening.
"RDL+HTVS_Normal+QIKPROP+R5R+SP_ExtensionA"
Local: Local docking and screening were carried out using the input ligand structure.
"HTVS_local+SP_local+MMGBSA_OPT"
Reference: Virtual Screening with reference ligand restrain.
"HTVS_REF+SP_REF+QIKPROP+R5R"
Prep_Normal: Virtual Screening for un-prepared compounds database.
"No_Dup+RDL+IONIZE+HTVS_Normal+QIKPROP+R5R+SP_ExtensionA"
Normal_MMGBSA: Virtual Screening and MMGBSA re-scoring.
"RDL+HTVS_Normal+QIKPROP+R5R+SP_ExtensionA+MMGBSA_EN"
Cov_Screening: Virtual Screening to discover covalent durg.
"R+HTVS_Normal+SP_ExtensionA+SP_Enhanced"
Induce_Fit_Screening: Induce fit screening.
"IFT_pre+IFT"
QM_Screening: Virtual Screening and QMMM re-docking.
"RDL+HTVS_Normal+QIKPROP+R5R+SP_ExtensionA+QM_redock+RMSD"
Advance: dock screening.
"HTVS_Normal+SP_ExtensionA+SP_Enhanced"
Shape_Screening: perform screening based on reference ligand shape.
"PhaseShape+HTVS_local+SP_local"
LocalShape_Screening: perform screening based on reference ligand shape.
"localShape+HTVS_local+SP_local"
Advance_Shape_Screening: perform screening based on reference ligand shape.
"HTVS_Shape+SP_Shape"
or Custom Running Mode, e.g. -m "EDL+R+HTVS+CD"
Task List as followed:
@LigFilter: Some chemical properties were used to filter the molecules in the library.
Such as, Molecule Weight, Number of Rings, cLogP.
RDL: Rough Drug Like, MW<=650/Num_rotatable_bonds<=10/Num_rings<=6, Do not need QIKPROP.
EDL: Exact Drug Like, MW<=350/Num_rotatable_bonds<=8/Num_rings<=4, Do not need QIKPROP.
Fragment: Small Fragment Molecule, Num_heavy_atoms<=15, Do not need QIKPROP.
R:reactive, virtual screening will perform with only reactive compounds! Do not need QIKPROP.
if you do not know what this option is talking about, use it with caution.
NR:Non_reactive, remove reactive compounds from the compound library, Do not need QIKPROP.
Warhead_SO: Only covalent compounds similar to known drugs were retained. Covalent to Cys or Ser.
Warhead_N: Only covalent compounds similar to known drugs were retained. Covalent to Lys.
NPSE: Non_Phosphonate_esters and Sulphonate_esters, Do not need QIKPROP.
No_Dup: removes duplicate variants by SMILES strings.
QIKPROP: Calculate cLogP, PSA, SASA, QPlogPo/w, QPlogHERG, QPPCaco, ...
5R: Standard LIPINSKI 5 Rule, need QIKPROP.
R5R: Rough 5 Rule, need QIKPROP.
Oral: Retain compounds with Oral Absorption, need QIKPROP.
3R: Jorgensen's rule of three, orally available, need QIKPROP.
Star: Retain compounds similar to known drugs, need QIKPROP.
Oral_Drug: Combine 3R and 5R but allow one dissatisfy term.
BBB: Filter for Blood-brain barrier, need QIKPROP.
MW: Filter compounds by Molecular weight, need -W option.
PosMol: retain the positively charged compounds.
NegMol: retain the negatively charged compounds.
@LigPrep: Use LigPrep to prepare filtered structures. Related to -r option.
IONIZE: Generate ionization states when using Ionizer.
EPIK4: Use Epik for generating ionization and tautomeric states.
EPIK32: Use Epik for generating ionization and tautomeric states.
RS1: SampleRings, and output 2 conformer in 300 iterations.
RS4: SampleRings, and output 8 conformer in 500 iterations.
RS_Fast: SampleRings, and output 2 conformer in 100 iterations.
CONFGEN: Preform ConfSearch by macromodel, with User defined force field.
CONFGEN_Fast: Preform ConfSearch fastly by macromodel, with User defined force field.
MMFF_CONFGEN: Preform ConfSearch by macromodel, MMFFs force field.
Combine_CONFGEN: Preform ConfSearch with two user defined force field and MMFFs.
@Screening: Reduce the number of compounds rough docking. Related to -a option.
localShape: Shape Screening using external app, taken together with the local mode!
NOTE: Must be the first in the pipeline.
PhaseShape: Shape Screening in pipeline.
HTVS_Normal: The standard HTVS screening.
HTVS_Rough: The reduced HTVS screening, The sample size is reduced to nearly half of the HTVS_Normal.
HTVS_Fragment: It is suitable for rapid screening of compound fragments.
HTVS_REF: The standard HTVS screening based on a template ligand, This will significantly increase the hit rate.
HTVS_local: Docking is performed using the initial coordinates of the ligand,
which is usually used as a post-processing for pharmacophore screening.
IFT_pre: Pre-screening for Induce fit docking, also useful for screening before Covalent Docking.
NOTE: Set RECEP_VSCALE to 0.50 in Grid Geneation is a good idea.
HTVS_Shape: Docking with reference ligand shape. with -R and -E option.
@Standard_Docking: Standard docking was performed to rank the compounds. Related to -b and -c option.
SP_Normal: The standard SP docking.
SP_ExtensionA: Reward intramolecular ligand hydrogen bonds, and accept halogens as H-bond acceptors.
SP_ExtensionB: Besides 'ExtensionA', also Accept aromatic hydrogens(>0.15) as potential H-bond donors.
SP_REF: The standard SP docking based on a template ligand, This will significantly increase the hit rate.
SP_Fragment: It is suitable for docking and scoring of compound fragments.
SP_Enhanced: Increase the depth of sampling for larger grid or More accurate poses.
SP_local: Docking is performed using the initial coordinates of the ligand,
which is usually used as a post-processing for pharmacophore screening.
SP_Shape: Docking with reference ligand shape. with -R and -E option.
XP_Normal: The standard XP docking.
XP_ExtensionA: Reward intramolecular ligand hydrogen bonds, and accept halogens as H-bond acceptors.
XP_ExtensionB: Besides 'ExtensionA', also Accept aromatic hydrogens(>0.15) as potential H-bond donors.
XP_REF: The standard XP docking based on a template ligand, This will significantly increase the hit rate.
XP_Fragment: It is suitable for docking and scoring of compound fragments.
XP_Enhanced: Increase the depth of sampling for larger grid orMore accurate poses.
XP_local: Docking is performed using the initial coordinates of the ligand,
which is usually used as a post-processing for pharmacophore screening.
@Ligand Clustering: 2D similarity clustering.
The format of this task is "FingerprintType_SimilarityMetric", such as MolPrint2D_Soergel, Topo_Tanimoto.
Currently, those task was been supproted:
FingerprintType: Linear, Radial, MolPrint2D, Topo, Dendritic;
SimilarityMetric: Tanimoto, Euclidean, Cosine, Soergel.
# Tanimoto Metric is the industry standard.
# Radial, dendritic, or MolPrint2D often give the best results.
@Advanced_Docking: Advanced docking to generate Induce-Fited/Covalent complex structures.
!NOTE: The Advanced_Docking Taskes can only receive a small number of ligands (< 200 ~ 2000).
IFT: Induce Fit Refinement.
CD: Covalent Docking to ser, cys or lys. Depend on the -C option.
Contains Michael_Addition, Epoxide_Opening, and Conjugate_Addition, for cys or ser.
Contains Imine Condensation and [C]=[C]-[S](=O)(=O), for lys.
QMMM: Perform QM/MM optimization.
QM_redock: Perform SP docking use charge from QMMM.
MMGBSA_EN: Perform MM-GBSA calculation. Do Not refine the structure.
MMGBSA_MIN: Perform MM-GBSA calculation. In Minimization Mode.
MMGBSA_OPT: Perform MM-GBSA calculation. In Side chain repack Mode.
@RMSD: Calculate RMSD between the previous stage with earlier stages.
Thank you for your using, If you found any problem, Please contact [email protected].
EOF
}
function help(){
cat<<HELP
Perform Virtual Screening Workflow.
Usage: GVSrun [OPTION] <parameter>
Input parameter:
-i Grid file input.
Use a file name (Multiple files are wrapped in "", and split by ' ') or regular expression to represent your input Grid file, default is *.zip.
-D Which databases do you want to screen? The Database basic path is <$Database_Path>.
These database are Supported:
HELP
ls -w 150 ${Database_Path} # echo "${Database_list}"
cat<<HELP
-d Provide your own database path, the compounds files are recommended as maegz or SDF file format.
-R Optional, reference Ligands correlated with the grid or use for RMSD calculation.
As *.mae, *.maegz (for query structure) or *.phypo (for pharmacophore hypothesis).
-m Running Mode: a serial combination of different computing tasks.
Show all mode and task in this option using "-O".
@ Available Running Mode: <Fast>
Fast: Fast Virtual Screening.
Normal: Filter The Drug-like compounds and dock screening.
Reference: Virtual Screening with reference ligand restrain.
Prep_Normal: Virtual Screening for un-prepared compounds database.
*Normal_MMGBSA: Virtual Screening and MMGBSA re-scoring.
*Cov_Screening: Virtual Screening to discover covalent durg.
*Induce_Fit_Screening: Induce fit screening.
*QM_Screening: Virtual Screening and QMMM re-docking.
Local: Local docking and screening were carried out using the input ligand structure.
Shape_Screening: perform screening based on reference ligand shape.
Advance: advance docking screening.
Advance_Shape_Screening: perform screening based on reference ligand shape.
GeminiMol_Advance: perform advance docking screening with GeminiMol output.
@ or Custom Running Mode, e.g. -m "EDL+R+HTVS+CD"
Control parameters:
-F Force Fields for docking stage (SP/XP/MMGBSA...), OPLS_2005, OPLS3e or OPLS4. <OPLS4>
-f Force Fields for other stage (HTVS/LigPrep...), OPLS_2005, OPLS3e or OPLS4. <OPLS_2005>
-W Define a Max/Min Molecular weight for MW module, such as "100:400" <100:400>
-T Set a Job Name. Default is "Grid_name-Database_name-Run_Mode".
-C Aattach residue number on receptor, required in Covalent Docking.
e.g. "cys:A:1425", the A is chain name and 145 is the atom number(Heavy atom).
The cys is residue name for A:1425, Supported residues: cys, ser, lys.
-q Define a "DFT:Basis_Set" to QM/QMMM, default is "B3LYP-D3(BJ):6-311G**".
Other QM setting: "B3LYP-D3M(BJ):6-311G+**","M06‑2X:def2-tzvpp(-g)","wB97M‑V:cc-pVTZ-pp"
-p set a PH:PHT for ligPrep, default is 7.0:2.0, means 7.0±2.0. <7.0:2.0>
-s Set a SMARTs Expression for compounds filter at first step. such as [B]([O])[O].
-E Shape Screening Options. <${shape_screen_default}>
The paramter means: "keep_num:shape_sample_method:max_confs";
-v scalingVdW for ligand, used in conjunction with prime MMGBSA to induce fit refinement. 0.8 is OK. <${scalingVdW}>
OUTPUT parameters:
-a The number of Output compounds per Screening Task. <5%>
e.g. 10% means retain top 10% compounds.
10000 means retain top 10000 compounds.
-b The number of Output compounds after Standard docking Task. <4000>
-c The number of conformations generated by each ligand in the docking task. <1>
-e The number of candidates to IFT/CD/MMGBSA/QMMM. <500>
Job control:
-H Host Name of your Queue, defult is ${HOST}.
-N The max number of subjobs. <100>
-G The number of Glide subjobs. <90>
-P The number of Prime subjobs. <10>
-L The number of LigPrep subjobs. <30>
-A The number of phase subjobs. <10>
-Q The number of Qsite subjobs. <10>
-K The number of QIKPROP subjobs. <10>
-M The number of MACROMODEL subjobs. <10>
-S Your Schrodinger path. <$SCHRODINGER>
Thank you for your using, If you found any problem, Please contact [email protected].
HELP
}
while getopts ":hOi:D:d:m:T:R:a:e:C:b:p:q:c:H:N:P:G:L:A:Q:K:M:S:F:f:W:E:v:" opt
do
case $opt in
h)
help
exit;;
O)
options
exit;;
i)
input=`readlink -f $OPTARG`;;
D)
Database=$OPTARG;;
d)
User_dbPath=`readlink -f $OPTARG`;;
m)
Running_Mode=$OPTARG;;
T)
Job_Title=$OPTARG;;
R)
Reference_Ligand=`readlink -f $OPTARG`;;
a)
HTVS_out_num=$OPTARG;;
e)
SET_PULL_NUM=$OPTARG;;
C)
covalent_attach_residue=$OPTARG;;
b)
Docking_out_num=$OPTARG;;
p)
PH=$OPTARG;;
s)
SMARTs=$OPTARG;;
q)
QM_set=$OPTARG;;
c)
Dock_out_conf=$OPTARG;;
H)
HOST=$OPTARG;;
N)
Njobs=$OPTARG;;
P)
Prime=$OPTARG;;
G)
Glide=$OPTARG;;
L)
LigPrep=$OPTARG;;
A)
Phase=$OPTARG;;
Q)
Qsite=$OPTARG;;
K)
QIKPROP=$OPTARG;;
M)
MACROMODEL=$OPTARG;;
S)
SCHRODINGER=$OPTARG;;
F)
Force_Field=$OPTARG;;
f)
corse_ff=$OPTARG;;
W)
MW_range=$OPTARG;;
E)
shape_screen_swith=true
shape_screen_Array=(${OPTARG//:/ });;
v)
scalingVdW=$OPTARG;;
?)
echo ""
echo "Error: Do not use undefined options."
echo ""
help
exit;;
esac
done
Parse_Running_Mode(){
# Parse_Running_Mode Running_Mode
Running_Mode=$1
if [ $Running_Mode == "Normal" ]; then
Pipeline="RDL+HTVS_Normal+QIKPROP+R5R+SP_ExtensionA"
elif [ $Running_Mode == "Prep_Normal" ]; then
Pipeline="No_Dup+RDL+IONIZE+HTVS_Normal+QIKPROP+R5R+SP_ExtensionA"
elif [ $Running_Mode == "Normal_MMGBSA" ]; then
Pipeline="RDL+HTVS_Normal+QIKPROP+R5R+SP_ExtensionA+MMGBSA_EN"
elif [ $Running_Mode == "Reference" ]; then
Pipeline="HTVS_REF+SP_REF+QIKPROP+R5R"
elif [ $Running_Mode == "Induce_Fit_Screening" ]; then
Pipeline="IFT_pre+IFT"
elif [ $Running_Mode == "Cov_Screening" ]; then
Pipeline="R+HTVS_Normal+SP_ExtensionA+SP_Enhanced"
elif [ $Running_Mode == "Fast" ]; then
Pipeline="HTVS_Normal+SP_Normal"
elif [ $Running_Mode == "QM_Screening" ]; then
Pipeline="RDL+HTVS_Normal+QIKPROP+R5R+SP_ExtensionA+QM_redock+RMSD"
elif [ $Running_Mode == "Shape_Screening" ];then
Pipeline="localShape+HTVS_local+SP_local"
elif [ $Running_Mode == "Local" ];then
Pipeline="HTVS_local+SP_local+MMGBSA_OPT"
elif [ $Running_Mode == "Advance" ];then
Pipeline="HTVS_Normal+SP_ExtensionA+SP_Enhanced"
elif [ $Running_Mode == "Advance_Shape_Screening" ];then
Pipeline="HTVS_Shape+SP_Shape"
elif [ $Running_Mode == "LocalShape_Screening" ];then
Pipeline="PhaseShape+HTVS_local+SP_local"
elif [ $Running_Mode == "GeminiMol_Advance" ];then
Pipeline="No_Dup+RDL+EPIK4+HTVS_Normal+QIKPROP+R5R+SP_ExtensionA+SP_Enhanced"
else
Pipeline=$Running_Mode
Running_Mode="User_Defined"
fi
}
Params_check_and_report(){
Work_Dir=${PWD}
# Check SCHRODINGER and Host
if [ -d ${SCHRODINGER} ];then
if [ "${SCHRODINGER}" == "" ];then
echo "SCHRODINGER not found. Please check your SCHRODINGER Path."
exit
fi
if [ "`grep -c $HOST ${SCHRODINGER}/schrodinger.hosts`" == "0" ];then
echo $HOST "Host not found."
echo "These host are available:"
grep "^name" ${SCHRODINGER}/schrodinger.hosts | awk '{print $2}'
exit
fi
else
echo "SCHRODINGER not found. Please check your SCHRODINGER Path."
exit
fi
if [ ${User_dbPath} ];then
Database_Location=${User_dbPath}
else
if [ -d ${Database_Path}/${Database} ]; then
Database_Location=${Database_Path}/${Database}
elif [ -f ${Database_Path}/${Database} ]; then
Database_Location=${Database_Path}/${Database}
else
echo "Your compound database does not exist!"
echo "please check the script settings, or confirm the location of the database!"
exit
fi
fi
if [ $Reference_Ligand ];then
if [ -f ${Reference_Ligand} ]; then
if [ ${Reference_Ligand##*.} == "mae" ] || [ ${Reference_Ligand##*.} == "maegz" ] || [ ${Reference_Ligand##*.} == "sdf" ];then
Reference_Ligand_notice="Reference Ligand: ${Reference_Ligand}"
else
echo "The input reference ligand file must be *.mae, *.maegz or *.sdf!"
exit
fi
else
echo "Your reference ligand file is not exist or not a file!"
exit
fi
else
Reference_Ligand_notice="Reference Ligand: None"
fi
cat<<OUTPUTLOG
Virtual Screening Workflow Parameter:
Job Dir: ${Work_Dir}
Grid Files: ${input}
Database: ${Database_Location}
Running Mode: ${Running_Mode}
${Reference_Ligand_notice}
OUTPUTLOG
}
setGrid(){
cat<<GRID >> ${Inp_Name}
[SET:GRID]
VARCLASS Grid
FILE "${INPUT}"
GRID
}
setdatabase(){
if [ "${Database_Location: -5}"x == ".phdb"x ];then
cat<<SETDB >> ${Inp_Name}
[SET:INPUT_PhaseDB]
VARCLASS PhaseDB
PATH ${Database_Location}
[STAGE:DBexport]
STAGECLASS phase.DBExportStage
INPUTS INPUT_PhaseDB,
OUTPUTS INPUT_Ligands,
SETDB
elif [ ${Database_Location##*.} == "mae" ] || [ ${Database_Location##*.} == "maegz" ] || [ ${Database_Location##*.} == "sdf" ] || [ ${Database_Location##*.} == "smi" ];then
cat<<SETDB >> ${Inp_Name}
[SET:INPUT_Ligands]
VARCLASS Structures
FILES ${Database_Location},
SETDB
elif [ ${Database_Location##*.} == "csv" ];then
structconvert -smi SMILES -name ID $Database_Location ${Database_Location%.*}.sdf
cat<<SETDB >> ${Inp_Name}
[SET:INPUT_Ligands]
VARCLASS Structures
FILES ${Database_Location%.*}.sdf,
SETDB
elif [ -d ${Database_Location} ]; then
cat<<SETDB >> ${Inp_Name}
[SET:INPUT_Ligands]
SETDB
echo " VARCLASS Structures" >> ${Inp_Name}
echo -n " FILES " >> ${Inp_Name}
for file in `ls ${Database_Location}`;do
if [ ${file##*.} == "mae" ] || [ ${file##*.} == "maegz" ] || [ ${file##*.} == "sdf" ] || [ ${file##*.} == "smi" ];then
echo -n "${Database_Location}/${file}," >> ${Inp_Name}
else
echo "Warning: Your input ${Database_Location}/${file} is not recognized."
fi
done
echo "" >> ${Inp_Name}
else
echo "Your input ${Database_Location} is not recognized."
exit
fi
Ligand_name="INPUT_Ligands"
TO_RMSD="INPUT_Ligands"
}
SMARTs(){
cat<<Warhead >> ${Inp_Name}
[STAGE:SMARTs]
STAGECLASS filtering.LigFilterStage
INPUTS ${Ligand_name},
OUTPUTS SMARTs_OUT,
CONDITIONS "${SMARTs} >= 1"
Warhead
Ligand_name="SMARTs_OUT"
}
QIKPROP(){
cat<<QIKPROP >> ${Inp_Name}
[STAGE:PRE_QIKPROP]
STAGECLASS gencodes.RecombineStage
INPUTS ${Ligand_name},
OUTPUTS PRE_QIKPROP_RECOMBINE_OUT,
NUMOUT njobs
OUTFORMAT maegz
MIN_SUBJOB_STS 4000
MAX_SUBJOB_STS 40000
GENCODES YES
OUTCOMPOUNDFIELD s_vsw_compound_code
OUTVARIANTFIELD s_vsw_variant
UNIQUEFIELD s_m_title
[STAGE:QIKPROP]
STAGECLASS qikprop.QikPropStage
INPUTS PRE_QIKPROP_RECOMBINE_OUT,
OUTPUTS QIKPROP_OUT,
RECOMBINE YES
[USEROUTS:${task}]
USEROUTS QIKPROP_OUT,
STRUCTOUT QIKPROP_OUT
QIKPROP
Ligand_name="QIKPROP_OUT"
}
5R(){
cat<<5R >> ${Inp_Name}
[STAGE:5R]
STAGECLASS filtering.LigFilterStage
INPUTS ${Ligand_name},
OUTPUTS 5R_OUT,
CONDITIONS "r_qp_mol_MW <= 500", "r_qp_QPlogPo/w <= 5", "r_qp_donorHB <= 5", "r_qp_accptHB <= 10", "r_qp_PSA <= 120"
[USEROUTS:${task}]
USEROUTS 5R_OUT,
STRUCTOUT 5R_OUT
5R
Ligand_name="5R_OUT"
}
BBB(){
cat<<BBB >> ${Inp_Name}
[STAGE:BBB]
STAGECLASS filtering.LigFilterStage
INPUTS ${Ligand_name},
OUTPUTS BBB_OUT,
CONDITIONS "Num_rotatable_bonds <= 8", "r_qp_QPlogBB >= -3.0 AND <= 1.2", "r_qp_QPPMDCK >= 25"
[USEROUTS:${task}]
USEROUTS BBB_OUT,
STRUCTOUT BBB_OUT
BBB
Ligand_name="BBB_OUT"
}
3R(){
cat<<3R >> ${Inp_Name}
[STAGE:3R]
STAGECLASS filtering.LigFilterStage
INPUTS ${Ligand_name},
OUTPUTS 3R_OUT,
CONDITIONS "r_qp_QPlogS > -5.7", "r_qp_QPPCaco > 22", "r_qp_accptHB <= 10", "r_qp_#metab < 7"
[USEROUTS:${task}]
USEROUTS 3R_OUT,
STRUCTOUT 3R_OUT
3R
Ligand_name="3R_OUT"
}
R5R(){
cat<<R5R >> ${Inp_Name}
[STAGE:R5R]
STAGECLASS filtering.LigFilterStage
INPUTS ${Ligand_name},
OUTPUTS R5R_OUT,
CONDITIONS "r_qp_mol_MW <= 650", "r_qp_QPlogPo/w <= 7", "r_qp_donorHB <= 6", "r_qp_accptHB <= 20"
[USEROUTS:${task}]
USEROUTS R5R_OUT,
STRUCTOUT R5R_OUT
R5R
Ligand_name="R5R_OUT"
}
Star(){
cat<<Star >> ${Inp_Name}
[STAGE:Star]
STAGECLASS filtering.LigFilterStage
INPUTS ${Ligand_name},
OUTPUTS Star_OUT,
CONDITIONS "r_qp_#Star <= 5"
[USEROUTS:${task}]
USEROUTS Star_OUT,
STRUCTOUT Star_OUT
Star
Ligand_name="Star_OUT"
}
Oral(){
cat<<Oral >> ${Inp_Name}
[STAGE:Oral]
STAGECLASS filtering.LigFilterStage
INPUTS ${Ligand_name},
OUTPUTS Oral_OUT,
CONDITIONS "r_qp_HumanOralAbsorption >= 2"
[USEROUTS:${task}]
USEROUTS Oral_OUT,
STRUCTOUT Oral_OUT
Oral
Ligand_name="Oral_OUT"
}
Oral_Drug(){
cat<<Oral_Drug >> ${Inp_Name}
[STAGE:Oral_Drug]
STAGECLASS filtering.LigFilterStage
INPUTS ${Ligand_name},
OUTPUTS Oral_Drug_OUT,
CONDITIONS "r_qp_RuleOfFive < 2", "r_qp_RuleOfThree < 2"
[USEROUTS:${task}]
USEROUTS Oral_Drug_OUT,
STRUCTOUT Oral_Drug_OUT
Oral_Drug
Ligand_name="Oral_Drug_OUT"
}
EDL(){
cat<<EDL >> ${Inp_Name}
[STAGE:EDL]
STAGECLASS filtering.LigFilterStage
INPUTS ${Ligand_name},
OUTPUTS EDL_OUT,
CONDITIONS "Molecular_weight <= 350", "Num_rotatable_bonds <= 8", "Num_rings <= 4"
EDL
Ligand_name="EDL_OUT"
}
RDL(){
cat<<RDL >> ${Inp_Name}
[STAGE:RDL]
STAGECLASS filtering.LigFilterStage
INPUTS ${Ligand_name},
OUTPUTS RDL_OUT,
CONDITIONS "Molecular_weight <= 650", "Num_rotatable_bonds <= 10", "Num_rings <= 6"
RDL
Ligand_name="RDL_OUT"
}
PosMol(){
cat<<RDL >> ${Inp_Name}
[STAGE:PosMol]
STAGECLASS filtering.LigFilterStage
INPUTS ${Ligand_name},
OUTPUTS PosMol_OUT,
CONDITIONS "Total_charge > 0"
RDL
Ligand_name="PosMol_OUT"
}
NegMol(){
cat<<RDL >> ${Inp_Name}
[STAGE:NegMol]
STAGECLASS filtering.LigFilterStage
INPUTS ${Ligand_name},
OUTPUTS NegMol_OUT,
CONDITIONS "Total_charge < 0"
RDL
Ligand_name="NegMol_OUT"
}
Fragment(){
cat<<Fragment >> ${Inp_Name}
[STAGE:Fragment]
STAGECLASS filtering.LigFilterStage
INPUTS ${Ligand_name},
OUTPUTS Fragment_OUT,
CONDITIONS "Num_heavy_atoms <= 15"
Fragment
Ligand_name="Fragment_OUT"
}
R(){
cat<<RR >> ${Inp_Name}
[STAGE:RR]
STAGECLASS filtering.LigFilterStage
INPUTS ${Ligand_name},
OUTPUTS R_OUT,
CONDITIONS "Reactive_groups > 0"
RR
Ligand_name="R_OUT"
}
NR(){
cat<<NR >> ${Inp_Name}
[STAGE:NR]
STAGECLASS filtering.LigFilterStage
INPUTS ${Ligand_name},
OUTPUTS NR_OUT,
CONDITIONS "Reactive_groups == 0"
NR
Ligand_name="NR_OUT"
}
NPSE(){
cat<<NPSE >> ${Inp_Name}
[STAGE:NPSE]
STAGECLASS filtering.LigFilterStage
INPUTS ${Ligand_name},
OUTPUTS NPSE_OUT,
CONDITIONS "Phosphonate_esters == 0", "Sulphonate_esters == 0"
NPSE
Ligand_name="NPSE_OUT"
}
No_Dup(){
cat<<No_Dup >> ${Inp_Name}
[STAGE:No_Dup]
STAGECLASS filtering.MergeDuplicatesStage
INPUTS ${Ligand_name},
OUTPUTS No_Dup_OUT,
SMILES_FIELD VendorSMILES
DESALT YES
MERGE_PROPS YES
OUTFORMAT sdf
NEUTRALIZE YES
No_Dup
Ligand_name="No_Dup_OUT"
}
Warhead_SO(){
cat<<Warhead >> ${Inp_Name}
[STAGE:Warhead]
STAGECLASS filtering.LigFilterStage
INPUTS ${Ligand_name},
OUTPUTS Warhead_SO_OUT,
CONDITIONS "Michael_acceptors >= 1 OR [B]([O])[O] >= 1 OR [C;r3][O;r3][C;r3] >= 1 OR [S;X2;H1] >= 1 OR [C]#[N] >=1 OR [O-0X1]=[C]1[C][C][N]1 >= 1 OR [O]=[C,c]-[C,c]=[O] >=1 OR NC(=O)C(=O)C(C)N >= 1 OR [C,c]=[C,c]-[C,c]#[N,n] >= 1 OR [C-0X2]#[C-0X2][C-0X3]=[O-0X1] >= 1 OR [C][S][S][H] >= 1 OR [N]=[O,S] >= 1 OR [N]=[C]=[S] >= 1 OR [C;H1]([Cl])-[C](=[O]) >= 1 OR [C]=[C][c][n] >= 1"
[USEROUTS:${task}]
USEROUTS Warhead_OUT,
STRUCTOUT Warhead_OUT
Warhead
Ligand_name="Warhead_SO_OUT"
}
Warhead_N(){
cat<<Warhead >> ${Inp_Name}
[STAGE:Warhead]
STAGECLASS filtering.LigFilterStage
INPUTS ${Ligand_name},
OUTPUTS Warhead_N_OUT,
CONDITIONS "[C]=[C]-[S](=O)(=O) >= 1 OR [C](=[O])-[C] >= 1"
Warhead
Ligand_name="Warhead_N_OUT"
}
MW(){
MW_array=(${MW_range//:/ })
MW_min=${MW_array[0]}
MW_max=${MW_array[1]}
cat<<Warhead >> ${Inp_Name}
[STAGE:MW]
STAGECLASS filtering.LigFilterStage
INPUTS ${Ligand_name},
OUTPUTS MW_OUT,
CONDITIONS "Molecular_weight <= ${MW_max} AND >= ${MW_min}"
Warhead
Ligand_name="MW_OUT"
}
IONIZE(){
PH_array=(${PH//:/ })
PH_value=${PH_array[0]}
PHT=${PH_array[1]}
cat<<IONIZE >> ${Inp_Name}
[STAGE:IONIZE]
STAGECLASS ligprep.LigPrepStage
INPUTS ${Ligand_name},
OUTPUTS IONIZE_OUT,
RECOMBINE YES
MIXLIGS YES
SKIP_BAD_LIGANDS YES
UNIQUEFIELD s_m_title
OUTCOMPOUNDFIELD s_vsw_compound_code
USE_EPIK False
PH ${PH_value}
PHT ${PHT}
MAX_TAUTOMERS 4
NRINGCONFS 3
COMBINEOUTS YES
IONIZE YES
STEREO_SOURCE parities
NUM_STEREOISOMERS 16
MAX_STEREOISOMERS 8
REGULARIZE NO
[STAGE:POSTLIGPREP]
STAGECLASS ligprep.PostLigPrepStage
INPUTS IONIZE_OUT,
OUTPUTS LIGPREP_OUT,
UNIQUEFIELD s_vsw_compound_code
OUTVARIANTFIELD s_vsw_variant
PRESERVE_NJOBS YES
REMOVE_PENALIZED_STATES YES
[USEROUTS:${task}]
USEROUTS LIGPREP_OUT,
STRUCTOUT LIGPREP_OUT
IONIZE
Ligand_name="LIGPREP_OUT"
TO_RMSD="${Ligand_name}"
}
EPIK4(){
PH_array=(${PH//:/ })
PH_value=${PH_array[0]}
PHT=${PH_array[1]}
cat<<EPIK4 >> ${Inp_Name}
[STAGE:EPIK4]
STAGECLASS ligprep.LigPrepStage
INPUTS ${Ligand_name},
OUTPUTS EPIK4_OUT,
RECOMBINE YES
RETITLE YES
MIXLIGS YES
SKIP_BAD_LIGANDS YES
UNIQUEFIELD s_m_title
OUTCOMPOUNDFIELD s_vsw_compound_code
USE_EPIK YES
MAX_STATES 8
METAL_BINDING NO
PH ${PH_value}
PHT ${PHT}
MAX_TAUTOMERS 4
NRINGCONFS 4
COMBINEOUTS YES
STEREO_SOURCE parities
NUM_STEREOISOMERS 16
MAX_STEREOISOMERS 4
REGULARIZE NO
[STAGE:POSTLIGPREP]
STAGECLASS ligprep.PostLigPrepStage
INPUTS EPIK4_OUT,
OUTPUTS LIGPREP_OUT,
UNIQUEFIELD s_vsw_compound_code
OUTVARIANTFIELD s_vsw_variant
PRESERVE_NJOBS YES
REMOVE_PENALIZED_STATES YES
[USEROUTS:${task}]
USEROUTS LIGPREP_OUT,
STRUCTOUT LIGPREP_OUT
EPIK4
Ligand_name="LIGPREP_OUT"
TO_RMSD="${Ligand_name}"
}
EPIK32(){
PH_array=(${PH//:/ })
PH_value=${PH_array[0]}
PHT=${PH_array[1]}
cat<<EPIK32 >> ${Inp_Name}
[STAGE:EPIK32]
STAGECLASS ligprep.LigPrepStage
INPUTS ${Ligand_name},
OUTPUTS EPIK32_OUT,
RECOMBINE YES
RETITLE YES
MIXLIGS YES
SKIP_BAD_LIGANDS YES
UNIQUEFIELD s_m_title
OUTCOMPOUNDFIELD s_vsw_compound_code
USE_EPIK YES
MAX_STATES 64
METAL_BINDING YES
PH ${PH_value}
PHT ${PHT}
MAX_TAUTOMERS 16
NRINGCONFS 16
COMBINEOUTS YES
STEREO_SOURCE parities
NUM_STEREOISOMERS 64
MAX_STEREOISOMERS 32
REGULARIZE NO
[STAGE:POSTLIGPREP]
STAGECLASS ligprep.PostLigPrepStage
INPUTS EPIK32_OUT,
OUTPUTS LIGPREP_OUT,
UNIQUEFIELD s_vsw_compound_code
OUTVARIANTFIELD s_vsw_variant
MAXSTEREO 32
PRESERVE_NJOBS YES
REMOVE_PENALIZED_STATES YES
[USEROUTS:${task}]
USEROUTS LIGPREP_OUT,
STRUCTOUT LIGPREP_OUT
EPIK32
# cat<<EOF
# [STAGE:RestoreTitle]
# STAGECLASS gencodes.RestoreTitlesStage
# INPUTS POSTEPIK32_OUT,
# OUTPUTS LIGPREP_OUT,
# EOF
Ligand_name="LIGPREP_OUT"
TO_RMSD="${Ligand_name}"
}
RS1(){
cat<<RS1 >> ${Inp_Name}
[STAGE:PRE_RS1]
STAGECLASS gencodes.RecombineStage
INPUTS ${Ligand_name},
OUTPUTS PRE_RS1_RECOMBINE_OUT,
NUMOUT njobs
OUTFORMAT maegz
MIN_SUBJOB_STS 4000
MAX_SUBJOB_STS 40000
GENCODES YES
OUTCOMPOUNDFIELD s_vsw_compound_code
OUTVARIANTFIELD s_vsw_variant
UNIQUEFIELD s_m_title
[STAGE:RS1]
STAGECLASS macromodel.SampleRingsStage
INPUTS PRE_RS1_RECOMBINE_OUT,
OUTPUTS RS1_OUT,
RECOMBINE YES
FORCE_FIELD ${Force_Field}
SOLVENT Water
ELECTROSTATIC_TREATMENT Constant dielectric
CHARGES_FROM Force field
MAXIMUM_ITERATION 300
OUTCONFS_PER_SEARCH 2
[USEROUTS:${task}]
USEROUTS RS1_OUT,
STRUCTOUT RS1_OUT
RS1
Ligand_name="RS1_OUT"
TO_RMSD="${Ligand_name}"
}
RS4(){
cat<<RS4 >> ${Inp_Name}
[STAGE:PRE_RS4]
STAGECLASS gencodes.RecombineStage
INPUTS ${Ligand_name},
OUTPUTS PRE_RS4_RECOMBINE_OUT,
NUMOUT njobs
OUTFORMAT maegz
MIN_SUBJOB_STS 4000
MAX_SUBJOB_STS 40000
GENCODES YES
OUTCOMPOUNDFIELD s_vsw_compound_code
OUTVARIANTFIELD s_vsw_variant
UNIQUEFIELD s_m_title
[STAGE:RS4]
STAGECLASS macromodel.SampleRingsStage
INPUTS PRE_RS4_RECOMBINE_OUT,
OUTPUTS RS4_OUT,
RECOMBINE YES
FORCE_FIELD ${Force_Field}
SOLVENT Water
ELECTROSTATIC_TREATMENT Constant dielectric
CHARGES_FROM Force field
MAXIMUM_ITERATION 500
OUTCONFS_PER_SEARCH 8
[USEROUTS:${task}]
USEROUTS RS4_OUT,
STRUCTOUT RS4_OUT
RS4
Ligand_name="RS4_OUT"
TO_RMSD="${Ligand_name}"
}
RS_Fast(){
cat<<RS_Fast >> ${Inp_Name}
[STAGE:PRE_RS_Fast]
STAGECLASS gencodes.RecombineStage
INPUTS ${Ligand_name},
OUTPUTS PRE_RS_Fast_RECOMBINE_OUT,
NUMOUT njobs
OUTFORMAT maegz
MIN_SUBJOB_STS 4000
MAX_SUBJOB_STS 40000
GENCODES YES
OUTCOMPOUNDFIELD s_vsw_compound_code
OUTVARIANTFIELD s_vsw_variant
UNIQUEFIELD s_m_title
[STAGE:RS_Fast]
STAGECLASS macromodel.SampleRingsStage
INPUTS PRE_RS_Fast_RECOMBINE_OUT,
OUTPUTS RS_Fast_OUT,
RECOMBINE YES
FORCE_FIELD ${Force_Field}
SOLVENT Water
ELECTROSTATIC_TREATMENT Constant dielectric
CHARGES_FROM Force field