\section{\PSIthree\ Input Files} \label{input}

\subsection{Syntax} \label{syntax}
\PSIthree\ input files are case-insensitive and free-format, with
a grammar designed for maximum flexibility and relative simplicity.
Input values are assigned using the structure:
\begin{verbatim}
keyword = value
\end{verbatim}
where {\tt keyword} is the parameter chosen (e.g., {\tt convergence})
and {\tt value} has one of the following data types:
\begin{itemize}
\item string: A character sequence surrounded by double-quotes.
  Example: {\tt basis = "cc-pVDZ"}
\item integer: Any positive or negative number (or zero) with no
  decimal point.  Example: {\tt maxiter = 100}
\item real: Any floating-point number.  Example: {\tt omega = 0.077357}
\item boolean: {\tt true}, {\tt false}, {\tt yes}, {\tt no}, {\tt 1},
  {\tt 0}.
\item array: a parenthetical list of values of the above data types.
  Example: {\tt docc = (3 0 1 1)}.  
\end{itemize}
Note that the input parsing system is general enough to allow
multidimensional arrays, with elements of more than one data type.  A
good example is the z-matrix keyword:
\begin{verbatim}
zmat = (
  (O)
  (H 1 r)
  (H 1 r 2 a)
)
\end{verbatim}
For z-matrices, z-matrix variables, and Cartesian coordinates, 
it is also possible to discard the inner parentheses.
The following is equivalent in this case:
\begin{verbatim}
zmat = (
  O
  H 1 r
  H 1 r 2 a
)
\end{verbatim}

Keywords must grouped together in blocks, based on the module or
modules that require them.  The default block is labelled {\tt psi:},
and most users will require only a {\tt psi:} block when using
\PSIthree.  For example, the following is a simple input file for a
single-point CCSD energy calculation on H$_2$O:
\begin{verbatim}
psi: (
  label = "6-31G**/CCSD H2O"
  wfn = ccsd
  reference = rhf
  jobtype = sp
  basis = "6-31G**"
  zmat = (
     O
     H 1 r 
     H 1 r 2 a 
  )
  zvars = (
     r 1.0 
     a 104.5 
  )
)
\end{verbatim}
In this example, the {\tt psi:} identifier collects all the keywords
(of varying types) together.  Every \PSIthree\ module will have access
to every keyword in the {\tt psi:} block by default.  One may use
other identifiers (e.g., {\tt ccenergy:}) to separate certain keywords
to be used only by selected modules.  For example, consider the
keyword {\tt convergence}, which is used by several \PSIthree\ modules
to determine the convergence criteria for constructing various types
of wave functions.  If one wanted to use a high convergence cutoff for the
\PSIthree\ SCF module but a lower cutoff for the coupled cluster
module, one could modify the above input:
\begin{verbatim}
psi: (
  ...
  convergence = 7
)
scf:convergence = 12
\end{verbatim}
Note that, since we have only one keyword associated with the {\tt
  scf:} block, we do not need to enclose it parentheses.

Some additional aspects of the \PSIthree\ grammar to keep in mind:
\begin{itemize}
\item The ``\%'' character denotes a comment line, i.e. any
  information following the ``\%'' up to the next linebreak is ignored
  by the program.
\item Anything in between double quotes (i.e. strings) is case-sensitive.
\item Multiple spaces are treated as a single space.
\end{itemize}

\subsection{Specifying the Type of Computation}
The most important keywords in a \PSIthree\ input file are those which
tell the program what type of computation are to be performed.  
They \keyword{jobtype} keyword tells the \PSIdriver\ program whether
this is a single-point computation, a geometry optimization, a 
vibrational frequency calculation, etc.  The \keyword{reference} 
keyword specifies whether an RHF, ROHF, UHF, etc., reference is
to be used for the SCF wavefunction.  The \keyword{wfn} specifies 
what theoretical method is to be used, either SCF, determinant-based
CI, coupled-cluster, etc.  Also of critical importance are the charge
and multiplicity of the molecule, the molecular geometry, and the
basis set to be used.  The latter two topics are discussed below
in sections \ref{geom-spec} and \ref{basis-spec}.
General keywords determining the general type of computation to be performed 
are described below.

