%! expbas.tex $ this file belongs to the Molcas repository $*/
\section{\program{expbas}}
\label{UG:sec:expbas}
\index{Program!Expbas@\program{Expbas}}\index{Expbas@\program{Expbas}}
%%%<MODULE NAME="EXPBAS">
%%Description:
%%%<HELP>
%%+This module is used to manipulate orbital files. By default it is
%%+used to expand the orbital file to a larger basis set.
%%+This feature is available only for generally contracted basis sets (ANO or CC).
%%+The original orbital file INPORB is needed.
%%+By default, the Runfile, RUNFIL1,
%%+from the small calculation is also needed. One runs also the
%%+GATEWAY module with
%%+the larger basis set to obtain the corresponding runfile, RUNFIL2. The
%%+program will produce the file EXPORB, which can be used as the input
%%+orbital file for calculations using the larger basis set.
%%+The DESYmmetrize keyword is used to transform orbitals with symmetry to
%%+C1 symmetry.
%%+If one wants to desymmetrize the orbitals without expanding the basis set, the keyword
%%+NOEXpand must be used.
%%+
%%+When the DESY keyword is used, in combination with NOEXpand, only the INPORB file is needed. One runs
%%+the GATEWAY module
%%+with the same basis set of the original orbital file to obtain the corresponding
%%+runfile. The program will produce in output the DESORB file.
%%+In any subsequent calculation using the DESORB file, modified Cartesian
%%+coordinates are required, the ones internally generated by Molcas and printed 
%%+out in the GATEWAY section of the output.
%%%</HELP>

This module is used to manipulate orbital files. By default it is
used to expand the orbital file to a larger basis set.
This feature is available only for generally contracted basis sets (ANO or CC).
The original orbital file \file{INPORB} is needed.
By default, the Runfile, \file{RUNFIL1},
from the small calculation is also needed. One runs also the
\program{GATEWAY} module with
the larger basis set to obtain the corresponding runfile, \file{RUNFIL2}. The
program will produce the file \file{EXPORB}, which can be used as the input
orbital file for calculations using the larger basis set.
The \keyword{DESYmmetrize} keyword is used to transform orbitals with symmetry to
C1 symmetry.
If one wants to desymmetrize the orbitals without expanding the basis set, the keyword
\keyword{NOEXpand} must be used.

When the \keyword{DESYmmetrize}
keyword is used, in combination with \keyword{NOEXpand}, only the \file{INPORB}
file is needed. One runs the \program{GATEWAY}
with the same basis set of the original orbital file to obtain the corresponding
runfile. The program will produce in output the \file{DESORB} file.
In any subsequent calculation using the \file{DESORB} file, modified Cartesian
coordinates are required, the ones internally generated by \molcas\ and printed 
out in the \program{GATEWAY} section of the output.

\subsection{Dependencies}
\label{UG:sec:expbas_dependencies}
\index{ExpBas!Dependencies}\index{Dependencies!ExpBas}
The \program{EXPBAS} requires one InpOrb file and two Runfiles produced by other programs.
If the keyword \keyword{NOEXpand} is used, only the \file{INPORB} file is needed.

\subsection{Files}
\label{UG:sec:expbas_files}
\index{ExpBas!Files}\index{Files!ExpBas}
\subsubsection{Input files}

\file{INPORB}, an orbital file for the original basis set.

Two more files are needed only if the basis set expansion is to be performed:
\file{RUNFIL1}, the runfile for the small basis set.
\file{RUNFIL2}, the runfile for the larger basis set.

\subsubsection{Output files}

\program{EXPBAS} generates the files:
\file{EXPORB} which contains orbitals, orbital energies, occupation numbers, and
type indices for the larger basis set.
\file{DESORB} which contains orbitals, orbital energies, occupation numbers, and
type indices for the desymmetrized basis set.


\subsection{Input}
\label{UG:sec:expbas_input}
\index{ExpBas!Input}\index{Input!ExpBas}
\begin{inputlisting}
 &EXPBAS
\end{inputlisting}

\subsubsection{Input example}

\begin{inputlisting}
>>COPY name.InpOrb INPORB
>>COPY name.RunFil1 RUNFIL1
>>COPY name.Runfil2 RUNFIL2
 &EXPBAS
\end{inputlisting}

\subsubsection{Optional general keywords}
\begin{keywordlist}
%---
%%%<KEYWORD MODULE="EXPBAS" NAME="NOEX" APPEAR="Do not expand basis set" LEVEL="BASIC" KIND="SINGLE">
%%Keyword: NOEX <basic>
%%%<HELP>
%%+Deactivates the basis set expansion.
%%%</HELP></KEYWORD>
\item[NOEXpand]
Deactivates the basis set expansion.
%---
%%%<KEYWORD MODULE="EXPBAS" NAME="DESY" APPEAR="Desymmetrize basis set" LEVEL="BASIC" KIND="SINGLE">
%%Keyword: DESY <basic>
%%%<HELP>
%%+Activates the basis set desymmetrization.
%%%</HELP></KEYWORD>
\item[DESYmmetrize]
Activates the basis set desymmetrization.
%---
%%%<KEYWORD MODULE="EXPBAS" NAME="FILE" APPEAR="Orbitals file" KIND="STRING" LEVEL="BASIC">
%%Keyword: FileOrb <basic>
%%%<HELP>
%%+The next line specifies the filename containing the original orbitals that will
%%+be expanded to the larger basis set. By default a file named INPORB will be used.
%%%</HELP></KEYWORD>
\item[FILEorb]
The next line specifies the filename containing the original orbitals that will
be expanded to the larger basis set. By default a file named \file{INPORB} will be used.

\end{keywordlist}


{\bf Comments}. For the basis set expansion
 procedure, this is the strategy:
\begin{enumerate}
\item
Do a calculation (SCF, DFT, CASSCF, etc) with a small basis set. Save the
produced orbital file and the runfile as: name.Inporb and name.Runfil1.
\item
Run a \program{GATEWAY} to create the second runfile, which is then saved as
name.Runfil2
\item
Run \program{EXPBAS} as indicated above. The file name.ExpOrb is produced.
This file can be used as input for large basis set calculations. Note that the
inactive and active orbitals will have the same place in the list as with the
smaller basis set, so they can be easily identified.
\end{enumerate}
%%%</MODULE>
