-
Notifications
You must be signed in to change notification settings - Fork 0
/
CENT3B.FORT10
4225 lines (4224 loc) · 162 KB
/
CENT3B.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
C**********************************************************************
C THIRD DERIVATIVE PROGRAM PART 5 : "CENT3B"
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 2 AND 4 DERIVATIVES ARE CALCULATED *
C *
C######################################################################
SUBROUTINE CENT24(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
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 DER24(BOTH1,BOTH2,IQN,JQN,KQN,LQN,IGCNT,NROOT0,AA,BB,CC,DD,
*ITEST)
C
BB2=BB + BB
DD2=DD + DD
B4=BB2 * BB2
D4=DD2 * DD2
B8=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FIRST, SECOND, AND THIRD DERIVATIVES
C
IF(KL .GT. ITTFIR) GO TO 505
KSPOT=KP0P1 + KLM1*K2P0P1
XXD1=XXD1 + YX(KL,7)*EX(IESZ+KSPOT)*CONST
XYD1=XYD1 + YY(KL,7)*EY(IESZ+KSPOT)*CONST
XZD1=XZD1 + YZ(KL,7)*EZ(IESZ+KSPOT)*CONST
C
IF(LNO .GT. 1) THEN
IF(KL .LE. ITTM1) THEN
KSPOT=KM0M1 + KLM1*K2M0M1
XXD2=XXD2 + YX(KL,7)*EX(IESZ+KSPOT)*CONST
XYD2=XYD2 + YY(KL,7)*EY(IESZ+KSPOT)*CONST
XZD2=XZD2 + YZ(KL,7)*EZ(IESZ+KSPOT)*CONST
END IF
END IF
505 CONTINUE
C
IF(KL .GT. ITTSEC) GO TO 510
KSPOT=KP0P2 + KLM1*K2P0P2
XX2D1=XX2D1 + YX(KL,8)*EX(IESZ+KSPOT)*CONST
XY2D1=XY2D1 + YY(KL,8)*EY(IESZ+KSPOT)*CONST
XZ2D1=XZ2D1 + YZ(KL,8)*EZ(IESZ+KSPOT)*CONST
C
IF(LNO .GT. 2) THEN
IF(KL .LE. ITTM2) THEN
KSPOT=KM0M2 + KLM1*K2M0M2
XX2D2=XX2D2 + YX(KL,7)*EX(IESZ+KSPOT)*CONST
XY2D2=XY2D2 + YY(KL,7)*EY(IESZ+KSPOT)*CONST
XZ2D2=XZ2D2 + YZ(KL,7)*EZ(IESZ+KSPOT)*CONST
END IF
END IF
510 CONTINUE
C
KSPOT=KP0P3 + KLM1*K2P0P3
XX3D1=XX3D1 + YX(KL,13)*EX(IESZ+KSPOT)*CONST
XY3D1=XY3D1 + YY(KL,13)*EY(IESZ+KSPOT)*CONST
XZ3D1=XZ3D1 + YZ(KL,13)*EZ(IESZ+KSPOT)*CONST
C
C CENTERS 2 AND 4 MIXED DERIVATIVES
C
IF(KL .GT. ITTSEC) GO TO 600
C
IF(KL .LE. ITTFIR) THEN
KSPOT=KP0P1 + KLM1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