-
Notifications
You must be signed in to change notification settings - Fork 0
/
delri.f
executable file
·158 lines (158 loc) · 7.74 KB
/
delri.f
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
SUBROUTINE DELRI(DG,NI,NJ,RR,DEL1)
IMPLICIT DOUBLE PRECISION (A-H,O-Z)
DIMENSION DG(22)
************************************************************************
* *
* ON INPUT NI = ATOMIC NUMBER OF FIRST ATOM *
* NJ = ATOMIC NUMBER OF SECOND ATOM *
* RR = INTERATOMIC DISTANCE IN BOHRS *
* *
************************************************************************
COMMON /MULTIP/ DD(107),QQ(107),BDD(107,3)
COMMON /TWOEL3/ F03(107)
COMMON /NATORB/ NATORB(107)
COMMON /ALPHA3/ ALP3(153)
COMMON /KEYWRD/ KEYWRD
COMMON /NUMCAL/ NUMCAL
CHARACTER*241 KEYWRD
DATA ICALCN/0/
IF (ICALCN.NE.NUMCAL) THEN
ICALCN=NUMCAL
ENDIF
A0=0.529167D0
TERM=(27.21D0*DEL1)/(RR*A0*A0)
DA=DD(NI)
DB=DD(NJ)
QA=QQ(NI)
QB=QQ(NJ)
C HYDROGEN-HYDROGEN
AEE=0.25D0*(1.0D0/BDD(NI,1)+1.0D0/BDD(NJ,1))**2
EE =-RR/(SQRT(RR**2+AEE))**3
DG(1)=TERM*EE
IF(NATORB(NI).LE.2.AND.NATORB(NJ).LE.2) RETURN
IF(NATORB(NI).LE.2) GO TO 10
C HEAVY ATOM-HYDROGEN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