Revision | e372fcf693291b9ef9f363e65304974f3c94256c (tree) |
---|---|
Time | 2014-01-07 00:42:58 |
Author | Mikiya Fujii <mikiya.fujii@gmai...> |
Commiter | Mikiya Fujii |
refactoring center of dipole
git-svn-id: https://svn.sourceforge.jp/svnroot/molds/trunk@1617 1136aad2-a195-0410-b898-f5ea1d11b9d8
@@ -230,7 +230,7 @@ HOW TO WRITE INPUT: | ||
230 | 230 | "max_iter", "rms_density", "damping_thresh", "damping_weight", |
231 | 231 | "diis_num_error_vect", "diis_start_error", "diis_end_error", |
232 | 232 | "vdW", "vdW_s6", and "vdW_d" are prepared as options. |
233 | - SCF module outputs also the dipole moment arrond the center of cores of the molecule. | |
233 | + SCF module outputs also the dipole moment arrond the center of core's mass | |
234 | 234 | To calculate the dipole moment, STO-6G [DY_1977] is used. |
235 | 235 | |
236 | 236 | The default value of the "max_iter" is 100. |
@@ -456,6 +456,8 @@ HOW TO WRITE INPUT: | ||
456 | 456 | If user set this "all_transition_dipole" as "yes", all transition dipole moments |
457 | 457 | including between excited states would be calculated. |
458 | 458 | Otherwise "no", transition dipole moments from ground state to each excited state are calculated. |
459 | + The center of the transition dipole moments is same with | |
460 | + the center of the dipole moment of the ground state. | |
459 | 461 | |
460 | 462 | "mulliken" is a option of mulliken popultaion analysis of the excited state. |
461 | 463 | When "mulliken x" is included in CIS-directive, the mulliken popultaion of xth excited state is calculated. |
@@ -54,8 +54,9 @@ public: | ||
54 | 54 | void AddRealAtom(MolDS_base_atoms::Atom* atom); |
55 | 55 | void AddGhostAtom(MolDS_base_atoms::Atom* atom); |
56 | 56 | void AddEpc(MolDS_base_atoms::Atom* epc); |
57 | - double const* GetXyzCOM() const; | |
58 | - double const* GetXyzCOC() const; | |
57 | + double const* GetXyzCOM() const; // Get the Cartesian coordinates of the center of atom's mass | |
58 | + double const* GetXyzCOC() const; // Get the Cartesian coordinates of the cneter of core's mass | |
59 | + double const* GetXyzDipoleCenter() const{return this->GetXyzCOC();} | |
59 | 60 | void CalcBasics(); |
60 | 61 | void CalcBasicsConfiguration(); |
61 | 62 | int GetTotalNumberAOs() const{return this->totalNumberAOs;} |
@@ -90,8 +91,8 @@ private: | ||
90 | 91 | std::vector<MolDS_base_atoms::Atom*>* realAtomVect; // Vector of real (=not ghost) atoms |
91 | 92 | std::vector<MolDS_base_atoms::Atom*>* ghostAtomVect; // Vector of ghost atoms |
92 | 93 | std::vector<MolDS_base_atoms::Atom*>* epcVect; // Vector of Environmental Point Charges |
93 | - double* xyzCOM; // x, y, z coordinates of Center of Mass; | |
94 | - double* xyzCOC; // x, y, z coordinates of Center of Core; | |
94 | + double* xyzCOM; // x, y, z coordinates of the center of atomic mass; | |
95 | + double* xyzCOC; // x, y, z coordinates of the center of core's mass; | |
95 | 96 | double** distanceAtoms; // distance between each atom; |
96 | 97 | double** distanceEpcs; // distance between each environmental point charge; |
97 | 98 | double** distanceAtomsEpcs;// distance between each atom and environmental point charge; |
@@ -1764,11 +1764,12 @@ void Cndo2::CalcGammaAB(double** gammaAB, const Molecule& molecule) const{ | ||
1764 | 1764 | void Cndo2::CalcCoreDipoleMoment(double* coreDipoleMoment, |
1765 | 1765 | const Molecule& molecule) const{ |
1766 | 1766 | |
1767 | + double const* dipoleCenter = molecule.GetXyzDipoleCenter(); | |
1767 | 1768 | for(int i=0; i<CartesianType_end; i++){ |
1768 | 1769 | coreDipoleMoment[i] = 0.0; |
1769 | 1770 | for(int A=0; A<molecule.GetAtomVect().size(); A++){ |
1770 | 1771 | coreDipoleMoment[i] += molecule.GetAtomVect()[A]->GetCoreCharge() |
1771 | - *(molecule.GetAtomVect()[A]->GetXyz()[i] - molecule.GetXyzCOC()[i]); | |
1772 | + *(molecule.GetAtomVect()[A]->GetXyz()[i] - dipoleCenter[i]); | |
1772 | 1773 | } |
1773 | 1774 | } |
1774 | 1775 | } |
@@ -1802,7 +1803,7 @@ void Cndo2::CalcElectronicTransitionDipoleMoment(double* transitionDipoleMoment, | ||
1802 | 1803 | double const* groundStateDipole) const{ |
1803 | 1804 | int groundState = 0; |
1804 | 1805 | if(from == groundState && to == groundState){ |
1805 | - double const* centerOfDipole = molecule.GetXyzCOC(); | |
1806 | + double const* dipoleCenter = molecule.GetXyzDipoleCenter(); | |
1806 | 1807 | int totalAONumber = molecule.GetTotalNumberAOs(); |
1807 | 1808 | transitionDipoleMoment[XAxis] = 0.0; |
1808 | 1809 | transitionDipoleMoment[YAxis] = 0.0; |
@@ -1820,9 +1821,9 @@ void Cndo2::CalcElectronicTransitionDipoleMoment(double* transitionDipoleMoment, | ||
1820 | 1821 | double temp = MolDS_wrappers::Blas::GetInstance()->Ddot(totalAONumber*totalAONumber, |
1821 | 1822 | &orbitalElectronPopulation[0][0], |
1822 | 1823 | &overlapAOs[0][0]); |
1823 | - transitionDipoleMoment[XAxis] += centerOfDipole[XAxis]*temp; | |
1824 | - transitionDipoleMoment[YAxis] += centerOfDipole[YAxis]*temp; | |
1825 | - transitionDipoleMoment[ZAxis] += centerOfDipole[ZAxis]*temp; | |
1824 | + transitionDipoleMoment[XAxis] += dipoleCenter[XAxis]*temp; | |
1825 | + transitionDipoleMoment[YAxis] += dipoleCenter[YAxis]*temp; | |
1826 | + transitionDipoleMoment[ZAxis] += dipoleCenter[ZAxis]*temp; | |
1826 | 1827 | } |
1827 | 1828 | else{ |
1828 | 1829 | stringstream ss; |
@@ -1132,8 +1132,8 @@ void ZindoS::CalcCISProperties(){ | ||
1132 | 1132 | dipoleMOs[ZAxis], |
1133 | 1133 | tmpMatrixBC); |
1134 | 1134 | |
1135 | - double const* centerOfDipole = this->molecule->GetXyzCOC(); | |
1136 | 1135 | // set orign of dipole |
1136 | + double const* dipoleCenter = this->molecule->GetXyzDipoleCenter(); | |
1137 | 1137 | MolDS_wrappers::Blas::GetInstance()->Dgemmm(false, false, true, totalNumberAOs, totalNumberAOs, totalNumberAOs, totalNumberAOs, |
1138 | 1138 | alpha, |
1139 | 1139 | this->fockMatrix, |
@@ -1143,15 +1143,15 @@ void ZindoS::CalcCISProperties(){ | ||
1143 | 1143 | overlapMOs, |
1144 | 1144 | tmpMatrixBC); |
1145 | 1145 | MolDS_wrappers::Blas::GetInstance()->Daxpy(totalNumberAOs*totalNumberAOs, |
1146 | - -centerOfDipole[XAxis], | |
1146 | + -dipoleCenter[XAxis], | |
1147 | 1147 | &overlapMOs[0][0], |
1148 | 1148 | &dipoleMOs[XAxis][0][0]); |
1149 | 1149 | MolDS_wrappers::Blas::GetInstance()->Daxpy(totalNumberAOs*totalNumberAOs, |
1150 | - -centerOfDipole[YAxis], | |
1150 | + -dipoleCenter[YAxis], | |
1151 | 1151 | &overlapMOs[0][0], |
1152 | 1152 | &dipoleMOs[YAxis][0][0]); |
1153 | 1153 | MolDS_wrappers::Blas::GetInstance()->Daxpy(totalNumberAOs*totalNumberAOs, |
1154 | - -centerOfDipole[ZAxis], | |
1154 | + -dipoleCenter[ZAxis], | |
1155 | 1155 | &overlapMOs[0][0], |
1156 | 1156 | &dipoleMOs[ZAxis][0][0]); |
1157 | 1157 |
@@ -1410,7 +1410,7 @@ void ZindoS::CalcElectronicTransitionDipoleMoment(double* transitionDipoleMoment | ||
1410 | 1410 | double valueX = 0.0; |
1411 | 1411 | double valueY = 0.0; |
1412 | 1412 | double valueZ = 0.0; |
1413 | - double const* xyzCOC = molecule.GetXyzCOC(); | |
1413 | + double const* dipoleCenter = molecule.GetXyzDipoleCenter(); | |
1414 | 1414 | int groundState = 0; |
1415 | 1415 | int totalNumberAOs = molecule.GetTotalNumberAOs(); |
1416 | 1416 | stringstream ompErrors; |
@@ -1439,9 +1439,9 @@ void ZindoS::CalcElectronicTransitionDipoleMoment(double* transitionDipoleMoment | ||
1439 | 1439 | for(int mu=0; mu<totalNumberAOs; mu++){ |
1440 | 1440 | for(int nu=0; nu<totalNumberAOs; nu++){ |
1441 | 1441 | temp = (-1.0*fockMatrix[moI][mu]*fockMatrix[moI][nu] + fockMatrix[moA][mu]*fockMatrix[moA][nu]); |
1442 | - tempX += temp*(cartesianMatrix[XAxis][mu][nu] - xyzCOC[XAxis]*overlapAOs[mu][nu]); | |
1443 | - tempY += temp*(cartesianMatrix[YAxis][mu][nu] - xyzCOC[YAxis]*overlapAOs[mu][nu]); | |
1444 | - tempZ += temp*(cartesianMatrix[ZAxis][mu][nu] - xyzCOC[ZAxis]*overlapAOs[mu][nu]); | |
1442 | + tempX += temp*(cartesianMatrix[XAxis][mu][nu] - dipoleCenter[XAxis]*overlapAOs[mu][nu]); | |
1443 | + tempY += temp*(cartesianMatrix[YAxis][mu][nu] - dipoleCenter[YAxis]*overlapAOs[mu][nu]); | |
1444 | + tempZ += temp*(cartesianMatrix[ZAxis][mu][nu] - dipoleCenter[ZAxis]*overlapAOs[mu][nu]); | |
1445 | 1445 | } |
1446 | 1446 | } |
1447 | 1447 | temp = matrixCIS[from-1][l]*matrixCIS[to-1][l]; |
@@ -1477,9 +1477,9 @@ void ZindoS::CalcElectronicTransitionDipoleMoment(double* transitionDipoleMoment | ||
1477 | 1477 | for(int mu=0; mu<totalNumberAOs; mu++){ |
1478 | 1478 | for(int nu=0; nu<totalNumberAOs; nu++){ |
1479 | 1479 | temp = fockMatrix[moA][mu]*fockMatrix[moI][nu]; |
1480 | - tempX += temp*(cartesianMatrix[XAxis][mu][nu] - xyzCOC[XAxis]*overlapAOs[mu][nu]); | |
1481 | - tempY += temp*(cartesianMatrix[YAxis][mu][nu] - xyzCOC[YAxis]*overlapAOs[mu][nu]); | |
1482 | - tempZ += temp*(cartesianMatrix[ZAxis][mu][nu] - xyzCOC[ZAxis]*overlapAOs[mu][nu]); | |
1480 | + tempX += temp*(cartesianMatrix[XAxis][mu][nu] - dipoleCenter[XAxis]*overlapAOs[mu][nu]); | |
1481 | + tempY += temp*(cartesianMatrix[YAxis][mu][nu] - dipoleCenter[YAxis]*overlapAOs[mu][nu]); | |
1482 | + tempZ += temp*(cartesianMatrix[ZAxis][mu][nu] - dipoleCenter[ZAxis]*overlapAOs[mu][nu]); | |
1483 | 1483 | } |
1484 | 1484 | } |
1485 | 1485 | temp = this->matrixCIS[to-1][l]*sqrt(2.0); |
@@ -1515,9 +1515,9 @@ void ZindoS::CalcElectronicTransitionDipoleMoment(double* transitionDipoleMoment | ||
1515 | 1515 | for(int mu=0; mu<totalNumberAOs; mu++){ |
1516 | 1516 | for(int nu=0; nu<totalNumberAOs; nu++){ |
1517 | 1517 | temp = fockMatrix[moI][mu]*fockMatrix[moA][nu]; |
1518 | - tempX += temp*(cartesianMatrix[XAxis][mu][nu] - xyzCOC[XAxis]*overlapAOs[mu][nu]); | |
1519 | - tempY += temp*(cartesianMatrix[YAxis][mu][nu] - xyzCOC[YAxis]*overlapAOs[mu][nu]); | |
1520 | - tempZ += temp*(cartesianMatrix[ZAxis][mu][nu] - xyzCOC[ZAxis]*overlapAOs[mu][nu]); | |
1518 | + tempX += temp*(cartesianMatrix[XAxis][mu][nu] - dipoleCenter[XAxis]*overlapAOs[mu][nu]); | |
1519 | + tempY += temp*(cartesianMatrix[YAxis][mu][nu] - dipoleCenter[YAxis]*overlapAOs[mu][nu]); | |
1520 | + tempZ += temp*(cartesianMatrix[ZAxis][mu][nu] - dipoleCenter[ZAxis]*overlapAOs[mu][nu]); | |
1521 | 1521 | } |
1522 | 1522 | } |
1523 | 1523 | temp = matrixCIS[from-1][l]*sqrt(2.0); |
@@ -1555,9 +1555,9 @@ void ZindoS::CalcElectronicTransitionDipoleMoment(double* transitionDipoleMoment | ||
1555 | 1555 | for(int mu=0; mu<totalNumberAOs; mu++){ |
1556 | 1556 | for(int nu=0; nu<totalNumberAOs; nu++){ |
1557 | 1557 | temp = (-1.0*fockMatrix[moI][mu]*fockMatrix[moI][nu] + fockMatrix[moA][mu]*fockMatrix[moA][nu]); |
1558 | - tempX += temp*(cartesianMatrix[XAxis][mu][nu] - xyzCOC[XAxis]*overlapAOs[mu][nu]); | |
1559 | - tempY += temp*(cartesianMatrix[YAxis][mu][nu] - xyzCOC[YAxis]*overlapAOs[mu][nu]); | |
1560 | - tempZ += temp*(cartesianMatrix[ZAxis][mu][nu] - xyzCOC[ZAxis]*overlapAOs[mu][nu]); | |
1558 | + tempX += temp*(cartesianMatrix[XAxis][mu][nu] - dipoleCenter[XAxis]*overlapAOs[mu][nu]); | |
1559 | + tempY += temp*(cartesianMatrix[YAxis][mu][nu] - dipoleCenter[YAxis]*overlapAOs[mu][nu]); | |
1560 | + tempZ += temp*(cartesianMatrix[ZAxis][mu][nu] - dipoleCenter[ZAxis]*overlapAOs[mu][nu]); | |
1561 | 1561 | } |
1562 | 1562 | } |
1563 | 1563 | temp = matrixCIS[from-1][l]*matrixCIS[to-1][l]; |