% tut_grid_it.tex $ this file belongs to the Molcas repository $*/
\section{GRID\_IT: A Program for Orbital Visualization}
\label{TUT:sec:gridit}
\index{Program!Grid\_It@\program{Grid\_It}}\index{Grid\_It@\program{Grid\_It}}

\program{GRID\_IT} is an interface program for calculations of molecular
orbitals and density in a set of cartesian grid points. Calculated grid
can be visualized by separate program \program{LUSCUS} in 
the form of isosurfaces. 

\program{GRID\_IT} generates the regular grid and calculates amplitudes of 
molecular orbitals in this net. Keywords \keyword{Sparse},\keyword{Dense},
\keyword{Npoints} specify the density of the grid. And keywords \keyword{ORange} (occupation range),
\keyword{ERange} (energy range), \keyword{Select} allow to select some specific orbitals to draw.

As default \program{GRID\_IT} will use grid net with intermediate quality,
and choose orbitals near HOMO-LUMO region. Note, that using keyword
\keyword{All} - to calculate grids for all orbitals or \keyword{Dense} -
to calculate grid with very high quality you can produce a very huge
output file.


\label{TUT:sec:gridit_dependencies}
\program{GRID\_IT} requires the communication file \file{RUNFILE},
processed by \program{GATEWAY} and any formated \file{INPORB} file: \file{SCFORB},
\file{RASORB}, \file{PT2ORB}, generated by program \program{SCF}, \program{RASSCF},
or \program{CASPT2}, respectively. The output file \file{M2MSI} 
contains the graphical information.

Normally you do not need to specify any keywords for \program{GRID\_IT}:
the selection of grid size, as well as the selection of orbitals done automatically.

An input example for \program{GRID\_IT} is:

\begin{inputlisting}
 &GRID_IT 
Dense
* compute orbitals from 20 to 23 form symmetry 1 and orbital 4 from symmetry 2
SELECT
1:20-23,2:4
\end{inputlisting}

\program{GRID\_IT} can be run in a sequence of other computational codes
(if you need to run \program{GRID\_IT} several times, you have to rename 
grid file by using EMIL command, or by using keyword NAME)
\begin{inputlisting}
&GATEWAY
 ...
&SEWARD 
&SCF
&GRID_IT
NAME=scf
&RASSCF
&GRID_IT
NAME=ras
\end{inputlisting}
or, you can run \program{GRID\_IT} separately, when the calculation has finished.

\begin{inputlisting}
&GATEWAY
&GRID_IT
FILEORB=/home/joe/project/water/water.ScfOrb
\end{inputlisting}

\ifmanual

This is quite important to understand that the timing for \program{GRID\_IT}, and
the size of generated grid file depends dramatically on the targeting problem.
To get a printer quality pictures you have to use Dense grid, but in order to see the
shape of orbitals - low quality grids are much more preferable.

The following table illustrates this dependence:

$C_{24}$ molecule, 14 orbitals.

\begin{tabular}{|c|c|c|c|} \hline
Keywords & Time (sec) & filesize & picture quality \\
\hline
Dense, ASCII  & 188  & 473 Mb & best \\
Dense         & 117   & 328 Mb & best \\
Dense, Pack   & 117  & 41  Mb & below average \\
Default (no keywords)  & 3 & 9 Mb & average \\
Pack                   & 3 & 1.4 Mb & average \\
Sparse                 & 1.3 & 3 Mb & poor \\
Sparse, Pack           & 1.3 & 620 Kb & poor \\
\hline
\end{tabular}

\fi
\subsection{GRID\_IT - Basic and Most Common Keywords}
\begin{keywordlist}
\item[ASCII] Generate the \file{grid} file in ASCII (e.g. to transfer to another computer), 
can be only used in combitation with \keyword{NoLUSCUS}
\item[ALL]   Generate all orbitals
\item[SELECT] Select orbitals to compute
\item[]

%--
\end{keywordlist}

