1 #
2 # pph3 with amber-like Ph groups
3 # check of gradients by finite difference
4 #
5 z_create zmatrix=z {
6 zmatrix
7 x
8 x 1 1.0
9 p 1 rhp 2 90.0
10 c 3 pc1 1 cpr 2 tcr1
11 c 4 cc 3 ccp1 1 ttw1
12 c 5 cc 4 a120 3 tfl1
13 c 6 cc 5 a120 4 t0
14 c 7 cc 6 a120 5 t0
15 c 8 cc 7 a120 6 t0
16 h 5 ch 4 a120 3 t0
17 h 6 ch 5 a120 4 t180
18 h 7 ch 6 a120 5 t180
19 h 8 ch 7 a120 6 t180
20 h 9 ch 8 a120 7 t180
21 c 3 pc2 1 cpr 2 tcr2
22 c 15 cc 3 ccp2 1 ttw2
23 c 16 cc 15 a120 3 tfl2
24 c 17 cc 16 a120 15 t0
25 c 18 cc 17 a120 16 t0
26 c 19 cc 18 a120 17 t0
27 h 16 ch 15 a120 3 t0
28 h 17 ch 16 a120 15 t180
29 h 18 ch 17 a120 16 t180
30 h 19 ch 18 a120 17 t180
31 h 20 ch 19 a120 18 t180
32 c 3 pc3 1 cpr 2 tcr3
33 c 26 cc 3 ccp3 1 ttw3
34 c 27 cc 26 a120 3 tfl3
35 c 28 cc 27 a120 26 t0
36 c 29 cc 28 a120 27 t0
37 c 30 cc 29 a120 28 t0
38 h 27 ch 26 a120 3 t0
39 h 28 ch 27 a120 26 t180
40 h 29 ch 28 a120 27 t180
41 h 30 ch 29 a120 28 t180
42 h 31 ch 30 a120 29 t180
43 variables
44 ttw1 135.0
45 ttw2 135.0
46 ttw3 135.0
47 cpr 120.0
48 tcr1 50.0
49 tcr2 170.0
50 tcr3 -80.0
51 pc1 3.468153
52 pc2 3.488024
53 pc3 3.471978
54 ccp1 120.152760
55 ccp2 123.554531
56 ccp3 122.667971
57 tfl1 180.506127
58 tfl2 186.478771
59 tfl3 -183.059865
60 ch 2.001174
61 cc 2.596695
62 constants
63 rhp 4.451659
64 a120 120.0
65 t0 0.0
66 t180 180.0
67 end
68 }
69 #
70 read_input ff {
71 query ci "ipso c"
72 supergroup c
73 target c
74 atom p
75 connect 1 2
76 endquery
77 declare hdum
78 bond p c 1000 1.6
79 bond c c 1000 1.3
80 bond c h 1000 1.0
81 angle c c c 100 120
82 angle c c h 100 120
83 angle c c p 100 120
84 angle c p c 100 120
85 vdw h h 2500 1000000
86 vdw c c 2500 1000000
87 vdw h c 2500 1000000
88 htor c c c c 100 0.0 i-j-k-l
89 htor p c c c 100 180.0 i-j-k-l
90 htor hdum c c c 100 180.0 i-j-k-l
91 charge p 0.3
92 charge ci -0.1
93 charge h 0.15
94 charge c -0.15
95 }
96 #
97 ztoc zmatrix=z coords=c
98 # mm.init mm_defs=ff coords=c
99 #exit
100 #
101 set res [ no_gradcheck function=copt : { theory= dl_poly : {mm_defs=ff debug_memory=yes debug_times=no } coords=c } del=0.001 ]
102 #
103 catch {memory active memory.txt }
105 times
108 # -------- Check result ----------
109 set count 0
110 foreach value $res {
111 if { abs ($value) > 1.0e-4 } {incr count }
112 }
114 if { $count != 0 } {
115 chemerr "Failed ... $count gradients wrong"
116 } else {
117 return "OK"
118 }

