Psi4
libciomr.h
Go to the documentation of this file.
1 /*
2  * @BEGIN LICENSE
3  *
4  * Psi4: an open-source quantum chemistry software package
5  *
6  * Copyright (c) 2007-2018 The Psi4 Developers.
7  *
8  * The copyrights for code used from other parties are included in
9  * the corresponding files.
10  *
11  * This file is part of Psi4.
12  *
13  * Psi4 is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU Lesser General Public License as published by
15  * the Free Software Foundation, version 3.
16  *
17  * Psi4 is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU Lesser General Public License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public License along
23  * with Psi4; if not, write to the Free Software Foundation, Inc.,
24  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25  *
26  * @END LICENSE
27  */
28 
29 /*
30 ** Declarations for functions found in libciomr.a
31 **
32 ** C. David Sherrill and T. Daniel Crawford
33 **
34 **
35 */
36 
37 #ifndef _psi_src_lib_libciomr_libciomr_h_
38 #define _psi_src_lib_libciomr_libciomr_h_
39 
40 #include <cstdio>
41 #include <string>
42 
43 #include "psi4/pragma.h"
44 
45 namespace psi {
46 
47 int psi_start(FILE **infile, FILE **outfile, char **psi_file_prefix, int argc, char *argv[], int overwrite_output);
48 int psi_stop(FILE *infile, FILE *outfile, char *psi_file_prefix);
49 char *psi_ifname();
50 char *psi_ofname();
51 char *psi_fprefix();
52 
53 void balance(double **a, int n);
54 
55 void eigsort(double *d, double **v, int n);
56 void eivout(double **a, double *b, int m, int n, std::string out);
57 void mosort(double *d, double **v, int *sym, int nso, int nmo);
58 
59 void flin(double **a, double *b, int in, int im, double *det);
60 void free_matrix(double **array, size_t size);
61 double *init_array(size_t size);
62 double **init_matrix(size_t rows, size_t cols);
63 
64 void lubksb(double **a, int n, int *indx, double *b);
65 void ludcmp(double **a, int n, int *indx, double *d);
66 
67 /* Functions under mat_to_arr.c */
68 void mat_to_arr(double **a, double *b, int m, int n);
69 void arr_to_mat(double **a, double *b, int m, int n);
70 
71 // void mmult(double **AF, int ta, double **BF, int tb, double **CF, int tc,
72 // int nr, int nl, int nc, int add) ;
73 void print_array(double *a, int m, std::string out);
74 void print_mat(double **a, int rows, int cols, std::string out);
75 
76 void rsp(int nm, int n, int nv, double *array, double *evals, int matz, double **evecs, double toler);
77 void sq_rsp(int nm, int n, double **array, double *evals, int matz, double **evecs, double toler);
78 void sq_to_tri(double **bmat, double *amat, int size);
79 
80 /* Functions under tri_to_block.c */
81 void tri_to_block(double *a, double **b, int num_ir, int *num_so, int *ioff);
82 void block_to_tri(double *a, double **b, int num_ir, int *num_so, int *ioff);
83 
84 void tri_to_sq(double *amat, double **bmat, int size);
85 
86 /* Functions under tstart.c */
87 void tstart();
88 void tstop();
89 
90 /* Functions in zero.c */
91 void zero_arr(double *a, int size);
92 void zero_mat(double **a, int rows, int cols);
93 
94 /* Functions in int_array.c */
95 PSI_API int *init_int_array(int size);
96 void zero_int_array(int *a, int size);
97 PSI_API int **init_int_matrix(int rows, int cols);
98 void free_int_matrix(int **array);
99 void zero_int_matrix(int **array, int rows, int cols);
100 void print_int_mat(int **a, int m, int n, std::string out);
101 
102 /* Functions in long_int_array.c */
103 long int *init_long_int_array(int size);
104 void zero_long_int_array(long int *a, int size);
105 long int **init_long_int_matrix(int rows, int cols);
106 void free_long_int_matrix(long int **array);
107 void zero_long_int_matrix(long int **array, int rows, int cols);
108 void print_long_int_mat(long int **a, int m, int n, std::string out);
109 
110 /* Functions in block_matrix.c */
111 PSI_API double **block_matrix(size_t n, size_t m, bool mlock = false);
112 void free_block(double **array);
113 
114 /* Functions in fndcor */
115 void fndcor(long int *maxcrb, std::string out_fname);
116 }
117 
118 #endif /* header guard */
char * psi_ifname()
double * init_array(size_t size)
Definition: init_array.cc:53
void print_int_mat(int **a, int m, int n, std::string out)
Definition: int_array.cc:165
PSI_API double ** block_matrix(size_t n, size_t m, bool memlock)
Definition: libciomr/block_matrix.cc:76
void arr_to_mat(double **a, double *b, int m, int n)
char * psi_file_prefix
Definition: core.cc:99
PSI_API int ** init_int_matrix(int rows, int cols)
Definition: int_array.cc:100
void print_long_int_mat(long int **a, int m, int n, std::string out)
long int * init_long_int_array(int size)
Definition: long_int_array.cc:61
void zero_long_int_array(long int *a, int size)
void flin(double **a, double *b, int in, int im, double *det)
Definition: flin.cc:56
void zero_long_int_matrix(long int **array, int rows, int cols)
void tstart()
Definition: tstart.cc:67
void tri_to_block(double *a, double **b, int num_ir, int *num_so, int *ioff)
void mat_to_arr(double **a, double *b, int m, int n)
void mosort(double *d, double **v, int *sym, int nso, int nmo)
Definition: eigsort.cc:125
void zero_arr(double *a, int size)
Definition: zero.cc:49
void print_mat(double **a, int rows, int cols, std::string out)
Definition: print_mat.cc:52
int psi_start(FILE **infile, FILE **outfile, char **psi_file_prefix, int argc, char *argv[], int overwrite_output)
std::shared_ptr< PsiOutStream > outfile
Definition: core.cc:102
void tri_to_sq(double *amat, double **bmat, int size)
Definition: tri_to_sq.cc:48
void zero_int_array(int *a, int size)
Definition: int_array.cc:85
void free_matrix(double **array, size_t)
Definition: init_matrix.cc:145
void zero_mat(double **a, int rows, int cols)
Definition: zero.cc:60
void PSI_API free_int_matrix(int **array)
Definition: int_array.cc:131
void balance(double **a, int n)
char * psi_ofname()
void free_long_int_matrix(long int **array)
int nso
Definition: dx_write.cc:56
void print_array(double *a, int m, std::string out)
Definition: print_array.cc:52
void block_to_tri(double *a, double **b, int num_ir, int *num_so, int *ioff)
void PSI_API free_block(double **array)
Definition: libciomr/block_matrix.cc:148
void fndcor(long int *maxcrb, std::string out_fname)
double ** init_matrix(size_t n, size_t m)
Definition: init_matrix.cc:68
#define PSI_API
Definition: pragma.h:155
void tstop()
Definition: tstart.cc:103
void ludcmp(double **, int, int *, double *)
Definition: ludcmp.cc:35
void sq_to_tri(double **bmat, double *amat, int size)
Definition: sq_to_tri.cc:48
PSI_API int * init_int_array(int size)
Definition: int_array.cc:62
int psi_stop(FILE *infile, FILE *outfile, char *psi_file_prefix)
long int ** init_long_int_matrix(int rows, int cols)
void sq_rsp(int nm, int n, double **array, double *evals, int matz, double **evecs, double toler)
Definition: sq_rsp.cc:76
void zero_int_matrix(int **array, int rows, int cols)
Definition: int_array.cc:149
void rsp(int nm, int n, int nv, double *array, double *evals, int matz, double **evecs, double toler)
Definition: rsp.cc:70
EXTERN int * ioff
Definition: cc/ccresponse/globals.h:48
char * psi_fprefix()
void eivout(double **a, double *b, int m, int n, std::string out)
Definition: eivout.cc:53
void PSI_API eigsort(double *d, double **v, int n)
Definition: eigsort.cc:57
void lubksb(double **, int, int *, double *)
Definition: lubksb.cc:31
int nmo
Definition: dx_write.cc:56