-
Notifications
You must be signed in to change notification settings - Fork 0
/
CICPHFL.FORT11
4009 lines (4009 loc) · 125 KB
/
CICPHFL.FORT11
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
C**********************************************************************
c Moved to PSI distribution disk on 2/4/89 by clj.
C**********************************************************************
C PROGRAM LAST UPDATED APRIL 14, 1985 *
C BY: TJL *
C**********************************************************************
SUBROUTINE GETINT(A,ETA,ZETA,F,ALPHA,BETA,IJORD,KADD,LADD,
1IJADD,IJGRP,ORBSYM,INTS,S,EPA,JT1C,IOFF,EAVF)
IMPLICIT INTEGER (A-Z)
LOGICAL IJEQ,IJKEQ,JKEQ
INTEGER XDF,N112(112),JULIA(70)
REAL*8 A0,A1,A2,A1S2,A4,FOCC,EAVF(NUMIJ)
REAL*8 CI1,CI2,H11,H12,H22,ONE,DERC1,DERC2
DIMENSION IJORD(NUMIJ),KADD(SYMORB),LADD(SYMORB),JT1C(1)
DIMENSION ORBSYM(NORBS),IJADD(NUMIJ),IJGRP(NUMIJ)
DIMENSION IOFF(NUMIJ)
REAL*8 A(IJIND,IJIND3),F(NORBS),INTS(NMAX)
1,S(NUMIJ,NDF),EPA(NORBS,NORBS)
REAL*8 ZETA(NUMIJ,NORBS),ALPHA(NUMIJ),BETA(NUMIJ)
REAL*8 C1A,C2A,C1,C2
REAL*8 VAL1,VAL2,VAL3,ETA(NUMIJ),ESCF,REPNUC
COMMON /CIA/ C1A(45),C2A(45),C1,C2,ESCF
C!!! COMMON /TAPES/ IT22,IT8,NOUT,IT2,IT42,JTAP1,IUTAP,JTAP2
COMMON /TAPES/ NOUT,ICHK,IT30,IT42,IT47,IT52,IT58,IT94,IT96,IT98
COMMON /DIMSG/ SYMORB,NUMIJ,NBF,NMAX,NBFORB,NSYM,NDF,NORBS
COMMON /POINT/ FOCC(5),IPOINT(5),JPOINT(5),NSORB(5)
COMMON /FUNCS/ IOCC,JOCC,KOCC,NTYPES,NBSET,NAT
COMMON /OCCS/ NSPE,NSA,NSB,NALP,NOP,NDOC,LFERM,NUOC,IJIND,IJIND3
COMMON /LOC22/ IA22(100),IBF2AT(284)
COMMON /IEXT/ IPRINT,IGRP,ICIDIP
COMMON /REN/ REPNUC
COMMON /TCSCF/ DERC1,DERC2,CI1,CI2,H11,H12,H22,ONE,ITCSCF
C
C WRITE(*,2222)
C2222 FORMAT(/' IN GETINT')
C WRITE(*,*) ' C1,C2 ',C1,C2
3001 FORMAT(10I5)
DO 3010 IJUL=1,70
JULIA(IJUL)=0
3010 CONTINUE
WRITE(ICHK,*) ' THE SPECIAL PARAMETERS '
WRITE(ICHK,3001) NSPE,NSA,NSB,NALP,NOP,NDOC,
+ LFERM,NUOC,IJIND,IJIND3
CTJL WRITE(ICHK,*) ' THE IJORD ARRAY:'
CTJL WRITE(ICHK,3001) (IJORD(III), III=1,NUMIJ)
IJIND2=IJIND
A0=0.0D+00
A1=1.0D+00
A2=2.0D+00
A4=4.00D+00
A1S2=0.50D+00
C H11=A0
C H22=A0
C H12=A0
CTJL DO 3020 I=1,NORBS
CTJL DO 3030 J=1,NORBS
CTJL E11(I,J)=A0
CTJL E22(I,J)=A0
CTJL E12(I,J)=A0
C3030 CONTINUE
C3020 CONTINUE
DO 3040 I=1,NORBS
F(I)=F(I)*A1S2
CTJL WRITE(*,*) ' I,F ',I,F(I)
3040 CONTINUE
CTJL DO 3050 II=1,NDF
CTJL DO 3060 I=1,NORBS
CTJL DO 3070 J=1,NORBS
CTJL W(I,J,II)=A0
C3070 CONTINUE
C3060 CONTINUE
C3050 CONTINUE
ESCF=A0
C NINR=NBF*NORBS*2
C INTSRT=((NINR-1)/112+6)*112
C NIJR=NUMIJ*2
C INTSRT=INTSRT+((NIJR-1)/112+1)*224
C NBFSQ=NBF*NBF*2
C INTSRT=INTSRT+((NBFSQ-1)/112+2)*112
C NKL=(NORBS*(NORBS+1))/2
C INTSRT=INTSRT+((NKL-1)/112+1)*224
C NIN=NSYM*NORBS
C INTSRT=INTSRT+((NIN-1)/112+1)*224+1
C
C NEW WAY OF OBTAINING INTSRT
CALL RFILE(IT52)
WRITE(ICHK,2223)
2223 FORMAT(/' OPENED IT52')
CTJL CALL SREW(IT52) THIS IS DONE IN RFILE
CALL SREAD(IT52,N112,112)
CALL RGETSA(IT52,INTSRT)
CTJL WRITE(ICHK,2224) INTSRT
C2224 FORMAT(/' CALLED RGETSA',I8)
CIBM CALL RSETSA(IT52,INTSRT)
CTJL WRITE(ICHK,2225) INTSRT
CTJL WRITE(NOUT,2225) INTSRT
C2225 FORMAT(/' CALLED RSETSA',I8)
IGRP=0
C
IIJJ=0
DO 3080 II=1,NORBS
DO 3090 JJ=1,II
IIJJ=IIJJ+1
ETA(IIJJ)=A0
EAVF(IIJJ)=A0
DO 3100 III=1,NORBS
ZETA(IIJJ,III)=A0
3100 CONTINUE
3090 CONTINUE
3080 CONTINUE
C
C
C CONSTRUCT ETA AND ZETA MATRICIES
C
DO 3110 IOR=NORBS,LFERM,-1
IO=IOFF(IOR)
II=IO+IOR
ISM=ORBSYM(IOR)
ITYP=1
DO 3120 JOR=IOR,LFERM,-1
JO=IOFF(JOR)
IJ=IO+JOR
JJ=JO+JOR
IF (IGRP .NE. IJGRP(IOFF(IOR)+JOR)) THEN
WRITE(ICHK,3002) IOR,JOR,IGRP,IJGRP(IOFF(IOR)+JOR)
3002 FORMAT(' IOR=',I5,' JOR=',I5,' IGRP=',I5,' NEW GROUP=',I5)
CIBM CALL RGETSA(IT52,IX)
CIBM WRITE(NOUT,2001) IX
C2001 FORMAT(' READING FROM IT52 AT ADR ',I8)
CALL SREAD(IT52,INTS,NMAX*2)
CCC WRITE(NOUT,1901)
CCC WRITE(NOUT,1902) (INTS(III), III=1,NMAX)
1901 FORMAT(/' HERE ARE A FEW INTEGRALS FROM IT52:')
1902 FORMAT(10F10.6)
SRIN=SRIN+NMAX*2/112
IGRP=IJGRP(IOFF(IOR)+JOR)
WRITE(ICHK,3003) IGRP
3003 FORMAT(' NOW IGRP=',I5)
END IF
JSM=ORBSYM(JOR)
IJEQ=IOR.EQ.JOR
IJT=ITYP
IF (IJEQ) IJT=IJT+2
IJSYM=IEOR((ISM-1),(JSM-1))
KOFF=IJSYM*NORBS
JAD=IJADD(IJ)
DO 3130 KOR=1,NUOC
KO=IOFF(KOR)
IK=IO+KOR
JK=JO+KOR
KK=KO+KOR
KSM=ORBSYM(KOR)
JKEQ=JOR.EQ.KOR
IJKT=IJT
IF (JKEQ) IJKT=IJKT+1
IJKEQ=IJEQ.AND.JKEQ
IJKSYM=IEOR(IJSYM,(KSM-1))
LOFF=IJKSYM*NORBS
KAD=JAD+KADD(KOFF+KOR)
DO 3140 LOR=1,KOR
LO=IOFF(LOR)
IL=IO+LOR
JL=JO+LOR
KL=KO+LOR
LL=LO+LOR
CTJL IF (JOR.EQ.KOR .AND. KOR.EQ.LOR .AND. LOR.LT.IOR) GOTO
CTJL * 300
LSM=ORBSYM(LOR)
IF ((LSM-1) .NE. IJKSYM) GOTO 300
IJKLT=IJKT
IF (IJKEQ .AND. KOR.GT.LOR) IJKLT=IJKLT+1
IF (KOR.EQ.LOR) IJKLT=IJKLT+3
LAD=KAD+LADD(LOFF+LOR)
IF (IJKLT.GT.7 .OR. IJKLT.LT.1) THEN
WRITE(NOUT,2004) IJKLT,IOR,JOR,KOR,LOR,IBF,JBF,KBF,
* LBF,ISM,JSM,KSM,LSM
2004 FORMAT(/' IN GETDM, IJKLT UNKNOWN TYPE ',I5/' ORBITALS
* :',4I5/' BASIS FUNCTIONS :',4I5/' SYMMETRIES :',4I5)
CALL ABORTS
END IF
IF (LAD .GT. NMAX) THEN
WRITE(NOUT,2005) LAD
2005 FORMAT(/' IN GETDM, LAD TOO BIG :',I6)
CALL ABORTS
END IF
GOTO (10,20,30,40,50,60,70)IJKLT
10 CONTINUE
C THIS TYPE (ALL DIFFERENT) DOES NOT CONTRIBUTE
GOTO 300
20 CONTINUE
WRITE(NOUT,2006)
2006 FORMAT(/ ' IN CONSTRUCTON OF ETA AND ZETA, J=K IS NOT
* POSSIBLE DO THE FIRST SET OF LOOPS'/' ERROR IN LOOPS SOMEWHERE')
CALL ABORTS
30 VAL1=INTS(LAD+1)
VAL2=INTS(LAD+2)
ETA(KL)=ETA(KL)+ALPHA(IK)*VAL2+BETA(IK)*VAL1
EAVF(KL)=EAVF(KL)+F(IOR)*(A2*VAL2-VAL1)
DO 3150 J2=1,NORBS
IJ2=IOFF(MAX(IOR,J2))+MIN(IOR,J2)
ZETA(KL,J2)=ZETA(KL,J2)+ALPHA(IJ2)*VAL2+BETA(IJ2)*
* VAL1
3150 CONTINUE
GOTO 300
40 CONTINUE
C THIS TYPE (K=L) DOES NOT CONTRIBUTE
GOTO 300
50 CONTINUE
WRITE(NOUT,2007)
2007 FORMAT(/ ' IN CONSTRUCTON OF ETA AND ZETA, I=J=K IS N
*OT POSSIBLE DO THE FIRST SET OF LOOPS'/' ERROR IN LOOPS SOMEWHERE
*')
CALL ABORTS
60 VAL1=INTS(LAD+1)
VAL2=INTS(LAD+2)
ETA(LL)=ETA(LL)+ALPHA(IL)*VAL2+BETA(IL)*VAL1
EAVF(LL)=EAVF(LL)+F(IOR)*(A2*VAL2-VAL1)
DO 3160 J2=1,NORBS
IJ2=IOFF(MAX(IOR,J2))+MIN(IOR,J2)
ZETA(LL,J2)=ZETA(LL,J2)+ALPHA(IJ2)*VAL2+BETA(IJ2)*
* VAL1
3160 CONTINUE
GOTO 300
70 CONTINUE
WRITE(NOUT,2008)
2008 FORMAT(/ ' IN CONSTRUCTON OF ETA AND ZETA,I=J=K=L IS
*NOT POSSIBLE DO THE FIRST SET OF LOOPS'/' ERROR IN LOOPS SOMEWHER
*E')
CALL ABORTS
300 CONTINUE
3140 CONTINUE
3130 CONTINUE
DO 3170 KOR=LFERM,JOR
KSM=ORBSYM(KOR)
KO=IOFF(KOR)
IK=IO+KOR
JK=JO+KOR
KK=KO+KOR
JKEQ=JOR.EQ.KOR
IJKT=IJT
IF (JKEQ) IJKT=IJKT+1
IJKEQ=IJEQ.AND.JKEQ
IJKSYM=IEOR(IJSYM,(KSM-1))
LOFF=IJKSYM*NORBS
KAD=JAD+KADD(KOFF+KOR)
DO 3180 LOR=1,NUOC
CTJL IF (JOR.EQ.KOR .AND. KOR.EQ.LOR .AND. LOR.LT.IOR) GOTO
CTJL * 301
LSM=ORBSYM(LOR)
IF ((LSM-1) .NE. IJKSYM) GOTO 301
LO=IOFF(LOR)
IL=IO+LOR
JL=JO+LOR
KL=KO+LOR
LL=LO+LOR
IJKLT=IJKT
IF (IJKEQ .AND. KOR.GT.LOR) IJKLT=IJKLT+1
IF (KOR.EQ.LOR) IJKLT=IJKLT+3
LAD=KAD+LADD(LOFF+LOR)
IF (IJKLT.GT.7 .OR. IJKLT.LT.1) THEN
WRITE(NOUT,2004)IJKLT,IOR,JOR,
* KOR,LOR,IBF,JBF,KBF,LBF,ISM,JSM,KSM,LSM
CALL ABORTS
END IF
IF (LAD .GT. NMAX) THEN
WRITE(NOUT,2005) LAD
CALL ABORTS
END IF
GOTO (11,21,31,41,51,61,71)IJKLT
11 CONTINUE
C THIS TYPE (ALL DIFFERENT) DOES NOT CONTRIBUTE
GOTO 301
21 VAL1=INTS(LAD+1)
VAL2=INTS(LAD+2)
ETA(IL)=ETA(IL)+ALPHA(IJ)*VAL2+BETA(IJ)*VAL1
EAVF(IL)=EAVF(IL)+F(JOR)*(A2*VAL2-VAL1)
DO 3190 K2=1,NORBS
KL2=IOFF(MAX(JOR,K2))+MIN(JOR,K2)
ZETA(IL,K2)=ZETA(IL,K2)+ALPHA(KL2)*VAL2+BETA(KL2)*
* VAL1
3190 CONTINUE
GOTO 301
31 VAL1=INTS(LAD+1)
VAL2=INTS(LAD+2)
ETA(KL)=ETA(KL)+ALPHA(IK)*VAL2+BETA(IK)*VAL1
EAVF(KL)=EAVF(KL)+F(IOR)*(A2*VAL2-VAL1)
DO 3200 J2=1,NORBS
IJ2=IOFF(MAX(IOR,J2))+MIN(IOR,J2)
ZETA(KL,J2)=ZETA(KL,J2)+ALPHA(IJ2)*VAL2+BETA(IJ2)*
* VAL1
3200 CONTINUE
GOTO 301
41 CONTINUE
WRITE(NOUT,2009)
2009 FORMAT(/ ' IN CONSTRUCTON OF ETA AND ZETA, K=L IS N
*OT POSSIBLE DO THE 2ND SET OF LOOPS'/' ERROR IN LOOPS SOMEWHERE')
CALL ABORTS
GOTO 301
51 VAL1=INTS(LAD+1)
VAL2=INTS(LAD+2)
VAL3=INTS(LAD+3)
ETA(IL)=ETA(IL)+ALPHA(II)*VAL1+BETA(II)*VAL1+F(IOR)*
* VAL3
EAVF(IL)=EAVF(IL)+F(IOR)*(A2*VAL1-VAL1) + VAL3
DO 3210 J2=1,NORBS
IJ2=IOFF(MAX(IOR,J2))+MIN(IOR,J2)
ZETA(IL,J2)=ZETA(IL,J2)+ALPHA(IJ2)*VAL1+BETA(IJ2)*
* VAL1+F(J2)*VAL3
3210 CONTINUE
GOTO 301
61 CONTINUE
WRITE(NOUT,2010)
2010 FORMAT(/ ' IN CONSTRUCTON OF ETA AND ZETA,I=J=K IS N
*OT POSSIBLE DO THE 2ND SET OF LOOPS'/' ERROR IN LOOPS SOMEWHERE')
CALL ABORTS
71 CONTINUE
WRITE(NOUT,2011)
2011 FORMAT(/ ' IN CONSTRUCTON OF ETA AND ZETA,I=J=K=L IS
*NOT POSSIBLE DO THE 2ND SET OF LOOPS'/' ERROR IN LOOPS SOMEWHERE'
* )
CALL ABORTS
301 CONTINUE
3180 CONTINUE
DO 3220 LOR=LFERM,KOR
IF (JOR.EQ.KOR .AND. KOR.EQ.LOR .AND. LOR.LT.IOR) GOTO
* 302
LSM=ORBSYM(LOR)
IF ((LSM-1) .NE. IJKSYM) GOTO 302
LO=IOFF(LOR)
IL=IO+LOR
JL=JO+LOR
KL=KO+LOR
LL=LO+LOR
IJKLT=IJKT
IF (IJKEQ .AND. KOR.GT.LOR) IJKLT=IJKLT+1
IF (KOR.EQ.LOR) IJKLT=IJKLT+3
LAD=KAD+LADD(LOFF+LOR)
IF (IJKLT.GT.7 .OR. IJKLT.LT.1) THEN
WRITE(NOUT,2004) IJKLT,IOR,JOR,
* KOR,LOR,IBF,JBF,KBF,LBF,ISM,JS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II)=EAVF(II)+F(IOR)*(A2*VAL1-VAL1) + VAL2
DO 3290 J2=1,NORBS
IJ2=IOFF(MAX(IOR,J2))+MIN(IOR,J2)
ZETA(II,J2)=ZETA(II,J2)+ALPHA(IJ2)*VAL1+BETA(IJ2)*
* VAL1+F(J2)*VAL2
3290 CONTINUE
302 CONTINUE
3220 CONTINUE
3170 CONTINUE
3120 CONTINUE
C SKIP OVER THE OCC,UOC / UOC,UOC TERMS
DO 3300 JOR=NUOC,1,-1
IF (IGRP .NE. IJGRP(IOFF(IOR)+JOR)) THEN
CIBM CALL RGETSA(IT52,IX)
CIBM WRITE(NOUT,2001) IX
CALL SREAD(IT52,INTS,NMAX*2)
SRIN=SRIN+NMAX*2/112
IGRP=IJGRP(IOFF(IOR)+JOR)
END IF
3300 CONTINUE
3110 CONTINUE
C GET THE TWO ELECTRON CONTRIBUTIONS TO ETA AND ZETA FROM THE EXTERNAL
DO 3310 IOR=NUOC,1,-1
IO=IOFF(IOR)
II=IO+IOR
ISM=ORBSYM(IOR)
ITYP=1
DO 3320 JOR=IOR,1,-1
JO=IOFF(JOR)
IJ=IO+JOR
JJ=JO+JOR
IF (IGRP .NE. IJGRP(IOFF(IOR)+JOR)) THEN
CIBM CALL RGETSA(IT52,IX)
CIBM WRITE(NOUT,2001) IX
CALL SREAD(IT52,INTS,NMAX*2)
SRIN=SRIN+NMAX*2/112
IGRP=IJGRP(IOFF(IOR)+JOR)
END IF
JSM=ORBSYM(JOR)
IJEQ=IOR.EQ.JOR
IJT=ITYP
IF (IJEQ) IJT=IJT+2
IJSYM=IEOR((ISM-1),(JSM-1))
KOFF=IJSYM*NORBS
JAD=IJADD(IJ)
DO 3330 KOR=1,JOR
KO=IOFF(KOR)
IK=IO+KOR
JK=JO+KOR
KK=KO+KOR
KSM=ORBSYM(KOR)
JKEQ=JOR.EQ.KOR
IJKT=IJT
IF (JKEQ) IJKT=IJKT+1
IJKEQ=IJEQ.AND.JKEQ
IJKSYM=IEOR(IJSYM,(KSM-1))
LOFF=IJKSYM*NORBS
KAD=JAD+KADD(KOFF+KOR)
DO 3340 LOR=1,KOR
LO=IOFF(LOR)
IL=IO+LOR
JL=JO+LOR
KL=KO+LOR
LL=LO+LOR
IF (JOR.EQ.KOR .AND. KOR.EQ.LOR .AND. LOR.LT.IOR) GOTO
* 9
LSM=ORBSYM(LOR)
IF ((LSM-1) .NE. IJKSYM) GOTO 9
IJKLT=IJKT
IF (IJKEQ .AND. KOR.GT.LOR) IJKLT=IJKLT+1
IF (KOR.EQ.LOR) IJKLT=IJKLT+3
LAD=KAD+LADD(LOFF+LOR)
IF (IJKLT.GT.7 .OR. IJKLT.LT.1) THEN
WRITE(NOUT,2004) IJKLT,IOR,JOR,
* KOR,LOR,IBF,JBF,KBF,LBF,ISM,JSM,KSM,LSM
CALL ABORTS
END IF
IF (LAD .GT. NMAX) THEN
WRITE(NOUT,2005) LAD
CALL ABORTS
END IF
GOTO (9,9,9,9,5,9,7)IJKLT
C ONLY 2 E TERMS, I.E., H(IJ), CONTRIBUTE
5 VAL3=INTS(LAD+3)
ETA(IL)=ETA(IL)+F(IOR)*VAL3
EAVF(IL)=EAVF(IL) + VAL3
DO 3350 J2=1,NORBS
ZETA(IL,J2)=ZETA(IL,J2)+F(J2)*VAL3
3350 CONTINUE
GOTO 9
7 VAL2=INTS(LAD+2)
ETA(II)=ETA(II)+F(IOR)*VAL2
EAVF(II)=EAVF(II) + VAL2
DO 3360 J2=1,NORBS
ZETA(II,J2)=ZETA(II,J2)+F(J2)*VAL2
3360 CONTINUE
9 CONTINUE
3340 CONTINUE
3330 CONTINUE
3320 CONTINUE
3310 CONTINUE
WRITE(NOUT,2002) ESCF,REPNUC,ESCF+REPNUC
CTJL WRITE(*,2003)
2002 FORMAT(/' ELECTRONIC ENERGY:',F16.10
1 /' NUCLEAR ENERGY:',F16.10
2 /' TOTAL SCF ENERGY:',F16.10)
2003 FORMAT(/' ETA AND ZETA ARE COMPLETE')
IF (IAND(IPRINT,128) .NE. 0) THEN
WRITE(NOUT,1904)
1904 FORMAT(/' ETA MATRIX:')
CALL PRINT(ETA,NUMIJ,NORBS,NOUT)
WRITE(NOUT,*) ' EAVF MATRIX '
CALL PRINT(EAVF,NUMIJ,NORBS,NOUT)
CTJL IF (IAND(IPRINT,128) .NE. 0) THEN
DO 3370 IORB=1,NORBS
WRITE(NOUT,1905) IORB
1905 FORMAT(/' THE ZETA MATRIX FOR IORB=',I5)
CALL PRINT(ZETA(1,IORB),NUMIJ,NORBS,NOUT)
3370 CONTINUE
END IF
C
C CONSTRUCT A AND B0 MATRICIES; B0 IS IN RIGHT SIDE OF A MATRIX
C
1100 FORMAT(/' IN THE CONSRTUCTION OF THE A MATRIX, THE CASE ',A7
1/' IS NOT POSSIBLE IN THE ',A11,' SET OF LOOPS.'/' ERROR IN LOOP
* STRUCTURE SOMEWHERE.')
CALL SREW(IT52)
CALL SREAD(IT52,N112,112)
INTSRT = 0
CALL RGETSA(IT52,INTSRT)
WRITE(ICHK,*) ' IN GETINT AND INTSRT = ',INTSRT
CIBM
CIBM CALL RSETSA(IT52,INTSRT)
IGRP=0
DO 3380 I=1,IJIND2
DO 3390 J=1,IJIND3
A(I,J)=A0
3390 CONTINUE
3380 CONTINUE
C
RETURN
END
SUBROUTINE FLINX(A,IDIM,IN,IM,DET)
IMPLICIT REAL*8 (A-H,O-Z)
C EXTENDED DUMMY A
C
C LINEAR SIMULTANEOUS EQUATION
C
C A(IN*IN) * X(IN*IM) = B(IN*IM)
C
C A & B SHOULD BE STORED ON A(IN*(IN+IM))
C SOLUTION X WILL BE STORED ON B PART IN DIMENSION A.
C
REAL*16 DET,D
DIMENSION A(IDIM,1)
DATA ZERO,ONE / 0.0D+00 , 1.0D+00 /
C
N=IN
NR=IM
JMAX=N+NR
SIGN=ONE
C M IS THE STAGE OF ELIMINATION
DO 49 M=1,N
TEMP=ZERO
DO 41 I=M,N
IF(M.GT.1)A(I,M)=A(I,M)-DOT(A(I,1),IDIM,A(1,M),1,M-1)
AVAL=A(I,M)
IF(DABS(AVAL).LE.TEMP)GOTO 41
TEMP=DABS(AVAL)
IMAX=I
41 CONTINUE
IF(TEMP.LE.ZERO)GOTO 999
IF(IMAX.EQ.M)GOTO 45
SIGN=-SIGN
DO 44 J=1,JMAX
STOR=A(M,J)
A(M,J)=A(IMAX,J)
A(IMAX,J)=STOR
44 CONTINUE
45 CONTINUE
JJ=M+1
IF(JJ.GT.JMAX)GOTO 49
IF(M.GT.1)GOTO 47
DO 46 J=JJ,JMAX
A(1,J)=A(1,J)/A(1,1)
46 CONTINUE
D=A(1,1)
GOTO 49
47 CONTINUE
DO 48 J=JJ,JMAX
A(M,J)=(A(M,J)-DOT(A(M,1),IDIM,A(1,J),1,M-1))/A(M,M)
48 CONTINUE
CTJL D=D*A(M,M)
49 CONTINUE
IF(NR.EQ.0) RETURN
DO 59 I=1,NR
NPI=N+I
DO 58 K=2,N
J=N+1-K
A(J,NPI)=A(J,NPI)-DOT(A(J,J+1),IDIM,A(J+1,NPI),1,K-1)
58 CONTINUE
59 CONTINUE
C*** IF(DABS(D).GE.1.0D+36) D=1.0D+36
C*** IF(DABS(D).LE.1.0D-36) D=1.0D-36
CTJL DET=D*SIGN
RETURN
C ON ZERO PIVOT, SET DET=0.AND RETURN TO CALLING PROGRAM NOV 1972
999 DET=ZERO
RETURN
END
CIBM FUNCTION DOTX(A,NA,B,NB,N)
C IMPLICIT REAL*8 (A-H,O-Z)
C EXTENDED DUMMY A,B
C DIMENSION A(1),B(1)
C DATA ZERO / 0.0D+00 /
C
C IAPT=1
C IBPT=1
C D=ZERO
C DO 10 I=1,N
C D=D+A(IAPT)*B(IBPT)
C IAPT=IAPT+NA
C IBPT=IBPT+NB
C10 CONTINUE
C DOTX=D
C RETURN
C END
C**********************************************************************
C BEGINNING OF GTINT SUBROUTINES *
C**********************************************************************
SUBROUTINE GTINT2(A,ETA,ZETA,F,ALPHA,BETA,IJORD,KADD,LADD,
1IJADD,IJGRP,ORBSYM,INTS,S,EPA,JT1C,IOFF,EX,RS,LG,IJDEP,BOX,
2EAVF,LSTEPA,EX2,E11,E12,E22,HA11,HA22,HA12)
IMPLICIT INTEGER (A-Z)
LOGICAL IJEQ,IJKEQ,JKEQ,IKEQ,JLEQ,JKLEQ,ILEQ
INTEGER XDF,N112(112),JULIA(70),IJDEP(NUMIJ)
REAL*8 A0,A1,A2,A1S2,A4,FOCC,EFAC,BOX(NDF),XFAC,SFAC,A3S2,ONE
REAL*8 CI1,CI2,H11,H12,H22,E11(NBF,NBF),E12(NBF,NBF),E22(NBF,NBF)
REAL*8 EAVF(NUMIJ),LSTEPA(NUMIJ),EX2(IJIND),ETCSCF,ESCF2
REAL*8 EH11,EH22,EH12,ETCSC1,HA11(NDF),HA22(NDF),HA12(NDF)
REAL*8 DERC1,DERC2
DIMENSION IJORD(NUMIJ),KADD(SYMORB),LADD(SYMORB),JT1C(1)
DIMENSION ORBSYM(NORBS),IJADD(NUMIJ),IJGRP(NUMIJ)
DIMENSION IOFF(NUMIJ)
REAL*8 A(IJIND,IJIND3),F(NORBS),INTS(NMAX),LG(NORBS,NORBS)
1,S(NUMIJ,NDF),EPA(NORBS,NORBS),EX(IJIND),RS(NUMDEP,NDF)
REAL*8 ZETA(NUMIJ,NORBS),ALPHA(NUMIJ),BETA(NUMIJ)
REAL*8 C1A,C2A,C1,C2,EA,BI1,BI2,SAIJ1,SAIJ2,ETEST
REAL*8 VAL1,VAL2,VAL3,ETA(NUMIJ),ESCF,REPNUC,STEST
COMMON /CIA/ C1A(45),C2A(45),C1,C2,ESCF
COMMON /TAPES/ NOUT,ICHK,IT30,IT42,IT47,IT52,IT58,IT94,IT96,IT98
COMMON /DIMSG/ SYMORB,NUMIJ,NBF,NMAX,NBFORB,NSYM,NDF,NORBS
COMMON /POINT/ FOCC(5),IPOINT(5),JPOINT(5),NSORB(5)
COMMON /FUNCS/ IOCC,JOCC,KOCC,NTYPES,NBSET,NAT
COMMON /OCCS/ NSPE,NSA,NSB,NALP,NOP,NDOC,LFERM,NUOC,IJIND,IJIND3
COMMON/OCCS2/NUMCOR,NCOR,FDOC,CORDOC,NUMVIR,FVIR,LUOC,NUMDEP,VUOC
COMMON /LOC22/ IA22(100),IBF2AT(284)
COMMON /IEXT/ IPRINT,IGRP,ICIDIP
COMMON /REN/ REPNUC
COMMON /TCSCF/ DERC1,DERC2,CI1,CI2,H11,H12,H22,ONE,ITCSCF
C
1100 FORMAT(/' IN THE CONSTRUCTION OF THE A MATRIX, THE CASE ',A7
* /' IS NOT POSSIBLE IN THE ',A11,' SET OF LOOPS.'/' ERROR
* IN LOOP STRUCTURE SOMEWHERE.')
2 FORMAT(/' IN GTINT2, IJKLT UNKNOWN TYPE ',I5/' ORBITALS: ',4I5
* /' BASIS FUNCTIONS: ',4I5/,' SYMMETRIES: ',4I5)
2005 FORMAT(/' IN GTINT2, LAD TOO BIG: ',I6)
C
IJIND2 = IJIND
ITEST = 0
A0 = 0.0D+00
A1 = 1.0D+00
A2 = 2.0D+00
A4 = 4.0D+00
A1S2 = 0.50D+00
A3S2 = 1.5D+00
ESCF2 = A0
CTJL
C WRITE(*,*) ' THE RS MATRIX '
C CALL MATOUT(RS,NUMDEP,NDF,NUMDEP,NDF,NOUT)
C WRITE(*,*) ' IN GTINT2 ; NOP,NBF ',NOP,NBF
C WRITE(*,*) ' THE AVERAGED FOCK MATRIX '
C CALL PRINT(EAVF,NUMIJ,NBF,NOUT)
CTJL
C
C THIS IS THE BEGINNING OF THE THIRD PART OF GETINT TJL 7/09/84
C
IF (NALP.EQ.0) GOTO 540
C
DO 4070 IOR=NALP,NOP,-1
IO=IOFF(IOR)
II=IO+IOR
ISM=ORBSYM(IOR)
ITYP=1
DO 4080 JOR=IOR,NOP,-1
JO=IOFF(JOR)
IJ=IO+JOR
JJ=JO+JOR
IJND=IJORD(IJ)
JSM=ORBSYM(JOR)
IJEQ=IOR.EQ.JOR
IJT=ITYP
IF (IJEQ) IJT=IJT+2
IJSYM=IEOR((ISM-1),(JSM-1))
KOF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L,VAL1,VAL2,VAL3,IK)
CALL GB1(ILND,IJ,JL,IK,KL,VAL3,VAL2,VAL1,JK)
CALL GB1(JKND,IJ,IK,JL,KL,VAL3,VAL2,VAL1,IL)
C
IF(KLVU.NE.0) CALL RS1(KLVU,A1,VAL2,VAL1,VAL3,IJ)
C
4110 CONTINUE
GO TO 406
126 CONTINUE
WRITE(NOUT,1100) 'J=K ','THIRTEENTH '
CALL MABORT
136 VAL1=INTS(LAD+1)
VAL2=INTS(LAD+2)
C
CALL GA3(IKND,ILND,IL,KL,II,IK,VAL1,VAL2,IOR)
C
CALL GB3(IKND,IL,KL,II,IK,VAL1,VAL2,IL,IOR)
CALL GB3(ILND,IK,KL,II,IL,VAL1,VAL2,IK,IOR)
C
IF(KLVU.NE.0) CALL RS1(KLVU,A1S2,VAL2,VAL1,VAL1,IJ)
C
4120 CONTINUE
GOTO 406
146 VAL1=INTS(LAD+1)
VAL2=INTS(LAD+2)
C
CALL GA4(IKND,JKND,IK,KK,IJ,JK,VAL1,VAL2,KOR)
C
CALL GB4(IKND,IK,KK,IJ,JK,VAL1,VAL2,JK,KOR)
CALL GB4(JKND,JK,KK,IJ,IK,VAL1,VAL2,IK,KOR)
GOTO 406
156 CONTINUE
WRITE(NOUT,1100) 'I=J=K ','THIRTEENTH '
CALL MABORT
166 VAL1=INTS(LAD+1)
VAL2=INTS(LAD+2)
C
CALL GA6(IKND,IK,KK,II,VAL1,VAL2,IOR,KOR)
C
CALL GB6(IKND,II,KK,VAL1,VAL2,IK,IOR,KOR)
GOTO 406
176 CONTINUE
WRITE(NOUT,1100) 'I=J=K=L','THIRTEENTH '
CALL MABORT
406 CONTINUE
4100 CONTINUE
4090 CONTINUE
DO 4150 KOR=LFERM,NDOC
KO=IOFF(KOR)
IK=IO+KOR
JK=JO+KOR
KK=KO+KOR
IKND=IJORD(IK)
JKND=IJORD(JK)
KSM=ORBSYM(KOR)
JKEQ=JOR.EQ.KOR
IJKT=IJT
IF (JKEQ) IJKT=IJKT+1
IJKEQ=IJEQ.AND.JKEQ
IJKSYM=IEOR(IJSYM,(KSM-1))
LOFF=IJKSYM*NORBS
KAD=JAD+KADD(KOFF+KOR)
C
C ALP-ALP-DOC-UOC
C
DO 4160 LOR=1,NUOC
IF (JOR.EQ.KOR .AND. KOR.EQ.LOR .AND. LOR.LT.IOR) GOTO 407
LSM=ORBSYM(LOR)
IF ((LSM-1) .NE. IJKSYM) GOTO 407
LO=IOFF(LOR)
IL=IO+LOR
JL=JO+LOR
KL=KO+LOR
LL=LO+LOR
ILND=IJORD(IL)
JLND=IJORD(JL)
KLND=IJORD(KL)
IJKLT=IJKT
IF (IJKEQ .AND. KOR.GT.LOR) IJKLT=IJKLT+1
IF (KOR.EQ.LOR) IJKLT=IJKLT+3
LAD=KAD+LADD(LOFF+LOR)
IF (IJKLT.GT.7 .OR. IJKLT.LT.1) GOTO 9903
IF (LAD .GT. NMAX) GOTO 9902
JULIA(IJKLT+7)=JULIA(IJKLT+7)+1
GOTO (117,127,137,147,157,167,177)IJKLT
117 VAL1=INTS(LAD+1)
VAL2=INTS(LAD+2)
VAL3=INTS(LAD+3)
C
CALL GA1(IKND,JLND,IL,KL,IJ,JK,VAL1,VAL2,VAL3)
CALL GA1(ILND,JKND,IK,KL,IJ,JL,VAL3,VAL2,VAL1)
C
CALL GB1(KLND,IK,IL,JK,JL,VAL2,VAL1,VAL3,IJ)
CALL GB1(IKND,IL,KL,IJ,JK,VAL1,VAL2,VAL3,JL)
CALL GB1(JLND,JK,KL,IJ,IL,VAL1,VAL2,VAL3,IK)
CALL GB1(ILND,IJ,JL,IK,KL,VAL3,VAL2,VAL1,JK)
CALL GB1(JKND,IJ,IK,JL,KL,VAL3,VAL2,VAL1,IL)
GOTO 407
127 CONTINUE
WRITE(NOUT,1100) 'J=K ','FOURTEENTH '
CALL MABORT
137 VAL1=INTS(LAD+1)
VAL2=INTS(LAD+2)
C
CALL GA3(IKND,ILND,IL,KL,II,IK,VAL1,VAL2,IOR)
C
CALL GBD(KLND,IK,IL,VAL2,VAL1,II)
CALL GB3(IKND,IL,KL,II,IK,VAL1,VAL2,IL,IOR)
CALL GB3(ILND,IK,KL,II,IL,VAL1,VAL2,IK,IOR)
GOTO 407
147 CONTINUE
WRITE(NOUT,1100) 'K=L ','FOURTEENTH '
CALL MABORT
157 CONTINUE
WRITE(NOUT,1100) 'I=J=K ','FOURTEENTH '
CALL MABORT
167 CONTINUE
WRITE(NOUT,1100) 'I=J;K=L','FOURTEENTH '
CALL MABORT
177 CONTINUE
WRITE(NOUT,1100) 'I=J=K=L','FOURTEENTH '
CALL MABORT
407 CONTINUE
4160 CONTINUE
C
C ALP-ALP-DOC-DOC
C
DO 4190 LOR=LFERM,KOR
IF (JOR.EQ.KOR .AND. KOR.EQ.LOR .AND. LOR.LT.IOR) GOTO 408
LSM=ORBSYM(LOR)
IF ((LSM-1) .NE. IJKSYM) GOTO 408
LO=IOFF(LOR)
IL=IO+LOR
JL=JO+LOR
KL=KO+LOR
LL=LO+LOR
ILND=IJORD(IL)
JLND=IJORD(JL)
KLND=IJORD(KL)
IJKLT=IJKT
IF (IJKEQ .AND. KOR.GT.LOR) IJKLT=IJKLT+1
IF (KOR.EQ.LOR) IJKLT=IJKLT+3
LAD=KAD+LADD(LOFF+LOR)
IF (IJKLT.GT.7 .OR. IJKLT.LT.1) GOTO 9903
IF (LAD .GT. NMAX) GOTO 9902
JULIA(IJKLT+14)=JULIA(IJKLT+14)+1
CTJL
KLDC = IJDEP(KL)
CTJL
GOTO (118,128,138,148,158,168,178)IJKLT
118 VAL1=INTS(LAD+1)
VAL2=INTS(LAD+2)
VAL3=INTS(LAD+3)
C
CALL GA1(IKND,JLND,IL,KL,IJ,JK,VAL1,VAL2,VAL3)
CALL GA1(ILND,JKND,IK,KL,IJ,JL,VAL3,VAL2,VAL1)
C
CALL GB1(IKND,IL,KL,IJ,JK,VAL1,VAL2,VAL3,JL)
CALL GB1(JLND,JK,KL,IJ,IL,VAL1,VAL2,VAL3,IK)
CALL GB1(ILND,IJ,JL,IK,KL,VAL3,VAL2,VAL1,JK)
CALL GB1(JKND,IJ,IK,JL,KL,VAL3,VAL2,VAL1,IL)
C
IF(KLDC.NE.0) CALL RS1(KLDC,A1,VAL2,VAL1,VAL3,IJ)
C
4200 CONTINUE
GOTO 408
128 CONTINUE
WRITE(NOUT,1100) 'J=K ','FIFTEENTH '
CALL MABORT
138 VAL1=INTS(LAD+1)
VAL2=INTS(LAD+2)
C
CALL GA3(IKND,ILND,IL,KL,II,IK,VAL1,VAL2,IOR)
C
CALL GB3(IKND,IL,KL,II,IK,VAL1,VAL2,IL,IOR)
CALL GB3(ILND,IK,KL,II,IL,VAL1,VAL2,IK,IOR)
C
IF(KLDC.NE.0) CALL RS1(KLDC,A1S2,VAL2,VAL1,VAL1,IJ)
C
4210 CONTINUE
GOTO 408
148 VAL1=INTS(LAD+1)
VAL2=INTS(LAD+2)
C
CALL GA4(IKND,JKND,IK,KK,IJ,JK,VAL1,VAL2,KOR)
C
CALL GB4(IKND,IK,KK,IJ,JK,VAL1,VAL2,JK,KOR)
CALL GB4(JKND,JK,KK,IJ,IK,VAL1,VAL2,IK,KOR)
GOTO 408
158 CONTINUE
WRITE(NOUT,1100) 'I=J=K ','FIFTEENTH '
CALL MABORT
168 VAL1=INTS(LAD+1)
VAL2=INTS(LAD+2)
C
CALL GA6(IKND,IK,KK,II,VAL1,VAL2,IOR,KOR)
C
CALL GB6(IKND,II,KK,VAL1,VAL2,IK,IOR,KOR)
GOTO 408
178 CONTINUE
WRITE(NOUT,1100) 'I=J=K=L','FIFTEENTH '
CALL MABORT
408 CONTINUE
4190 CONTINUE
4150 CONTINUE
DO 4240 KOR=NOP,JOR
KO=IOFF(KOR)
IK=IO+KOR
JK=JO+KOR
KK=KO+KOR
KSM=ORBSYM(KOR)
JKEQ=JOR.EQ.KOR
IJKT=IJT
IF (JKEQ) IJKT=IJKT+1
IJKEQ=IJEQ.AND.JKEQ
IJKSYM=IEOR(IJSYM,(KSM-1))
LOFF=IJKSYM*NORBS