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