\subsection{Complete-Active-Space Self-Consistent-Field (CASSCF)} \label{casscf}
                                                                                
CASSCF is a general method for obtaining a qualitatively correct
wavefunction for highly strained molecules, diradicals, or bond
breaking reactions.  The \PSIdetcasman\ module performs
CASSCF optimization of molecular orbitals via a two-step
procedure in which the CI wavefunction is computed using
\PSIdetci\, and the orbital rotation step is computed using
\PSIdetcas.  The \PSIdetcas\ program is fairly simple
and uses an approximate orbital Hessian and a Newton-Raphson update,
accelerated by Pulay's DIIS procedure.  Future versions of the
program will allow RASSCF type wavefunctions.

At present, CASSCF's work most efficiently if the inactive orbitals
are treated as ``frozen'' in the {\tt FROZEN\_DOCC} and {\tt FROZEN\_UOCC} 
arrays.  These orbitals are still optimized by the CASSCF.  This
procedure is being simplified for the next release of \PSIthree.
See the {\tt casscf-sp} example in the \file{tests} directory for an
example of the current input.

\subsubsection{Basic Keywords}
\begin{description}
\item[WFN = string]\mbox{}\\
This should be {\tt detcas} for determinant-based CASSCF.
\item[REFERENCE = string]\mbox{}\\
Any of the references allowed by \PSIdetci\ should work (i.e., not 
{\tt uhf}), but there should be no reason not to use {\tt rhf}.
\item[DERTYPE = string]\mbox{}\\
Energies ({\tt none}) and gradients ({\tt first}) are supported.
\item[CONVERGENCE = integer]\mbox{}\\
Convergence desired on the orbital gradient.  Convergence is achieved when
the RMS of the error in the orbital gradient is less than 10**(-n).  The 
default is 4 for energy calculations and 7 for gradients.  Note that
this is a different convergence criterion than for the \PSIdetci\
program itself.  These can be differentiated, if changed by the user,
by placing the {\tt CONVERGENCE} keywords within separate sections of
input, such as {\tt detcas: ( convergence = x )}.
\item[ENERGY\_CONVERGENCE = integer]\mbox{}\\
Convergence desired on the total MCSCF energy.  The default is 7.
\item[FROZEN\_DOCC = integer array]\mbox{}\\
The number of lowest energy doubly occupied orbitals in each irreducible
representation from which there will be no excitations.
The Cotton ordering of the irredicible representations is used.
The default is the zero vector.
\item[FROZEN\_UOCC = integer array]\mbox{}\\
The number of highest energy unoccupied orbitals in each irreducible
representation into which there will be no excitations.
The default is the zero vector.
\item[NCASITER = integer]\mbox{}\\
Maximum number of iterations to optimize the orbitals.  This option
should be specified in the DEFAULT section of input, because
it needs to be visible to the control program PSI.  Defaults to 20.
\item[PRINT = integer]\mbox{}\\
This option determines the verbosity of the output.  A value of 1 or
2 specifies minimal printing, a value of 3 specifies verbose printing.
Values of 4 or 5 are used for debugging.  Do not use level 5 unless
the test case is very small (e.g. STO H2O CISD).
\end{description}

