File: init_data.F

package info (click to toggle)
aces3 3.0.6-7
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 82,460 kB
  • sloc: fortran: 225,647; ansic: 20,413; cpp: 4,349; makefile: 953; sh: 137
file content (684 lines) | stat: -rw-r--r-- 24,072 bytes parent folder | download
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
C  Copyright (c) 2003-2010 University of Florida
C
C  This program is free software; you can redistribute it and/or modify
C  it under the terms of the GNU General Public License as published by
C  the Free Software Foundation; either version 2 of the License, or
C  (at your option) any later version.

C  This program is distributed in the hope that it will be useful,
C  but WITHOUT ANY WARRANTY; without even the implied warranty of
C  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
C  GNU General Public License for more details.

C  The GNU General Public License is included in this distribution
C  in the file COPYRIGHT.
      subroutine init_data() 
      implicit none
      include 'mpif.h'
      include 'int_gen_parms.h'
      include 'hess.h'
      include 'machine_types.h'
      include 'dbugcom.h'
      include 'trace.h'
      include 'dropmo.h'
      include 'sial_config_params.h'
#ifdef ALTIX
      include 'sheap.h'
#endif

      integer*8 c_loc64
      integer moa, mob
      integer ntemp

      integer i, j, n, ierr
      integer nalpha, npcoef
      integer dummy
      integer lnp1, lnpo
      integer ione
      integer          nfct(max_centers), nufct(max_centers)
      integer          naoatm(max_centers)
      integer          npop(max_centers)
      integer          ireorder(max_centers) 
      integer          natoms
      integer          nscfa_fock, nscfb_fock
      integer          ieom_temprt, ieom_roots, iexcite  ! Watson Added
      character*4      atmnam(max_centers)
      logical          cartesian
      logical          uhf
      logical dropit 
      integer          ijunk(500)
      logical*8        l8false
      double precision dbuf(1)
#ifdef ALTIX
      pointer (dptr, dbuf)
#else
      common dbuf
#endif
      double precision vnn

#ifdef ALTIX
      dptr = dshptr   ! set dbuf ptr to shared memory.
#endif

c-------------------------------------------------------------------------
c   scf_init() initializes the ACES II I/O subsystem so that JOBARC may 
c   be read.
c-------------------------------------------------------------------------

      call scf_init()

c-------------------------------------------------------------------------
c   Read original MOL file, create a new one with the subshells split.
c   The new MOL file will be named CHSSI.MOL, and we will work from
c   CHSSI.MOL from this point on.
c
c   This will allow us to perform finer segmentation of the AO indices 
c   later on.
c-------------------------------------------------------------------------

c      call segment_mol(molfile, 'CHSSI.MOL', 12, 13, iErr)
c      if (ierr .ne. 0) then
c         print *,'Error: Cannot process ',molfile
c         print *,'Error code ',ierr
c         call abort_job()
c      endif

c-------------------------------------------------------------------------
c   Inspect the MOL file to determine problem size.  Contraction 
c   coefficients and exponents are not read in at this stage.
c-------------------------------------------------------------------------

