-
Notifications
You must be signed in to change notification settings - Fork 0
/
CENT3A.FORT11
3098 lines (3097 loc) · 111 KB
/
CENT3A.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 THIRD DERIVATIVE PROGRAM PART 4 : "CENT3A" *
C**********************************************************************
C
C**********************************************************************
C* NOTICE OF PROGRAM MODIFICATION *
C**********************************************************************
c Moved to PSI distribution disk on 020389 - clj.
C**********************************************************************
C* BY: RICHARD REMINGTON search: c7-14-88 *
C* DATE: July 14, 1988 *
C* REASON: Migration to run in 7Mb on 9370 *
C**********************************************************************
C *
C LAST UPDATED ON NOVEMBER 26, 1985 BY YUKIO YAMAGUCHI *
C *
C######################################################################
C *
C CENTER 1 AND 2 DERIVATIVES ARE CALCULATED *
C *
C######################################################################
SUBROUTINE CENT12(GT,GU,GV,XX0,XY0,XZ0,XXFIR,XYFIR,XZFIR
*, XXSEC,XYSEC,XZSEC,XXMXFF,XYMXFF,XZMXFF,GMXFIR
*, GMXSEC,GMXFF,LO,XXTHR,XYTHR,XZTHR
*, XXFFF,XYFFF,XZFFF,XXFSMX,XYFSMX,XZFSMX,GMXTHR
*, GMXFFF,GMXFS)
IMPLICIT REAL*8 (A-H,O-Z)
INTEGER GSPOT
LOGICAL BOTH1,BOTH2,DO1,DO2,DO6
LOGICAL EQUAL1,EQUAL2,EQUAL3,EQUAL4,EQUAL5
DIMENSION YX(8,14),YY(8,14),YZ(8,14)
DIMENSION GT(I4LARL,I2LARL),GU(I4LARL,I2LARL)
DIMENSION GV(I4LARL,I2LARL)
DIMENSION ITEST(10)
DIMENSION YYX(8,18),YYY(8,18),YYZ(8,18)
DIMENSION XX0(IANGSQ,IANGSQ),XY0(IANGSQ,IANGSQ),XZ0(IANGSQ,IANGSQ)
DIMENSION XXFIR(IANGSQ,IANGSQ,3),XYFIR(IANGSQ,IANGSQ,3)
DIMENSION XZFIR(IANGSQ,IANGSQ,3),XXSEC(IANGSQ,IANGSQ,3)
DIMENSION XYSEC(IANGSQ,IANGSQ,3),XZSEC(IANGSQ,IANGSQ,3)
DIMENSION XXMXFF(IANGSQ,IANGSQ,3),XYMXFF(IANGSQ,IANGSQ,3)
DIMENSION XZMXFF(IANGSQ,IANGSQ,3),GMXFIR(IMEM4,3,3)
DIMENSION GMXSEC(IMEM4,6,3),GMXFF(IMEM4,9,3)
DIMENSION LO(IMEM4*5)
DIMENSION XXTHR(IANGSQ,IANGSQ,3),XYTHR(IANGSQ,IANGSQ,3)
*, XZTHR(IANGSQ,IANGSQ,3),XXFFF(IANGSQ,IANGSQ)
*, XYFFF(IANGSQ,IANGSQ),XZFFF(IANGSQ,IANGSQ)
DIMENSION XXFSMX(IANGSQ,IANGSQ,6),XYFSMX(IANGSQ,IANGSQ,6)
*, XZFSMX(IANGSQ,IANGSQ,6)
DIMENSION GMXTHR(IMEM4,10,3),GMXFFF(IMEM4,27),GMXFS(IMEM4,18,6)
COMMON/CALQN/ISTYPE,ICTYPE,NDERIV,NTYPES,NBSET
COMMON/EINFO/IPLACE(49),ISAME(49)
COMMON/EXYZS/EX(686),EY(686),EZ(686)
COMMON/FILES/IOUT,INPUT,IDBG
COMMON/IPAR1/NS,N3N,I2N3N,I3N3N
COMMON/IPAR2/NBFAO,NUMIJ,NUMNUM
COMMON/IPAR4/IMEM,IMEM2,IMEM4
COMMON/IPAR5/IANG,IANGSQ,LARGL,LARGL2,I2LARL,I4LARL
COMMON/LOGIC/EQUAL1,EQUAL2,EQUAL3,EQUAL4,EQUAL5
COMMON/ORBIN/IORB1,JORB1,KORB1,LORB1,NUMI,NUMJ,NUMK,NUML
COMMON/PASS /II,JJ,KK,LL
COMMON/POSNS/IJX(50),IJY(50),IJZ(50),KLX(50),KLY(50),KLZ(50)
COMMON/SIGNS/IOFF(256),IPRNT
COMMON/TWINF/ISHELL,JSHELL,KSHELL,LSHELL
C
ISIZ= 7
ISIZ2= 14
ISIZ3= 21
IESZ=343
C
RETURN
C
ENTRY DER12(BOTH1,BOTH2,IQN,JQN,KQN,LQN,IGCNT,NROOT0,AA,BB,CC,DD,
*ITEST)
C
AA2=AA + AA
BB2=BB + BB
A4=AA2 * AA2
B4=B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,IROOT)
YZ2B1=YZ2B1 + EZ(ISPOT)*GV(GSPOT,IROOT)
C
IF(JNO .GT. 2) THEN
IF(IJ .LE. ITM2) THEN
ISPOT=IM0M2 + IJM1*I2M0M2
YX2B2=YX2B2 + EX(ISPOT)*GT(GSPOT,IROOT)
YY2B2=YY2B2 + EY(ISPOT)*GU(GSPOT,IROOT)
YZ2B2=YZ2B2 + EZ(ISPOT)*GV(GSPOT,IROOT)
END IF
END IF
C
END IF
C
C CENTER 1 AND CENTER 2 MIXED DERIVATIVES
C
IF(DO6) THEN
ISPOT=IP1P1 + IJM1*I2P1P1
YXAB1=YXAB1 + EX(ISPOT)*GT(GSPOT,IROOT)
YYAB1=YYAB1 + EY(ISPOT)*GU(GSPOT,IROOT)
YZAB1=YZAB1 + EZ(ISPOT)*GV(GSPOT,IROOT)
C
IF(INO .GT. 1) THEN
IF(IJ .LE. IT) THEN
ISPOT=IM1P1 + IJM1*I2M1P1
YXAB2=YXAB2 + EX(ISPOT)*GT(GSPOT,IROOT)
YYAB2=YYAB2 + EY(ISPOT)*GU(GSPOT,IROOT)
YZAB2=YZAB2 + EZ(ISPOT)*GV(GSPOT,IROOT)
C
IF(JNO .GT. 1) THEN
IF(IJ .LE. ITM2) THEN
ISPOT=IM1M1 + IJM1*I2M1M1
YXAB3=YXAB3 + EX(ISPOT)*GT(GSPOT,
* IROOT)
YYAB3=YYAB3 + EY(ISPOT)*GU(GSPOT,
* IROOT)
YZAB3=YZAB3 + EZ(ISPOT)*GV(GSPOT,
* IROOT)
END IF
END IF
END IF
END IF
C
IF(JNO .GT. 1) THEN
IF(IJ .LE. IT) THEN
ISPOT=IP1M1 + IJM1*I2P1M1
YXAB4=YXAB4 + EX(ISPOT)*GT(GSPOT,IROOT)
YYAB4=YYAB4 + EY(ISPOT)*GU(GSPOT,IROOT)
YZAB4=YZAB4 + EZ(ISPOT)*GV(GSPOT,IROOT)
END IF
END IF
C
END IF
170 CONTINUE
C
C THIRD DERIVATIVES
C
IF(DO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Z(IESZ+KSPOT)*CONST
C
XXX1=XXX1 + YX(KL,1)*EXCNST
XYY1=XYY1 + YY(KL,1)*EYCNST
XZZ1=XZZ1 + YZ(KL,1)*EZCNST
C
C CENTER 1 FIRST, SECOND AND THIRD DERIVATIVES
C
IF(DO1) THEN
XXX2=XXX2 + YX(KL,2)*EXCNST
XYY2=XYY2 + YY(KL,2)*EYCNST
XZZ2=XZZ2 + YZ(KL,2)*EZCNST
C
XXX3=XXX3 + YX(KL,3)*EXCNST
XYY3=XYY3 + YY(KL,3)*EYCNST
XZZ3=XZZ3 + YZ(KL,3)*EZCNST
C
XXX9=XXX9 + YX(KL,9)*EXCNST
XYY9=XYY9 + YY(KL,9)*EYCNST
XZZ9=XZZ9 + YZ(KL,9)*EZCNST
END IF
C
C CENTER 2 FIRST, SECOND, AND THIRD DERIVATIVES
C
IF(DO2) THEN
XXX4=XXX4 + YX(KL,4)*EXCNST
XYY4=XYY4 + YY(KL,4)*EYCNST
XZZ4=XZZ4 + YZ(KL,4)*EZCNST
C
XXX5=XXX5 + YX(KL,5)*EXCNST
XYY5=XYY5 + YY(KL,5)*EYCNST
XZZ5=XZZ5 + YZ(KL,5)*EZCNST
C
XXX10=XXX10 + YX(KL,10)*EXCNST
XYY10=XYY10 + YY(KL,10)*EYCNST
XZZ10=XZZ10 + YZ(KL,10)*EZCNST
END IF
C
C CENTERS 1 AND 2 MIXED DERIVATIVES
C
IF(DO6) THEN
XXX6=XXX6 + YX(KL,6)*EXCNST
XYY6=XYY6 + YY(KL,6)*EYCNST
XZZ6=XZZ6 + YZ(KL,6)*EZCNST
C
XXX11=XXX11 + YX(KL,11)*EXCNST
XYY11=XYY11 + YY(KL,11)*EYCNST
XZZ11=XZZ11 + YZ(KL,11)*EZCNST
C
XXX12=XXX12 + YX(KL,12)*EXCNST
XYY12=XYY12 + YY(KL,12)*EYCNST
XZZ12=XZZ12 + YZ(KL,12)*EZCNST
END IF
C
600 CONTINUE
IF(JN .GT. 9) WRITE(IOUT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IJORB=IOFF(MAX0(IORB,JORB)) + MIN0(IORB,JORB)
IJCNT=IJCNT + 1
JNX=IJX(IJCNT)
JNY=IJY(IJCNT)
JNZ=IJZ(IJCNT)
KLCNT=0
KORBMX=KORB1 -1 + NUMK
LORBMX=LORB1 -1 + NUML
IF(ISHELL .EQ. KSHELL) KORBMX=IORB
DO 3000 KORB=KORB1,KORBMX
IF(BOTH2) LORBMX=KORB
DO 2000 LORB=LORB1,LORBMX
KLORB=IOFF(MAX0(KORB,LORB)) + MIN0(KORB,LORB)
IJKL=IOFF(MAX0(IJORB,KLORB)) + MIN0(IJORB,KLORB)
IF(KLORB .GT. IJORB) GO TO 3000
C
ICNT=ICNT + 1
IF(ICNT .GT. IMEM4) WRITE(IOUT,*) ' ICNT = ',ICNT
KLCNT=KLCNT + 1
LNX=KLX(KLCNT)
LNY=KLY(KLCNT)
LNZ=KLZ(KLCNT)
C
C CENTER 1 DERIVATIVES
C
INT=0
IF(DO1) THEN
INT=INT+1
C
C FIRST DERIVATIVES
C
GMXFIR(ICNT,1,INT)= GMXFIR(ICNT,1,INT) +
* XXFIR(JNX,LNX,INT)*XY0(JNY,LNY)*XZ0(JNZ,LNZ)
GMXFIR(ICNT,2,INT)= GMXFIR(ICNT,2,INT) +
* XX0(JNX,LNX)*XYFIR(JNY,LNY,INT)*XZ0(JNZ,LNZ)
GMXFIR(ICNT,3,INT)= GMXFIR(ICNT,3,INT) +
* XX0(JNX,LNX)*XY0(JNY,LNY)*XZFIR(JNZ,LNZ,INT)
C
C SECOND DERIVATIVES
C
GMXSEC(ICNT,1,INT)= GMXSEC(ICNT,1,INT) +
* XXSEC(JNX,LNX,INT)*XY0(JNY,LNY)*XZ0(JNZ,LNZ)
GMXSEC(ICNT,2,INT)= GMXSEC(ICNT,2,INT) +
* XXFIR(JNX,LNX,INT)*XYFIR(JNY,LNY,INT)*XZ0(JNZ,LNZ)
GMXSEC(ICNT,3,INT)= GMXSEC(ICNT,3,INT) +
* XX0(JNX,LNX)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