-
Notifications
You must be signed in to change notification settings - Fork 0
/
CCTRANS.FORT10
1783 lines (1781 loc) · 54.2 KB
/
CCTRANS.FORT10
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
PROGRAM TRANS
C**********************************************************************
C* NOTICE OF PROGRAM MODIFICATION *
C**********************************************************************
c Moved to PSI distribution disk on 2/4/89 by clj.
C**********************************************************************
C* BY: RICHARD REMINGTON search: c5-22-88 *
C* DATE: MAY 22, 1988 *
C* REASON: DECREASE CORE TO RUN IN 7MB ON 9370 *
C**********************************************************************
IMPLICIT REAL*8 (A-H,O-Z)
REAL*8 CORE(1)
c5-22-88 INTEGER ICORE(2500000),I30(200)
INTEGER ICORE(1400000),I30(200)
INTEGER WPADTI,SEC2I,SPACE,SPACE2
COMMON/BASIS/NBASIS,MTRI,NSYM
C COMMON/PAKQ/I1,I2,I3
EQUIVALENCE (CORE,ICORE)
CALL NOUNFL
c5-22-88 MAXCOR=1250000
MAXCOR= 700000
C
CALL TSTART(6)
C
WRITE(6,6000)
6000 FORMAT(//,47('-'),/,47('-'),/,
.' CCTRANS : INTEGRAL TRANSFORMATION FOR CC CODES',/,
.' WRITTEN BY ANDY SCHEINER ',/,47('-'),/,47('-'),//)
C
1 FORMAT (' ')
2 FORMAT ('************************************************')
121 FORMAT (' NOT ENOUGH CORE TO DO FINAL 2-ELECTRON HALF TRANSFORM')
C
INPUT=5
JOUT=6
KOUT=8
ITAP30=30
ITAP71=71
ITAP72=72
ITAP77=77
ITAP78=78
ITAP34=34
IBUFHF=4471
IFLAG=1
ISORT=1
JBUF=0
INTBUF=SEC2I(100)/INTOWP(1)
MAXBKT=120
C
CALL RFILE(ITAP30)
CALL RFILE(ITAP71)
CALL RFILE(ITAP72)
CALL RFILE(ITAP77)
CALL RFILE(ITAP78)
C WRITE (JOUT,*) ' RFILES'
CALL WREADW(ITAP30,I30,200,101,LWORD)
C WRITE (JOUT,1)
C WRITE (JOUT,2)
C WRITE (JOUT,*) ' ************ TAPE 30 CONSTANTS ***********'
C WRITE (JOUT,2)
C WRITE (JOUT,1)
C DO 3 I=1,200
C WRITE (JOUT,*) I,I30(I)
C 3 CONTINUE
C
MPOINT=I30(2)
MCONST=I30(3)
MCALCS=I30(4)
NCALCS=I30(5)
NBF=I30(18)
C WRITE (JOUT,*) ' NBF=',NBF
NBFAO=I30(22)
C WRITE (JOUT,*) ' NBFAO=',NBFAO
NIRRED=I30(28)
NSYMHF=I30(41)
C WRITE (JOUT,*) ' NSYMHF=',NSYMHF
C WRITE (JOUT,*) ' MCALCS=',MCALCS
MXCOEF=I30(42)
C WRITE (JOUT,*) ' MXCOEF=',MXCOEF
NTRI=(NBF*(NBF+1))/2
NTRIAO=(NBFAO*(NBFAO+1))/2
C WRITE (JOUT,*) ' NTRIAO=',NTRIAO
MTRI=NTRIAO
C
IC=0
C
CALL ZERO(CORE,MAXCOR)
C
K1= 1
K2=K1+NBF*NBFAO
C WRITE (JOUT,*) ' K2=',K2
K3=WPADTI(K2+NBF)
C WRITE (JOUT,*) ' K3=',K3
KTPO=K3+NSYMHF
C WRITE (JOUT,*) ' KTPO=',KTPO
KTYP=KTPO+NBF
C WRITE (JOUT,*) ' KTYP=',KTYP
KFLOV=KTYP+NSYMHF
C WRITE (JOUT,*) ' KFLOV=',KFLOV
KORBSM=KFLOV+2*NIRRED
C WRITE (JOUT,*) ' KORBSM=',KORBSM
KNMSM=KORBSM+NBF
C WRITE (JOUT,*) ' KNMSM=',KNMSM
KIWRK=KNMSM+NIRRED
C WRITE (JOUT,*) ' KIWRK=',KIWRK
KKLPT=KIWRK+NIRRED
C WRITE (JOUT,*) ' KKLPT=',KKLPT
KIJPT=KKLPT+NTRI
C WRITE (JOUT,*) ' KIJPT=',KIJPT
KOFF1=KIJPT+NTRI
C WRITE (JOUT,*) ' KOFF1=',KOFF1
KOFF2=KOFF1+NTRI
C WRITE (JOUT,*) ' KOFF2=',KOFF2
K4=KOFF2+NTRI
C WRITE (JOUT,*) ' K4=',K4
K5=K4+MCALCS
C WRITE (JOUT,*) ' K5=',K5
K6=IADTWP(K5+NSYMHF)
C WRITE (JOUT,*) ' K6=',K6
K7 = K6 + MXCOEF
C WRITE (JOUT,*) ' K7=',K7
KTOP=K7+NBF*NBF-1
C WRITE (JOUT,*) ' KTOP=',KTOP
C
CALL READ30 (ITAP30,MPOINT,MCONST,MCALCS,NCALCS,NBF,NBFAO,NSYMHF,
. MXCOEF,CORE(K1),CORE(K2),ICORE(K3),ICORE(K4),CORE(K6)
. ,JOUT,ICORE(K5),NO,ICORE(KTPO),CORE(K7),ICORE(KTYP),
. NIRRED,ICORE(KFLOV),ICORE(KORBSM),NTRI,ICORE(KNMSM),
. ICORE(KIWRK),ICORE(KKLPT),ICORE(KIJPT),ICORE(KOFF1),
. ICORE(KOFF2))
NV=NBF-NO
C WRITE(*,*) ' NV = ',NV
C WRITE(JOUT,*)
C WRITE(JOUT,*) ' THE SCF EIGENVECTORS '
C WRITE(JOUT,*)
C CALL MATOUT (CORE(K1),NBFAO,NBF,NBFAO,NBF,JOUT)
C WRITE (JOUT,1)
C WRITE (JOUT,2)
C WRITE (JOUT,*) ' ************ EIGENVECTOR *************'
C WRITE (JOUT,2)
C WRITE (JOUT,1)
C DO 4 I=1,196
C WRITE (JOUT,*) I,CORE(I)
C 4 CONTINUE
C WRITE (JOUT,1)
C WRITE (JOUT,2)
C WRITE (JOUT,*) ' ************ EIGENVALUES *************'
C WRITE (JOUT,2)
C WRITE (JOUT,1)
C DO 5 I=197,210
C WRITE (JOUT,*) I,CORE(I)
C 5 CONTINUE
C WRITE (JOUT,1)
C WRITE (JOUT,2)
C WRITE (JOUT,*) ' ************ NLAMDA *************'
C WRITE (JOUT,2)
C WRITE (JOUT,1)
C WRITE (JOUT,*) ICORE (421)
C WRITE (JOUT,1)
C WRITE (JOUT,2)
C WRITE (JOUT,*) ' ************ ITEMP *************'
C WRITE (JOUT,2)
C WRITE (JOUT,1)
C DO 6 I=422,521
C WRITE (JOUT,*) I,ICORE(I)
C 6 CONTINUE
C WRITE (JOUT,1)
C WRITE (JOUT,2)
C WRITE (JOUT,*) ' ************ XVEC *************'
C WRITE (JOUT,2)
C WRITE (JOUT,1)
C DO 7 I=262,457
C WRITE (JOUT,*) I,CORE(I)
C 7 CONTINUE
C
J1=IADTWP(K4)
C WRITE (JOUT,*) ' J1=',J1
J2=J1+NTRIAO
C WRITE (JOUT,*) ' J2=',J2
J3=J2+NTRIAO
C WRITE (JOUT,*) ' J3=',J3
J4=J3+NTRIAO
C WRITE (JOUT,*) ' J4=',J4
J5=J4+NTRIAO
C WRITE (JOUT,*) ' J5=',J5
J6=WPADTI(J5)
C WRITE (JOUT,*) ' J6=',J6
JTOP=J5+IBUFHF-1
C WRITE (JOUT,*) ' JTOP=',JTOP
C
CALL READ34 (CORE(J1),CORE(J2),CORE(J3),CORE(J4),CORE(J5),ICORE(J6
. ),IBUFHF,ITAP34,JOUT)
C WRITE (JOUT,1)
C WRITE (JOUT,2)
C WRITE (JOUT,*) ' ************ H MATRIX *************'
C WRITE (JOUT,2)
C WRITE (JOUT,1)
C DO 8 I=212,316
C WRITE (JOUT,*) I,CORE(I)
C 8 CONTINUE
C WRITE (JOUT,1)
C WRITE (JOUT,2)
C WRITE (JOUT,*) ' ************ S MATRIX *************'
C WRITE (JOUT,2)
C WRITE (JOUT,1)
C DO 9 I=317,421
C WRITE (JOUT,*) I,CORE(I)
C 9 CONTINUE
C WRITE (JOUT,1)
C WRITE (JOUT,2)
C WRITE (JOUT,*) ' ************ T MATRIX *************'
C WRITE (JOUT,2)
C WRITE (JOUT,1)
C DO 11 I=422,526
C WRITE (JOUT,*) I,CORE(I)
C 11 CONTINUE
C WRITE (JOUT,1)
C WRITE (JOUT,2)
C WRITE (JOUT,*) ' ************ V MATRIX *************'
C WRITE (JOUT,2)
C WRITE (JOUT,1)
C DO 12 I=527,631
C WRITE (JOUT,*) I,CORE(I)
C 12 CONTINUE
CC WRITE (JOUT,1)
CC WRITE (JOUT,2)
CC WRITE (JOUT,*) ' ************ XVEC *************'
CC WRITE (JOUT,2)
CC WRITE (JOUT,1)
CC DO 7 I=262,457
CC WRITE (JOUT,*) I,CORE(I)
CC 7 CONTINUE
C
CA2/13LENINT=MAXCOR-IBUFHF-J2-3*NBFAO*NBFAO-(MAXBKT+1)/INTOWP(1)
LENINT=MAXCOR-INTBUF-J2-3*NBFAO*NBFAO-(MAXBKT+1)/INTOWP(1)
C WRITE (JOUT,*) ' LENINT=',LENINT
ITRI=LENINT/NTRIAO
C WRITE (JOUT,*) ' ITRI=',ITRI
C IF (ITRI.GE.NTRIAO*2) THEN
C WRITE(*,*)'DOING TRANSFORMATION IN CORE'
C L1=I2
C L2=L1+NTRIAO*NTRIAO
C L3=WPADTI(L2)
C LTOP=IADTWP(L3+IBUFHF)-1
C CALL ZERO(CORE(L1),MAXCOR-L1)
C WRITE(*,*) ' ZEROING OUT CORE BEFORE RDTWO '
C
C CALL RDTWO(CORE(L1),CORE(L2),ICORE(L3),IBUFHF,NTRIAO,ITAP34,JOUT)
C
C M1=L2
C IM1=WPADTI(M1)
C M2=M1+NTRIAO*NTRI
C M3=M2+NBFAO*NBFAO
C M4=M3+NBFAO*NBFAO
C MTOP=M4+NBFAO*NBFAO-1
C IF (MTOP.GT.MAXCOR) THEN
C WRITE(JOUT,*) ' MTOP EXCEEDS MAXCOR'
C END IF
C IFLAG=2
C
C WRITE (JOUT,*) ' NTRIAO*NTRI=',NTRIAO*NTRI
C CALL HTRANS(CORE(M2),CORE(M3),CORE(M4),CORE(L1),
C . CORE(M1),ICORE(IM1),
C . NTRIAO*NTRIAO,NTRIAO*NTRI,NBFAO,CORE(K1),NBFAO,NBF,
C . JOUT,NTRIAO,NTRI,IFLAG,ISORT,ITAP78,NTRIAO,1,1,
C . JBUF,1,ICORE(KORBSM),ICORE(KFLOV),NIRRED,ICORE(K3),
C . NSYMHF,ICORE(KKLPT),ICORE(KIJPT),NTRI,ICORE(KTPO),
C . ICORE(KOFF1),ICORE(KOFF2),NO)
C
C M5=L1
C IM5=WPADTI(M5)
C IF (MTOP.GT.MAXCOR) THEN
C WRITE(JOUT,*) ' MTOP EXCEEDS MAXCOR'
C END IF
C IFLAG=1
C
C WRITE (JOUT,*) ' NTRI*NTRI=',NTRI*NTRI
C CALL HTRANS(CORE(M2),CORE(M3),CORE(M4),CORE(M1),
C . CORE(M5),ICORE(IM5),NTRIAO
C . *NTRI,NTRI*NTRI,NBFAO,CORE(K1),NBFAO,NBF,JOUT,NTRI,
C . NTRI,IFLAG,ISORT,ITAP78,NTRI,1,1,JBUF,1,
C . ICORE(KORBSM),ICORE(KFLOV),NIRRED,ICORE(K3),NSYMHF,
C . ICORE(KKLPT),ICORE(KIJPT),NTRI,ICORE(KTPO),
C . ICORE(KOFF1),ICORE(KOFF2),NO)
C
C
C CALL WRINTS(ITAP71,CORE(M4),NTRI*NTRI,IAD)
C CALL SREW(ITAP71)
C CALL RCLOSE(ITAP71,3)
C CALL SREW(ITAP30)
C CALL RCLOSE(ITAP30,3)
C WRITE (JOUT,*) ' IAD=',IAD
C ELSE
ISORT=2
IF (ITRI.GT.NTRIAO) ITRI=NTRIAO
NBUCK=NTRIAO/ITRI
MODTRI=MOD(NTRIAO,ITRI)
IF (ITRI*NBUCK.NE.NTRIAO) NBUCK=NBUCK+1
C WRITE (JOUT,*) ' NBUCK=',NBUCK
IBKTSP=MAXCOR-IBUFHF-J2
. -(MAXBKT+1)/INTOWP(1)
C WRITE (JOUT,*) ' IBKTSP=',IBKTSP
LENGTH=IBKTSP/NBUCK
NIOBF=INTOWP(LENGTH)/SEC2I(1)
IF (NIOBF.GT.100) NIOBF=100
LENGTH=NIOBF*(SEC2I(1)/INTOWP(1))
C WRITE (JOUT,*) ' LENGTH=',LENGTH
SPACE=MAXCOR-LENGTH-3*NBFAO*NBFAO-J2
. -(MAXBKT+1)/INTOWP(1)
IF (NTRIAO*ITRI.GT.SPACE) THEN
LENGTH=LENGTH-(NTRIAO*ITRI-SPACE)
NIOBF=INTOWP(LENGTH)/SEC2I(1)
LENGTH=NIOBF*(SEC2I(1)/INTOWP(1))
C WRITE (JOUT,*) ' LENGTH=',LENGTH
SPACE=MAXCOR-LENGTH-3*NBFAO*NBFAO-J2
. -(MAXBKT+1)/INTOWP(1)
END IF
IF (SPACE.GT.NTRIAO*NTRIAO) SPACE=NTRIAO*NTRIAO
C WRITE (JOUT,*) ' SPACE=',SPACE
C
N1=J2
IN1=WPADTI(N1)
C WRITE (JOUT,*) ' N1=',N1
N2=IADTWP(IN1+MAXBKT)
C WRITE (JOUT,*) ' N2=',N2
IN2=WPADTI(N2)
C WRITE (JOUT,*) ' IN2=',IN2
N3=N2+NBUCK*LENGTH
C WRITE (JOUT,*) ' N3=',N3
IN3=WPADTI(N3)
C WRITE (JOUT,*) ' IN3=',IN3
NTOP=N3+IBUFHF-1
C WRITE (JOUT,*) ' NTOP=',NTOP
C WRITE (JOUT,*) ' ENTERING SORT 1'
CALL ZERO(CORE(N1),MAXCOR-N1)
CALL SORT(CORE(N2),ICORE(IN2),ICORE(IN3),CORE(N3),NBUCK*LENGTH,
. IBUFHF,NBUCK,JOUT,ITAP34,ITRI,ITAP77,ICORE(IN1),MAXBKT,NIOBF
. ,LENGTH,MAXVAL,IWRIT)
C WRITE (JOUT,*) ' EXITING SORT 1'
CALL RCLOSE(ITAP34,3)
C
N6=N2
C WRITE (JOUT,*) ' N6=',N6
N7=N6+SPACE
C WRITE (JOUT,*) ' N7=',N7
IN7=WPADTI(N7)
C WRITE (JOUT,*) ' IN7=',IN7
N8=N7+LENGTH
C WRITE (JOUT,*) ' N8=',N8
N9=N8+NBFAO*NBFAO
C WRITE (JOUT,*) ' N9=',N9
N10=N9+NBFAO*NBFAO
C WRITE (JOUT,*) ' N10=',N10
NTOP=N10+NBFAO*NBFAO-1
C WRITE (JOUT,*) ' NTOP=',NTOP
CALL ZERO(CORE(N6),MAXCOR-N6)
JBUF=0
DO 101 I=1,NBUCK
C WRITE (JOUT,*) ' ENTERING BCKCHN 1'
C WRITE (JOUT,*) ' NBUCK=',I
C WRITE (JOUT,*) ' LENGTH=',LENGTH
C WRITE (JOUT,*) ' SPACE=',SPACE
C WRITE (JOUT,*) ' MAXBKT=',MAXBKT
CALL BCKCHN(ICORE(IN1),I,ITAP77,CORE(N7),ICORE(IN7),LENGTH,
. MAXBKT,MAXVAL,CORE(N6),SPACE,NTRIAO,JOUT,ITRI)
NTRIMX=ITRI
IF ((I.EQ.NBUCK).AND.(MODTRI.NE.0)) NTRIMX=MODTRI
IFLAG=2
CALL HTRANS(CORE(N8),CORE(N9),CORE(N10),CORE(N6),
. CORE(N7),ICORE(IN7),
. SPACE,LENGTH,NBFAO,CORE(K1),NBFAO,NBF,JOUT,NTRIAO
. ,NTRI,IFLAG,ISORT,ITAP78,NTRIMX,I,ITRI,JBUF,
. NBUCK,ICORE(KORBSM),ICORE(KFLOV),NIRRED,ICORE(K3),
. NSYMHF,ICORE(KKLPT),ICORE(KIJPT),NTRI,ICORE(KTPO),
. ICORE(KOFF1),ICORE(KOFF2),NO)
CALL ZERO(CORE(N6),MAXCOR-N6)
101 CONTINUE
CALL RCLOSE(ITAP77,4)
CALL RFILE(ITAP77)
CALL ZERO(CORE(J2),MAXCOR-J2)
NBUCK=NTRI/ITRI
MODTRI=MOD(NTRI,ITRI)
IF (ITRI*NBUCK.NE.NTRI) NBUCK=NBUCK+1
IBKTSP=MAXCOR-LENGTH-J2
. -(MAXBKT+1)/INTOWP(1)
C WRITE (JOUT,*) ' IBKTSP=',IBKTSP
LEN2=IBKTSP/NBUCK
NIOBF=INTOWP(LEN2)/SEC2I(1)
IF (NIOBF.GT.100) NIOBF=100
LEN2=NIOBF*(SEC2I(1)/INTOWP(1))
C WRITE (JOUT,*) ' ******* BEFORE SORT2 *******'
C WRITE (JOUT,*) ' LEN2=',LEN2
C WRITE (JOUT,*) ' LENGTH=',LENGTH
C WRITE (JOUT,*) ' NBUCK=',NBUCK
SPACE2=MAXCOR-LEN2-3*NBF*NBFAO-J2
. -(MAXBKT+1)/INTOWP(1)
IF (NTRIAO*ITRI.GT.SPACE2) THEN
LEN2=LEN2-(NTRIAO*ITRI-SPACE2)
NIOBF=INTOWP(LEN2)/SEC2I(1)
LEN2=NIOBF*(SEC2I(1)/INTOWP(1))
WRITE (JOUT,*) ' LEN2=',LEN2
SPACE2=MAXCOR-LEN2-3*NBF*NBFAO-J2
. -(MAXBKT+1)/INTOWP(1)
END IF
IF (SPACE2.GT.NTRI*NTRIAO) SPACE2=NTRI*NTRIAO
IF (INTBUF.GT.LEN2) THEN
WRITE (JOUT,121)
STOP
END IF
C
C WRITE (JOUT,*) ' K1=',K1
N1=J2
C WRITE (JOUT,*) ' N1=',N1
IN1=WPADTI(N1)
C WRITE (JOUT,*) ' IN1=',IN1
N2=IADTWP(IN1+MAXBKT)
C WRITE (JOUT,*) ' N2=',N2
IN2=WPADTI(N2)
C WRITE (JOUT,*) ' IN2=',IN2
N3=N2+LEN2*NBUCK
C WRITE (JOUT,*) ' N3=',N3
IN3=WPADTI(N3)
C WRITE (JOUT,*) ' IN3=',IN3
NTOP=N3+LENGTH-1
C WRITE (JOUT,*) ' NTOP=',NTOP
CALL ZERO(CORE(N1),MAXCOR-N1)
CALL SORT2(ITAP77,ITAP78,CORE(N3),ICORE(IN3),LENGTH,CORE(N2),
. ICORE(IN2),NBUCK*LEN2,ITRI,ICORE(IN1),MAXBKT,
. JOUT,NBUCK,NIOBF,LEN2,JBUF,MAXVAL)
C
CALL RCLOSE(ITAP78,4)
CALL RFILE(ITAP78)
N6=N2
C WRITE (JOUT,*) ' N6=',N6
N7=N6+SPACE2
C WRITE (JOUT,*) ' N7=',N7
IN7=WPADTI(N7)
C WRITE (JOUT,*) ' IN7=',IN7
N8=N7+LEN2
C WRITE (JOUT,*) ' N8=',N8
N9=N8+NBFAO*NBFAO
C WRITE (JOUT,*) ' N9=',N9
N10=N9+NBFAO*NBFAO
C WRITE (JOUT,*) ' N10=',N10
NTOP=N10+NBFAO*NBFAO-1
C WRITE (JOUT,*) ' SECOND NTOP=',NTOP
CALL ZERO(CORE(N6),MAXCOR-N6)
JBUF=0
DO 111 I=1,NBUCK
C WRITE (JOUT,*) ' LEN2=',LENGTH
C WRITE (JOUT,*) ' SPACE2=',SPACE2
C WRITE (JOUT,*) ' MAXBKT=',MAXBKT
CALL BCKCHN(ICORE(IN1),I,ITAP77,CORE(N7),ICORE(IN7),LEN2,
. MAXBKT,MAXVAL,CORE(N6),SPACE2,NTRIAO,JOUT,ITRI)
NTRIMX=ITRI
IF ((I.EQ.NBUCK).AND.(MODTRI.NE.0)) NTRIMX=MODTRI
IFLAG=1
CALL SETMBF(N8,N7+INTBUF)
CALL SETMBF(N9,N8+NBFAO*NBFAO)
CALL SETMBF(N10,N9+NBFAO*NBFAO)
CALL SETMBF(NTOP,N10+NBFAO*NBFAO)
C WRITE(*,*) ' THIRD NTOP = ',NTOP
CALL HTRANS(CORE(N8),CORE(N9),CORE(N10),CORE(N6),
. CORE(N7),ICORE(IN7),
. SPACE2,INTBUF,NBFAO,CORE(K1),NBFAO,NBF,JOUT,NTRI
. ,NTRI,IFLAG,ISORT,ITAP78,NTRIMX,I,ITRI,JBUF,
. NBUCK,ICORE(KORBSM),ICORE(KFLOV),NIRRED,ICORE(K3),
. NSYMHF,ICORE(KKLPT),ICORE(KIJPT),NTRI,ICORE(KTPO),
. ICORE(KOFF1),ICORE(KOFF2),NO)
CALL ZERO(CORE(N6),MAXCOR-N6)
111 CONTINUE
CALL RCLOSE(ITAP77,4)
C END IF
I1=J2
C WRITE (JOUT,*) ' I1=',I1
II1=WPADTI(I1)
C WRITE (JOUT,*) ' II1=',II1
I2=I1+INTBUF
C WRITE (JOUT,*) ' I2=',I2
I3=I2+NBFAO*NBFAO
C WRITE (JOUT,*) ' I3=',I3
I4=I3+NBFAO*NBFAO
C WRITE (JOUT,*) ' I4=',I4
ITOP=I4+NBFAO*NBFAO-1
C WRITE (JOUT,*) ' ITOP=',ITOP
C
CALL ZERO(CORE(I1),MAXCOR-I1)
C WRITE (JOUT,*) ' ENTERING HTRANS'
ISORT=1
IFLAG=1
CALL HTRANS(CORE(I2),CORE(I3),CORE(I4),CORE(J1),
. CORE(I1),ICORE(II1),NTRIAO
. *1,INTBUF,NBFAO,CORE(K1),NBFAO,NBF,JOUT,1,1,IFLAG,
. ISORT,ITAP78,1,1,1,JBUF,1,ICORE(KORBSM),ICORE(KFLOV),
. NIRRED,ICORE(K3),NSYMHF,ICORE(KKLPT),ICORE(KIJPT),NTRI,
. ICORE(KTPO),ICORE(KOFF1),ICORE(KOFF2),NO)
C WRITE (JOUT,1)
C WRITE (JOUT,2)
C WRITE (JOUT,*) ' ************ TINTS *************'
C WRITE (JOUT,2)
C WRITE (JOUT,1)
C CALL PRINT(CORE(I1),NTRI,NBF,JOUT)
C DO 13 I=317,421
C WRITE (JOUT,*) I,CORE(I)
C 13 CONTINUE
C
C CALL WRINTS(ITAP71,CORE(I1),NTRI,IAD)
C WRITE (JOUT,*) ' IAD=',IAD
C CALL REINTS(ITAP71,CORE(ITOP),NTRI,JOUT,IAD)
C
CALL RCLOSE(ITAP30,3)
CALL RCLOSE(ITAP78,3)
C WRITE (JOUT,*) ' CALLED RCLOSE TAPE 78'
CALL TSTOP(6)
C
END
C ********************
C -------------------------****** HTRANS ******------------------------
C ********************
C
SUBROUTINE HTRANS(X,XTP,X1,RINTS,TINTS,ITINTS,NDIM,LDIM,XDIM,
. EIV,NBFAO,NBF,JOUT,NTRI1,NTRI2,IFLAG,ISORT,
. ITAP78,NTRIMX,IBKT,ITRI,JBUF,NBKT,ORBSYM,FLOV,
. NIRRED,NLAMDA,NSYMHF,KLPNT,IJPNT,NTRI,PTOCC,
. IOFF1,IOFF2,NO)
C
C THIS SUBROUTINE PERFORMS A HALF TRANSFORMATION OF ATOMIC (SYMMETRY)
C ORBITALS TO MOLECULAR ORBITALS. RINTS IS THE REAL*8 ARRAY CONTAINING
C THE INTEGRALS TO BE TRANSFORMED, TINTS IS THE REAL*8 ARRAY CONTAINING
C THE TRANSFORMED INTS, X & XTP ARE BUFFER ARRAYS, AND NDIM & LDIM ARE
C THE DIMENSIONS OF THE INTEGRAL ARRAYS.
C
IMPLICIT REAL*8 (A-H,O-Z)
INTEGER XDIM,FK,FL,FMU,FNU,FI,FJ,FFJ
REAL*8 RINTS(NDIM),TINTS(LDIM),XTP(XDIM,XDIM),X1(XDIM,XDIM),
. X(XDIM,XDIM),EIV(NBFAO,NBF)
INTEGER ITINTS(2*LDIM),ORBSYM(NBF),FLOV(NIRRED,2),NLAMDA(NSYMHF),
. KLPNT(NTRI),IJPNT(NTRI),PTOCC(NBF),IOFF1(NTRI),
. IOFF2(NTRI)
COMMON/PAKQ/I1,I2,I3
COMMON/SIGNS/IOFF(256),IPRNT
DATA ITEMP /255/
1 FORMAT (' ')
2 FORMAT ('************************************************')
29 FORMAT (2I3,F20.12)
39 FORMAT (4I3,F20.12)
KOUT=8
R0=1.0D-15
C WRITE(JOUT,*)
C WRITE(JOUT,*) ' THE SCF EIGENVECTORS IN HTRANS '
C WRITE(JOUT,*)
C CALL MATOUT (EIV,NBFAO,NBF,NBFAO,NBF,JOUT)
C WRITE (JOUT,*) ' LDIM=',LDIM
C WRITE (JOUT,7) ISORT
C WRITE (JOUT,17) IFLAG
CALL ZERO(TINTS,LDIM)
C WRITE (JOUT,7) ISORT
C WRITE (JOUT,17) IFLAG
7 FORMAT (' ISORT=',I2)
17 FORMAT (' IFLAG=',I2)
18 FORMAT (' ITINTS(',I4,')=',I8,'(',I3,',',I3,') TINTS(',I4,')=',
# E20.10)
19 FORMAT (2I5,F20.12)
72 FORMAT (F20.12)
C WRITE (JOUT,*) ' LDIM=',LDIM
INTLEN=(INTOWP(LDIM)-2)/INTOWP(1)
MAXINT=INTOWP(INTLEN)/(1+INTOWP(1))
C WRITE (JOUT,*) ' MAXINT=',MAXINT
CTJL IVOFF=(MAXINT+2)/INTOWP(1)
IVOFF=(MAXINT+3)/INTOWP(1)
ICNTR=1
C WRITE (JOUT,*) ' ICNTR=',ICNTR
ITRUF=ITRI*(IBKT-1)+1
FI=IOFF1(ITRUF)
FJ=IOFF2(ITRUF)
ITRUL=ITRUF+NTRIMX-1
LI=IOFF1(ITRUL)
LJ=IOFF2(ITRUL)
C INBF=NBFAO
C IF (IFLAG.EQ.1) INBF=NBF
JTRI=0
C WRITE (JOUT,*) ' FI,LI',FI,LI
DO 10 I=FI,LI
ISYM=ORBSYM(I)
FFJ=1
LLJ=I
IF (I.EQ.FI) FFJ=FJ
IF (I.EQ.LI) LLJ=LJ
C WRITE (JOUT,*) ' FFJ,LLJ',FFJ,LLJ
DO 10 J=FFJ,LLJ
JTRI=JTRI+1
C WRITE (JOUT,*) ' I,J,JTRI',I,J,JTRI
C IF (JTRI.GT.NTRIMX) GOTO 500
JSYM=ORBSYM(J)
IJSYM=IEOR(ISYM,JSYM)
INDR=NTRI1*(JTRI-1)+1
C WRITE (JOUT,*) ' JTRI=',JTRI
CALL SQUR(RINTS(INDR),X,XDIM)
C WRITE (JOUT,*) ' SQUARED RINTS INTO X'
CALL ZERO(XTP,XDIM*XDIM)
C WRITE (JOUT,*) ' ZEROED XTP'
CALL ZERO(X1,XDIM*XDIM)
C WRITE (JOUT,*) ' ZEROED X1'
C IF (JTRI.EQ.1) THEN
C WRITE (JOUT,*) ' ****************** X ****************'
C CALL MATOUT(X,XDIM,XDIM,XDIM,XDIM,JOUT)
C WRITE (JOUT,*) ' ****************** XTP ****************'
C CALL MATOUT(XTP,XDIM,XDIM,XDIM,XDIM,JOUT)
C WRITE (JOUT,*) ' ****************** EIV ****************'
C CALL MATOUT(EIV,NBFAO,NBF,NBFAO,NBF,JOUT)
C END IF
C WRITE (JOUT,*) ' NIRRED=',NIRRED
DO 13 KIRRED=1,NIRRED
C WRITE (JOUT,*) ' KIRRED=',KIRRED
KSYM=KIRRED-1
FK=FLOV(KSYM+1,1)
C WRITE (JOUT,*) ' FK=',FK
LK=FLOV(KSYM+1,2)
C WRITE (JOUT,*) ' LK=',LK
NUMK=LK-FK+1
C WRITE (JOUT,*) ' NUMK=',NUMK
NUMMU=NUMK
FMU=FK
C WRITE (JOUT,*) ' FMU=',FMU
LMU=LK
C WRITE (JOUT,*) ' LMU=',LMU
LSYM=IEOR(KSYM,IJSYM)
LIRRED=LSYM+1
C WRITE (JOUT,*) ' LIRRED=',LIRRED
FL=FLOV(LSYM+1,1)
C WRITE (JOUT,*) ' FL=',FL
LL=FLOV(LSYM+1,2)
C WRITE (JOUT,*) ' LL=',LL
NUML=LL-FL+1
C WRITE (JOUT,*) ' NUML=',NUML
NUMNU=NUML
FNU=FL
C WRITE (JOUT,*) ' FNU=',FNU
LNU=LL
C WRITE (JOUT,*) ' LNU=',LNU
IF (FK.EQ.0.OR.FL.EQ.0) GOTO 13
CALL ZERO(XTP,XDIM*XDIM)
CALL MXMB(EIV(FMU,FK),NBFAO,1,X(FMU,FNU),1,
. XDIM,XTP(FK,FNU),1,XDIM,NUMK,NUMMU,NUMNU)
C WRITE (JOUT,*) ' MATRIX MULTIPLIED EIV * X'
C IF (JTRI.EQ.1) THEN
C WRITE (JOUT,*) ' ****************** XTP ****************'
C CALL MATOUT(XTP,XDIM,XDIM,XDIM,XDIM,JOUT)
C END IF
CALL MXMB(XTP(FK,FNU),1,XDIM,EIV(FNU,FL),1,NBFAO,
. X1(FK,FL),1,XDIM,NUMK,NUMNU,NUML)
C WRITE (JOUT,*) ' MATRIX MULTIPLIED XTP * EIV'
C IF (JTRI.EQ.1) THEN
C WRITE (JOUT,*) ' ****************** X1 ****************'
C CALL MATOUT(X1,XDIM,XDIM,XDIM,XDIM,JOUT)
C END IF
13 CONTINUE
C IF (JTRI.EQ.1) CALL MATOUT(X1,XDIM,XDIM,XDIM,XDIM,JOUT)
KL=0
C WRITE (JOUT,*) ' BEFORE WRITING INTS'
IF (ISORT.EQ.1) THEN
IF (IFLAG.EQ.2) THEN
DO 20 K=1,NBF
DO 30 L=1,K
KL=KL+1
INDT2=NTRI2*(KL-1)+JTRI
TINTS(INDT2)=X1(K,L)
30 CONTINUE
20 CONTINUE
ELSE
C WRITE (JOUT,*) 'IJ=',JTRI
DO 40 K=1,NBF
DO 50 L=1,K
KL=KL+1
IF (DABS(X1(K,L)).GT.RO) THEN
IF (ICNTR.GT.MAXINT) THEN
CALL WRINTS(ITAP78,TINTS,LDIM,ISCTR)
JBUF=JBUF+1
CALL ZERO (TINTS,LDIM)
ICNTR=1
C WRITE (JOUT,*) ' ICNTR=',ICNTR
END IF
KCC=PTOCC(K)
LCC=PTOCC(L)
ITMPX=MAX0(KCC,LCC)
ITMPN=MIN0(KCC,LCC)
KCC=ITMPX
LCC=ITMPN
LBL=IOR(LCC,ISHFT(KCC,8))
C INDT1=NTRI2*(JTRI-1)+KL
ITINTS(1)=0
ITINTS(2)=ICNTR
ITINTS(ICNTR+2)=LBL
TINTS(IVOFF+ICNTR)=X1(K,L)
ICNTR=ICNTR+1
C WRITE (JOUT,*) ' ICNTR=',ICNTR
END IF
50 CONTINUE
40 CONTINUE
ITINTS(1)=-1
CALL WRINTS(ITAP78,TINTS,LDIM,ISCTR)
C CALL PRINT(TINTS(INDR),NTRI2,NBF,JOUT)
END IF
ELSE
IF (IFLAG.EQ.2) THEN
C ILOOP=1
DO 22 K=1,NBF
DO 32 L=1,K
KL=KL+1
IF (DABS(X1(K,L)).GT.R0) THEN
IF (ICNTR.GT.MAXINT) THEN
CALL RGETSA(ITAP78,IAD)
C WRITE (JOUT,1)
C WRITE (JOUT,2)
C WRITE (JOUT,*)' ****** TAPE78 DUMP ******'
C WRITE (JOUT,2)
C WRITE (JOUT,1)
C IADHLD=IAD
C WRITE(JOUT,*) ' IAD=',IAD
CALL WRINTS (ITAP78,TINTS,LDIM,ISECTR)
JBUF=JBUF+1
CALL ZERO (TINTS,LDIM)
C WRITE (JOUT,1)
C WRITE (JOUT,2)
C WRITE (JOUT,*)' ****** TINTS DUMP ******'
C WRITE (JOUT,2)
C WRITE (JOUT,1)
C CALL RSETSA(ITAP78,IADHLD)
C WRITE (JOUT,*) ' IADHLD=',IADHLD
C CALL SREAD(ITAP78,TINTS,INTOWP(LDIM))
C DO 53 JQ=1,MAXINT
C I3=ITINTS(JQ)
C CALL UNPAK
C QINT=TINTS(JQ+IVOFF)
C WRITE (JOUT,18) JQ,I3,I1,I2,JQ+IVOFF,QINT
C 53 CONTINUE
ICNTR=1
C WRITE (JOUT,*) ' ICNTR=',ICNTR
C ILOOP=ILOOP+1
END IF
I1=KL
I2=JTRI+ITRI*(IBKT-1)
CALL PAK
ITINTS(1)=0
ITINTS(2)=ICNTR
ITINTS(ICNTR+2)=I3
TINTS(IVOFF+ICNTR)=X1(K,L)
ICNTR=ICNTR+1
C WRITE (JOUT,*) ' ICNTR=',ICNTR
C WRITE (JOUT,18) ICNTR,ITINTS(ICNTR+2),I1,I2,IVOFF+ICNTR,
C . TINTS(IVOFF+ICNTR)
END IF
32 CONTINUE
22 CONTINUE
ELSE
C WRITE (JOUT,*) ' BEFORE 42'
DO 42 K=1,NBF
DO 52 L=1,K
C WRITE (JOUT,*) ' K,L=',K,L
KL=KL+1
IF (DABS(X1(K,L)).GT.R0) THEN
IF (ICNTR.GT.MAXINT) THEN
C CALL RGETSA(ITAP78,IAD)
C WRITE (JOUT,*) ' IAD=',IAD
C WRITE (JOUT,1)
C WRITE (JOUT,2)
C WRITE (JOUT,*)' ****** TINTS DUMP ******'
C WRITE (JOUT,2)
C WRITE (JOUT,1)
C DO 63 JQ=1,MAXINT
C I3=ITINTS(JQ+2)
C CALL UNPAK
C PINT=TINTS(JQ+IVOFF)
C WRITE (JOUT,18) JQ,I3,I1,I2,JQ+IVOFF,PINT
C 63 CONTINUE
CALL WRINTS (ITAP78,TINTS,LDIM,ISECTR)
JBUF=JBUF+1
CALL ZERO (TINTS,LDIM)
ICNTR=1
C WRITE (JOUT,*) ' ICNTR=',ICNTR
END IF
I1=KL
I2=JTRI+ITRI*(IBKT-1)
IF (I1.GE.I2) THEN
ICC=PTOCC(I)
JCC=PTOCC(J)
KCC=PTOCC(K)
LCC=PTOCC(L)
ITMPX=MAX0(ICC,JCC)
ITMPN=MIN0(ICC,JCC)
ICC=ITMPX
JCC=ITMPN
ITMPX=MAX0(KCC,LCC)
ITMPN=MIN0(KCC,LCC)
KCC=ITMPX
LCC=ITMPN
IJCC=IOFF(ICC)+JCC
KLCC=IOFF(KCC)+LCC
ITMPX=MAX0(IJCC,KLCC)
ITMPN=MIN0(IJCC,KLCC)
IJCC=ITMPX
KLCC=ITMPN
ICC=IOFF1(IJCC)
JCC=IOFF2(IJCC)
KCC=IOFF1(KLCC)
LCC=IOFF2(KLCC)
IJKL=IOR(JCC,ISHFT(ICC,8))
IJKL=IOR(KCC,ISHFT(IJKL,8))
IJKL=IOR(LCC,ISHFT(IJKL,8))
C CALL PAK
ITINTS(1)=0
ITINTS(2)=ICNTR
ITINTS(ICNTR+2)=IJKL
TINTS(IVOFF+ICNTR)=X1(K,L)
C IF (KCC.GT.NO.AND.JCC.LE.NO.AND.LCC.LE.NO)
C . WRITE (JOUT,39) ICC,JCC,KCC,LCC,TINTS(IVOFF+ICNTR)
C WRITE (JOUT,29) I1,I2,TINTS(IVOFF+ICNTR)
ICNTR=ICNTR+1
C WRITE (JOUT,*) ' ICNTR=',ICNTR
END IF
END IF
52 CONTINUE
42 CONTINUE
END IF
END IF
10 CONTINUE
500 IF (ISORT.EQ.2) THEN
IF ((IBKT.EQ.NBKT).AND.(IFLAG.EQ.1)) ITINTS(1)=-1
CALL WRINTS (ITAP78,TINTS,LDIM,ISCTR)
C WRITE (JOUT,*) ' ICNTR=',ITINTS(2)
JBUF=JBUF+1
C IF ((IBKT.EQ.NBKT).AND.(IFLAG.EQ.1)) THEN
C CALL SREW(ITAP78)
C DO 33 IQ=1,JBUF
WRITE (JOUT,*) ' JBUF=',IQ
C CALL ZERO(TINTS,LDIM)
C CALL SREAD(ITAP78,TINTS,INTOWP(LDIM))
C WRITE (JOUT,*) ' IFLG=',ITINTS(1)
C CALL SETMBF(MBUF,ITINTS(2))
C DO 43 JQ=1,MBUF
C IJKL=ITINTS(JQ+2)
C I=ISHFT(IJKL,-24)
C J=IAND(ITEMP,ISHFT(IJKL,-16))
C K=IAND(ITEMP,ISHFT(IJKL,-8))
C L=IAND(ITEMP,IJKL)
C QINT=TINTS(IVOFF+JQ)
C WRITE (JOUT,*) I,J,K,L,QINT
C 43 CONTINUE
C 33 CONTINUE
C END IF
END IF
RETURN
END
C
C ********************
C----------------------------****** WRINTS ******--------------------
C ********************
C
SUBROUTINE WRINTS (IDISK,MOINTS,LENINT,IAD)
IMPLICIT REAL*8 (A-H,O-Z)
REAL*8 MOINTS(LENINT)
CALL RGETSA(IDISK,IAD)
CALL SWRIT (IDISK,MOINTS,INTOWP(LENINT))
RETURN
END
C
C ********************
C----------------------------****** REINTS ******--------------------
C ********************
C
SUBROUTINE REINTS (IDISK,MOINTS,LENINT,IDIM,JOUT,IAD)
IMPLICIT REAL*8 (A-H,O-Z)
REAL*8 MOINTS(LENINT)
CALL RSETSA(IDISK,IAD)
CALL SREAD (IDISK,MOINTS,INTOWP(LENINT))
CALL MATOUT(MOINTS,IDIM,IDIM,IDIM,IDIM,JOUT)
RETURN
END
C
C ********************
C----------------------------****** SQUR ******-----------------------
C ********************
C
SUBROUTINE SQUR(T,SQ,N)
IMPLICIT REAL*8 (A-H,O-Z)
DIMENSION SQ(2),T(2)
IJ=0
II=0
DO 20 I=1,N
JJ=0
DO 10 J=1,I
IJ=IJ+1
SQ(II+J)=T(IJ)
SQ(JJ+I)=T(IJ)
10 JJ=JJ+N
20 II=II+N
RETURN
END
C
C **********************
C-------------------------****** READ34 ******-----------------------
C **********************
C
SUBROUTINE READ34(H,S,T,V,STVI,LBLI,IBUFHF,ITAP34,JOUT)
IMPLICIT REAL*8 (A-H,O-Z)
CHARACTER*4 BLABEL(20)
INTEGER ND(10),MNL(142),MS(142),MTYPE(2,20),ITYP(20)
COMMON/BASIS/NBASIS,MTRI,NSYM
COMMON/SIGNS/IOFF(256),IPRNT
COMMON/SYMMS/IDEG(10),NDEG(10),LSYM(10)
DIMENSION S(MTRI),H(MTRI),T(MTRI),V(MTRI)
DIMENSION LBLI(IBUFHF*2),STVI(IBUFHF)
C
IPRNT=0
C
IOFF(1)=0
DO 101 I=1,255
101 IOFF(I+1)=IOFF(I)+I
C
C READ IN INTEGRAL INFORMATION FROM 34 FILE
CALL RFILE(ITAP34)
CALL WREADW(ITAP34,NKIND,1,1,IEND)
C WRITE (JOUT,*) ' NKIND=',NKIND
CALL WREADW(ITAP34,ICLOS,1,IEND,IEND)
C WRITE (JOUT,*) ' ICLOS=',ICLOS
CALL WREADW(ITAP34,BLABEL,20,IEND,IEND)
C WRITE (JOUT,*) ' BLABEL=',BLABEL
CALL WREADW(ITAP34,ENUC,2,IEND,IEND)
C WRITE (JOUT,*) ' ENUC=',ENUC
CALL WREADW(ITAP34,NST,1,IEND,IEND)
C WRITE (JOUT,*) ' NST=',NST
CALL WREADW(ITAP34,ND,NST,IEND,IEND)
C WRITE (JOUT,*) ' ND=',ND
CALL WREADW(ITAP34,ITYP,NST,IEND,IEND)
C WRITE (JOUT,*) ' ITYP=',ITYP
CALL WREADW(ITAP34,NDEG,NST,IEND,IEND)
C WRITE (JOUT,*) ' NDEG=',NDEG
CALL WREADW(ITAP34,NS,1,IEND,IEND)
C WRITE (JOUT,*) ' NS=',NS
CALL WREADW(ITAP34,MTYPE,2*NS,IEND,IEND)
C WRITE (JOUT,*) ' MTYPE=',MTYPE
CALL WREADW(ITAP34,LAPU,1,IEND,IEND)
C WRITE (JOUT,*) ' LAPU=',LAPU
CALL WREADW(ITAP34,MS,LAPU,IEND,IEND)
C WRITE (JOUT,*) ' MS=',MS
CALL WREADW(ITAP34,MNL,LAPU,IEND,IPARA)
ITOT=25+INTOWP(1)+2*NS+3*NST+2*LAPU
ISADR=I2SEC(ITOT)+1
CALL RSETSA(ITAP34,ISADR)
CALL RGETSA(ITAP34,IJUNK)
C WRITE(*,*) ' TAPE 34 POSITIONED AT SECTOR ',IJUNK
C
NSYM=0
NBASIS=0
DO 102 I=1,NST
IF(NDEG(I).GT.0) NSYM=NSYM+1
NBASIS=NBASIS+NDEG(I)
102 CONTINUE
IDEG(1)=0
LSYM(1)=0
IF(NSYM.EQ.1) GO TO 203
II=0
DO 103 I=2,NST
IF(NDEG(I).LE.0) GO TO 202
201 II=II+1
NN=NDEG(II)
IF(NN.EQ.0) GO TO 201
IDEG(I)=IDEG(I-1)+NN
LSYM(I)=LSYM(I-1)+IOFF(NN+1)
GO TO 103
202 LSYM(I)=LSYM(I-1)
IDEG(I)=IDEG(I-1)
103 CONTINUE
203 CONTINUE
C WRITE(*,*) ' NSYM,IBUFHF,MTRI',NSYM,IBUFHF,MTRI
C WRITE(*,*) ' IDEG = ',IDEG
C
C CREATE SO INTEGRAL FILES
C WRITE(3,21)
C 21 FORMAT(//,2X,' NOW YOU ARE IN RDONE'/)
C IBUFHF=4471
CALL RDONE(S,H,T,V,LBLI,STVI,IBUFHF,ITAP34,JOUT)
C
RETURN
END
C
C *********************
C-------------------------****** RDONE ******-----------------------
C *********************
C
SUBROUTINE RDONE(S,H,T,V,LBLI,STVI,INBUFS,ITAP34,JOUT)
IMPLICIT REAL*8 (A-H,O-Z)
DIMENSION S(MTRI),H(MTRI),T(MTRI),V(MTRI)
DIMENSION LBLI(INBUFS*2),STVI(INBUFS)
COMMON/BASIS/NBASIS,MTRI,NSYM
COMMON/SIGNS/IOFF(256),IPRNT
1 FORMAT(//,2X,' S MATRIX'/)
2 FORMAT(//,2X,' T MATRIX'/)
3 FORMAT(//,2X,' V MATRIX'/)