\begin{description}
\item[LABEL = string]\mbox{}\\
This is a character string to be included in the output to help keep track
of what computation has been run.  It is not otherwise used by the program.
There is no default.
\item[JOBTYPE = string]\mbox{}\\
This tells the program whether to run a single-point energy calculation
(SP), a geometry optimization (OPT), a series of calculations at 
different displaced geometries (DISP), a frequency calculation (FREQ),
frequencies only for symmetric vibrational modes (SYMM\_FREQ), 
a Diagonal Born-Oppenheimer Correction (DBOC) energy computation,
or certain response properties (RESPONSE).
The default is SP.
\item[WFN = string]\mbox{}\\
This specifies the wavefunction type.  Possible values are:\\ 
SCF, MP2, MP2R12, CIS, DETCI, CASSCF, RASSCF, CCSD, CCSD\_T, BCCD, BCCD\_T,
EOM\_CCSD, ZAPTN. 
\item[REFERENCE = string]\mbox{}\\
This specifies the type of SCF calculation one wants to do.  It
can be one of RHF (for a closed  shell  singlet), ROHF (for
a restricted open shell calculation), UHF (for an unrestricted
open shell calculation), or TWOCON (for a two configuration
singlet).  The default is RHF.
\item[MULTP = integer]\mbox{}\\
Specifies the multiplicity of the molecule, i.e., 2S+1.  Default
is 1 (singlet).
\item[CHARGE = integer]\mbox{}\\
Specifies the charge of the molecule.  Default is 0.
\item[DERTYPE = string]\mbox{}\\
This specifies the order of the derivative that is to be obtained.
The default is NONE (energy only).
\item[DOCC = integer vector]\mbox{}\\
This gives the number of doubly occupied orbitals in each irreducible
representation.  There is no default.  If this is not given, 
\PSIcscf\  will attempt to guess at the occupations.
\item[SOCC = integer vector]\mbox{} \\
This gives the number of singly occupied orbitals in each irreducible 
representation. There is no default.  If this is not given,
\PSIcscf\ will attempt to guess at the occupations.
\item[FREEZE\_CORE = string]\mbox{} \\
\PSIthree\ can automatically freeze core orbitals. Core orbitals are
defined as follows:  
\begin{verbatim}
 H-Be  no core 
 B-Ne  1s 
Na-Ar  small: 1s2s
       large: 1s2s2p
\end{verbatim}
YES or TRUE will freeze the core orbitals, SMALL or LARGE are for elements 
Na-Ar. The default is NO or FALSE. Always check to make sure that the 
occupations are correct!
\end{description}

\subsection{Geometry Specification} \label{geom-spec}
The molecular geometry may be specified using either Cartesian a
Z-matrix coordinates.  Cartesian coordinates are specified via the
keyword \keyword{geometry}:
\begin{verbatim}
  geometry = (
     atomname1 x1 y1 z1 
     atomname2 x2 y2 z2 
     atomname3 x3 y3 z3 
             ...
     atomnameN xN yN zN 
  )
\end{verbatim}
where \keyword{atomname$i$} can take the following values:
\begin{itemize}
\item The element symbol: H, He, Li, Be, B, etc.
\item The full element name: hydrogen, helium, lithium, etc.
\item As a {\em ghost} atom with the symbol, G, or name, ghost. A
ghost atom has a formal charge 0.0, and can be useful to specify the
location of the off-nucleus basis functions.
\item As a {\em dummy} atom with the symbol, X.  Dummy atoms can be
useful only to specify Z-matrix coordinates of proper symmetry or
which contain linear fragments.
\end{itemize}
Hence the following two examples are equivalent to one another:
\begin{verbatim}
  geometry = (
     H 0.0 0.0 0.0 
     f 1.0 0.0 0.0 
     Li 3.0 0.0 0.0 
     BE 6.0 0.0 0.0 
  )
\end{verbatim}
\begin{verbatim}
  geometry = (
     hydrogen  0.0 0.0 0.0 
     FLUORINE  1.0 0.0 0.0 
     Lithium   3.0 0.0 0.0 
     beryllium 6.0 0.0 0.0 
  )
\end{verbatim}
It is also possible to include an inner set 
of parentheses around each line containing {\tt atomname1 x1 y1 z1}.

