4
#include <libciomr/libciomr.h>
12
/*-----------------------------------------------------------------------------------------------------------------
13
This function builds global transformation matrices for each angular momentum type present in the basis
14
-----------------------------------------------------------------------------------------------------------------*/
19
int irr,coeff,ao,ao_max;
21
int *xexp, *yexp, *zexp;
22
int symX[8], symY[8], symZ[8];
27
/*-------------------------------------------------------------------------------------
28
Initialize global arrays of x, y, and z exponents for particular basis function type
29
-------------------------------------------------------------------------------------*/
30
xexp_ao = (int **) malloc(MAXANGMOM*sizeof(int *));
31
yexp_ao = (int **) malloc(MAXANGMOM*sizeof(int *));
32
zexp_ao = (int **) malloc(MAXANGMOM*sizeof(int *));
33
for(l=0;l<MAXANGMOM;l++) {
34
xexp_ao[l] = init_int_array(ioff[l+1]);
35
yexp_ao[l] = init_int_array(ioff[l+1]);
36
zexp_ao[l] = init_int_array(ioff[l+1]);
51
symX[EFLAG] = 1; symY[EFLAG] = 1; symZ[EFLAG] = 1;
52
symX[C2XFLAG] = 1; symY[C2XFLAG] = -1; symZ[C2XFLAG] = -1;
53
symX[C2YFLAG] = -1; symY[C2YFLAG] = 1; symZ[C2YFLAG] = -1;
54
symX[C2ZFLAG] = -1; symY[C2ZFLAG] = -1; symZ[C2ZFLAG] = 1;
55
symX[IFLAG] = -1; symY[IFLAG] = -1; symZ[IFLAG] = -1;
56
symX[SIGXYFLAG] = 1; symY[SIGXYFLAG] = 1; symZ[SIGXYFLAG] = -1;
57
symX[SIGXZFLAG] = 1; symY[SIGXZFLAG] = -1; symZ[SIGXZFLAG] = 1;
58
symX[SIGYZFLAG] = -1; symY[SIGYZFLAG] = 1; symZ[SIGYZFLAG] = 1;
63
/*Initialize global arrays*/
64
max_l = MAX(max_angmom+1,MAXANGMOM);
65
ao_type_transmat = (double ***) malloc(max_l*sizeof(double **));
67
ao_type_transmat[i] = init_matrix(nirreps,ioff[i+1]);
68
num_cart_so = init_int_matrix(max_l,nirreps);
69
ao_type_irr = (int **) malloc(sizeof(int *)*max_l);
71
ao_type_irr[l] = init_int_array(ioff[l+1]);
74
for(l=0;l<max_l;l++) {
78
for(j=0;j<ioff[l+1];j++)
79
ao_type_transmat[l][EFLAG][j] = 1.0;
82
for(i=0;i<nirreps;i++)
83
ao_type_transmat[l][i][0] = 1.0;
87
for(i=1;i<nirreps;i++) {
89
for(j=0;j<ioff[l+1];j++)
90
ao_type_transmat[l][i][j] = pow((double)symX[oper],(double)xexp[j])*
91
pow((double)symY[oper],(double)yexp[j])*
92
pow((double)symZ[oper],(double)zexp[j]);
99
/*--------------------------------------------------------------------------------------------
100
Determine the number of cartesian SOs in each symmetry block for each angular momentum type
101
and irreps to which every basis function type belongs
102
--------------------------------------------------------------------------------------------*/
104
num_cart_so[0][0] = 1;
105
for(l=1;l<max_l;l++) {
107
for(ao=0;ao<ao_max;ao++)
108
for(irr=0;irr<nirreps;irr++) {
110
for(symop=0;symop<nirreps;symop++)
111
coeff += ao_type_transmat[l][symop][ao]*irr_char[irr][symop];
113
ao_type_irr[l][ao] = irr;
114
num_cart_so[l][irr]++;
120
fprintf(outfile," Transformation matrices :\n\n");
121
for(l=0;l<max_l;l++) {
122
fprintf(outfile," l = %d\n",l);
123
for(i=0;i<nirreps;i++) {
124
fprintf(outfile,"Symmetry Operation %d\n",i);
125
for(j=0;j<ioff[l+1];j++)
126
fprintf(outfile," %d %lf\n",j+1,ao_type_transmat[l][i][j]);
127
fprintf(outfile,"\n");
129
fprintf(outfile,"\n");