1%
2% $Id$
3%
4%
5%-----------------------------------------------------------------%
6%                                                                 %
7%                                                                 %
8%  This latex source file should NOT be edited.  It is generated  %
9%  automatically from the integral API source code using "seetex" %
10%  modifications required sould be made in the source code which  %
11%  is in the source directory ".../nwchem/src/NWints/api" from    %
12%  the standard repository. If you have questions or problems     %
13%  contact Ricky Kendall at ra_kendall@pnl.gov or (509)375-2602   %
14%                                                                 %
15%  To make the ``current version'' of these files:                %
16%  1) cd ${NWCHEM_TOP}/src/NWints/api                            $%
17%  2) make doc                                                    %
18%                                                                 %
19%-----------------------------------------------------------------%
20%
21\chapter{Integral Application Programmer's Interface}
22The integral (INT) Application Programmer's Interface (API) is the
23interface to the base integral technology available in the NWChem
24application software.  The INT-API interfaces currently three integral
25codes, the sp rotated axis code (from GAMESS-UK), the
26McMurchie-Davidson code (PNNL, Stave, Fr\"uchtl, and Kendall), and the
27Texas 93/95 Integral code (Wolinski and Pulay).  The API is currently
28limited to the requisite functionality of NWChem.  Further
29functionality will be added over time as requirements are determined,
30prioritized and implemented.
31
32\section{Overview}
33The integral code operates as a single threaded suite and all
34parallelization is achieved at the level of the routines that call the
35API or above.  The API requires a collective initialization phase to
36determine operating parameters for the particular run based on both
37user input and the basis set specification.  The API will select the
38appropriate base integral code for the requested integrals at the time
39of each request.  Once all integral computations have completed for
40the module the termination routines should be called (in a collective
41fashion).
42
43Coupled initialization and termination can be executed as many times
44as required. It is imperative that the basis set object, ECP object,
45and the geometry object are constant between initialization and
46termination, e.g., normalization must occur prior to initialization.
47If this data must be modified then a termination and re-initialization
48of the integral API is {\it required}.
49
50The INT-API has the following kinds of routines:
51\begin{itemize}
52\item initialization, integral accuracy and termination,
53\item memory requirements,
54\item integral routines (both shell based and blocked),
55\item derivative integral routines,
56\item property integral routines,
57\item periodic integral routines,
58\item Internal API Routines
59\end{itemize}
60
61Details of the API spcification are in appendix \ref{appendix_intapi}.
62
63\section{Adding a new base integral code to the NWChem INT-API}
64
65This is a straightforward but non-trivial task.  Requirements include
66a set of APIs for the base integral code to marry it to the NWChem
67style.  The computation of integral batches (e.g., in shell quartets
68or groups of shell quartets, i.e., blocks) must be autonomous and use
69a scratch buffer passed at the time integral batch request for unified
70memory management.  Any precomputation must be done in the
71initialization phase and stored for later use.  The initialization
72routines must be based on using the NWChem basis set and geometry data.
73This may be translated and stored for later use in the base integral
74code format but it must not require significant amounts of memory.  A
75memory estimate routine that tells the application code the amount of
76scratch memory and buffer memory that is required.  This should be
77dynamic in nature and not be a fixed dimension.  In other words, the
78memory utilization should scale with the size of the problem.
79Termination routines should completely cleanup all temporary memory
80storage that is done in the Memory Allocator.
81
82
83%\subsection{API Initialization and Termination Routines}
84%int\_init, intd\_init, int\_terminate, int\_acc,
85%
86%\subsection{API Internal Routines}
87%int\_chk\_init, int\_chk\_sh, exact\_mem, exactd\_mem, cando\_sp, int\_canon,
88%int\_hf1sp
89%
90%\subsection{API include files}
91%apiP.fh, apispP.fh, int\_tim.fh, numb\_qP.fh
92%
93%\subsection{API Standard Integral Routines}
94%int\_mem int\_1cg, int\_1e3ov, int\_1eall, int\_1eh1, int\_1eke, int\_1eov, int\_1epe,
95%int\_2e2c, int\_2e3c, int\_2e4c, int\_l1e3ov, int\_l1eall, int\_l1eh1,
96%int\_l1eke, int\_l1eov, int\_l1epe, int\_l2e2c, int\_l2e3c, int\_l2e4c,
97%int\_lgen1e, int\_mpole, int\_nint, int\_pgen1e, int\_projpole
98%
99%\subsection{API blocking routines}
100%intb\_2e4c, intb\_init4c
101%
102%\subsection{API Integral Derivative Routines}
103%intd\_1eh1, intd\_1eov, intd\_2e2c, intd\_2e3c, intd\_2e4c
104%
105%\subsection{API Periodic Integral Routines}
106%intp\_* routines include only the specific translations of centers
107%required currently by the periodic DFT code.
108%
109%intp\_txyz
110%
111