The keyword \keyword{units} specifies the units for the coordinates:
\begin{itemize}
\item \keyword{units = angstrom} -- angstroms (\AA), default;
\item \keyword{units = bohr} -- atomic units (Bohr);
\end{itemize}

\noindent
Z-matrix coordinates are specified using the keyword \keyword{zmat}:
\begin{verbatim}
  zmat = (
     atomname1
     atomname2 ref21 bond_dist2
     atomname3 ref31 bond_dist3 ref32 bond_angle3 
     atomname4 ref41 bond_dist4 ref42 bond_angle4 ref43 tors_angle4 
     atomname5 ref51 bond_dist5 ref52 bond_angle5 ref53 tors_angle5 
                             ...                
     atomnameN refN1 bond_distN refN2 bond_angleN refN3 tors_angleN 
  )
\end{verbatim}
where
\begin{itemize}
\item \keyword{bond\_dist$i$} is the distance (in units specified by
keyword \keyword{units}) from nucleus number $i$ to
nucleus number \keyword{ref$i$1}. The units 
\item \keyword{bond\_angle$i$} is the angle formed by nuclei $i$,
\keyword{ref$i$1}, and \keyword{ref$i$2};
\item \keyword{tors\_angle$i$} is the torsion angle formed by nuclei $i$,
\keyword{ref$i$1}, \keyword{ref$i$2}, and \keyword{ref$i$3};
\end{itemize}
%%
%% I'm commenting this part out, since the redundant internal coordinate
%% structure implemented by RAK in 08/03 takes care of many dummy-atom
%% problems.  If user's really want z-matrix coords, we may have to deal
%% with this again.
%%   -TDC, 08/31/03
%Some care has to be taken when constructing a Z-matrix for a molecule
%which contains linear fragments. For example, an appropriate Z-matrix
%for a linear conformation of HNCO must include dummy atoms: The first
%three atoms (HNC) can be specified as is, but the fourth atom (O)
%poses a problem -- the torsional angle cannot be defined with respect
%to the linear HNC fragment. The solution is to add 2 dummy atoms to
%the definition:
%\begin{verbatim}
%  zmat = (
%    h
%    n 1 1.012
%    x 2 1.000 1  90.0
%    c 2 1.234 3  90.0 1 180.0
%    x 4 1.000 2  90.0 3 180.0
%    o 4 1.114 5  90.0 2 180.0
%  )
%\end{verbatim}
%Alternatively, one could use, for example, only a single dummy atom above the
%nitrogen and specify ``bond lengths'' relative to the latter.

\subsection{Molecular Symmetry} \label{symm-spec}
\PSIthree\ can determine automatically the largest Abelian point group
for a valid framework of centers (including ghost atoms, but dummy
atoms are ignored).  It will then use the symmetry properties of the
system in computing the energy, forces, and other properties.
However, in certain instances it is desirable to use less than the
full symmetry of the molecule. The keyword \keyword{subgroup} is used
to specify a subgroup of the full molecular point group. The allowed
values are \keyword{c2v}, \keyword{c2h}, \keyword{d2}, \keyword{c2},
\keyword{cs}, \keyword{ci}, and \keyword{c1}. For certain combinations
of a group and its subgroup there is no unique way to determine which
subgroup is implied. For example, $D_{\rm 2h}$ has 3 non-equivalent
$C_{\rm 2v}$ subgroups, e.g. $C_{\rm 2v}(X)$ consists of symmetry
operations $\hat{E}$, $\hat{C}_2(x)$, $\hat{\sigma}_{xy}$, and
$\hat{\sigma_{xz}}$.  To specify such subgroups precisely one has to
use the keyword \keyword{unique\_axis}.  For example, the following
input will specify the $C_{\rm 2v}(X)$ subgroup of $D_{\rm 2h}$ to be
the computational point group:
\begin{verbatim}
  psi: (
    ...
    geometry = (
         ...
    )
    units = angstrom
    subgroup = c2v
    unique_axis = x
  )
\end{verbatim}

