****************************************************************************** 
                                                                                
                                   DESCRIPTION                                  
                                                                                
                                     OF THE                                     
                                                                                
                             OHIO STATE - LIVERMORE                             
                   SPIN-ORBIT CONFIGURATION-GENERATION PROGRAM                  
                                     (CGDBG)                                    
                                                                                
 ****************************************************************************** 
                                                                                
                                                                                
 PROCEDURE NAME:  CGDBG                                                         
                                                                                
                                                                                
 DESCRIPTION:  This program generates lists of electron configurations for use  
               with the CIDBG spin-orbit configuration-interaction program.     
                                                                                
                                                                                
                                                                                
                                                                                
 INPUT FILE:  CGDBGIN                                                           
                                                                                
 PRINT OUTPUT FILE:  CGDBGLS                                                    
                                                                                
 ELECTRON CONFIGURATION FILE:  (specify by unit no. in input)                   
                                                                                
                                                                                
                                                                                
                                                                                
 DOCUMENTATION:  Russell M. Pitzer                                              
                 Department of Chemistry              Internet:                 
                 The Ohio State University            pitzer.3@osu.edu          
                 100 W. 18th Ave.                                               
                 Columbus, OH 43210                                             
                 USA                                                            
                                                                                
                                                                                
 LAST REVISION:  March, 1996                                                 
                                                                                
                                                                                
                                                                                
 REFERENCES:  Algorithms                                                        
              R. C. Ladner, Ph. D. thesis, Caltech, 1972                        
                                                                                

 I.  INPUT DATA                                                                 
                                                                                
 1)      TITLE                                                                  
         FORMAT (A80)                                                           
                                                                                
 2)      NBF,NEL,KSYM,NBCFG,NCFGIN,NCFGDE,ICFGPN,MXOP,MSYMTP,KORBOC             
         FORMAT (16I5)                                                          
                                                                                
 3)      (MSYMBF(I),I=1,NBF)                                                    
         FORMAT (16I5)                                                          
                                                                                
 4)      IF(KORBOC.NE.0)                                                        
                                                                                
         DO 4 I=1,KORBOC                                                        
         KSET(I),LMSET(1,I),LMSET(2,I)                                          
         FORMAT (16I5)                                                          
         (MMSET(J),J=1,KSET(I))                                                 
         FORMAT (16I5)                                                          
                                                                                
 5)      IF(NCFGIN.NE.0)                                                        
                                                                                
         DO 5 I=1,NCFGIN                                                        
         (JOUTFG(J,I),J=1,NBF)                                                  
         FORMAT (80I1)                                                          
                                                                                
 6)      IF(NCFGDE.NE.0)                                                        
                                                                                
         DO 6 I=1,NCFGDE                                                        
         (JFGDE(J,I),J=1,NBF)                                                   
         FORMAT (80I1)                                                          
                                                                                
 7)      DO 9 I=1,NBCFG                                                         
         (JINFG(J,I),J=1,NBF),NEXCIT,NORBST,NORBOC                              
         FORMAT (80I1)                                                          
                                                                                
 8)      IF(NORBST.GT.0)                                                        
                                                                                
         (((LSTORB(K,L),K=1,NORBL),LEXCIT),L=1,NORBST                           
         FORMAT (26I3)                                                          
                                                                                
 9)      IF(NORBOC.NE.0)                                                        
                                                                                
         DO 9 I=1,NORBOC                                                        
         KSET(I),LMSET(1,I),LMSET(2,I)                                          
         FORMAT (16I5)                                                          
         (MMSET(J),J=1,KSET(I))                                                 
         FORMAT (16I5)                                                          
                                                                                
