• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisione372fcf693291b9ef9f363e65304974f3c94256c (tree)
Time2014-01-07 00:42:58
AuthorMikiya Fujii <mikiya.fujii@gmai...>
CommiterMikiya Fujii

Log Message

refactoring center of dipole

git-svn-id: https://svn.sourceforge.jp/svnroot/molds/trunk@1617 1136aad2-a195-0410-b898-f5ea1d11b9d8

Change Summary

Incremental Difference

--- a/doc/README.txt
+++ b/doc/README.txt
@@ -230,7 +230,7 @@ HOW TO WRITE INPUT:
230230 "max_iter", "rms_density", "damping_thresh", "damping_weight",
231231 "diis_num_error_vect", "diis_start_error", "diis_end_error",
232232 "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
234234 To calculate the dipole moment, STO-6G [DY_1977] is used.
235235
236236 The default value of the "max_iter" is 100.
@@ -456,6 +456,8 @@ HOW TO WRITE INPUT:
456456 If user set this "all_transition_dipole" as "yes", all transition dipole moments
457457 including between excited states would be calculated.
458458 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.
459461
460462 "mulliken" is a option of mulliken popultaion analysis of the excited state.
461463 When "mulliken x" is included in CIS-directive, the mulliken popultaion of xth excited state is calculated.
--- a/src/base/Molecule.h
+++ b/src/base/Molecule.h
@@ -54,8 +54,9 @@ public:
5454 void AddRealAtom(MolDS_base_atoms::Atom* atom);
5555 void AddGhostAtom(MolDS_base_atoms::Atom* atom);
5656 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();}
5960 void CalcBasics();
6061 void CalcBasicsConfiguration();
6162 int GetTotalNumberAOs() const{return this->totalNumberAOs;}
@@ -90,8 +91,8 @@ private:
9091 std::vector<MolDS_base_atoms::Atom*>* realAtomVect; // Vector of real (=not ghost) atoms
9192 std::vector<MolDS_base_atoms::Atom*>* ghostAtomVect; // Vector of ghost atoms
9293 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;
9596 double** distanceAtoms; // distance between each atom;
9697 double** distanceEpcs; // distance between each environmental point charge;
9798 double** distanceAtomsEpcs;// distance between each atom and environmental point charge;
--- a/src/cndo/Cndo2.cpp
+++ b/src/cndo/Cndo2.cpp
@@ -1764,11 +1764,12 @@ void Cndo2::CalcGammaAB(double** gammaAB, const Molecule& molecule) const{
17641764 void Cndo2::CalcCoreDipoleMoment(double* coreDipoleMoment,
17651765 const Molecule& molecule) const{
17661766
1767+ double const* dipoleCenter = molecule.GetXyzDipoleCenter();
17671768 for(int i=0; i<CartesianType_end; i++){
17681769 coreDipoleMoment[i] = 0.0;
17691770 for(int A=0; A<molecule.GetAtomVect().size(); A++){
17701771 coreDipoleMoment[i] += molecule.GetAtomVect()[A]->GetCoreCharge()
1771- *(molecule.GetAtomVect()[A]->GetXyz()[i] - molecule.GetXyzCOC()[i]);
1772+ *(molecule.GetAtomVect()[A]->GetXyz()[i] - dipoleCenter[i]);
17721773 }
17731774 }
17741775 }
@@ -1802,7 +1803,7 @@ void Cndo2::CalcElectronicTransitionDipoleMoment(double* transitionDipoleMoment,
18021803 double const* groundStateDipole) const{
18031804 int groundState = 0;
18041805 if(from == groundState && to == groundState){
1805- double const* centerOfDipole = molecule.GetXyzCOC();
1806+ double const* dipoleCenter = molecule.GetXyzDipoleCenter();
18061807 int totalAONumber = molecule.GetTotalNumberAOs();
18071808 transitionDipoleMoment[XAxis] = 0.0;
18081809 transitionDipoleMoment[YAxis] = 0.0;
@@ -1820,9 +1821,9 @@ void Cndo2::CalcElectronicTransitionDipoleMoment(double* transitionDipoleMoment,
18201821 double temp = MolDS_wrappers::Blas::GetInstance()->Ddot(totalAONumber*totalAONumber,
18211822 &orbitalElectronPopulation[0][0],
18221823 &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;
18261827 }
18271828 else{
18281829 stringstream ss;
--- a/src/zindo/ZindoS.cpp
+++ b/src/zindo/ZindoS.cpp
@@ -1132,8 +1132,8 @@ void ZindoS::CalcCISProperties(){
11321132 dipoleMOs[ZAxis],
11331133 tmpMatrixBC);
11341134
1135- double const* centerOfDipole = this->molecule->GetXyzCOC();
11361135 // set orign of dipole
1136+ double const* dipoleCenter = this->molecule->GetXyzDipoleCenter();
11371137 MolDS_wrappers::Blas::GetInstance()->Dgemmm(false, false, true, totalNumberAOs, totalNumberAOs, totalNumberAOs, totalNumberAOs,
11381138 alpha,
11391139 this->fockMatrix,
@@ -1143,15 +1143,15 @@ void ZindoS::CalcCISProperties(){
11431143 overlapMOs,
11441144 tmpMatrixBC);
11451145 MolDS_wrappers::Blas::GetInstance()->Daxpy(totalNumberAOs*totalNumberAOs,
1146- -centerOfDipole[XAxis],
1146+ -dipoleCenter[XAxis],
11471147 &overlapMOs[0][0],
11481148 &dipoleMOs[XAxis][0][0]);
11491149 MolDS_wrappers::Blas::GetInstance()->Daxpy(totalNumberAOs*totalNumberAOs,
1150- -centerOfDipole[YAxis],
1150+ -dipoleCenter[YAxis],
11511151 &overlapMOs[0][0],
11521152 &dipoleMOs[YAxis][0][0]);
11531153 MolDS_wrappers::Blas::GetInstance()->Daxpy(totalNumberAOs*totalNumberAOs,
1154- -centerOfDipole[ZAxis],
1154+ -dipoleCenter[ZAxis],
11551155 &overlapMOs[0][0],
11561156 &dipoleMOs[ZAxis][0][0]);
11571157
@@ -1410,7 +1410,7 @@ void ZindoS::CalcElectronicTransitionDipoleMoment(double* transitionDipoleMoment
14101410 double valueX = 0.0;
14111411 double valueY = 0.0;
14121412 double valueZ = 0.0;
1413- double const* xyzCOC = molecule.GetXyzCOC();
1413+ double const* dipoleCenter = molecule.GetXyzDipoleCenter();
14141414 int groundState = 0;
14151415 int totalNumberAOs = molecule.GetTotalNumberAOs();
14161416 stringstream ompErrors;
@@ -1439,9 +1439,9 @@ void ZindoS::CalcElectronicTransitionDipoleMoment(double* transitionDipoleMoment
14391439 for(int mu=0; mu<totalNumberAOs; mu++){
14401440 for(int nu=0; nu<totalNumberAOs; nu++){
14411441 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]);
14451445 }
14461446 }
14471447 temp = matrixCIS[from-1][l]*matrixCIS[to-1][l];
@@ -1477,9 +1477,9 @@ void ZindoS::CalcElectronicTransitionDipoleMoment(double* transitionDipoleMoment
14771477 for(int mu=0; mu<totalNumberAOs; mu++){
14781478 for(int nu=0; nu<totalNumberAOs; nu++){
14791479 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]);
14831483 }
14841484 }
14851485 temp = this->matrixCIS[to-1][l]*sqrt(2.0);
@@ -1515,9 +1515,9 @@ void ZindoS::CalcElectronicTransitionDipoleMoment(double* transitionDipoleMoment
15151515 for(int mu=0; mu<totalNumberAOs; mu++){
15161516 for(int nu=0; nu<totalNumberAOs; nu++){
15171517 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]);
15211521 }
15221522 }
15231523 temp = matrixCIS[from-1][l]*sqrt(2.0);
@@ -1555,9 +1555,9 @@ void ZindoS::CalcElectronicTransitionDipoleMoment(double* transitionDipoleMoment
15551555 for(int mu=0; mu<totalNumberAOs; mu++){
15561556 for(int nu=0; nu<totalNumberAOs; nu++){
15571557 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]);
15611561 }
15621562 }
15631563 temp = matrixCIS[from-1][l]*matrixCIS[to-1][l];