\begin{table}[h]
%\caption{Standard Cotton Ordering in \PSIthree}
\begin{center}
\begin{tabular}{ll}
\hline
\hline
Point Group & Cotton Ordering of Irreps \\
\hline
C$_1$       & A                                    \\
C$_i$       & A$_g$ A$_u$                          \\
C$_2$       & A B                                  \\
C$_s$       & A' A''                               \\
C$_{2h}$    & A$_g$ B$_g$ A$_u$ B$_u$              \\
C$_{2v}$    & A$_1$ A$_2$ B$_1$ B$_2$              \\
D$_2$       & A B$_1$ B$_2$ B$_3$                  \\
D$_{2h}$    & A$_g$ B$_{1g}$ B$_{2g}$ B$_{3g}$ A$_u$ B$_{1u}$ B$_{2u}$ B$_{3u}$ \\
\hline
\hline
\end{tabular}
\end{center}
\end{table}

\subsection{Specifying Scratch Disk Usage in \PSIthree} \label{scratchfiles}

Depending on the calculation, the \PSIthree\ package often requires
substantial temporary disk storage for integrals, wave function ampltiudes,
etc.  By default, \PSIthree\ will write all such datafiles to {\tt /tmp}
(except for the checkpoint file, which is written to {\tt ./} by default).
However, to allow for various customized arrangements of scratch disks,
the \PSIthree\ {\tt files:} block gives the user considerable control
over how temporary files are organized, including file names, scratch
directories, and the ability to ``stripe'' files over several disks (much
like RAID0 systems).  This section of keywords is normally placed within
the {\tt psi:} section of input, but may be used for specific \PSIthree\
modules, just like other keywords.

For example, if the user is working with \PSIthree\ on a computer
system with only one scratch disk (mounted at, e.g., {\tt /scr}), one
could identify the disk in the input file as follows:
\begin{verbatim}
psi: (
  ...
  files: (
    default: (
      nvolume = 1
      volume1 = "/scr/"
    )
  )
)
\end{verbatim}
The {\tt nvolume} keyword indicates the number of scratch
directories/disks to be used to stripe files, and each of these is
specified by a corresponding {\tt volumen} keyword.  (NB: the trailing
slash ``/'' is essential in the directoy name.)  Thus, in the above
example, all temporary storage files generated by the various
\PSIthree\ modules would automatically be placed in the {\tt /scr}
directory.  

By default, the scratch files are given the prefix ``{\tt psi}'', and
named ``{\tt psi.nnn}'', where {\tt nnn} is a number used by the
\PSIthree\ modules.  The user can select a different prefix by
specifying it in the input file with the {\tt name} keyword:
\begin{verbatim}
psi: (
  ...
  files: (
    default: (
      name = "H2O"
      nvolume = 1
      volume1 = "/scr/"
    )
  )
)
\end{verbatim}
The {\tt name} keyword allows the user to store data associated with
multiple calculations in the same scratch area.  Alternatively, one
may specify the filename prefix on the command-line of the {\tt psi3}
driver program (or any \PSIthree\ module) with the {\tt -p} argument:
\begin{verbatim}
psi3 -p H2O
\end{verbatim}

If the user has multiple scratch areas available, \PSIthree\ files may
be automatically split (evenly) across them:
\begin{verbatim}
psi: (
  ...
  files: (
    default: (
      nvolume = 3
      volume1 = "/scr1/"
      volume2 = "/scr2/"
      volume3 = "/scr3/"
    )
  )
)
\end{verbatim}
In this case, each \PSIthree\ datafile will be written in chunks (65
kB each) to three separate files, e.g., {\tt /scr1/psi.72}, {\tt
/scr2/psi.72}, and {\tt /scr3/psi.72}.  The maximum number of volumes
allowed for striping files is eight (8), though this may be easily
extended in the \PSIthree\ I/O code, if necessary.

The format of the {\tt files} section of input also allows the user to
place selected files in alternative directories, such as the current
working directory.  This feature is especially important if some of
the data need to be retained between calculations.  For example, the
following {\tt files:} section will put {\tt file32} (the \PSIthree\
checkpoint file) into the working directory, but all scratch files
into the temporary areas:
\begin{verbatim}
psi: (
  ...
  files: (
    default: (
      nvolume = 3
      volume1 = "/scr1/"
      volume2 = "/scr2/"
      volume3 = "/scr3/"
    )
    file32: ( nvolume = 1  volume1 = "./" )
  )
)
\end{verbatim}

\subsection{The {\tt .psirc} File} \label{psirc}

