1%
2% $Id$
3%
4\label{sec:selci}
5
6The selected CI module is integrated into NWChem but as yet no
7input module has been written.  The input thus consists of setting the
8appropriate variables in the database.
9
10It is assumed that an initial SCF/MCSCF calculation has completed, and
11that MO vectors are available.  These will be used to perform a
12four-index transformation, if this has not already been performed.
13
14\section{Background}
15
16This is a general spin-adapted, configuration-driven CI program
17which can perform arbitrary CI calculations, the only restriction
18being that all spin functions are present for each orbital occupation.
19CI wavefunctions may be specified using a simple configuration
20generation program, but the prime usage is intended to be in
21combination with perturbation correction and selection of new
22configurations.  The second-order correction (Epstein-Nesbet) to the
23CI energy may be computed, and at the same time configurations that
24interact greater than a certain threshold with the current CI
25wavefunction may be chosen for inclusion in subsequent calculations.
26By repeating this process (typically twice is adequate) with the same
27threshold until no new configurations are added, the CI expansion may
28be made consistent with the selection threshold, enabling tentative
29extrapolation to the full-CI limit.
30
31A typical sequence of calculations is as follows:
32\begin{enumerate}
33\item Pick as an initial CI reference the previously executed
34  SCF/MCSCF.
35\item Define an initial selection threshold.
36\item Determine the roots of interest in the current reference space.
37\item Compute the perturbation correction and select additional
38  configurations that interact greater than the current threshold.
39\item Repeat steps 3 and 4.
40\item Lower the threshold (a factor of 10 is common) and repeat steps
41  3, 4, and 5.  The {\em first} pass through step 4 will yield the
42  approximately self-consistent CI and CI+PT energies from the {\em
43    previous} selection threshold.
44\end{enumerate}
45
46To illustrate this, below is some abbreviated output from a
47calculation on water in an augmented cc-PVDZ basis set with one frozen
48core orbital.  The SCF was converged to high precision in $C_{2v}$
49symmetry with the following input
50\begin{verbatim}
51  start h2o
52  geometry; symmetry c2v
53    O 0 0 0; H 0 1.43042809 -1.10715266
54  end
55  basis
56    H library aug-cc-pvdz; O library aug-cc-pvdz
57  end
58  task scf
59  scf; thresh 1d-8; end
60\end{verbatim}
61
62The following input restarts from the SCF to perform a sequence of
63selected CI calculations with the specified tolerances, starting with
64the SCF reference.
65\begin{verbatim}
66  restart h2o
67  set fourindex:occ_frozen 1
68  set selci:mode select
69  set "selci:selection thresholds" \
70      0.001 0.001 0.0001 0.0001 0.00001 0.00001 0.000001
71  task selci
72\end{verbatim}
73Table \ref{selcitab} summarizes the output from each of the major
74computational steps that were performed.
75\begin{table}[htbp]
76  \begin{tabular}{c|l|r|l}
77       &               & CI        &    \\
78  Step &  Description  & dimension &  Energy        \\ \hline
79       &               &           &          \\
80    1  &  Four-index, one frozen-core &    &      \\
81    2  &  Config. generator, SCF default &  1 & \\
82    3+4&  CI diagonalization & 1 &  $E_{CI} = -76.041983$ \\
83    5  &  PT selection T=0.001 & 1 & $E_{CI+PT} = -76.304797$ \\
84    6+7 &  CI diagonalization & 75 & $E_{CI} = -76.110894$ \\
85    8  &  PT selection T=0.001& 75 & $E_{CI+PT} = -76.277912$ \\
86    9+10&  CI diagonalization & 75 & $E_{CI}(T=0.001) = -76.110894$ \\
87    11 &  PT selection T=0.0001 & 75 & $E_{CI+PT}(T=0.001) = -76.277912$ \\
88    12+13 & CI diagonalization & 823 & $E_{CI} = -76.228419$ \\
89    14 & PT selection T=0.0001 & 823 & $E_{CI+PT} = -76.273751$ \\
90    15+16 & CI diagonalization & 841 & $E_{CI}(T=0.0001) = -76.2300544$ \\
91    17 & PT selection T=0.00001& 841 & $E_{CI+PT}(T=0.0001) = -76.274073$ \\
92    18+19 & CI diagonalization & 2180 &  $E_{CI} = -76.259285$ \\
93    20 & PT selection T=0.00001& 2180 & $E_{CI+PT} = -76.276418$ \\
94    21+22 & CI diagonalization & 2235 & $E_{CI}(T=0.00001) = -76.259818$ \\
95    23 & PT selection T=0.000001 & 2235 & $E_{CI+PT}(T=0.00001) = -76.276478$\\
96    24   & CI diagonalization &  11489 & \\ \hline
97\end{tabular}
98\caption{\label{selcitab} Summary of steps performed in a selected CI
99  calculation on water.}
100\end{table}
101
102\section{Files}
103
104Currently, no direct control is provided over filenames.  All files
105are prefixed with the standard file-prefix, and any files generated by
106all nodes are also postfixed with the processor number.  Thus, for
107example the molecular integrals file, used only by process zero, might
108be called {\tt h2o.moints} whereas the off-diagonal Hamiltonian matrix
109element file used by process number eight would be called {\tt
110  h2o.hamil.8}.
111
112\sloppy
113
114\begin{description}
115\item{\tt ciconf} --- the CI configuration file, which holds
116  information about the current CI expansion, indexing vectors, etc.
117  This is the most important file and is required for all restarts.
118  Note that the CI configuration generator is only run if this file
119  does not exist. Referenced only by process zero.
120\item{\tt moints} --- the molecular integrals, generated by the four-index
121  transformation.  As noted above these must currently be manually
122  deleted, or the database entry \verb+selci:moints:force+ set, to
123  force regeneration.  Referenced only by process zero.
124\item{\tt civecs} --- the CI vectors.    Referenced only by process zero.
125\item{\tt wmatrx} --- temporary file used to hold coupling coefficients.
126  Deleted at calculation end.  Referenced only by process zero.
127\item{\tt rtname, roname} --- restart information for the PT
128  selection.  Should be automatically deleted if no restart is
129  necessary.  Referenced only by process zero.
130\item{\tt hamdg} --- diagonal elements of the Hamiltonian.
131  Deleted at calculation end.  Referenced only by process zero.
132\item{\tt hamil} --- off-diagonal Hamiltonian matrix elements.  All
133  processes generate a file containing a subset of these elements.
134  These files can become very large.  Deleted at calculation end.
135\end{description}
136
137\fussy
138
139\section{Configuration Generation}
140
141If no configuration is explicitly specified then the previous
142SCF/MCSCF wavefunction is used, adjusting for any orbitals frozen in
143the four-index transformation.  The four-index transformation must
144have completed successfully before this can execute.  Orbital
145configurations for use as reference functions may also be explicitly
146specified.
147
148Once the default/user-input reference configurations have been
149determined additional reference functions may be generated by applying
150multiple sets of creation-annihilation operators, permitting for
151instance, the ready specification of complete or restricted active
152spaces.
153
154Finally, a uniform level of excitation from the current set of
155configurations into all orbitals may be applied, enabling, for
156instance, the simple creation of single or single+double excitation
157spaces from an MCSCF reference.
158
159\subsection{Specifying the reference occupation}
160
161A single orbital configuration or occupation is specified by
162\begin{verbatim}
163  ns  (socc(i),i=1,ns)  (docc(i),i=1,nd)
164\end{verbatim}
165where \verb+ns+ specifies the number of singly occupied orbitals,
166\verb+socc()+ is the list of singly occupied orbitals, and
167\verb+docc()+ is the list of doubly occupied orbitals (the
168number of doubly occupied orbitals, \verb+nd+, is inferred from
169\verb+ns+ and the total number of electrons).  All occupations may be
170strung together and inserted into the database as a single integer
171array with name \verb+"selci:conf"+.  For example, the input
172\begin{verbatim}
173  set "selci:conf" \
174    0                1  2  3  4 \
175    0                1  2  3 27 \
176    0                1  3  4 19 \
177    2   11 19        1  3  4 \
178    2    8 27        1  2  3 \
179    0                1  2  4 25 \
180    4   3  4 25 27   1  2 \
181    4   2  3 19 20   1 4 \
182    4   2  4 20 23   1 3
183\end{verbatim}
184specifies the following nine orbital configurations
185\begin{verbatim}
186   1(2)  2(2)  3(2)  4(2)
187   1(2)  2(2)  3(2) 27(2)
188   1(2)  3(2)  4(2) 19(2)
189   1(2)  3(2)  4(2) 11(1) 19(1)
190   1(2)  2(2)  3(2)  8(1) 27(1)
191   1(2)  2(2)  4(2) 25(2)
192   1(2)  2(2)  3(1)  4(1) 25(1) 27(1)
193   1(2)  2(1)  3(1)  4(2) 19(1) 20(1)
194   1(2)  2(1)  3(2)  4(1) 20(1) 23(1)
195\end{verbatim}
196The optional formatting of the input is just to make this arcane
197notation easier to read.  Relatively few configurations can be
198currently specified in this fashion because of the input line limit of
1991024 characters.
200
201\subsection{Applying creation-annihilation operators}
202
203Up to 10 sets of creation-annihilation operator pairs may be
204specified, each set containing up to 255 pairs.  This suffices to
205specify complete active spaces with up to ten electrons.
206
207The number of sets is specified as follows,
208\begin{verbatim}
209  set selci:ngen 4
210\end{verbatim}
211which indicates that there will be four sets.  Each set is then
212specified as a separate integer array
213\begin{verbatim}
214  set "selci:refgen  1" 5 4    6 4   5 3   6 3
215  set "selci:refgen  2" 5 4    6 4   5 3   6 3
216  set "selci:refgen  3" 5 4    6 4   5 3   6 3
217  set "selci:refgen  4" 5 4    6 4   5 3   6 3
218\end{verbatim}
219In the absence of friendly, input note that the names
220\verb+"selci:refgen n"+ must be formatted with n in \verb+I2+
221format. Each set specifies a list of creation-annihilation operator
222pairs (in that order).  So for instance, in the above example each set
223is the same and causes the excitations
224\begin{verbatim}
225  4->5   4->6   3->5   3->6
226\end{verbatim}
227If orbitals 3 and 4 were initially doubly occupied, and orbitals 5 and
2286 initially unoccupied, then the application of this set of operators
229four times in succession is sufficient to generate the four electron
230in four orbital complete active space.
231
232The precise sequence in which operators are applied is
233\begin{enumerate}
234\item loop through sets of operators
235\item loop through reference configurations
236\item loop through operators in the set
237\item apply the operator to the configuration, if the result is new add it
238  to the new list
239\item end the loop over operators
240\item end the loop over reference configurations
241\item augment the configuration list with the new list
242\item end the loop over sets of operators
243\end{enumerate}
244
245\subsection{Uniform excitation level}
246
247By default no excitation is applied to the reference configurations.
248If, for instance, you wanted to generate a single excitation CI space
249from the current configuration list, specify
250\begin{verbatim}
251set selci:exci 1
252\end{verbatim}
253Any excitation level may be applied, but since the list of
254configurations is explicitly generated, as is the CI Hamiltonian
255matrix, you will run out of disk space if you attempt to use more than
256a few tens of thousands of configurations.
257
258\section{Number of roots}
259
260By default, only one root is generated in the CI diagonalization or
261perturbation selection.  The following requests that 2 roots be
262generated
263\begin{verbatim}
264  set selci:nroot 2
265\end{verbatim}
266There is no imposed upper limit.  If many roots are required, then, to
267minimize root skipping problems, it helps to perform an initial
268approximate diagonalization with several more roots than required, and
269then resetting this parameter once satisfied that the desired
270states are obtained.
271
272\section{Accuracy of diagonalization}
273
274By default, the CI wavefunctions are converged to a residual norm of
275$10^{-6}$ which provides similar accuracy in the perturbation
276corrections to the energy, and much higher accuracy in the CI
277eigenvalues.  This may be adjusted with
278\begin{verbatim}
279 set "selci:diag tol" 1d-3
280\end{verbatim}
281the example setting much lower precision, appropriate for the
282approximate diagonalization discussed in the preceding section.
283
284\section{Selection thresholds}
285
286When running in the selected-CI mode the program will loop
287through a list of selection thresholds ($T$), performing the CI
288diagonalization, computing the perturbation correction, and augmenting
289the CI expansion with configurations that make an energy lowering to
290any root greater than $T$.  The list of selection thresholds is
291specified as follows
292\begin{verbatim}
293  set "selci:selection thresholds" \
294      0.001 0.001 0.0001 0.0001 0.00001 0.00001 0.000001
295\end{verbatim}
296
297There is no default for this parameter.
298
299
300\section{Mode}
301
302By default the program runs in \verb="ci+davids"= mode and just
303determines the CI eigenvectors/values in the current configuration
304space.  To perform a selected-CI with perturbation correction use the
305following
306\begin{verbatim}
307  set selci:mode select
308\end{verbatim}
309and remember to define the selection thresholds.
310
311\section{Memory requirements}
312
313No global arrays are used inside the selected-CI, though the
314four-index transformation can be automatically invoked and it does use
315GAs.  The selected CI replicates inside each process
316\begin{itemize}
317\item all unique two-electron integrals in the MO basis that are
318  non-zero by symmetry, and
319\item all CI information, including the CI vectors.
320\end{itemize}
321These large data structures are allocated on the local stack.  A fatal
322error will result if insufficient memory is available.
323
324\section{Forcing regeneration of the MO integrals}
325
326When scanning a potential energy surface or optimizing a geometry the
327MO integrals need to be regenerated each time.  Specify
328\begin{verbatim}
329  set selci:moints:force logical .true.
330\end{verbatim}
331to accomplish this.
332
333\section{Disabling update of the configuration list}
334
335When computing CI+PT energy the reference configuration list is
336normally updated to reflect all configurations that interact more than
337the specified threshold.  This is usually desirable.  But when
338scanning a potential energy surface or optimizing a geometry the
339reference list must be kept fixed to keep the potential energy surface
340continuous and well defined.  To do this specify
341\begin{verbatim}
342  set selci:update logical .false.
343\end{verbatim}
344
345\section{Orbital locking in CI geometry optimization}
346
347The selected CI wavefunction is not invariant to orbital rotations or
348to swapping two or more orbitals. Orbitals could be swapped or rotated
349when the geometry is changed in a geometry optimization step. The keyword
350\verb#lock# has to be set in the SCF/MCSCF (vectors) input block to keep the
351orbitals in the same order throughout the geometry optimization.
352