3
\brief Enter brief description of file here
8
#include<libipv1/ip_lib.h>
10
#include<libciomr/libciomr.h>
11
#include<libchkpt/chkpt.h>
19
namespace psi { namespace CINTS {
26
for (i=1; i<IOFFMAX; i++){
27
ioff[i] = ioff[i-1] + i;
33
for(i=2;i<CINTS_MAX_AM*2;i++)
36
/* Binomial coefficients */
37
for(i=0;i<=CINTS_MAX_AM;i++)
39
bc[i][j] = (int)(fac[i]/(fac[i-j]*fac[j]));
41
/* df[i] gives (i-1)!!, so that (-1)!! is defined... */
42
/* we shouldn't need both this and lci with the range needed on df[] */
46
for(i=3; i<MAXFACT*2; i++){
47
df[i] = (i-1)*df[i-2];
50
/* (2i-1)!! a useful thing, num_ser in the integral expansion */
52
for (i=1; i<CINTS_MAX_AM+1; i++)
53
num_ser[i] = (2*i-1)*num_ser[i-1];
57
void start_io(int argc, char *argv[])
60
int num_extra_args = 0;
62
extra_args = (char **) malloc(argc*sizeof(char *));
64
/* Filter out known options */
65
for (i=1; i<argc; i++) {
66
if ( strcmp(argv[i], "--fock") &&
67
strcmp(argv[i], "--oeints") &&
68
strcmp(argv[i], "--teints") &&
69
strcmp(argv[i], "--deriv1") &&
70
strcmp(argv[i], "--deriv1_ints") &&
71
strcmp(argv[i], "--deriv2") &&
72
strcmp(argv[i], "--oeprop") &&
73
strcmp(argv[i], "--mp2") &&
74
strcmp(argv[i], "--mkpt2") &&
75
strcmp(argv[i], "--r12ints") &&
76
strcmp(argv[i], "--cc_bt2") &&
77
strcmp(argv[i], "--giao_deriv") &&
78
strcmp(argv[i], "--mp2r12") )
79
extra_args[num_extra_args++] = argv[i];
82
errcod = psi_start(&infile,&outfile,&psi_file_prefix,num_extra_args, extra_args, 0);
83
if (errcod != PSI_RETURN_SUCCESS)
86
psio_init(); psio_ipv1_config();
87
chkpt_init(PSIO_OPEN_OLD);
96
if(UserOptions.print_lvl)
99
psi_stop(infile,outfile,psi_file_prefix);
102
void punt(char *mess)
104
fprintf(outfile, " error: %s\n", mess);
105
fprintf(stderr, " CINTS error: %s\n", mess);
110
double distance_calc(struct coordinates g1, struct coordinates g2)
112
return sqrt((g1.x-g2.x)*(g1.x-g2.x) +
113
(g1.y-g2.y)*(g1.y-g2.y) +
114
(g1.z-g2.z)*(g1.z-g2.z));
117
double ***init_box(int a, int b, int c)
122
box = (double ***) malloc(sizeof(double **)*a);
124
box[i] = (double **) malloc(sizeof(double *)*b);
127
box[i][j] = (double *) malloc(sizeof(double)*c);
128
//bzero((char *) box[i][j],sizeof(double)*c);
129
memset(box[i][j], '\0', sizeof(double)*c);
137
void free_box(double ***box, int a, int b)