• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

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

Commit MetaInfo

修訂c2934c671e820d0340f922e39f961a9be30b2c59 (tree)
時間2011-11-09 21:02:06
作者Mikiya Fujii <mikiya.fujii@gmai...>
CommiterMikiya Fujii

Log Message

Atomic files are refactored.

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

Change Summary

差異

--- a/src/base/atoms/Atom.h
+++ b/src/base/atoms/Atom.h
@@ -31,7 +31,7 @@ public:
3131 int GetNumberValenceElectrons();
3232 double GetImuAmu(OrbitalType orbitalType); // return 0.5*(I_mu + A_mu)
3333 double GetOrbitalExponent(ShellType shellType, OrbitalType orbitalType, TheoryType theory); // See (1.73) in J. A. Pople book for CNDO, INDO, and ZINDOS. See [BT_1977] for MNDO. See [DZHS_1985, DY_1990] for AM1. See [S_1989] for PM3.
34- virtual double GetCoreIntegral(OrbitalType orbital, double gamma, bool isGuess, TheoryType theory) = 0; // P82 - 83 in J. A. Pople book for INDO or Eq. (13) in [BZ_1979] for ZINDO/S. See [BT_1977] for MNDO. See [DZHS_1985, DY_1990] for AM1. See [S_1989] for PM3.
34+ double GetCoreIntegral(OrbitalType orbital, double gamma, bool isGuess, TheoryType theory); // P82 - 83 in J. A. Pople book for INDO or Eq. (13) in [BZ_1979] for ZINDO/S. See [BT_1977] for MNDO. See [DZHS_1985, DY_1990] for AM1. See [S_1989] for PM3.
3535 double GetCoreIntegral(OrbitalType orbital, bool isGuess, TheoryType theory);
3636 double GetIndoF2();
3737 double GetIndoG1();
@@ -173,6 +173,7 @@ protected:
173173 double pm3ParameterK[4];// Table II in ref. [S_1989].
174174 double pm3ParameterL[4];// Table II in ref. [S_1989].
175175 double pm3ParameterM[4];// Table II in ref. [S_1989].
176+ double GetIndoCoreIntegral(OrbitalType orbital, double gamma, bool isGuess);
176177 double GetZindoCoreIntegral(OrbitalType orbital); // Eq. (13) in [BZ_1979]
177178 double GetMndoCoreIntegral(OrbitalType orbital);
178179 double GetAm1CoreIntegral(OrbitalType orbital);
@@ -594,6 +595,36 @@ double Atom::GetJdd(){
594595 return this->zindoF0dd - 2.0*(this->zindoF2dd + this->zindoF4dd)/63.0;
595596 }
596597
598+// (3.93) - (3.99) in J. A. Pople book.
599+double Atom::GetIndoCoreIntegral(OrbitalType orbital, double gamma, bool isGuess){
600+ double value = 0.0;
601+ if(orbital == s){
602+ value = -1.0*this->imuAmuS;
603+ if(!isGuess){
604+ value -= this->indoF0CoefficientS*gamma
605+ +this->indoG1CoefficientS*this->indoG1
606+ +this->indoF2CoefficientS*this->indoF2;
607+ }
608+ }
609+ else if(orbital == px || orbital == py || orbital == pz){
610+ value = -1.0*this->imuAmuP;
611+ if(!isGuess){
612+ value -= this->indoF0CoefficientP*gamma
613+ +this->indoG1CoefficientP*this->indoG1
614+ +this->indoF2CoefficientP*this->indoF2;
615+ }
616+ }
617+ else{
618+ stringstream ss;
619+ ss << this->errorMessageIndoCoreIntegral;
620+ ss << this->errorMessageAtomType << AtomTypeStr(this->atomType) << endl;
621+ ss << this->errorMessageOrbitalType << OrbitalTypeStr(orbital) << endl;
622+ throw MolDSException(ss.str());
623+ }
624+ return value;
625+}
626+
627+
597628 // Eq. (13) in [BZ_1979]
598629 double Atom::GetZindoCoreIntegral(OrbitalType orbital){
599630 double value=0.0;
@@ -1064,6 +1095,28 @@ double Atom::GetZindoF4ddLower(){
10641095 return this->zindoF4dd/441.0;
10651096 }
10661097
1098+double Atom::GetCoreIntegral(OrbitalType orbital,
1099+ double gamma,
1100+ bool isGuess,
1101+ TheoryType theory){
1102+ double value = 0.0;
1103+ if(theory == INDO){
1104+ value = this->GetIndoCoreIntegral(orbital, gamma, isGuess);
1105+ }
1106+ else if(theory == ZINDOS){
1107+ value = this->GetZindoCoreIntegral(orbital);
1108+ }
1109+ else if(theory == MNDO){
1110+ value = this->GetMndoCoreIntegral(orbital);
1111+ }
1112+ else if(theory == AM1){
1113+ value = this->GetAm1CoreIntegral(orbital);
1114+ }
1115+ else if(theory == PM3){
1116+ value = this->GetPm3CoreIntegral(orbital);
1117+ }
1118+ return value;
1119+}
10671120
10681121 double Atom::GetCoreIntegral(OrbitalType orbital, bool isGuess, TheoryType theory){
10691122 return this->GetCoreIntegral(orbital, 0.0, isGuess, theory);
--- a/src/base/atoms/Catom.h
+++ b/src/base/atoms/Catom.h
@@ -9,7 +9,6 @@ namespace MolDS_base_atoms{
99 class Catom : public Atom {
1010 public:
1111 Catom(double x, double y, double z);
12- double GetCoreIntegral(OrbitalType orbital, double gamma, bool isGuess, TheoryType theory);
1312 private:
1413 };
1514
@@ -145,52 +144,5 @@ Catom::Catom(double x, double y, double z) : Atom(x, y, z){
145144 this->pm3ParameterM[2] = 0.00;
146145 this->pm3ParameterM[3] = 0.00;
147146 }
148-
149-double Catom::GetCoreIntegral(OrbitalType orbital, double gamma, bool isGuess, TheoryType theory){
150- double value = 0.0;
151-
152- if(theory == INDO){
153- if(orbital == s){
154- value = -1.0*this->imuAmuS;
155- if(!isGuess){
156- value -= this->indoF0CoefficientS*gamma
157- +this->indoG1CoefficientS*this->indoG1
158- +this->indoF2CoefficientS*this->indoF2;
159- }
160- }
161- else if(orbital == px || orbital == py || orbital == pz){
162- value = -1.0*this->imuAmuP;
163- if(!isGuess){
164- value -= this->indoF0CoefficientP*gamma
165- +this->indoG1CoefficientP*this->indoG1
166- +this->indoF2CoefficientP*this->indoF2;
167- }
168- }
169- else{
170- stringstream ss;
171- ss << this->errorMessageIndoCoreIntegral;
172- ss << this->errorMessageAtomType << AtomTypeStr(this->atomType) << endl;
173- ss << this->errorMessageOrbitalType << OrbitalTypeStr(orbital) << endl;
174- throw MolDSException(ss.str());
175- }
176- }
177- else if(theory == ZINDOS){
178- value = this->GetZindoCoreIntegral(orbital);
179- }
180- else if(theory == MNDO){
181- value = this->GetMndoCoreIntegral(orbital);
182- }
183- else if(theory == AM1){
184- value = this->GetAm1CoreIntegral(orbital);
185- }
186- else if(theory == PM3){
187- value = this->GetPm3CoreIntegral(orbital);
188- }
189-
190- return value;
191-}
192-
193-
194-
195147 }
196148 #endif
--- a/src/base/atoms/Hatom.h
+++ b/src/base/atoms/Hatom.h
@@ -9,7 +9,6 @@ namespace MolDS_base_atoms{
99 class Hatom : public Atom {
1010 public:
1111 Hatom(double x, double y, double z);
12- double GetCoreIntegral(OrbitalType orbital, double gamma, bool isGuess, TheoryType theory);
1312 private:
1413 };
1514
@@ -137,50 +136,5 @@ Hatom::Hatom(double x, double y, double z) : Atom(x, y, z){
137136 this->pm3ParameterM[2] = 0.00;
138137 this->pm3ParameterM[3] = 0.00;
139138 }
140-
141-double Hatom::GetCoreIntegral(OrbitalType orbital, double gamma, bool isGuess, TheoryType theory){
142- double value = 0.0;
143-
144- if(theory == INDO){
145- if(orbital == s){
146- value = -1.0*this->imuAmuS;
147- if(!isGuess){
148- value -= this->indoF0CoefficientS*gamma
149- +this->indoG1CoefficientS*this->indoG1
150- +this->indoF2CoefficientS*this->indoF2;
151- }
152- }
153- else if(orbital == px || orbital == py || orbital == pz){
154- value = -1.0*this->imuAmuP;
155- if(!isGuess){
156- value -= this->indoF0CoefficientP*gamma
157- +this->indoG1CoefficientP*this->indoG1
158- +this->indoF2CoefficientP*this->indoF2;
159- }
160- }
161- else{
162- stringstream ss;
163- ss << this->errorMessageIndoCoreIntegral;
164- ss << this->errorMessageAtomType << AtomTypeStr(this->atomType) << endl;
165- ss << this->errorMessageOrbitalType << OrbitalTypeStr(orbital) << endl;
166- throw MolDSException(ss.str());
167- }
168- }
169- else if(theory == ZINDOS){
170- value = this->GetZindoCoreIntegral(orbital);
171- }
172- else if(theory == MNDO){
173- value = this->GetMndoCoreIntegral(orbital);
174- }
175- else if(theory == AM1){
176- value = this->GetAm1CoreIntegral(orbital);
177- }
178- else if(theory == PM3){
179- value = this->GetPm3CoreIntegral(orbital);
180- }
181-
182- return value;
183-}
184-
185139 }
186140 #endif
--- a/src/base/atoms/Liatom.h
+++ b/src/base/atoms/Liatom.h
@@ -9,7 +9,6 @@ namespace MolDS_base_atoms{
99 class Liatom : public Atom {
1010 public:
1111 Liatom(double x, double y, double z);
12- double GetCoreIntegral(OrbitalType orbital, double gamma, bool isGuess, TheoryType theory);
1312 private:
1413 };
1514
@@ -59,42 +58,5 @@ Liatom::Liatom(double x, double y, double z) : Atom(x, y, z){
5958 this->ionPotP = 3.54 * Parameters::GetInstance()->GetEV2AU();
6059 this->ionPotD = 0.0 * Parameters::GetInstance()->GetEV2AU();
6160 }
62-
63-double Liatom::GetCoreIntegral(OrbitalType orbital, double gamma, bool isGuess, TheoryType theory){
64-
65- double value = 0.0;
66-
67- if(theory == INDO){
68- if(orbital == s){
69- value = -1.0*this->imuAmuS;
70- if(!isGuess){
71- value -= this->indoF0CoefficientS*gamma
72- +this->indoG1CoefficientS*this->indoG1
73- +this->indoF2CoefficientS*this->indoF2;
74- }
75- }
76- else if(orbital == px || orbital == py || orbital == pz){
77- value = -1.0*this->imuAmuP;
78- if(!isGuess){
79- value -= this->indoF0CoefficientP*gamma
80- +this->indoG1CoefficientP*this->indoG1
81- +this->indoF2CoefficientP*this->indoF2;
82- }
83- }
84- else{
85- stringstream ss;
86- ss << this->errorMessageIndoCoreIntegral;
87- ss << this->errorMessageAtomType << AtomTypeStr(this->atomType) << endl;
88- ss << this->errorMessageOrbitalType << OrbitalTypeStr(orbital) << endl;
89- throw MolDSException(ss.str());
90- }
91- }
92- else if(theory == ZINDOS){
93- value = this->GetZindoCoreIntegral(orbital);
94- }
95-
96- return value;
97-}
98-
9961 }
10062 #endif
--- a/src/base/atoms/Natom.h
+++ b/src/base/atoms/Natom.h
@@ -9,7 +9,6 @@ namespace MolDS_base_atoms{
99 class Natom : public Atom {
1010 public:
1111 Natom(double x, double y, double z);
12- double GetCoreIntegral(OrbitalType orbital, double gamma, bool isGuess, TheoryType theory);
1312 private:
1413 };
1514
@@ -145,52 +144,5 @@ Natom::Natom(double x, double y, double z) : Atom(x, y, z){
145144 this->pm3ParameterM[2] = 0.00;
146145 this->pm3ParameterM[3] = 0.00;
147146 }
148-
149-double Natom::GetCoreIntegral(OrbitalType orbital, double gamma, bool isGuess, TheoryType theory){
150- double value = 0.0;
151-
152- if(theory == INDO){
153- if(orbital == s){
154- value = -1.0*this->imuAmuS;
155- if(!isGuess){
156- value -= this->indoF0CoefficientS*gamma
157- +this->indoG1CoefficientS*this->indoG1
158- +this->indoF2CoefficientS*this->indoF2;
159- }
160- }
161- else if(orbital == px || orbital == py || orbital == pz){
162- value = -1.0*this->imuAmuP;
163- if(!isGuess){
164- value -= this->indoF0CoefficientP*gamma
165- +this->indoG1CoefficientP*this->indoG1
166- +this->indoF2CoefficientP*this->indoF2;
167- }
168- }
169- else{
170- stringstream ss;
171- ss << this->errorMessageIndoCoreIntegral;
172- ss << this->errorMessageAtomType << AtomTypeStr(this->atomType) << endl;
173- ss << this->errorMessageOrbitalType << OrbitalTypeStr(orbital) << endl;
174- throw MolDSException(ss.str());
175- }
176- }
177- else if(theory == ZINDOS){
178- value = this->GetZindoCoreIntegral(orbital);
179- }
180- else if(theory == MNDO){
181- value = this->GetMndoCoreIntegral(orbital);
182- }
183- else if(theory == AM1){
184- value = this->GetAm1CoreIntegral(orbital);
185- }
186- else if(theory == PM3){
187- value = this->GetPm3CoreIntegral(orbital);
188- }
189-
190- return value;
191-}
192-
193-
194-
195147 }
196148 #endif
--- a/src/base/atoms/Oatom.h
+++ b/src/base/atoms/Oatom.h
@@ -9,7 +9,6 @@ namespace MolDS_base_atoms{
99 class Oatom : public Atom {
1010 public:
1111 Oatom(double x, double y, double z);
12- double GetCoreIntegral(OrbitalType orbital, double gamma, bool isGuess, TheoryType theory);
1312 private:
1413 };
1514
@@ -145,52 +144,5 @@ Oatom::Oatom(double x, double y, double z) : Atom(x, y, z){
145144 this->pm3ParameterM[2] = 0.00;
146145 this->pm3ParameterM[3] = 0.00;
147146 }
148-
149-double Oatom::GetCoreIntegral(OrbitalType orbital, double gamma, bool isGuess, TheoryType theory){
150- double value = 0.0;
151-
152- if(theory == INDO){
153- if(orbital == s){
154- value = -1.0*this->imuAmuS;
155- if(!isGuess){
156- value -= this->indoF0CoefficientS*gamma
157- +this->indoG1CoefficientS*this->indoG1
158- +this->indoF2CoefficientS*this->indoF2;
159- }
160- }
161- else if(orbital == px || orbital == py || orbital == pz){
162- value = -1.0*this->imuAmuP;
163- if(!isGuess){
164- value -= this->indoF0CoefficientP*gamma
165- +this->indoG1CoefficientP*this->indoG1
166- +this->indoF2CoefficientP*this->indoF2;
167- }
168- }
169- else{
170- stringstream ss;
171- ss << this->errorMessageIndoCoreIntegral;
172- ss << this->errorMessageAtomType << AtomTypeStr(this->atomType) << endl;
173- ss << this->errorMessageOrbitalType << OrbitalTypeStr(orbital) << endl;
174- throw MolDSException(ss.str());
175- }
176- }
177- else if(theory == ZINDOS){
178- value = this->GetZindoCoreIntegral(orbital);
179- }
180- else if(theory == MNDO){
181- value = this->GetMndoCoreIntegral(orbital);
182- }
183- else if(theory == AM1){
184- value = this->GetAm1CoreIntegral(orbital);
185- }
186- else if(theory == PM3){
187- value = this->GetPm3CoreIntegral(orbital);
188- }
189-
190- return value;
191-}
192-
193-
194-
195147 }
196148 #endif
--- a/src/base/atoms/Satom.h
+++ b/src/base/atoms/Satom.h
@@ -9,7 +9,6 @@ namespace MolDS_base_atoms{
99 class Satom : public Atom {
1010 public:
1111 Satom(double x, double y, double z);
12- double GetCoreIntegral(OrbitalType orbital, double gamma, bool isGuess, TheoryType theory);
1312 private:
1413 };
1514
@@ -164,50 +163,5 @@ Satom::Satom(double x, double y, double z) : Atom(x, y, z){
164163 this->pm3ParameterM[2] = 0.00;
165164 this->pm3ParameterM[3] = 0.00;
166165 }
167-
168-double Satom::GetCoreIntegral(OrbitalType orbital, double gamma, bool isGuess, TheoryType theory){
169- double value = 0.0;
170- if(theory == INDO){
171- if(orbital == s){
172- value = -1.0*this->imuAmuS;
173- if(!isGuess){
174- value -= this->indoF0CoefficientS*gamma
175- +this->indoG1CoefficientS*this->indoG1
176- +this->indoF2CoefficientS*this->indoF2;
177- }
178- }
179- else if(orbital == px || orbital == py || orbital == pz){
180- value = -1.0*this->imuAmuP;
181- if(!isGuess){
182- value -= this->indoF0CoefficientP*gamma
183- +this->indoG1CoefficientP*this->indoG1
184- +this->indoF2CoefficientP*this->indoF2;
185- }
186- }
187- else{
188- stringstream ss;
189- ss << this->errorMessageIndoCoreIntegral;
190- ss << this->errorMessageAtomType << AtomTypeStr(this->atomType) << endl;
191- ss << this->errorMessageOrbitalType << OrbitalTypeStr(orbital) << endl;
192- throw MolDSException(ss.str());
193- }
194- }
195- else if(theory == ZINDOS){
196- value = this->GetZindoCoreIntegral(orbital);
197- }
198- else if(theory == MNDO){
199- value = this->GetMndoCoreIntegral(orbital);
200- }
201- else if(theory == AM1){
202- value = this->GetAm1CoreIntegral(orbital);
203- }
204- else if(theory == PM3){
205- value = this->GetPm3CoreIntegral(orbital);
206- }
207- return value;
208-}
209-
210-
211-
212166 }
213167 #endif
--- a/src/input.in
+++ b/src/input.in
@@ -165,10 +165,10 @@ CIS_END
165165 //GEOMETRY_END
166166
167167 // n2
168-GEOMETRY
169- N 0.0 0.168464 0.673854
170- N 0.0 1.369664 0.673854
171-GEOMETRY_END
168+//GEOMETRY
169+// N 0.0 0.168464 0.673854
170+// N 0.0 1.369664 0.673854
171+//GEOMETRY_END
172172
173173 // o2
174174 //GEOMETRY
@@ -279,10 +279,10 @@ GEOMETRY_END
279279 //GEOMETRY_END
280280
281281 // LiH 2
282-//GEOMETRY
283-// H 0.464960 0.485175 0.000000
284-// Li 1.994960 0.485175 0.000000
285-//GEOMETRY_END
282+GEOMETRY
283+ H 0.464960 0.485175 0.000000
284+ Li 1.994960 0.485175 0.000000
285+GEOMETRY_END
286286
287287 // LiH 3
288288 //GEOMETRY