Users of \PSIthree\ often find that they wish to use certain keywords
or input sections in every calculation they run, especially those
keywords associated with the {\tt files:} section.  The {\tt .psirc}
file, which is kept in the user's {\tt \$HOME} directory, helps to
avoid repetition of keywords whose defaults are essentially user- or
system-specific.  A typical {\tt .psirc} file would look like:
\begin{verbatim}
psi: (
  files: (
    default: (
      nvolume=3
      volume1 = "/tmp1/mylogin/"
      volume2 = "/tmp2/mylogin/"
      volume3 = "/tmp3/mylogin/"
    )
    file32: (nvolume=1 volume1 = "./")
  )
)
\end{verbatim}

\subsection{Specifying Basis Sets} \label{basis-spec}

\PSIthree\ uses basis sets comprised of Cartesian or spherical harmonic
Gaussian functions. A basis set is identified by a string, enclosed
in double quotes. Currently, there exist three ways to specify which
basis sets to use for which atoms:
\begin{itemize}
\item \keyword{basis = string} -- all atoms use basis set type.
\item \keyword{basis = (string1 string2 string3 ... stringN)} -- 
\keyword{string {\em i}}
specifies the basis set for atom {\em i}. Thus, the number of strings
in the \keyword{basis} vector has to be the same as the number of
atoms (including ghost atoms but excluding dummy atoms). Another
restriction is that symmetry equivalent atoms should have same basis
sets, otherwise \PSIinput\ will use the string provided for the
so-called unique atom out of the set of symmetry equivalent ones.
\item 
\begin{verbatim}
  basis = (
    (element1 string1)
    (element2 string2)
            ...
    (elementN stringN)
  )
\end{verbatim}
\keyword{string {\em i}} specifies the basis set for chemical element 
\keyword{element {\em i}}.
\end{itemize}

\subsubsection{Default Basis Sets}

\PSIthree\ default basis sets are located in \pbasisdat\ which may be
found by default in {\tt \$psipath/share}. Tables
\ref{table:poplebasis}, \ref{table:dunningbasis},
\ref{table:wachtersbasis}, and \ref{table:ccbasis} list basis sets
pre-defined in \pbasisdat.

The predefined basis sets use either spherical harmonics or Cartesian
Gaussians, which is determined by the authors of the basis.
Currently \PSIthree\ cannot handle basis sets that consist
of a mix of Cartesian and spherical harmonics Gaussians.
Therefore there may be combinations of basis sets that are forbidden,
e.g. {\tt cc-pVTZ} and {\tt 6-31G**}.
In such case one can override the predetermined choice
of the type of the Gaussians by specifying the \keyword{puream}
keyword. It takes two values, {\tt true} or {\tt false},
for spherical harmonics and Cartesian Gaussians, respectively.

\begin{table}[p]
\caption{Pople-type basis sets available in \PSIthree}
\label{table:poplebasis}
\begin{center}
\begin{tabular}{|l|l|l|}
\hline
\hline
Basis Set 		&Atoms   	&Aliases\\ 
\hline
	STO-3G			& H-Ar			&\\
	3-21G			& H-Ar			&\\
	6-31G			& H-Ar, K, Ca, Cu	&\\
        6-31G*                  & H-Ar, K, Ca, Cu       &6-31G(d)\\
        6-31+G*                 & H-Ar                  &6-31+G(d)\\
        6-31G**                 & H-Ar, K, Ca, Cu       &6-31G(d,p)\\
	6-311G			& H-Ar			&\\
	6-311G*                 & H-Ar                  &6-311G(d)\\
        6-311+G*                & H-Ne                  &6-311+G(d)\\
	6-311G**                & H-Ar                  &6-311G(d,p)\\
        6-311G(2df,2pd)         & H-Ne                  &\\
	6-311++G**		& H, B-Ar		&6-311++G(d,p)\\
        6-311G(2d,2p)           & H-Ar                  &\\
        6-311++G(2d,2p)         & H-Ar                  &\\
        6-311++G(3df,3pd)       & H-Ar                  &\\
\hline
\hline
\end{tabular}
\end{center}
\end{table}