CDEBUG      call simple_inspect_mol('CHSSI.MOL', max_centers, max_shells, 
      call simple_inspect_mol('MOL', max_centers, max_shells, 
     *           ncenters, nshells, nspc, 
     *           cartesian, ITFCT, LNP1, LNPO, Nfct,
     *           nufct, nbasis, naobasis, nCFPS, nPFpS,
     *           naoatm, ivAngMom, atom, vnn)
      if (cartesian) then
         ispherical = 0
      else
         ispherical = 1
      endif

      do i = 1, ncenters
         npop(i)     = 1
         ireorder(i) = i
      enddo

c---------------------------------------------------------------------------
C Compute the gradient of the Nuclear-Nuclear repulsion energy
C---------------------------------------------------------------------------

      call mem_alloc(dbuf, 9*ncenters*ncenters, bytes_per_double, 
     *               ix_hess, .true., ierr)
      if (ierr .ne. 0) then
         print *,'Error attempting to malloc hessian.'
         call mpi_abort(mpi_comm_world, 1, ierr)
      endif 

      call mem_alloc(dbuf,  9*ncenters*ncenters, bytes_per_double, 
     *               ix_nnhess, .true., ierr)
      if (ierr .ne. 0) then
         print *,'Error attempting to malloc nuclear-nuclear hessian.'
         call mpi_abort(mpi_comm_world, 1, ierr)
      endif 

      call nuclear_nuclear_gradient(dbuf(ix_hess), dbuf(ix_NNhess), 
     *                              ncenters)

c--------------------------------------------------------------------------
c   Allocate memory for exponents, coordinates, and basis functions.
c--------------------------------------------------------------------------

      nalpha = 0
      npcoef = 0
      do i = 1, nshells
         nalpha = nalpha + npfps(i)
         npcoef = npcoef + npfps(i) * ncfps(i)
      enddo

      nalloc_pkg = 3*nshells + nalpha + npcoef 
      call mem_alloc(dbuf, nalloc_pkg, bytes_per_double, master_icoord, 
     *               .true., ierr)
      if (ierr .ne. 0) then
         print *,'Error attempting to malloc basis data.'
         call mpi_abort(mpi_comm_world, 1, ierr)
      endif

      ialpha  = master_icoord + 3*nshells
      ipcoeff = ialpha + nalpha

c-------------------------------------------------------------------------
c   Read orbital values from JOBARC.
c-------------------------------------------------------------------------

      ione = 1

      if ((.not. if_scf) .and. .not. dryrun) then
         call igetrec(1, 'JOBARC', 'OCCUPYA0', 1, nalpha_occupied)
         call dgetrec(1, 'JOBARC', 'SCFENEG',  ione, scf_energy)
         call dgetrec(1, 'JOBARC', 'TOTENERG',  ione, totenerg)
      else
         scf_energy = 0.
         totenerg = 0.
      endif
      noccupied       = nalpha_occupied

      call igetrec(1,'JOBARC','IFLAGS',100,iJunk)

c------------------------------------------------------------------------
c   Retrieve flags parameters.
c------------------------------------------------------------------------

      iuhf = ijunk(11)
      if (dbg) print *,'IUHF = ',iuhf
      damp_init = ijunk(15) * .01
      scf_conv = 10.0d0**(-ijunk(5))
      cc_conv  = 10.0d0**(-ijunk(4))

      cc_iter = ijunk(7)
      if (cc_iter .eq. 0) then
         print *,'WARNING: ACES has defaulted cc_maxcyc to 0, ',
     *     ' resetting to 100.'
         cc_iter = 100
      endif

      cc_hist = ijunk(12)
      if (cc_hist .eq. 0) then
         print *,'WARNING: ACES has defaulted cc_exporder to 0,',
     *      ' resetting to 5.'
         cc_hist = 5
      endif

      cc_beg  = 2
      scf_iter = ijunk(16)
      scf_hist = ijunk(20)
      scf_beg  = ijunk(40)
      vib_freq_calc = .false. 
      if (ijunk(54) .ne. 0) vib_freq_calc = .true.
      vib_exact = .false.
      if (ijunk(54) .eq. 1) vib_exact = .true.
C
C Watson Added: For EOM calcs.
C
      iexcite = 0
      iexcite = ijunk(87)
      if (iexcite .gt. 0) then
         excite = DBLE(iexcite)
         eom_tol = 10.0d0**(-ijunk(98))
         call igetrec(-1, 'JOBARC', 'EESYMINF', 1, ieom_roots)
         write(*,*) ' ieom_roots: ', ieom_roots
         if (ieom_roots .eq. 0) then
            print *,'WARNING: ACES has defaulted ESTATE_SYM to 0, ',
     *        ' resetting to 4.'
            ieom_roots = 4
         endif
         eom_roots = DBLE(ieom_roots)
         ieom_temprt = ieom_roots
      endif
      if (iexcite .eq. 0) ieom_temprt = 0
C
C Watson
C

c-------------------------------------------------------------------------
c   Read IFLAGS2 off JOBARC.
c-------------------------------------------------------------------------

      call igetrec(1,'JOBARC','IFLAGS2',500,iJunk)

      geom_opt = .false.
      if (ijunk(5) .ne. 0) geom_opt = .true.

c------------------------------------------------------------------------
c   Allocate memory for the scf coefficient arrays, and read them in from
c   the ACES II JOBARC file.
c------------------------------------------------------------------------

      if ((.not. if_scf) .and. .not. dryrun) then
         call dgetrec(0,'JOBARC', 'SCFEVCA0', nscfa, dummy)   ! get reclen

         if (nscfa .lt. 0) then
            print *,'Error: ACES JOBARC file does not contain ',
     *           'SCFEVCA0 data'
            call abort_job()
         endif

         if (dbg) write(6,*) ' IUHF in init :', iuhf
         if (iuhf .eq. 2) then    ! ROHF
            call dgetrec(0,'JOBARC', 'FOCKA', nscfa_fock, dummy)

            if (nscfa_fock .lt. 0) then
               print *,'Error: ACES JOBARC file does not contain ',
     *           'FOCKA data'
               call abort_job()
            endif

            if (nscfa_fock .ne. nscfa) then
               print *,'Error: FOCKA has ',nscfa_fock,' elements, ',
     *            'should match SCFEVCA0 ',nscfa
               call abort_job()
            endif
         endif ! ROHF
      else
         nscfa = nbasis * nbasis 
      endif   

c---------------------------------------------------------------------------
c   If the gradient has been previously calculated (partially), read it 
c   from the JOBARC.
c---------------------------------------------------------------------------

      call dgetrec(0,'JOBARC', 'GRADIENT', n, dummy)

      if (n .gt. 0) then
          call dgetrec(1,'JOBARC', 'GRADIENT', n, gradient_data)
      else
         do i = 1, 3*ncenters
            gradient_data(i) = 0.
         enddo
      endif 
      
      call mem_alloc(dbuf, nscfa, bytes_per_double, iscfa, 
     *               .true., ierr)
      if (ierr .ne. 0) then
         print *,'mem_alloc for eigenvectors failed: nscfa = ',
     *     nscfa
         call abort_job()
      endif

      if ((.not. if_scf) .and. .not. dryrun) then
         call dgetrec(1, 'JOBARC', 'SCFEVCA0', nscfa, dbuf(iscfa))

c-------------------------------------------------------------------------
c   For ROHF, read in the FOCKA array.
c-------------------------------------------------------------------------

         if (iuhf .eq. 2) then   ! ROHF
            call mem_alloc(dbuf, nscfa, bytes_per_double,
     *                               ifockrohfa, .true., ierr)
            call dgetrec(1,'JOBARC','FOCKA', nscfa, dbuf(ifockrohfa))
         endif   ! ROHF
      endif

      if ((.not. if_scf) .and. .not. dryrun) then
         call dgetrec(0, 'JOBARC', 'SCFEVLA0', nepsa, dummy) 

         if (nepsa .lt. 0) then
             print *,'Error: ACES JOBARC file does not contain ',
     *          'SCFEVLA0 data.'
             call abort_job()
         endif
      else
         nepsa = nbasis
      endif

      call mem_alloc(dbuf, nepsa, bytes_per_double, iepsa, 
     *               .true., ierr)
      if (ierr .ne. 0) then
         print *,'mem_alloc for eigenvalues failed: nscfa = ',nscfa
         call abort_job()
      endif
     
      if ((.not. if_scf) .and. .not. dryrun) then
         call dgetrec(1, 'JOBARC', 'SCFEVLA0', nepsa, dbuf(iepsa))
      endif

c---------------------------------------------------------------------------
c   Look for beta spin data.
c---------------------------------------------------------------------------

      if (iuhf .eq. 0) then
         nscfb = -1
      else
         if ((.not. if_scf) .and. .not. dryrun) then
            call dgetrec(0,'JOBARC', 'SCFEVCB0', nscfb, dummy)   ! get reclen

            if (iuhf .eq. 2) then   ! ROHF
               call dgetrec(0,'JOBARC', 'FOCKB', nscfb_fock, dummy)

               if (nscfb_fock .le. 0) then
                  print *,'Error: FOCKB data is not on JOBARC'
                  call abort_job()
               endif

               if (nscfb_fock .ne. nscfb) then
                  print *,'Error: FOCKB has ',nscfb_fock,' elements,',
     *               ' should match SCFEVCB0 ',nscfb
                  call abort_job()
               endif
            endif   ! ROHF
         else
            nscfb = nbasis * nbasis
         endif
      endif

      if (nscfb .lt. 0) then

c-----------------------------------------------------------------------------
c   If ACES is telling us this is RHF, we must run a true RHF version of
c   the SCF SIAL code, then copy over the alpha-spin eigenvalue data into the
c   beta-spin eigenvalues.
c-----------------------------------------------------------------------------

         uhf = .false.
         nbeta_occupied = nalpha_occupied
         nscfb = nscfa
         print *,'*** WARNING: ACES has specified a RHF run. ',
     *      ' Either use REF=UHF in ACES or run a true RHF SIAL code.',
     *       '***'
      else
         uhf = .true.
      endif

      call mem_alloc(dbuf, nscfb, bytes_per_double, iscfb, 
     *                 .true., ierr)
      if (ierr .ne. 0) then
         print *,'mem_alloc for beta eigenvectors fialed: nscfb ',
     *     nscfb
         call abort_job()
      endif

      if (iuhf .eq. 2)
     *     call mem_alloc(dbuf, nscfb, bytes_per_double,
     *                                ifockrohfb, .true., ierr)

      if ((.not. if_scf) .and. uhf .and. .not. dryrun) then

c--------------------------------------------------------------------------
c  Read beta eigenvectors from JOBARC.
c--------------------------------------------------------------------------

         call dgetrec(1, 'JOBARC', 'SCFEVCB0', nscfb, dbuf(iscfb))

         if (iuhf .eq. 2) then   ! ROHF
            call dgetrec(1,'JOBARC','FOCKB', nscfb, dbuf(ifockrohfb))
         endif    ! ROHF
      else

c--------------------------------------------------------------------------
c   Copy alpha eigenvectors into the beta eigenvectors.
c--------------------------------------------------------------------------

         do i = 1, nscfa
            dbuf(iscfb+i-1) = dbuf(iscfa+i-1)
         enddo
      endif

      if ((.not. if_scf) .and. uhf .and. .not. dryrun) then

c---------------------------------------------------------------------------
c   Read number of beta eigenvalues from JOBARC.
c---------------------------------------------------------------------------

         call dgetrec(0, 'JOBARC', 'SCFEVLB0', nepsb, dummy)

         if (nepsb .lt. 0) then
             print *,'Error: ACES JOBARC file does not contain ',
     *           'SCFEVLB0 data.'
             call abort_job()
         endif
      else
         nepsb = nbasis 
      endif

      call mem_alloc(dbuf, nepsb, bytes_per_double, iepsb, 
     *                  .true., ierr)
      if (ierr .ne. 0) then
         print *,'mem_alloc for beta eigenvalues failed: nscfb ',nscfb
         call abort_job()
      endif

      if ((.not. if_scf) .and. uhf .and. .not. dryrun) then

c---------------------------------------------------------------------------
c   Read actual beta-spin eigenvalues from JOBARC.
c---------------------------------------------------------------------------

         call dgetrec(1, 'JOBARC', 'SCFEVLB0', nepsb, dbuf(iepsb))
      else

c--------------------------------------------------------------------------
c   Copy alpha-spin eigenvalues into beta-spin eigenvalues.
c--------------------------------------------------------------------------

         do i = 1, nepsb
            dbuf(iepsb+i-1) = dbuf(iepsa+i-1)
         enddo
      endif

      if ((.not. if_scf) .and. uhf .and. .not. dryrun) then
         call igetrec(1, 'JOBARC', 'OCCUPYB0', 1, nbeta_occupied)
      endif

CDEBUG      call read_basis_info('CHSSI.MOL', ncenters, ncenters, npop, 
      call read_basis_info('MOL', ncenters, ncenters, npop, 
     *           ireorder, cartesian, itfct, lnp1, lnpo, nfct, 
     *           nbasis, dbuf(ialpha), ixalpha, 
     *           dbuf(ipcoeff), ixpcoef, atmnam, 
     *           dbuf(master_icoord), naoatm)
 
c-------------------------------------------------------------------------
c   If the SCF has already been performed check if MOs are to be dropped.
c-------------------------------------------------------------------------

      nalpha_virtual = nbasis - nalpha_occupied 
      nbeta_virtual  = nbasis - nbeta_occupied 
      
      if (.not. ignore_dropmo) then

C--------------------------------------------------------------------------
c   Check if any MO's are to be dropped.
C--------------------------------------------------------------------------

      CALL IGETREC(20,'JOBARC','NUMDROPA',1,NDROPMO_A)
      if (ndropmo_a .gt. 0) 
     *    CALL IGETREC(20,'JOBARC','MODROPA',NDROPMO_A,MODROP_A)

      if (ndropmo_a .gt. 0) then 

c----------------------------------------------------------------------------
c   Check to see if NUMDROPB is defined.  For RHF jobs, joda does not set it,
c   so we must copy over the alpha dropmo's in that case.
c----------------------------------------------------------------------------

         CALL IGETREC(0,'JOBARC','NUMDROPB',dummy, ndropmo_b)
         if (dummy .gt. 0) then   ! NUMDROPB is set.
            CALL IGETREC(20,'JOBARC','NUMDROPB',1,NDROPMO_B)
            if (ndropmo_b .gt. 0) 
     *         CALL IGETREC(20,'JOBARC','MODROPB',NDROPMO_B,MODROP_B)
         else   ! NUMDROPB is not set.

c-----------------------------------------------------------------------------
c   Copy over the alpha DROPMO values.
c-----------------------------------------------------------------------------

            ndropmo_b = ndropmo_a
            do i = 1, ndropmo_b
               modrop_b(i) = modrop_a(i)
            enddo
         endif
      endif

      if ((ndropmo_a .gt. 0 .or. ndropmo_b .gt. 0) .and. 
     *    .not. ignore_dropmo) then 

C--------------------------------------------------------------------------
c   Reset the alpha eigenvectors if DROPMO. 
C--------------------------------------------------------------------------

         do j = 1, nbasis
            moamap(j) = 0
            mobmap(j) = 0 
         enddo

         moa = 0
         do j = 1, nbasis
            dropit = .false.

            do i = 1, ndropmo_a
               if (modrop_a(i) .eq. j) then
                  dropit = .true.
                  go to 11
               endif
            enddo

            moa = moa +1 
   11       continue

c------------------------------------------------------------------------
c   Move data for eigenvalue/eigenvector "j" to "moa".
c------------------------------------------------------------------------

            if (j .ne. moa .and. .not. dropit) then
               dbuf(iepsa+moa-1) = dbuf(iepsa+j-1)
               moamap(moa) = j 

               do i = 1, nbasis
                  dbuf(iscfa+nbasis*(moa-1)+i-1) = 
     *                 dbuf(iscfa+(j-1)*nbasis+i-1) 
               enddo
            endif
         enddo

C--------------------------------------------------------------------------
c   Reset the beta eigenvectors if DROPMO. 
C--------------------------------------------------------------------------

         if (ndropmo_b .gt. 0) then
            mob = 0 
            do j = 1, nbasis
               dropit = .false.

               do i = 1, ndropmo_b
                  if (modrop_b(i) .eq. j) then
                     dropit = .true.
                     go to 10
                  endif  
               enddo

               mob = mob +1 
   10          continue

c------------------------------------------------------------------------
c   Move data for eigenvalue/eigenvector "j" to "mob".
c------------------------------------------------------------------------

               if (j .ne. mob .and. .not. dropit) then
                  dbuf(iepsb+mob-1) = dbuf(iepsb+j-1)
                  mobmap(mob) = j 

                  do i = 1, nbasis
                     dbuf(iscfb+nbasis*(mob-1)+i-1) = 
     *                 dbuf(iscfb+(j-1)*nbasis+i-1) 
                  enddo
               endif
            enddo
         endif

C--------------------------------------------------------------------------
c   Reset the number of virtual orbitals if they were dropped. 
C--------------------------------------------------------------------------
c
         nalpha_virtual = nbasis - nalpha_occupied    
         enalpha_virtual = nalpha_virtual
         do i = 1, ndropmo_a 
            if (modrop_a(i) .gt. nalpha_occupied) 
     *         nalpha_virtual = nalpha_virtual - 1  
         enddo 
c
         nbeta_virtual = nbasis - nbeta_occupied    
         enbeta_virtual = nbeta_virtual
         do i = 1, ndropmo_b 
            if (modrop_b(i) .gt. nbeta_occupied) 
     *      nbeta_virtual = nbeta_virtual - 1  
         enddo 
c
C--------------------------------------------------------------------------
c   Reset the number of occupied orbitals if they were dropped. 
C--------------------------------------------------------------------------
c
         enalpha_occupied = nalpha_occupied
         ntemp = nalpha_occupied 
         do i = 1, ndropmo_a 
            if (modrop_a(i) .le. nalpha_occupied) ntemp = ntemp - 1  
         enddo 
         nalpha_occupied = ntemp  
         nepsa           = nbasis - ndropmo_a   
c
         enbeta_occupied = nbeta_occupied
         ntemp = nbeta_occupied 
         do i = 1, ndropmo_b 
            if (modrop_b(i) .le. nbeta_occupied) ntemp = ntemp - 1  
         enddo 
         nbeta_occupied = ntemp  
         nepsb           = nbasis - ndropmo_b  

         write(6,*) ' Number of alpha virtuals = ', nalpha_virtual 
         write(6,*) ' Number of beta virtuals = ', nbeta_virtual 
         write(6,*) ' Number of alpha occupied = ',nalpha_occupied 
         write(6,*) ' Number of beta occupied = ',nbeta_occupied 

c
      endif ! ndropmo > 0 
c
      endif ! ((.not. ignore_dropmo then

c-------------------------------------------------------------------------
c   If we are running a SCF job, reset the energy variables and gradient
c   accumulation to 0.  The assumption is that this is the beginning of
c   a new gradient accumulation cycle.
c-------------------------------------------------------------------------

      if (if_scf .or. init_scf) then
         scf_energy = 0.
         totenerg   = 0.
         
         do i = 1, 3*ncenters
            gradient_data(i) = 0.
         enddo
      endif

      if (scf_energy .eq. 0.d0) then
         scf_energy = vnn
         print *,'SCF ENERGY IS INITIALIZED FROM ',
     *       'NUCLEAR-NUCLEAR REPULSION ENERGY: ',scf_energy
      endif

      print *,'--------- Required data from MOL file -----------'
      print *,'Number of centers.....................',nCenters
      print *,'Number of shells......................',nShells
      print *,'Cartesian flag........................',cartesian
      print *,'Total number of basis functions.......',nbasis
      print *,'Total number of primitive functions...',nalpha
      print *,'Initial SCF energy....................',scf_energy
      print *,'SCF damping factor....................',damp_init
      print *,'SCF convergence tolerance.............',scf_conv
      print *,'Number of SCF iterations..............',scf_iter
      print *,'Number of SCF histories for DIIS......',scf_hist
      print *,'Beginning iteration for SCF DIIS......',scf_beg
      print *,'CCSD convergence tolerance............',cc_conv
      print *,'Number of CCSD iterations.............',cc_iter
      print *,'Number of CCSD histories for DIIS.....',cc_hist
      print *,'Beginning iteration for CCSD DIIS.....',cc_beg
      print *,'Excited state computation.............',iexcite .gt. 0
      print *,'EOM-CCSD converged tolerance..........',eom_tol ! Watson added
      print *,'Number of EOM-CCSD roots to find......',ieom_temprt
      print *,'Geometry optimization calc............',geom_opt
      print *,'Vibrational frequency calc............',
     *                                  vib_freq_calc
  
      print *,'  Shell     Contracted fns.   Primitive Fns. '
      print *,'  -----     ---------------   --------------' 

      do i = 1, nshells
         print 200,i, nCFpS(i),nPFpS(i),
     *        (dbuf(master_icoord+(i-1)*3+j-1) ,j=1,3)
      enddo

      return
  100 format (1x,a4,3(2x,d14.6))
  200 format(2x,i4,12x,i3,15x,i3,3(1x,d20.12))

c     end subroutine init_data
      end