.. index::
   single: Program; ExpBas
   single: ExpBas

.. _UG\:sec\:expbas:

:program:`expbas`
=================

.. only:: html

  .. contents::
     :local:
     :backlinks: none

.. xmldoc:: <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 :kword:`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
:kword:`NOEXpand` must be used.
When the :kword:`DESYmmetrize`
keyword is used, in combination with :kword:`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 the :file:`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 :program:`GATEWAY` section of the output.

.. index::
   pair: Dependencies; ExpBas

.. _UG\:sec\:expbas_dependencies:

Dependencies
------------

The :program:`EXPBAS` requires one InpOrb file and two Runfiles produced by other programs.
If the keyword :kword:`NOEXpand` is used, only the :file:`INPORB` file is needed.

.. index::
   pair: Files; ExpBas

.. _UG\:sec\:expbas_files:

Files
-----

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.

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.

.. index::
   pair: Input; ExpBas

.. _UG\:sec\:expbas_input:

Input
-----

::

  &EXPBAS

Input example
.............

::

  >>COPY name.InpOrb INPORB
  >>COPY name.RunFil1 RUNFIL1
  >>COPY name.Runfil2 RUNFIL2
   &EXPBAS

Optional general keywords
.........................

.. class:: keywordlist

:kword:`NOEXpand`
  Deactivates the basis set expansion.

  .. xmldoc:: <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>

:kword:`DESYmmetrize`
  Activates the basis set desymmetrization.

  .. xmldoc:: <KEYWORD MODULE="EXPBAS" NAME="DESY" APPEAR="Desymmetrize basis set" LEVEL="BASIC" KIND="SINGLE">
              %%Keyword: DESY <basic>
              <HELP>
              Activates the basis set desymmetrization.
              </HELP>
              </KEYWORD>

:kword:`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.

  .. xmldoc:: <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>

**Comments**. For the basis set expansion
procedure, this is the strategy:

#. 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.

#. Run a :program:`GATEWAY` to create the second runfile, which is then saved as
   name.Runfil2

#. 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.

.. xmldoc:: </MODULE>