\begin{table}[tbp]
\caption{Huzinaga-Dunning basis sets available in \PSIthree}
\label{table:dunningbasis}
\begin{center}
\begin{tabular}{|l|l|}
\hline
\hline
Basis Set 		&Atoms   	\\
\hline
	(4S/2S)			& H		\\
	(9S5P/4S2P)		& B-F			\\
	(11S7P/6S4P)		& Al-Cl			\\
	DZ			& H, Li, B-F, Al-Cl		\\
	DZP			& H, Li, Be, B-F, Na, Al-Cl	\\
	DZ-DIF			& H, B-F, Al-Cl		\\
	DZP-DIF			& H, B-F, Al-Cl		\\
	TZ2P			& H, B-F, Al-Cl		\\
	TZ2PD			& H			\\
	TZ2PF			& H, B-F, Al-Cl		\\
	TZ-DIF			& H, B-F, Al-Cl		\\ 	
	TZ2P-DIF		& H, B-F, Al-Cl		\\
	TZ2PD-DIF		& H			\\
	TZ2PF-DIF		& H, B-F, Al-Cl		\\		
\hline
\hline
\end{tabular}
\end{center}
\end{table}

\begin{table}[tbp]
\caption{Wachters basis sets available in \PSIthree}
\label{table:wachtersbasis}
\begin{center}
\begin{tabular}{|l|l|}
\hline
\hline
Basis Set 		&Atoms   	\\ 
\hline
	WACHTERS		& K, Sc-Cu			\\
	WACHTERS-F		& Sc-Cu			\\
\hline
\hline
\end{tabular}
\end{center}
\end{table}

\begin{table}[tbp]
\caption{Correlation-consistent basis sets available in \PSIthree}
\label{table:ccbasis}
\begin{center}
\begin{tabular}{|l|l|l|}
\hline
\hline
Basis Set 		&Atoms   	&Aliases\\ 
\textbf{ (N = D,T,Q,5,6)}	&			&	\\
\hline
	cc-pVNZ			& H-Ar			&CC-PVNZ\\
	cc-pV(N+D)Z		& Al-Ar			&CC-PV(N+D)Z\\
        cc-pCVNZ                & B-Ne                  &CC-PCVNZ\\
	aug-cc-pVNZ		& H-He, B-Ne, Al-Ar	&AUG-CC-PVNZ\\
	aug-cc-pV(N+D)Z		& Al-Ar			&AUG-CC-PCV(N+d)Z\\
	aug-cc-pCVNZ    	& B-F (N${<}$6)		&AUG-CC-PCVNZ\\
	d-aug-cc-pVNZ		& H			&\\
	pV7Z\footnote{testa}	& H, C, N, O, F, S	&PV7Z\\
	cc-pV7Z\footnote{testb}	& H, C, N, O, F, S	&CC-PV7Z\\
	aug-pV7Z\footnote{testc}     & H, C, N, O, F, S	&AUG-PV7Z\\
	aug-cc-pV7Z\footnote{testd}  & H, N, O, F            &AUG-CC-PV7Z\\
\hline
\hline
\end{tabular}
\end{center}
\end{table}

\subsubsection{Custom Basis Sets} \label{custom-basis}

If the basis set you desire is not already defined in \PSIthree, a
custom set may be used by specifying its exponents and contraction
coefficients (either in the input file or another file named {\tt
basis.dat}.) A contracted Cartesian Gaussian-type orbital
\begin{equation}
\phi_{\rm CGTO} =  x^ly^mz^n\sum_i^N C_i \exp(-\alpha_i[x^2+y^2+z^2])
\end{equation}
where
\begin{equation}
L = l+m+n
\end{equation}
is written as
\begin{verbatim}
basis: (
  ATOM_NAME: "BASIS_SET_LABEL" = (
    (L (C1  alpha1)
       (C2  alpha2)
       (C3  alpha3)
       ...
       (CN  alpha4))   
    )
  )
\end{verbatim}

One must further specify whether Cartesian or spherical harmonics
Gaussians are to be used. One can specify that in two ways:
\begin{itemize}
\item It can be done on a basis
by basis case, such as
\begin{verbatim}
basis: (
  "BASIS_SET_LABEL1":puream = true
  "BASIS_SET_LABEL2":puream = false
  "BASIS_SET_LABEL3":puream = true
  ....
)
\end{verbatim}
By default, if \keyword{puream} is not given for a basis,
then Cartesian Gaussians will be used.
\item
The choice between Cartesian or spherical harmonics Gaussian
can be made globally by specifying \keyword{puream} keyword
in the standard input section, e.g.
\begin{verbatim}
psi: (
  ...
  puream = true
  ...
)
\end{verbatim}
\end{itemize}
Note that currently \PSIthree\ cannot handle basis sets that consist
of a mix of Cartesian and spherical harmonics Gaussians.

