cuest-ffi 0.1.0

cuEST C binding FFI
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
//! Library initializer implementation for dynamic loading.
//!
//! This file is generated automatically by `scripts/generate_ffi.py`; do not
//! edit it manually.

use super::*;
use libloading::{Library, Symbol};

unsafe fn get_symbol<'f, F>(libs: &'f [Library], name: &[u8]) -> Option<Symbol<'f, F>> {
    libs.iter().find_map(|lib| lib.get::<F>(name).ok())
}

impl DyLoadLib {
    pub unsafe fn new(libs: Vec<libloading::Library>, libs_path: Vec<String>) -> DyLoadLib {
        let mut result = DyLoadLib {
            __libraries: vec![],      // dummy, set later
            __libraries_path: vec![], // dummy, set later
            __error: None,
            cuestCreate: get_symbol(&libs, b"cuestCreate\0").map(|sym| *sym),
            cuestDestroy: get_symbol(&libs, b"cuestDestroy\0").map(|sym| *sym),
            cuestSetMathMode: get_symbol(&libs, b"cuestSetMathMode\0").map(|sym| *sym),
            cuestGetMathMode: get_symbol(&libs, b"cuestGetMathMode\0").map(|sym| *sym),
            cuestSetComputeCapabilityTarget: get_symbol(
                &libs,
                b"cuestSetComputeCapabilityTarget\0",
            )
            .map(|sym| *sym),
            cuestGetComputeCapabilityTarget: get_symbol(
                &libs,
                b"cuestGetComputeCapabilityTarget\0",
            )
            .map(|sym| *sym),
            cuestGetMajorVersion: get_symbol(&libs, b"cuestGetMajorVersion\0").map(|sym| *sym),
            cuestGetMinorVersion: get_symbol(&libs, b"cuestGetMinorVersion\0").map(|sym| *sym),
            cuestGetPatchVersion: get_symbol(&libs, b"cuestGetPatchVersion\0").map(|sym| *sym),
            cuestAOShellCreate: get_symbol(&libs, b"cuestAOShellCreate\0").map(|sym| *sym),
            cuestAOShellDestroy: get_symbol(&libs, b"cuestAOShellDestroy\0").map(|sym| *sym),
            cuestAOBasisCreate: get_symbol(&libs, b"cuestAOBasisCreate\0").map(|sym| *sym),
            cuestAOBasisCreateWorkspaceQuery: get_symbol(
                &libs,
                b"cuestAOBasisCreateWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestAOBasisDestroy: get_symbol(&libs, b"cuestAOBasisDestroy\0").map(|sym| *sym),
            cuestAOPairListCreate: get_symbol(&libs, b"cuestAOPairListCreate\0").map(|sym| *sym),
            cuestAOPairListCreateWorkspaceQuery: get_symbol(
                &libs,
                b"cuestAOPairListCreateWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestAOPairListDestroy: get_symbol(&libs, b"cuestAOPairListDestroy\0").map(|sym| *sym),
            cuestECPCompute: get_symbol(&libs, b"cuestECPCompute\0").map(|sym| *sym),
            cuestECPComputeWorkspaceQuery: get_symbol(&libs, b"cuestECPComputeWorkspaceQuery\0")
                .map(|sym| *sym),
            cuestECPDerivativeCompute: get_symbol(&libs, b"cuestECPDerivativeCompute\0")
                .map(|sym| *sym),
            cuestECPDerivativeComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestECPDerivativeComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestECPAtomCreate: get_symbol(&libs, b"cuestECPAtomCreate\0").map(|sym| *sym),
            cuestECPAtomDestroy: get_symbol(&libs, b"cuestECPAtomDestroy\0").map(|sym| *sym),
            cuestECPShellCreate: get_symbol(&libs, b"cuestECPShellCreate\0").map(|sym| *sym),
            cuestECPShellDestroy: get_symbol(&libs, b"cuestECPShellDestroy\0").map(|sym| *sym),
            cuestECPIntPlanCreate: get_symbol(&libs, b"cuestECPIntPlanCreate\0").map(|sym| *sym),
            cuestECPIntPlanCreateWorkspaceQuery: get_symbol(
                &libs,
                b"cuestECPIntPlanCreateWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestECPIntPlanDestroy: get_symbol(&libs, b"cuestECPIntPlanDestroy\0").map(|sym| *sym),
            cuestOEIntPlanCreate: get_symbol(&libs, b"cuestOEIntPlanCreate\0").map(|sym| *sym),
            cuestOEIntPlanCreateWorkspaceQuery: get_symbol(
                &libs,
                b"cuestOEIntPlanCreateWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestOEIntPlanDestroy: get_symbol(&libs, b"cuestOEIntPlanDestroy\0").map(|sym| *sym),
            cuestDFIntPlanCreate: get_symbol(&libs, b"cuestDFIntPlanCreate\0").map(|sym| *sym),
            cuestDFIntPlanCreateWorkspaceQuery: get_symbol(
                &libs,
                b"cuestDFIntPlanCreateWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestDFIntPlanDestroy: get_symbol(&libs, b"cuestDFIntPlanDestroy\0").map(|sym| *sym),
            cuestOverlapCompute: get_symbol(&libs, b"cuestOverlapCompute\0").map(|sym| *sym),
            cuestOverlapComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestOverlapComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestOverlapDerivativeCompute: get_symbol(&libs, b"cuestOverlapDerivativeCompute\0")
                .map(|sym| *sym),
            cuestOverlapDerivativeComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestOverlapDerivativeComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestKineticCompute: get_symbol(&libs, b"cuestKineticCompute\0").map(|sym| *sym),
            cuestKineticComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestKineticComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestKineticDerivativeCompute: get_symbol(&libs, b"cuestKineticDerivativeCompute\0")
                .map(|sym| *sym),
            cuestKineticDerivativeComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestKineticDerivativeComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestMultipoleCompute: get_symbol(&libs, b"cuestMultipoleCompute\0").map(|sym| *sym),
            cuestMultipoleComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestMultipoleComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestMultipoleDerivativeCompute: get_symbol(
                &libs,
                b"cuestMultipoleDerivativeCompute\0",
            )
            .map(|sym| *sym),
            cuestMultipoleDerivativeComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestMultipoleDerivativeComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestAngularMomentumCompute: get_symbol(&libs, b"cuestAngularMomentumCompute\0")
                .map(|sym| *sym),
            cuestAngularMomentumComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestAngularMomentumComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestAngularMomentumDerivativeCompute: get_symbol(
                &libs,
                b"cuestAngularMomentumDerivativeCompute\0",
            )
            .map(|sym| *sym),
            cuestAngularMomentumDerivativeComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestAngularMomentumDerivativeComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestNablaCompute: get_symbol(&libs, b"cuestNablaCompute\0").map(|sym| *sym),
            cuestNablaComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestNablaComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestNablaDerivativeCompute: get_symbol(&libs, b"cuestNablaDerivativeCompute\0")
                .map(|sym| *sym),
            cuestNablaDerivativeComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestNablaDerivativeComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestPotentialCompute: get_symbol(&libs, b"cuestPotentialCompute\0").map(|sym| *sym),
            cuestPotentialComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestPotentialComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestPotentialDerivativeCompute: get_symbol(
                &libs,
                b"cuestPotentialDerivativeCompute\0",
            )
            .map(|sym| *sym),
            cuestPotentialDerivativeComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestPotentialDerivativeComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestDFCoulombCompute: get_symbol(&libs, b"cuestDFCoulombCompute\0").map(|sym| *sym),
            cuestDFCoulombComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestDFCoulombComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestDFSymmetricExchangeCompute: get_symbol(
                &libs,
                b"cuestDFSymmetricExchangeCompute\0",
            )
            .map(|sym| *sym),
            cuestDFSymmetricExchangeComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestDFSymmetricExchangeComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestDFNonsymmetricExchangeCompute: get_symbol(
                &libs,
                b"cuestDFNonsymmetricExchangeCompute\0",
            )
            .map(|sym| *sym),
            cuestDFNonsymmetricExchangeComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestDFNonsymmetricExchangeComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestDFSymmetricDerivativeCompute: get_symbol(
                &libs,
                b"cuestDFSymmetricDerivativeCompute\0",
            )
            .map(|sym| *sym),
            cuestDFSymmetricDerivativeComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestDFSymmetricDerivativeComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestDFMOIntegralsCompute: get_symbol(&libs, b"cuestDFMOIntegralsCompute\0")
                .map(|sym| *sym),
            cuestDFMOIntegralsComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestDFMOIntegralsComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestAtomGridCreate: get_symbol(&libs, b"cuestAtomGridCreate\0").map(|sym| *sym),
            cuestAtomGridDestroy: get_symbol(&libs, b"cuestAtomGridDestroy\0").map(|sym| *sym),
            cuestMolecularGridCreate: get_symbol(&libs, b"cuestMolecularGridCreate\0")
                .map(|sym| *sym),
            cuestMolecularGridCreateWorkspaceQuery: get_symbol(
                &libs,
                b"cuestMolecularGridCreateWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestMolecularGridDestroy: get_symbol(&libs, b"cuestMolecularGridDestroy\0")
                .map(|sym| *sym),
            cuestXCIntPlanCreate: get_symbol(&libs, b"cuestXCIntPlanCreate\0").map(|sym| *sym),
            cuestXCIntPlanCreateWorkspaceQuery: get_symbol(
                &libs,
                b"cuestXCIntPlanCreateWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestXCIntPlanDestroy: get_symbol(&libs, b"cuestXCIntPlanDestroy\0").map(|sym| *sym),
            cuestXCIntegrationGridCompute: get_symbol(&libs, b"cuestXCIntegrationGridCompute\0")
                .map(|sym| *sym),
            cuestXCIntegrationGridComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestXCIntegrationGridComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestXCIntegrationWeightCompute: get_symbol(
                &libs,
                b"cuestXCIntegrationWeightCompute\0",
            )
            .map(|sym| *sym),
            cuestXCIntegrationWeightComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestXCIntegrationWeightComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestXCPotentialRKSCompute: get_symbol(&libs, b"cuestXCPotentialRKSCompute\0")
                .map(|sym| *sym),
            cuestXCPotentialRKSComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestXCPotentialRKSComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestXCPotentialUKSCompute: get_symbol(&libs, b"cuestXCPotentialUKSCompute\0")
                .map(|sym| *sym),
            cuestXCPotentialUKSComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestXCPotentialUKSComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestXCDensityCompute: get_symbol(&libs, b"cuestXCDensityCompute\0").map(|sym| *sym),
            cuestXCDensityComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestXCDensityComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestXCPotentialCompute: get_symbol(&libs, b"cuestXCPotentialCompute\0")
                .map(|sym| *sym),
            cuestXCPotentialComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestXCPotentialComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestXCNonsymmetricDensityCompute: get_symbol(
                &libs,
                b"cuestXCNonsymmetricDensityCompute\0",
            )
            .map(|sym| *sym),
            cuestXCNonsymmetricDensityComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestXCNonsymmetricDensityComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestXCDerivativeRKSCompute: get_symbol(&libs, b"cuestXCDerivativeRKSCompute\0")
                .map(|sym| *sym),
            cuestXCDerivativeRKSComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestXCDerivativeRKSComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestXCDerivativeUKSCompute: get_symbol(&libs, b"cuestXCDerivativeUKSCompute\0")
                .map(|sym| *sym),
            cuestXCDerivativeUKSComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestXCDerivativeUKSComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestXCDerivativeCompute: get_symbol(&libs, b"cuestXCDerivativeCompute\0")
                .map(|sym| *sym),
            cuestXCDerivativeComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestXCDerivativeComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestXCGridDerivativeCompute: get_symbol(&libs, b"cuestXCGridDerivativeCompute\0")
                .map(|sym| *sym),
            cuestXCGridDerivativeComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestXCGridDerivativeComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestXCNonsymmetricDerivativeCompute: get_symbol(
                &libs,
                b"cuestXCNonsymmetricDerivativeCompute\0",
            )
            .map(|sym| *sym),
            cuestXCNonsymmetricDerivativeComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestXCNonsymmetricDerivativeComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestNonlocalXCPotentialRKSCompute: get_symbol(
                &libs,
                b"cuestNonlocalXCPotentialRKSCompute\0",
            )
            .map(|sym| *sym),
            cuestNonlocalXCPotentialRKSComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestNonlocalXCPotentialRKSComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestNonlocalXCPotentialUKSCompute: get_symbol(
                &libs,
                b"cuestNonlocalXCPotentialUKSCompute\0",
            )
            .map(|sym| *sym),
            cuestNonlocalXCPotentialUKSComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestNonlocalXCPotentialUKSComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestNonlocalXCDerivativeRKSCompute: get_symbol(
                &libs,
                b"cuestNonlocalXCDerivativeRKSCompute\0",
            )
            .map(|sym| *sym),
            cuestNonlocalXCDerivativeRKSComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestNonlocalXCDerivativeRKSComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestNonlocalXCDerivativeUKSCompute: get_symbol(
                &libs,
                b"cuestNonlocalXCDerivativeUKSCompute\0",
            )
            .map(|sym| *sym),
            cuestNonlocalXCDerivativeUKSComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestNonlocalXCDerivativeUKSComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestPCMIntPlanCreate: get_symbol(&libs, b"cuestPCMIntPlanCreate\0").map(|sym| *sym),
            cuestPCMIntPlanCreateWorkspaceQuery: get_symbol(
                &libs,
                b"cuestPCMIntPlanCreateWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestPCMIntPlanDestroy: get_symbol(&libs, b"cuestPCMIntPlanDestroy\0").map(|sym| *sym),
            cuestPCMPotentialCompute: get_symbol(&libs, b"cuestPCMPotentialCompute\0")
                .map(|sym| *sym),
            cuestPCMPotentialComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestPCMPotentialComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestPCMDerivativeCompute: get_symbol(&libs, b"cuestPCMDerivativeCompute\0")
                .map(|sym| *sym),
            cuestPCMDerivativeComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestPCMDerivativeComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestPCMRadiiDerivativeCompute: get_symbol(&libs, b"cuestPCMRadiiDerivativeCompute\0")
                .map(|sym| *sym),
            cuestPCMRadiiDerivativeComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestPCMRadiiDerivativeComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestPCMIntegrationGridCompute: get_symbol(&libs, b"cuestPCMIntegrationGridCompute\0")
                .map(|sym| *sym),
            cuestPCMIntegrationGridComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestPCMIntegrationGridComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestPCMIntegrationWeightCompute: get_symbol(
                &libs,
                b"cuestPCMIntegrationWeightCompute\0",
            )
            .map(|sym| *sym),
            cuestPCMIntegrationWeightComputeWorkspaceQuery: get_symbol(
                &libs,
                b"cuestPCMIntegrationWeightComputeWorkspaceQuery\0",
            )
            .map(|sym| *sym),
            cuestQuery: get_symbol(&libs, b"cuestQuery\0").map(|sym| *sym),
            cuestResultsCreate: get_symbol(&libs, b"cuestResultsCreate\0").map(|sym| *sym),
            cuestResultsDestroy: get_symbol(&libs, b"cuestResultsDestroy\0").map(|sym| *sym),
            cuestResultsQuery: get_symbol(&libs, b"cuestResultsQuery\0").map(|sym| *sym),
            cuestParametersCreate: get_symbol(&libs, b"cuestParametersCreate\0").map(|sym| *sym),
            cuestParametersDestroy: get_symbol(&libs, b"cuestParametersDestroy\0").map(|sym| *sym),
            cuestParametersQuery: get_symbol(&libs, b"cuestParametersQuery\0").map(|sym| *sym),
            cuestParametersConfigure: get_symbol(&libs, b"cuestParametersConfigure\0")
                .map(|sym| *sym),
        };
        result.__libraries = libs;
        result.__libraries_path = libs_path;
        result
    }
}