-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfock1.f
96 lines (96 loc) · 2.94 KB
/
fock1.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
SUBROUTINE FOCK1(F, PTOT, PA, PB)
IMPLICIT DOUBLE PRECISION (A-H,O-Z)
INCLUDE 'SIZES'
DIMENSION F(*), PTOT(*), PA(*), PB(*)
C *********************************************************************
C
C *** COMPUTE THE REMAINING CONTRIBUTIONS TO THE ONE-CENTRE ELEMENTS.
C
C *********************************************************************
COMMON /MOLKST/ NUMAT,NAT(NUMATM),NFIRST(NUMATM),NMIDLE(NUMATM),
1 NLAST(NUMATM), NORBS, NELECS,NALPHA,NBETA,
2 NCLOSE,NOPEN,NDUMY,FRACT
COMMON /GAUSS / FN1(107),FN2(107)
1 /MOLORB/ USPD(MAXORB),DUMY(MAXORB)
COMMON /TWOELE/ GSS(107),GSP(107),GPP(107),GP2(107),HSP(107)
1 ,GSD(107),GPD(107),GDD(107)
DIMENSION QTOT(NUMATM), QA(NUMATM)
COMMON /KEYWRD/ KEYWRD
CHARACTER*241 KEYWRD
CALL CHRGE(PTOT,QTOT)
CALL CHRGE(PA,QA)
DO 100 II=1,NUMAT
IA=NFIRST(II)
IB=NMIDLE(II)
IC=NLAST(II)
NI=NAT(II)
DTPOP=0.D0
DAPOP=0.D0
PTPOP=0.D0
PAPOP=0.D0
GOTO (100,40,30,30,30,20,20,20,20,20)IC-IA+2
20 DTPOP=PTOT((IC*(IC+1))/2)+PTOT(((IC-1)*(IC))/2)
1 +PTOT(((IC-2)*(IC-1))/2)+PTOT(((IC-3)*(IC-2))/2)
2 +PTOT(((IC-4)*(IC-3))/2)
DAPO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