Revision | 1824 (tree) |
---|---|
Time | 2016-07-20 12:55:59 |
Author | mikiya_fujii |
Reduce memory usage for excited states mulliken #36466
@@ -123,9 +123,8 @@ | ||
123 | 123 | this->molecule->GetTotalNumberAOs()); |
124 | 124 | if(Parameters::GetInstance()->RequiresMullikenCIS()){ |
125 | 125 | vector<int>* elecStates = Parameters::GetInstance()->GetElectronicStateIndecesMullikenCIS(); |
126 | - MallocerFreer::GetInstance()->Free<double>(&this->orbitalElectronPopulationCIS, | |
126 | + MallocerFreer::GetInstance()->Free<double>(&this->orbitalElectronPopulationDiagCIS, | |
127 | 127 | elecStates->size(), |
128 | - this->molecule->GetTotalNumberAOs(), | |
129 | 128 | this->molecule->GetTotalNumberAOs()); |
130 | 129 | MallocerFreer::GetInstance()->Free<double>(&this->atomicElectronPopulationCIS, |
131 | 130 | elecStates->size(), |
@@ -1166,7 +1165,7 @@ | ||
1166 | 1165 | this->matrixCISdimension); |
1167 | 1166 | |
1168 | 1167 | // orbital electron population |
1169 | - this->CalcOrbitalElectronPopulationCIS(&this->orbitalElectronPopulationCIS, | |
1168 | + this->CalcOrbitalElectronPopulationCIS(&this->orbitalElectronPopulationDiagCIS, | |
1170 | 1169 | this->orbitalElectronPopulation, |
1171 | 1170 | *this->molecule, |
1172 | 1171 | this->fockMatrix, |
@@ -1174,12 +1173,15 @@ | ||
1174 | 1173 | |
1175 | 1174 | // atomic electron population |
1176 | 1175 | this->CalcAtomicElectronPopulationCIS(&this->atomicElectronPopulationCIS, |
1177 | - this->orbitalElectronPopulationCIS, | |
1176 | + this->orbitalElectronPopulationDiagCIS, | |
1178 | 1177 | *this->molecule); |
1179 | 1178 | // atomic unpaired electron population |
1180 | 1179 | this->CalcAtomicUnpairedPopulationCIS(&this->atomicUnpairedPopulationCIS, |
1181 | - this->orbitalElectronPopulationCIS, | |
1182 | - *this->molecule); | |
1180 | + this->orbitalElectronPopulationDiagCIS, | |
1181 | + this->orbitalElectronPopulation, | |
1182 | + *this->molecule, | |
1183 | + this->fockMatrix, | |
1184 | + this->matrixCIS); | |
1183 | 1185 | } |
1184 | 1186 | |
1185 | 1187 | void ZindoS::CalcElectronicTransitionDipoleMomentMatrix(double*** electronicTransitionDipoleMoments, |
@@ -1713,7 +1715,7 @@ | ||
1713 | 1715 | } |
1714 | 1716 | } |
1715 | 1717 | |
1716 | -void ZindoS::CalcOrbitalElectronPopulationCIS(double**** orbitalElectronPopulationCIS, | |
1718 | +void ZindoS::CalcOrbitalElectronPopulationCIS(double*** orbitalElectronPopulationDiagCIS, | |
1717 | 1719 | double const* const* orbitalElectronPopulation, |
1718 | 1720 | const MolDS_base::Molecule& molecule, |
1719 | 1721 | double const* const* fockMatrix, |
@@ -1723,16 +1725,14 @@ | ||
1723 | 1725 | } |
1724 | 1726 | vector<int>* elecStates = Parameters::GetInstance()->GetElectronicStateIndecesMullikenCIS(); |
1725 | 1727 | // malloc or initialize free exciton energies |
1726 | - if(*orbitalElectronPopulationCIS == NULL){ | |
1727 | - MallocerFreer::GetInstance()->Malloc<double>(orbitalElectronPopulationCIS, | |
1728 | + if(*orbitalElectronPopulationDiagCIS == NULL){ | |
1729 | + MallocerFreer::GetInstance()->Malloc<double>(orbitalElectronPopulationDiagCIS, | |
1728 | 1730 | elecStates->size(), |
1729 | - molecule.GetTotalNumberAOs(), | |
1730 | 1731 | molecule.GetTotalNumberAOs()); |
1731 | 1732 | } |
1732 | 1733 | else{ |
1733 | - MallocerFreer::GetInstance()->Initialize<double>(*orbitalElectronPopulationCIS, | |
1734 | + MallocerFreer::GetInstance()->Initialize<double>(*orbitalElectronPopulationDiagCIS, | |
1734 | 1735 | elecStates->size(), |
1735 | - molecule.GetTotalNumberAOs(), | |
1736 | 1736 | molecule.GetTotalNumberAOs()); |
1737 | 1737 | } |
1738 | 1738 | // MPI setting of each rank |
@@ -1754,39 +1754,37 @@ | ||
1754 | 1754 | #pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE) |
1755 | 1755 | for(int mu=0; mu<numberAOs; mu++){ |
1756 | 1756 | try{ |
1757 | - for(int nu=0; nu<numberAOs; nu++){ | |
1758 | - double value = orbitalElectronPopulation[mu][nu]; | |
1759 | - for(int i=0; i<numberActiveOcc; i++){ | |
1760 | - int moI = numberOcc - (i+1); | |
1761 | - for(int a=0; a<numberActiveVir; a++){ | |
1762 | - int moA = numberOcc + a; | |
1763 | - int slaterDeterminantIndex = this->GetSlaterDeterminantIndex(i,a); | |
1764 | - value += pow(matrixCIS[excitedStateIndex][slaterDeterminantIndex],2.0) | |
1765 | - *(-fockMatrix[moI][mu]*fockMatrix[moI][nu] | |
1766 | - +fockMatrix[moA][mu]*fockMatrix[moA][nu]); | |
1767 | - double tmpVal1=0.0; | |
1768 | - for(int b=0; b<numberActiveVir; b++){ | |
1769 | - int moB = numberOcc + b; | |
1770 | - if(moB==moA) continue; | |
1771 | - int tmpSDIndex = this->GetSlaterDeterminantIndex(i,b); | |
1772 | - tmpVal1 += matrixCIS[excitedStateIndex][tmpSDIndex]*fockMatrix[moB][nu]; | |
1773 | - } | |
1774 | - double tmpVal2=0.0; | |
1775 | - for(int j=0; j<numberActiveOcc; j++){ | |
1776 | - int moJ = numberOcc - (j+1); | |
1777 | - if(moJ==moI) continue; | |
1778 | - int tmpSDIndex = this->GetSlaterDeterminantIndex(j,a); | |
1779 | - tmpVal2 += matrixCIS[excitedStateIndex][tmpSDIndex]*fockMatrix[moJ][mu]; | |
1780 | - } | |
1781 | - value += matrixCIS[excitedStateIndex][slaterDeterminantIndex] | |
1782 | - *(fockMatrix[moA][mu]*tmpVal1 + fockMatrix[moI][nu]*tmpVal2); | |
1757 | + double value = orbitalElectronPopulation[mu][mu]; | |
1758 | + for(int i=0; i<numberActiveOcc; i++){ | |
1759 | + int moI = numberOcc - (i+1); | |
1760 | + for(int a=0; a<numberActiveVir; a++){ | |
1761 | + int moA = numberOcc + a; | |
1762 | + int slaterDeterminantIndex = this->GetSlaterDeterminantIndex(i,a); | |
1763 | + value += pow(matrixCIS[excitedStateIndex][slaterDeterminantIndex],2.0) | |
1764 | + *(-fockMatrix[moI][mu]*fockMatrix[moI][mu] | |
1765 | + +fockMatrix[moA][mu]*fockMatrix[moA][mu]); | |
1766 | + double tmpVal1=0.0; | |
1767 | + for(int b=0; b<numberActiveVir; b++){ | |
1768 | + int moB = numberOcc + b; | |
1769 | + if(moB==moA) continue; | |
1770 | + int tmpSDIndex = this->GetSlaterDeterminantIndex(i,b); | |
1771 | + tmpVal1 += matrixCIS[excitedStateIndex][tmpSDIndex]*fockMatrix[moB][mu]; | |
1783 | 1772 | } |
1773 | + double tmpVal2=0.0; | |
1774 | + for(int j=0; j<numberActiveOcc; j++){ | |
1775 | + int moJ = numberOcc - (j+1); | |
1776 | + if(moJ==moI) continue; | |
1777 | + int tmpSDIndex = this->GetSlaterDeterminantIndex(j,a); | |
1778 | + tmpVal2 += matrixCIS[excitedStateIndex][tmpSDIndex]*fockMatrix[moJ][mu]; | |
1779 | + } | |
1780 | + value += matrixCIS[excitedStateIndex][slaterDeterminantIndex] | |
1781 | + *(fockMatrix[moA][mu]*tmpVal1 + fockMatrix[moI][mu]*tmpVal2); | |
1784 | 1782 | } |
1785 | - (*orbitalElectronPopulationCIS)[k][mu][nu] = value; | |
1786 | 1783 | } |
1784 | + (*orbitalElectronPopulationDiagCIS)[k][mu] = value; | |
1787 | 1785 | } //end of try-loop |
1788 | 1786 | catch(MolDSException ex){ |
1789 | - #pragma omp critical | |
1787 | +#pragma omp critical | |
1790 | 1788 | ex.Serialize(errorStream); |
1791 | 1789 | } |
1792 | 1790 | } // end of mu-loop |
@@ -1795,8 +1793,8 @@ | ||
1795 | 1793 | int tag = k; |
1796 | 1794 | int source = calcRank; |
1797 | 1795 | int dest = mpiHeadRank; |
1798 | - int num = numberAOs*numberAOs; | |
1799 | - double* buff = &(*orbitalElectronPopulationCIS)[k][0][0]; | |
1796 | + int num = numberAOs; | |
1797 | + double* buff = &(*orbitalElectronPopulationDiagCIS)[k][0]; | |
1800 | 1798 | if(mpiRank == mpiHeadRank && mpiRank != calcRank){ |
1801 | 1799 | asyncCommunicator.SetRecvedMessage(buff, num, source, tag); |
1802 | 1800 | } |
@@ -1815,15 +1813,15 @@ | ||
1815 | 1813 | throw MolDSException::Deserialize(errorStream); |
1816 | 1814 | } |
1817 | 1815 | for(int k=0; k<elecStates->size(); k++){ |
1818 | - int num = numberAOs*numberAOs; | |
1819 | - double* buff = &(*orbitalElectronPopulationCIS)[k][0][0]; | |
1816 | + int num = numberAOs; | |
1817 | + double* buff = &(*orbitalElectronPopulationDiagCIS)[k][0]; | |
1820 | 1818 | MolDS_mpi::MpiProcess::GetInstance()->Broadcast(buff, num, mpiHeadRank); |
1821 | 1819 | } |
1822 | 1820 | } |
1823 | 1821 | |
1824 | 1822 | void ZindoS::CalcAtomicElectronPopulationCIS(double*** atomicElectronPopulationCIS, |
1825 | - double const* const* const* orbitalElectronPopulationCIS, | |
1826 | - const Molecule& molecule) const{ | |
1823 | + double const* const* orbitalElectronPopulationDiagCIS, | |
1824 | + const Molecule& molecule) const{ | |
1827 | 1825 | if(!Parameters::GetInstance()->RequiresMullikenCIS()){ |
1828 | 1826 | return; |
1829 | 1827 | } |
@@ -1832,13 +1830,13 @@ | ||
1832 | 1830 | // malloc or initialize free exciton energies |
1833 | 1831 | if(*atomicElectronPopulationCIS == NULL){ |
1834 | 1832 | MallocerFreer::GetInstance()->Malloc<double>(atomicElectronPopulationCIS, |
1835 | - elecStates->size(), | |
1836 | - totalNumberAtoms); | |
1833 | + elecStates->size(), | |
1834 | + totalNumberAtoms); | |
1837 | 1835 | } |
1838 | 1836 | else{ |
1839 | 1837 | MallocerFreer::GetInstance()->Initialize<double>(*atomicElectronPopulationCIS, |
1840 | - elecStates->size(), | |
1841 | - totalNumberAtoms); | |
1838 | + elecStates->size(), | |
1839 | + totalNumberAtoms); | |
1842 | 1840 | } |
1843 | 1841 | |
1844 | 1842 | // MPI setting of each rank |
@@ -1854,13 +1852,13 @@ | ||
1854 | 1852 | int excitedStateIndex = (*elecStates)[k]-1; |
1855 | 1853 | int calcRank = k%mpiSize; |
1856 | 1854 | if(calcRank == mpiRank){ |
1857 | - #pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE) | |
1855 | +#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE) | |
1858 | 1856 | for(int a=0; a<totalNumberAtoms; a++){ |
1859 | 1857 | try{ |
1860 | 1858 | int firstAOIndex = molecule.GetAtomVect()[a]->GetFirstAOIndex(); |
1861 | 1859 | int numberAOs = molecule.GetAtomVect()[a]->GetValenceSize(); |
1862 | 1860 | for(int i=firstAOIndex; i<firstAOIndex+numberAOs; i++){ |
1863 | - (*atomicElectronPopulationCIS)[k][a] += orbitalElectronPopulationCIS[k][i][i]; | |
1861 | + (*atomicElectronPopulationCIS)[k][a] += orbitalElectronPopulationDiagCIS[k][i]; | |
1864 | 1862 | } |
1865 | 1863 | }// end of try-region |
1866 | 1864 | catch(MolDSException ex){ |
@@ -1898,8 +1896,11 @@ | ||
1898 | 1896 | } |
1899 | 1897 | |
1900 | 1898 | void ZindoS::CalcAtomicUnpairedPopulationCIS(double*** atomicUnpairedPopulationCIS, |
1901 | - double const* const* const* orbitalElectronPopulationCIS, | |
1902 | - const Molecule& molecule) const{ | |
1899 | + double const* const* orbitalElectronPopulationDiagCIS, | |
1900 | + double const* const* orbitalElectronPopulation, | |
1901 | + const MolDS_base::Molecule& molecule, | |
1902 | + double const* const* fockMatrix, | |
1903 | + double const* const* matrixCIS) const{ | |
1903 | 1904 | if(!Parameters::GetInstance()->RequiresMullikenCIS()){ |
1904 | 1905 | return; |
1905 | 1906 | } |
@@ -1907,6 +1908,10 @@ | ||
1907 | 1908 | return; |
1908 | 1909 | } |
1909 | 1910 | int totalNumberAtoms = molecule.GetAtomVect().size(); |
1911 | + int numberAOs = molecule.GetTotalNumberAOs(); | |
1912 | + int numberOcc = molecule.GetTotalNumberValenceElectrons()/2; | |
1913 | + int numberActiveOcc = Parameters::GetInstance()->GetActiveOccCIS(); | |
1914 | + int numberActiveVir = Parameters::GetInstance()->GetActiveVirCIS(); | |
1910 | 1915 | vector<int>* elecStates = Parameters::GetInstance()->GetElectronicStateIndecesMullikenCIS(); |
1911 | 1916 | // malloc or initialize free exciton energies |
1912 | 1917 | if(*atomicUnpairedPopulationCIS == NULL){ |
@@ -1934,22 +1939,65 @@ | ||
1934 | 1939 | int calcRank = k%mpiSize; |
1935 | 1940 | if(calcRank == mpiRank){ |
1936 | 1941 | #pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE) |
1937 | - for(int a=0; a<totalNumberAtoms; a++){ | |
1942 | + for(int atom=0; atom<totalNumberAtoms; atom++){ | |
1938 | 1943 | try{ |
1939 | - int firstAOIndex = molecule.GetAtomVect()[a]->GetFirstAOIndex(); | |
1940 | - int numberAOs = molecule.GetAtomVect()[a]->GetValenceSize(); | |
1941 | - (*atomicUnpairedPopulationCIS)[k][a] = 0.0; | |
1942 | - for(int i=firstAOIndex; i<firstAOIndex+numberAOs; i++){ | |
1944 | + int firstAOIndex = molecule.GetAtomVect()[atom]->GetFirstAOIndex(); | |
1945 | + int numberAOs = molecule.GetAtomVect()[atom]->GetValenceSize(); | |
1946 | + (*atomicUnpairedPopulationCIS)[k][atom] = 0.0; | |
1947 | + for(int mu=firstAOIndex; mu<firstAOIndex+numberAOs; mu++){ | |
1943 | 1948 | double orbitalSquarePopulation = 0.0; |
1944 | 1949 | int totalNumberAOs = molecule.GetTotalNumberAOs(); |
1945 | - for(int j=0; j<totalNumberAOs; j++) { | |
1946 | - orbitalSquarePopulation += orbitalElectronPopulationCIS[k][i][j] * orbitalElectronPopulationCIS[k][j][i]; | |
1950 | + for(int nu=0; nu<totalNumberAOs; nu++) { | |
1951 | + | |
1952 | + // calculation of off-diag of orbitalElectronPopulationCIS | |
1953 | + double oepMuNu=0.0; | |
1954 | + double oepNuMu=0.0; | |
1955 | + oepMuNu = orbitalElectronPopulation[mu][nu]; | |
1956 | + oepNuMu = orbitalElectronPopulation[nu][mu]; | |
1957 | + for(int i=0; i<numberActiveOcc; i++){ | |
1958 | + int moI = numberOcc - (i+1); | |
1959 | + for(int a=0; a<numberActiveVir; a++){ | |
1960 | + int moA = numberOcc + a; | |
1961 | + int slaterDeterminantIndex = this->GetSlaterDeterminantIndex(i,a); | |
1962 | + double tmp = 0.0; | |
1963 | + tmp = pow(matrixCIS[excitedStateIndex][slaterDeterminantIndex],2.0) | |
1964 | + *(-fockMatrix[moI][mu]*fockMatrix[moI][nu] | |
1965 | + +fockMatrix[moA][mu]*fockMatrix[moA][nu]); | |
1966 | + oepMuNu += tmp; | |
1967 | + oepNuMu += tmp; | |
1968 | + double tmpVal1MuNu=0.0; | |
1969 | + double tmpVal1NuMu=0.0; | |
1970 | + for(int b=0; b<numberActiveVir; b++){ | |
1971 | + int moB = numberOcc + b; | |
1972 | + if(moB==moA) continue; | |
1973 | + int tmpSDIndex = this->GetSlaterDeterminantIndex(i,b); | |
1974 | + tmpVal1MuNu += matrixCIS[excitedStateIndex][tmpSDIndex]*fockMatrix[moB][nu]; | |
1975 | + tmpVal1NuMu += matrixCIS[excitedStateIndex][tmpSDIndex]*fockMatrix[moB][mu]; | |
1976 | + } | |
1977 | + double tmpVal2MuNu=0.0; | |
1978 | + double tmpVal2NuMu=0.0; | |
1979 | + for(int j=0; j<numberActiveOcc; j++){ | |
1980 | + int moJ = numberOcc - (j+1); | |
1981 | + if(moJ==moI) continue; | |
1982 | + int tmpSDIndex = this->GetSlaterDeterminantIndex(j,a); | |
1983 | + tmpVal2MuNu += matrixCIS[excitedStateIndex][tmpSDIndex]*fockMatrix[moJ][mu]; | |
1984 | + tmpVal2NuMu += matrixCIS[excitedStateIndex][tmpSDIndex]*fockMatrix[moJ][nu]; | |
1985 | + } | |
1986 | + oepMuNu += matrixCIS[excitedStateIndex][slaterDeterminantIndex] | |
1987 | + *(fockMatrix[moA][mu]*tmpVal1MuNu + fockMatrix[moI][nu]*tmpVal2MuNu); | |
1988 | + oepNuMu += matrixCIS[excitedStateIndex][slaterDeterminantIndex] | |
1989 | + *(fockMatrix[moA][nu]*tmpVal1NuMu + fockMatrix[moI][mu]*tmpVal2NuMu); | |
1990 | + } | |
1991 | + } | |
1992 | + orbitalSquarePopulation += oepNuMu * oepNuMu; | |
1993 | + | |
1947 | 1994 | } |
1948 | - (*atomicUnpairedPopulationCIS)[k][a] += 2.0 * orbitalElectronPopulationCIS[k][i][i] - orbitalSquarePopulation; | |
1995 | + (*atomicUnpairedPopulationCIS)[k][atom] += 2.0 * orbitalElectronPopulationDiagCIS[k][mu] | |
1996 | + - orbitalSquarePopulation; | |
1949 | 1997 | } |
1950 | 1998 | } // end of try-region |
1951 | 1999 | catch(MolDSException ex){ |
1952 | - #pragma omp critical | |
2000 | +#pragma omp critical | |
1953 | 2001 | ex.Serialize(errorStream); |
1954 | 2002 | } |
1955 | 2003 | } // end of a-loop |
@@ -1995,11 +2043,11 @@ | ||
1995 | 2043 | double eneEv = this->excitedEnergies[k]/eV2AU; |
1996 | 2044 | double eneNm = 1.0/(this->excitedEnergies[k]/nmin2AU); |
1997 | 2045 | this->OutputLog(boost::format("%s\t%d\t%e\t%e\t%e\t") |
1998 | - % this->messageExcitedStatesEnergies | |
1999 | - % (k+1) | |
2000 | - % this->excitedEnergies[k] | |
2001 | - % eneEv | |
2002 | - % eneNm); | |
2046 | + % this->messageExcitedStatesEnergies | |
2047 | + % (k+1) | |
2048 | + % this->excitedEnergies[k] | |
2049 | + % eneEv | |
2050 | + % eneNm); | |
2003 | 2051 | |
2004 | 2052 | // sort eigen vector coefficeits of CIS and output |
2005 | 2053 | vector<CISEigenVectorCoefficient> cisEigenVectorCoefficients; |
@@ -2006,8 +2054,8 @@ | ||
2006 | 2054 | this->SortCISEigenVectorCoefficients(&cisEigenVectorCoefficients, this->matrixCIS[k]); |
2007 | 2055 | for(int l=0; l<Parameters::GetInstance()->GetNumberPrintCoefficientsCIS(); l++){ |
2008 | 2056 | this->OutputLog(boost::format("%e (%d -> %d)\t") % cisEigenVectorCoefficients[l].coefficient |
2009 | - % cisEigenVectorCoefficients[l].occIndex | |
2010 | - % cisEigenVectorCoefficients[l].virIndex); | |
2057 | + % cisEigenVectorCoefficients[l].occIndex | |
2058 | + % cisEigenVectorCoefficients[l].virIndex); | |
2011 | 2059 | } |
2012 | 2060 | this->OutputLog("\n"); |
2013 | 2061 | } |
@@ -2031,12 +2079,12 @@ | ||
2031 | 2079 | this->OutputLog(this->messageExcitonEnergiesCISTitle); |
2032 | 2080 | for(int k=0; k<Parameters::GetInstance()->GetNumberExcitedStatesCIS(); k++){ |
2033 | 2081 | this->OutputLog(boost::format("%s\t%d\t%e\t%e\t%e\t%e\n") |
2034 | - % this->messageExcitonEnergiesShortCIS | |
2035 | - % (k+1) | |
2036 | - % this->freeExcitonEnergiesCIS[k] | |
2037 | - % (this->freeExcitonEnergiesCIS[k]/eV2AU) | |
2038 | - % (this->excitedEnergies[k]-this->freeExcitonEnergiesCIS[k]) | |
2039 | - %((this->excitedEnergies[k]-this->freeExcitonEnergiesCIS[k])/eV2AU)); | |
2082 | + % this->messageExcitonEnergiesShortCIS | |
2083 | + % (k+1) | |
2084 | + % this->freeExcitonEnergiesCIS[k] | |
2085 | + % (this->freeExcitonEnergiesCIS[k]/eV2AU) | |
2086 | + % (this->excitedEnergies[k]-this->freeExcitonEnergiesCIS[k]) | |
2087 | + %((this->excitedEnergies[k]-this->freeExcitonEnergiesCIS[k])/eV2AU)); | |
2040 | 2088 | } |
2041 | 2089 | } |
2042 | 2090 | this->OutputLog("\n"); |
@@ -2044,10 +2092,10 @@ | ||
2044 | 2092 | // output Hole density |
2045 | 2093 | if(Parameters::GetInstance()->RequiresHolePlot()){ |
2046 | 2094 | MolDS_base_loggers::DensityLogger* holeDensityLogger = new MolDS_base_loggers::HoleDensityLogger( |
2047 | - *this->molecule, | |
2048 | - this->fockMatrix, | |
2049 | - this->matrixCIS, | |
2050 | - this->theory); | |
2095 | + *this->molecule, | |
2096 | + this->fockMatrix, | |
2097 | + this->matrixCIS, | |
2098 | + this->theory); | |
2051 | 2099 | holeDensityLogger->DrawDensity(*(Parameters::GetInstance()->GetElecIndecesHolePlot())); |
2052 | 2100 | delete holeDensityLogger; |
2053 | 2101 | } |
@@ -2055,10 +2103,10 @@ | ||
2055 | 2103 | // output particle density |
2056 | 2104 | if(Parameters::GetInstance()->RequiresParticlePlot()){ |
2057 | 2105 | MolDS_base_loggers::DensityLogger* particleDensityLogger = new MolDS_base_loggers::ParticleDensityLogger( |
2058 | - *this->molecule, | |
2059 | - this->fockMatrix, | |
2060 | - this->matrixCIS, | |
2061 | - this->theory); | |
2106 | + *this->molecule, | |
2107 | + this->fockMatrix, | |
2108 | + this->matrixCIS, | |
2109 | + this->theory); | |
2062 | 2110 | particleDensityLogger->DrawDensity(*(Parameters::GetInstance()->GetElecIndecesParticlePlot())); |
2063 | 2111 | delete particleDensityLogger; |
2064 | 2112 | } |
@@ -2078,16 +2126,16 @@ | ||
2078 | 2126 | temp += pow(this->electronicTransitionDipoleMoments[k][k][ZAxis]+this->coreDipoleMoment[ZAxis],2.0); |
2079 | 2127 | magnitude = sqrt(temp); |
2080 | 2128 | this->OutputLog(boost::format("\t%s\t%d\t%e\t%e\t%e\t%e\t\t%e\t%e\t%e\t%e\n") |
2081 | - % this->messageTotalDipoleMoment | |
2082 | - % k | |
2083 | - % (this->electronicTransitionDipoleMoments[k][k][XAxis]+this->coreDipoleMoment[XAxis]) | |
2084 | - % (this->electronicTransitionDipoleMoments[k][k][YAxis]+this->coreDipoleMoment[YAxis]) | |
2085 | - % (this->electronicTransitionDipoleMoments[k][k][ZAxis]+this->coreDipoleMoment[ZAxis]) | |
2086 | - % magnitude | |
2087 | - % ((this->electronicTransitionDipoleMoments[k][k][XAxis]+this->coreDipoleMoment[XAxis])/debye2AU) | |
2088 | - % ((this->electronicTransitionDipoleMoments[k][k][YAxis]+this->coreDipoleMoment[YAxis])/debye2AU) | |
2089 | - % ((this->electronicTransitionDipoleMoments[k][k][ZAxis]+this->coreDipoleMoment[ZAxis])/debye2AU) | |
2090 | - % (magnitude/debye2AU)); | |
2129 | + % this->messageTotalDipoleMoment | |
2130 | + % k | |
2131 | + % (this->electronicTransitionDipoleMoments[k][k][XAxis]+this->coreDipoleMoment[XAxis]) | |
2132 | + % (this->electronicTransitionDipoleMoments[k][k][YAxis]+this->coreDipoleMoment[YAxis]) | |
2133 | + % (this->electronicTransitionDipoleMoments[k][k][ZAxis]+this->coreDipoleMoment[ZAxis]) | |
2134 | + % magnitude | |
2135 | + % ((this->electronicTransitionDipoleMoments[k][k][XAxis]+this->coreDipoleMoment[XAxis])/debye2AU) | |
2136 | + % ((this->electronicTransitionDipoleMoments[k][k][YAxis]+this->coreDipoleMoment[YAxis])/debye2AU) | |
2137 | + % ((this->electronicTransitionDipoleMoments[k][k][ZAxis]+this->coreDipoleMoment[ZAxis])/debye2AU) | |
2138 | + % (magnitude/debye2AU)); | |
2091 | 2139 | } |
2092 | 2140 | this->OutputLog("\n"); |
2093 | 2141 |
@@ -199,17 +199,20 @@ | ||
199 | 199 | double const* energiesMO, |
200 | 200 | double const* const* matrixCIS, |
201 | 201 | int matrixCISdimension) const; |
202 | - void CalcOrbitalElectronPopulationCIS(double**** orbitalElectronPopulationCIS, | |
202 | + void CalcOrbitalElectronPopulationCIS(double*** orbitalElectronPopulationDiagCIS, | |
203 | 203 | double const* const* orbitalElectronPopulation, |
204 | 204 | const MolDS_base::Molecule& molecule, |
205 | 205 | double const* const* fockMatrix, |
206 | 206 | double const* const* matrixCIS) const; |
207 | 207 | void CalcAtomicElectronPopulationCIS(double*** atomicElectronPopulationCIS, |
208 | - double const* const* const* orbitalElectronPopulationCIS, | |
208 | + double const* const* orbitalElectronPopulationDiagCIS, | |
209 | 209 | const MolDS_base::Molecule& molecule) const; |
210 | 210 | void CalcAtomicUnpairedPopulationCIS(double*** atomicUnpairedPopulationCIS, |
211 | - double const* const* const* orbitalElectronPopulationCIS, | |
212 | - const MolDS_base::Molecule& molecule) const; | |
211 | + double const* const* orbitalElectronPopulationDiagCIS, | |
212 | + double const* const* orbitalElectronPopulation, | |
213 | + const MolDS_base::Molecule& molecule, | |
214 | + double const* const* fockMatrix, | |
215 | + double const* const* matrixCIS) const; | |
213 | 216 | void CalcElectronicTransitionDipoleMomentMatrix(double*** electronicTransitionDipoleMoments, |
214 | 217 | double const* const* fockMatrix, |
215 | 218 | double const* const* matrixCIS, |
@@ -82,15 +82,15 @@ | ||
82 | 82 | this->matrixCISdimension = 0; |
83 | 83 | this->fockMatrix = NULL; |
84 | 84 | this->energiesMO = NULL; |
85 | - this->orbitalElectronPopulation = NULL; | |
86 | - this->orbitalElectronPopulationCIS = NULL; | |
87 | - this->atomicElectronPopulation = NULL; | |
88 | - this->atomicElectronPopulationCIS = NULL; | |
89 | - this->atomicUnpairedPopulationCIS = NULL; | |
90 | - this->overlapAOs = NULL; | |
91 | - this->twoElecsTwoAtomCores = NULL; | |
92 | - this->twoElecsAtomEpcCores = NULL; | |
93 | - this->cartesianMatrix = NULL; | |
85 | + this->orbitalElectronPopulation = NULL; | |
86 | + this->orbitalElectronPopulationDiagCIS = NULL; | |
87 | + this->atomicElectronPopulation = NULL; | |
88 | + this->atomicElectronPopulationCIS = NULL; | |
89 | + this->atomicUnpairedPopulationCIS = NULL; | |
90 | + this->overlapAOs = NULL; | |
91 | + this->twoElecsTwoAtomCores = NULL; | |
92 | + this->twoElecsAtomEpcCores = NULL; | |
93 | + this->cartesianMatrix = NULL; | |
94 | 94 | this->electronicTransitionDipoleMoments = NULL; |
95 | 95 | this->coreDipoleMoment = NULL; |
96 | 96 | this->normalForceConstants = NULL; |
@@ -112,7 +112,7 @@ | ||
112 | 112 | double** fockMatrix; |
113 | 113 | double* energiesMO; |
114 | 114 | double** orbitalElectronPopulation; //P_{\mu\nu} of (2.50) in J. A. Pople book. |
115 | - double*** orbitalElectronPopulationCIS; | |
115 | + double** orbitalElectronPopulationDiagCIS; | |
116 | 116 | double* atomicElectronPopulation; //P_{AB} of (3.21) in J. A. Pople book. |
117 | 117 | double** atomicElectronPopulationCIS; |
118 | 118 | double** atomicUnpairedPopulationCIS; |