Note that the basis set must be given in a separate {\tt basis:}
section of input, outside all other sections (including {\tt psi:}).
For example, the \PSIthree\ DZP basis set for carbon could be
specified as:
\begin{verbatim}
basis: (
  carbon: "DZP" = (
    (S (   4232.6100      0.002029) 
       (    634.8820      0.015535)
       (    146.0970      0.075411)
       (     42.4974      0.257121)
       (     14.1892      0.596555) 
       (      1.9666      0.242517))
    (S (      5.1477      1.0))
    (S (      0.4962      1.0))
    (S (      0.1533      1.0))
    (P (     18.1557      0.018534)
       (      3.9864      0.115442)
       (      1.1429      0.386206)
       (      0.3594      0.640089))
    (P (      0.1146      1.0))
    (D (      0.75        1.0))
  )
)
\end{verbatim}

Here are a couple of additional points that may be useful when
specifying customized basis sets:
\begin{itemize}
\item Normally the {\tt basis.dat} file is placed in the same
directory as the main input file, but it may also be placed in a
global location specified by the keyword {\tt basisfile}:
\begin{verbatim}
  basisfile = "/home/users/tool/chem/h2o/mybasis.in"
\end{verbatim}
\item To scale a basis set, a scale factor may be added as the last item
in the specification of each contracted Gaussian function.  For
example, to scale the S functions in a 6-31G** basis for hydrogen,
one would use the following
\begin{verbatim}
  hydrogen: "6-31G**" =
      ( (S (    18.73113696     0.03349460)
           (     2.82539437     0.23472695)
           (     0.64012169     0.81375733) 1.2 )
        (S (     0.16127776     1.00000000) 1.2 )
        (P (     1.10000000     1.00000000))
       )
\end{verbatim}
In this example, both contracted S functions have their exponents
scaled by a factor of (1.2)$^2$ = 1.44.  The output file should show
the exponents after scaling.
\end{itemize}

\subsubsection{Automated Conversion of Basis Sets}

The \PSIthree\ package is distributed with a Perl-based utility, named {\tt
g94\_2\_PSI3}, which will convert basis sets from the Gaussian ('94 or later)
format to \PSIthree\ format automatically.  This utility is especially useful
for basis sets downloaded from the EMSL database at \htmladdnormallink{{\tt
http://www.emsl.pnl.gov/forms/basisform.html}}{http://www.emsl.pnl.gov/forms/basisform.html}.
To use this utility, save the desired basis set to a file (e.g., {\tt
g94\_basis.dat}) in the Gaussian format.  Then execute:
\begin{verbatim}
g94_2_PSI3 < g94_basis.dat > basis.dat
\end{verbatim}
You may either incorporate the results from the {\tt basis.dat} file into
your input file as described above, or place the results into a global {\tt
basis.dat} file.  Be sure to surround the basis-set definition with the
{\tt basis:()} keyword (as shown in the above examples) or input parsing
errors will result.

\subsection{Specification of Ghost Atoms}

To specify ghost atoms, use atom symbol \keyword{G} in
\keyword{zmat} or \keyword{geometry} keywords:
\begin{verbatim}
  zmat = (
    he
    g 1 r
  )
  basis = "aug-cc-pVTZ"
\end{verbatim}
Basis sets for ghost atoms
must be defined explicitly using \keyword{GHOST} as the element name:
\begin{verbatim}
  basis:GHOST:"aug-cc-pVTZ": (
    ....
  )
\end{verbatim}
This method leads to replication of existing basis set
definitions.
It is usually more convenient to specify ghost atoms as regular atoms
with zero charge:
\begin{verbatim}
  zmat = (
    he
    he 1 r
  )
  charges = (2.0 0.0)
  basis = "aug-cc-pVTZ"
\end{verbatim}
In this example, the second helium atom is a ``ghost'' atom which carries
helium's aug-cc-pVTZ basis set.

