Calculation of Single excited state for Hubbard canonical system.
39 long int idim_max, idim_maxMPI;
40 long unsigned int i, j;
41 long unsigned int org_isite, ispin, itype;
42 long unsigned int is1_spin;
44 double complex tmpphi;
45 long unsigned int tmp_off = 0;
47 if (
X->Def.NSingleExcitationOperator == 0) {
50 double complex *tmp_v1bufOrg;
54 c_malloc1(tmp_v1bufOrg, idim_maxMPI + 1);
57 idim_max =
X->Check.idim_maxOrg;
58 for (i = 0; i <
X->Def.NSingleExcitationOperator; i++) {
59 org_isite =
X->Def.SingleExcitationOperator[i][0];
60 ispin =
X->Def.SingleExcitationOperator[i][1];
61 itype =
X->Def.SingleExcitationOperator[i][2];
62 tmpphi =
X->Def.ParaSingleExcitationOperator[i];
63 is1_spin =
X->Def.Tpow[2 * org_isite + ispin];
65 if (org_isite >=
X->Def.Nsite) {
66 X_Cis_MPI(org_isite, ispin, tmpphi, tmp_v0, tmp_v1, tmp_v1bufOrg, idim_max, \
68 X->Large.irght,
X->Large.ilft,
X->Large.ihfbit);
71 #pragma omp parallel for default(none) shared(tmp_v0, tmp_v1, X, list_1_org) \ 72 firstprivate(idim_max, tmpphi, org_isite, ispin, list_2_1, list_2_2, is1_spin) private(j, isgn,tmp_off) 73 for (j = 1; j <= idim_max; j++) {
75 tmp_v0[tmp_off] += tmp_v1[j] * isgn*tmpphi;
79 else if (itype == 0) {
80 if (org_isite >=
X->Def.Nsite) {
81 X_Ajt_MPI(org_isite, ispin, tmpphi, tmp_v0, tmp_v1, tmp_v1bufOrg, \
86 #pragma omp parallel for default(none) shared(tmp_v0, tmp_v1, X, list_1_org, list_1) \ 87 firstprivate(idim_max, tmpphi, org_isite, ispin, list_2_1, list_2_2, is1_spin, myrank) private(j, isgn, tmp_off) 88 for (j = 1; j <= idim_max; j++) {
90 tmp_v0[tmp_off] += tmp_v1[j] * isgn*tmpphi;
double complex X_Cis_MPI(int org_isite, unsigned int org_ispin, double complex tmp_trans, double complex *tmp_v0, double complex *tmp_v1, double complex *tmp_v1buf, unsigned long int idim_max, long unsigned int *Tpow, long unsigned int *list_1_org, long unsigned int *list_1buf_org, long unsigned int *list_2_1_target, long unsigned int *list_2_2_target, long unsigned int _irght, long unsigned int _ilft, long unsigned int _ihfbit)
Compute term of canonical Hubbard system.
long unsigned int * list_1buf_org
double complex X_Ajt_MPI(int org_isite, unsigned int org_ispin, double complex tmp_trans, double complex *tmp_v0, double complex *tmp_v1, double complex *tmp_v1buf, unsigned long int idim_max, long unsigned int *Tpow, long unsigned int *list_1_org, long unsigned int *list_1buf_org, long unsigned int *list_2_1_target, long unsigned int *list_2_2_target, long unsigned int _irght, long unsigned int _ilft, long unsigned int _ihfbit)
Compute term of canonical Hubbard system.
int X_Cis(long unsigned int j, long unsigned int is1_spin, long unsigned int *tmp_off, long unsigned int *list_1_org, long unsigned int *list_2_1_target, long unsigned int *list_2_2_target, long unsigned int _irght, long unsigned int _ilft, long unsigned int _ihfbit)
Compute index of final wavefunction associatesd to term of canonical Hubbard system.
long unsigned int * list_1_org
unsigned long int MaxMPI_li(unsigned long int idim)
MPI wrapper function to obtain maximum unsigned long integer across processes.
long unsigned int * list_2_1
double complex X_Ajt(long unsigned int j, long unsigned int is1_spin, long unsigned int *tmp_off, long unsigned int *list_1_org, long unsigned int *list_2_1_target, long unsigned int *list_2_2_target, long unsigned int _irght, long unsigned int _ilft, long unsigned int _ihfbit)
Compute index of final wavefunction associatesd to term of canonical Hubbard system.
long unsigned int * list_2_2