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 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 namespace psi {
43 
44 int psi_start(FILE** infile, FILE** outfile, char** psi_file_prefix, int argc, char *argv[], int overwrite_output);
45 int psi_stop(FILE* infile, FILE* outfile, char* psi_file_prefix);
46 char* psi_ifname();
47 char* psi_ofname();
48 char* psi_fprefix();
49 
50 void balance(double **a, int n);
51 
52 void eigsort(double *d,double **v,int n);
53 void eivout(double **a, double *b, int m, int n, std::string out) ;
54 void mosort(double *d, double **v, int *sym, int nso, int nmo);
55 
56 void flin(double **a,double *b,int in,int im,double *det);
57 void free_matrix(double **array, size_t size) ;
58 double * init_array(size_t size) ;
59 double ** init_matrix(size_t rows, size_t cols) ;
60 
61 void lubksb(double **a,int n,int *indx,double *b);
62 void ludcmp(double **a,int n,int *indx,double *d);
63 
64 /* Functions under mat_to_arr.c */
65 void mat_to_arr(double **a,double *b, int m, int n);
66 void arr_to_mat(double **a,double *b,int m,int n);
67 
68 
69 // void mmult(double **AF, int ta, double **BF, int tb, double **CF, int tc,
70 // int nr, int nl, int nc, int add) ;
71 void print_array(double *a, int m, std::string out) ;
72 void print_mat(double **a, int rows, int cols, std::string out) ;
73 
74 void rsp(int nm, int n, int nv, double *array, double *evals, int matz,
75  double **evecs, double toler) ;
76 void sq_rsp(int nm, int n, double **array, double *evals, int matz,
77  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 int * init_int_array(int size) ;
96 void zero_int_array(int *a, int size);
97 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 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 
119 #endif /* header guard */
char * psi_ifname()
double * init_array(size_t size)
Definition: init_array.cc:54
void print_int_mat(int **a, int m, int n, std::string out)
Definition: int_array.cc:179
void tstop()
Definition: tstart.cc:103
void arr_to_mat(double **a, double *b, int m, int n)
char * psi_file_prefix
Definition: core.cc:99
void print_long_int_mat(long int **a, int m, int n, std::string out)
double ** block_matrix(size_t n, size_t m, bool memlock)
Definition: libciomr/block_matrix.cc:78
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:57
void zero_long_int_matrix(long int **array, int rows, int cols)
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:127
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)
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:87
void tstart()
Definition: tstart.cc:63
void free_matrix(double **array, size_t)
Definition: init_matrix.cc:148
void zero_mat(double **a, int rows, int cols)
Definition: zero.cc:63
void free_int_matrix(int **array)
Definition: int_array.cc:139
void balance(double **a, int n)
char * psi_ofname()
void free_long_int_matrix(long int **array)
int * init_int_array(int size)
Definition: int_array.cc:62
int ** init_int_matrix(int rows, int cols)
Definition: int_array.cc:106
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 free_block(double **array)
Definition: libciomr/block_matrix.cc:153
void fndcor(long int *maxcrb, std::string out_fname)
double ** init_matrix(size_t n, size_t m)
Definition: init_matrix.cc:69
std::shared_ptr< PsiOutStream > outfile
Definition: core.cc:102
void ludcmp(double **, int, int *, double *)
Definition: ludcmp.cc:36
void sq_to_tri(double **bmat, double *amat, int size)
Definition: sq_to_tri.cc:48
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:77
void zero_int_matrix(int **array, int rows, int cols)
Definition: int_array.cc:159
void rsp(int nm, int n, int nv, double *array, double *evals, int matz, double **evecs, double toler)
Definition: rsp.cc:71
EXTERN int * ioff
Definition: 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 eigsort(double *d, double **v, int n)
Definition: eigsort.cc:56
void lubksb(double **, int, int *, double *)
Definition: lubksb.cc:32
int nmo
Definition: dx_write.cc:56