10)      ITEST                                                                  
         FORMAT (16I5)                                                          
                                                                                
                                                                                
 II.  DISCUSSION                                                                
                                                                                
 NBF            =   number of basis functions, i.e., molecular orbitals.        
 NEL            =   number of electrons.                                        
 KSYM           =   double-group symmetry of state.                             
 NBCFG          =   number of basic configurations.                             
 NCFGIN         =   number of configurations specifically put on list.          

 NCFGDE         =   number of configurations deleted from final list.           
 ICFGPN         =   if gt 0, write configuration file on unit ICFGPN            
 MXOP           =   maximum number of open shells allowed.                      
 MSYMTP         =   number of symmetry types.  (4 for C2v or D2, 8 for D2h).    
 KORBOC         =   number of restrictions on the occupancy of orbitals which   
                    are to be applied to all configurations (maximum is 10).    
 MSYMBF         =   symmetry of the Ith orbital.                                
 KSET(I)        =   number of orbitals in the Ith occupancy restriction set.    
                         (KSET(1)+KSET(2)+... .LE. 100)                         
 LMSET(1,I)     =   minimum number of electrons to be allowed in the orbitals   
                    of the Ith set.                                             
 LMSET(2,I)     =   maximum number of electrons to be allowed in the orbitals   
                    of the Ith set.                                             
 (MMSET(J),     =   list of orbitals in the Ith set.                            
 J=1,KSET(I))                                                                   
                                                                                
 COMMENTS:      An orbital MAY appear in more than one set.  The number of      
                electrons in the orbitals of a given set are added up and the   
                sum must be within the upper and lower limits (LMSET(1,I) and   
                LMSET(2,I)), if the configuration is to be retained.            
                                                                                
 EXAMPLE:       The first and third orbitals may be constrained to be doubly    
                occupied by the following two lines:                            
                                                                                
                2     4     4                                                   
                1     3                                                         
                                                                                
 (JOUTFG(J,I),  =   configuration(s) specifically to be put on the list.  It is 
   J=1,NBF)         often convenient to include the dominant configurations     
                    here so that their initial guess coefficients can be placed 
                    in the CIDBG input in advance.                              
                                                                                
 (JFGDE(J,I),   =   configuration(s) to be deleted from final list.             
   J=1,NBF)                                                                     
                                                                                
 (JINFG(J,I),   =   basic configuration(s) from which excitation are to be      
   J=1,NBF)         performed.                                                  
                                                                                
 NEXCIT         =   number of excitations (excitation number) to be allowed     
                    from the Ith basic configuration.                           
                                                                                
 NORBOC         =   number of restrictions on the occupancy of orbitals for the 
                    configurations derived from the Ith basic configuration.    
                                                                                
 NORBST         =   number of orbital sets into which the Ith basic             
                    configuration is partitioned.  These sets may overlap.      
 (NORBST.LT.0)  =   use previous list of orbital sets.                          
 (NORBST.EQ.0)  =   there is ONE orbital set and it contains all the basic      
                    functions.                                                  
 (NORBST.GT.0)  =   the list of orbital sets is read in on the following line.  
                    (Only one line is allowed).                                 

 LSTORB(K,L)    =   Kth orbital in Lth orbital set.                             
 NORBL          =   number of orbitals in Lth orbital set.                      
 LEXCIT         =   excitation number for Lth orbital set.  Note that LEXCIT    
                    must be made negative so that the program can detect the    
                    end of an orbital set.  Also, if LEXCIT.EQ.0, the program   
                    uses NEXCIT for LEXCIT.                                     
                                                                                
 (ITEST.NE.0)   =   go back to 1 and read another data set.                     
                                                                                
                                                                                
 III.  Notes                                                                     
                                                                                
      This program was prepared by R. M. Pitzer and N. W. Winter in 1984-1985,  
 in order to try out new algorithms for including the spin-orbit interaction in 
 configuration-interaction calculations.  The Caltech (W. A. Goddard group)     
 program MQM23 was used as the starting point.  MQM23 was written by            
 R. C. Ladner in the Summer of 1971 and rewritten by B. D. Olafson in the       
 Summer of 1973.  It was converted to the Lawrence Livermore system by          
 N. W. Winter in Autumn, 1977.                                                  
                                                                                
      CGDBG works only for molecules which have C2v, D2, or D2h symmetry, or    
 whose symmetry point group contains one of these as a subgroup.                
                                                                                
      The Department of Energy, the National Science Foundation, and Cray       
 Research, Inc., have supported this work.                                      
                                                                                
      Distribution of this program is handled primarily through Argonne         
 National Laboratory as part of the COLUMBUS system of programs.  Contact       
                            shepard@tcg.anl.gov                                 
                                                                                
                                                                                
 *******************************************************************            
                                                                                
    This computer program contains work performed partially at                  
    Lawrence Livermore National Laboratory under                                
    the auspices of the Office of Basic Energy Sciences,                        
    Division of Chemical Sciences, U.S. Department of Energy,                   
    under contract W-7405-ENG-48.                                               
                                                                                
    These programs may not be (re)distributed without the                       
    written consent of the Argonne Theoretical Chemistry Group.                 
                                                                                
    Since these programs are under development, correct results                 
    are not guaranteed.                                                         
                                                                                
 *******************************************************************            
                                                                                
                                                                                
 IV.  Sample Data                                                                
                                                                                
 CH2 (a1)1 (b1)1 triplet-singlet                                                
    2    2    1    1    2    0    1    2    4    0                              
    1    3                                                                      
11                                                                              
20                                                                              
11100                                                                           
    0