1# $Id$
2
3Basis Set Object/API
4Rick A. Kendall and Robert J. Harrison (April/May 1994)
5
6The basis set object/api was designed to get all information from the
7basis set based on a unique handle.  The internal data structures
8store only the unique tag information which is different from what a
9symmetry unique atom might be.  The routines are listed below with a
10short argument list and then detailed descriptions follow.
11
12logical function bas_version()
13logical function bas_create(basis,name)
14logical function bas_destroy(basis)
15logical function bas_check_handle(basis,msg)
16logical function bas_print(basis)
17logical function bas_rtdb_load(rtdb, geom, basis, name)
18logical function bas_rtdb_store(rtdb, name, basis)
19logical function bas_high_angular(basis,high_angular)
20logical function gbs_map_print(basis)
21logical function bas_print_all()
22logical function bas_cn2ce(basis,cont,center)
23logical function bas_cn2bfr(basis,cont,ifirst,ilast)
24logical function bas_ce2bfr(basis, icent, ibflo, ibfhi)
25logical function bas_ce2cnr(basis,center,ifirst,ilast)
26logical function bas_bf2ce(basis,testbf,center)
27logical function bas_bf2cn(basis,testbf,cont)
28logical function bas_numbf(basis,nbf)
29logical function bas_name(basis,basis_name,trans_name)
30logical function bas_get_exponent(basis,icont,exp)
31logical function bas_continfo(basis,icont,type,nprimo,ngeno,sphcart)
32logical function bas_numcont(basis,numcont)
33logical function bas_get_coeff(basis,icont,coeff)
34logical function bas_set_exponent(basis,icont,exp,nexp)
35logical function bas_set_coeff(basis,icont,coeff,ncoeff)
36logical function bas_nbf_cn_max(basis,nbf_max)
37logical function bas_nbf_ce_max(basis,nbf_max)
38
39c......................................................................
40      logical function bas_version()
41c: Routine that calclulates the size of the common block structures
42c  used in the basis set object and the mapped representation object.
43c:input none
44c:output always true.
45c......................................................................
46      logical function bas_create(basis,name)
47c
48c creates a handle and marks it active in the in-core data structure
49c
50      integer basis       ! [output] returned handle
51      character*(*)name   ! [input] name of basis set.
52c......................................................................
53      logical function bas_destroy(basis)
54c
55c destroys information about an active incore basis
56c and the associated mapping arrays.
57c
58      integer basis ![input] basis set handle to be destroyed
59c......................................................................
60      logical function bas_check_handle(basis,msg)
61c
62c Checks to see if a basis set handle is valid
63c
64      integer basis      ! [input] handle
65      character*(*) msg  ! [input] error message
66c......................................................................
67      logical function bas_print(basis)
68c
69c routine to print unique basis information that is in core
70c
71      integer basis  ! [input] basis set handle
72c......................................................................
73      logical function bas_rtdb_load(rtdb, geom, basis, name)
74c
75c routine that loads a basis set from the rtdb and using the
76c geometry information builds the mapping arrays to contractions/
77c shells, basis functions, and centers.
78c
79      integer rtdb        ! [input] rtdb handle
80      integer geom        ! [input] geometry handle with info loaded
81      integer basis       ! [input] basis handle
82      character*(*) name  ! [input] basis set name that must be on the rtdb
83c......................................................................
84      logical function bas_rtdb_store(rtdb, name, basis)
85c
86c routine that does an incore basis set store to the rtdb
87c
88      integer rtdb              ! [input] handle to database
89      character*(*) name        ! [input] name to use when storing db
90      integer basis             ! [input] handle to basis set
91c......................................................................
92      logical function bas_high_angular(basis,high_angular)
93c
94c  calculate, return and store high angular momentem function
95c   for given basis.
96c
97      integer basis         ! [input] basis set handle
98      integer high_angular  ! [output] high angular momentum of basis
99c......................................................................
100      logical function gbs_map_print(basis)
101c
102c prints the basis set <-> geometry mapping information
103c
104      integer basis    ! [input] basis set handle
105c......................................................................
106      logical function bas_print_all()
107c
108c routine to print active all basis set(s) information
109c
110c......................................................................
111      logical function bas_cn2ce(basis,cont,center)
112c
113c returns the center for a given mapped contraction
114c
115      integer basis     ! [input] basis set handle
116      integer cont      ! [input] mapped contraction index
117      integer center    ! [output] center index
118c......................................................................
119      logical function bas_cn2bfr(basis,cont,ifirst,ilast)
120c
121c returns the first basis function index of a mapped contraction
122c in ifirst and the last basis function index in ilast
123c
124      integer basis     ! [input] basis set handle
125      integer cont      ! [input] mapped contraction index
126      integer ifirst    ! [output] first basis function
127      integer ilast     ! [output] last basis function
128c......................................................................
129      logical function bas_ce2bfr(basis, icent, ibflo, ibfhi)
130c
131c  returns the basis function range for a given center
132c
133      integer basis             ! [input] handle
134      integer icent             ! [input] no. of center
135      integer ibflo, ibfhi      ! [output] range of functions on center
136c......................................................................
137      logical function bas_ce2cnr(basis,center,ifirst,ilast)
138c
139c returns the mapped contraction range on a given center
140c
141      integer basis    ! [input] basis set handle
142      integer center   ! [input] center index
143      integer ifirst   ! [output] first mapped contraction
144      integer ilast    ! [output] last mapped contraction
145c......................................................................
146      logical function bas_bf2ce(basis,testbf,center)
147c
148c routine to return the center of a given basis function
149c
150      integer basis   ! [input] basis set handle
151      integer testbf  ! [input] basis function index
152      integer center  ! [output] center index
153c......................................................................
154      logical function bas_bf2cn(basis,testbf,cont)
155c
156c returns the mapped contraction index that contains the given
157c basis function index
158c
159      integer basis   ! [input] basis set handle
160      integer testbf  ! [input] basis function index
161      integer cont    ! [output] mapped contraction index
162c......................................................................
163      logical function bas_numbf(basis,nbf)
164c
165c returns the total number of basis functions of the mapped basis set.
166c
167      integer basis   ! [input] basis set handle
168      integer nbf     ! [output] number of basis functions
169c......................................................................
170      logical function bas_name(basis,basis_name,trans_name)
171c
172c returns the name and translated name of the basis set
173c
174      integer       basis    ! [input] basis set handle
175      character*(*) basis_name ! [output] basis set name when loaded
176      character*(*) trans_name ! [output] basis set name in context when loaded
177c......................................................................
178      logical function bas_get_exponent(basis,icont,exp)
179c
180c  returns the exponents of a given mapped contraction
181c
182      integer basis           ! [input] basis set handle
183      integer icont           ! [input] mapped contraction index
184      double precision exp(*) ! [output] exponents
185c......................................................................
186      logical function bas_continfo(basis,icont,
187     &       type,nprimo,ngeno,sphcart)
188c
189c  returns the generic information about the given mapped contraction
190c
191      integer basis             ! [input] basis handle
192      integer icont             ! [input] contraction index
193      integer type              ! [output] type (sp/s/p/d/..)
194      integer nprimo            ! [output] no. of primitives
195      integer ngeno             ! [output] no. of contractions
196      integer sphcart           ! [output] 0/1 for cartesian/shperical
197c......................................................................
198      logical function bas_numcont(basis,numcont)
199c
200c returns the total number of mapped contractions/shells for the
201c given basis set
202c
203      integer basis     ! [input] basis set handle
204      integer numcont   ! [output] number of mapped contractions
205c......................................................................
206      logical function bas_get_coeff(basis,icont,coeff)
207c
208c returns the coefficients for the given mapped contraction
209c
210      integer basis              ! [input] basis set handle
211      integer icont              ! [input] mapped contraction index
212      double precision coeff(*)  ! [output] mapped contraction coeffs.
213c......................................................................
214      logical function bas_set_exponent(basis,icont,exp,nexp)
215c
216c sets the exponents to the input array for a given mapped contraction
217c
218      integer basis               ! [input] basis set handle
219      integer icont               ! [input] mapped contraction index
220      integer nexp                ! [input] number of exponents for contraction
221      double precision exp(nexp)  ! [input] "new" exponents for contraction
222c......................................................................
223      logical function bas_set_coeff(basis,icont,coeff,ncoeff)
224c
225c sets the coefficients of the given mapped contraction
226c
227      integer basis                   ! [input] basis set handle
228      integer icont                   ! [input] mapped contraction index
229      integer ncoeff                  ! [input] number of coeffs. for contraction
230      double precision coeff(ncoeff)  ! [input] "new" coeffs. for contraction
231c......................................................................
232      logical function bas_nbf_cn_max(basisin,nbf_max)
233      implicit none
234c
235c  calculate, return and store maximum basis function block size
236c   for all contractions in a given basis.
237c
238      integer basisin       ! [input] basis set handle
239      integer nbf_max       ! [output] largest basis function block on any
240c                           !          shell in the given basis set.
241c......................................................................
242      logical function bas_nbf_ce_max(basisin,nbf_max)
243      implicit none
244c
245c  calculate, return and store maximum basis function block size
246c   for all contractions in a given basis.
247c
248      integer basisin       ! [input] basis set handle
249      integer nbf_max       ! [output] largest nbf block on an
250c                           !          atom in the given basis.
251c......................................................................
252