.. index::
   single: Program; GRID_IT
   single: GRID_IT

.. _TUT\:sec\:gridit:

:program:`GRID_IT` --- A Program for Orbital Visualization
======================================================================

.. warning::

   This program requires a submodule

: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 :kword:`Sparse`,:kword:`Dense`,
:kword:`Npoints` specify the density of the grid. And keywords :kword:`ORange` (occupation range),
:kword:`ERange` (energy range), :kword:`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
:kword:`All` --- to calculate grids for all orbitals or :kword:`Dense` --
to calculate grid with very high quality you can produce a very huge
output file.

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

  &GRID_IT
  Dense
  * compute orbitals from 20 to 23 form symmetry 1 and orbital 4 from symmetry 2
  SELECT
  1:20-23,2:4

.. compound::

  :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 :kword:`NAME`) ::

    &GATEWAY
     ...
    &SEWARD
    &SCF
    &GRID_IT
    NAME=scf
    &RASSCF
    &GRID_IT
    NAME=ras

  or, you can run :program:`GRID_IT` separately, when the calculation has finished. ::

    &GATEWAY
    &GRID_IT
    FILEORB=/home/joe/project/water/water.ScfOrb

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:

.. _tab\:grid_it_size:

============================== ======== ======== ===============
:math:`\ce{C_{24}}` molecule, 14 orbitals.
----------------------------------------------------------------
Keywords                       Time (s) filesize picture quality
============================== ======== ======== ===============
:kword:`Dense`; :kword:`ASCII` 188      473 MB   best
:kword:`Dense`                 117      328 MB   best
:kword:`Dense`; :kword:`Pack`  117      41 MB    below average
Default (no keywords)          3        9 MB     average
:kword:`Pack`                  3        1.4 MB   average
:kword:`Sparse`                1.3      3 MB     poor
:kword:`Sparse`; :kword:`Pack` 1.3      620 KB   poor
============================== ======== ======== ===============

:program:`GRID_IT` --- Basic and Most Common Keywords
-----------------------------------------------------

.. class:: keywordlist

:kword:`ASCII`
  Generate the :file:`grid` file in ASCII (e.g. to transfer to another computer),
  can only be used in combination with :kword:`NoLUSCUS`

:kword:`ALL`
  Generate all orbitals

:kword:`SELECT`
  Select orbitals to compute
