Revisão | ffe6a88c556427d383ac4ae76d48d0a50f5ddeb9 (tree) |
---|---|
Hora | 2011-01-07 12:08:55 |
Autor | Mikiya Fujii <mikiya.fujii@gmai...> |
Commiter | Mikiya Fujii |
Rename from COMXyz to xyzCOM and etc..
git-svn-id: https://svn.sourceforge.jp/svnroot/molds/MolDS/trunk@48 1136aad2-a195-0410-b898-f5ea1d11b9d8
@@ -374,7 +374,7 @@ void InputParser::CalcMolecularBasics(Molecule* molecule){ | ||
374 | 374 | |
375 | 375 | molecule->CalcTotalNumberAOs(); |
376 | 376 | molecule->CalcTotalNumberValenceElectrons(); |
377 | - molecule->CalcCOMXyz(); | |
377 | + molecule->CalcXyzCOM(); | |
378 | 378 | |
379 | 379 | } |
380 | 380 |
@@ -382,7 +382,7 @@ void InputParser::OutputMolecularBasics(Molecule* molecule){ | ||
382 | 382 | |
383 | 383 | molecule->OutputTotalNumberAtomsAOsValenceelectrons(); |
384 | 384 | molecule->OutputConfiguration(); |
385 | - molecule->OutputCOMXyz(); | |
385 | + molecule->OutputXyzCOM(); | |
386 | 386 | } |
387 | 387 | |
388 | 388 | void InputParser::OutputScfConditions(){ |
@@ -18,13 +18,13 @@ public: | ||
18 | 18 | Molecule(); |
19 | 19 | ~Molecule(); |
20 | 20 | vector<Atom*>* GetAtomVect(); |
21 | - double* GetCOMXyz(); | |
22 | - void CalcCOMXyz(); | |
21 | + double* GetXyzCOM(); | |
22 | + void CalcXyzCOM(); | |
23 | 23 | int GetTotalNumberAOs(); |
24 | 24 | void CalcTotalNumberAOs(); |
25 | 25 | int GetTotalNumberValenceElectrons(); |
26 | 26 | void CalcTotalNumberValenceElectrons(); |
27 | - void OutputCOMXyz(); | |
27 | + void OutputXyzCOM(); | |
28 | 28 | void OutputTotalNumberAtomsAOsValenceelectrons(); |
29 | 29 | void OutputConfiguration(); |
30 | 30 | void CalcPrincipalAxes(); |
@@ -38,13 +38,13 @@ public: | ||
38 | 38 | void Translate(); |
39 | 39 | private: |
40 | 40 | vector<Atom*>* atomVect; |
41 | - double* COMXyz; | |
41 | + double* xyzCOM; | |
42 | 42 | double* rotatingOrigin; |
43 | 43 | double* rotatingAxis; |
44 | 44 | double rotatingAngle; |
45 | 45 | EularAngle* rotatingEularAngles; |
46 | 46 | RotatingType rotatingType; |
47 | - bool wasCalculatedCOMXyz; | |
47 | + bool wasCalculatedXyzCOM; | |
48 | 48 | int totalNumberAOs; |
49 | 49 | int totalNumberValenceElectrons; |
50 | 50 | void CalcInertiaTensor(double** inertiaTensor, double* inertiaTensorOrigin); |
@@ -91,13 +91,13 @@ private: | ||
91 | 91 | |
92 | 92 | Molecule::Molecule(){ |
93 | 93 | this->atomVect = new vector<Atom*>; |
94 | - this->COMXyz = MallocerFreer::GetInstance()->MallocDoubleMatrix1d(3); | |
94 | + this->xyzCOM = MallocerFreer::GetInstance()->MallocDoubleMatrix1d(3); | |
95 | 95 | this->rotatingOrigin = NULL; |
96 | 96 | this->rotatingAxis = NULL; |
97 | 97 | this->rotatingAngle = 0.0; |
98 | 98 | this->rotatingType = Axis; |
99 | 99 | this->rotatingEularAngles = NULL; |
100 | - this->wasCalculatedCOMXyz = false; | |
100 | + this->wasCalculatedXyzCOM = false; | |
101 | 101 | this->messageTotalNumberAOs = "\tTotal number of valence AOs: "; |
102 | 102 | this->messageTotalNumberAtoms = "\tTotal number of atoms: "; |
103 | 103 | this->messageTotalNumberValenceElectrons = "\tTotal number of valence electrons: "; |
@@ -144,10 +144,10 @@ Molecule::~Molecule(){ | ||
144 | 144 | this->atomVect = NULL; |
145 | 145 | //cout << "atomVect deleted\n"; |
146 | 146 | } |
147 | - if(this->COMXyz != NULL){ | |
148 | - MallocerFreer::GetInstance()->FreeDoubleMatrix1d(this->COMXyz); | |
149 | - this->COMXyz = NULL; | |
150 | - //cout << "COMXyz deleted\n"; | |
147 | + if(this->xyzCOM != NULL){ | |
148 | + MallocerFreer::GetInstance()->FreeDoubleMatrix1d(this->xyzCOM); | |
149 | + this->xyzCOM = NULL; | |
150 | + //cout << "xyzCOM deleted\n"; | |
151 | 151 | } |
152 | 152 | if(this->rotatingOrigin != NULL){ |
153 | 153 | MallocerFreer::GetInstance()->FreeDoubleMatrix1d(this->rotatingOrigin); |
@@ -170,22 +170,22 @@ vector<Atom*>* Molecule::GetAtomVect(){ | ||
170 | 170 | return this->atomVect; |
171 | 171 | } |
172 | 172 | |
173 | -double* Molecule::GetCOMXyz(){ | |
174 | - if(!this->wasCalculatedCOMXyz){ | |
175 | - this->CalcCOMXyz(); | |
173 | +double* Molecule::GetXyzCOM(){ | |
174 | + if(!this->wasCalculatedXyzCOM){ | |
175 | + this->CalcXyzCOM(); | |
176 | 176 | } |
177 | - return this->COMXyz; | |
177 | + return this->xyzCOM; | |
178 | 178 | } |
179 | 179 | |
180 | -void Molecule::CalcCOMXyz(){ | |
181 | - if(!this->wasCalculatedCOMXyz){ | |
180 | +void Molecule::CalcXyzCOM(){ | |
181 | + if(!this->wasCalculatedXyzCOM){ | |
182 | 182 | double totalAtomicMass; |
183 | 183 | Atom* atom; |
184 | 184 | double* atomicXyz; |
185 | 185 | double atomicMass; |
186 | 186 | |
187 | 187 | for(int j=0; j<3; j++){ |
188 | - this->COMXyz[j] = 0.0; | |
188 | + this->xyzCOM[j] = 0.0; | |
189 | 189 | } |
190 | 190 | |
191 | 191 | for(int i=0; i<this->atomVect->size(); i++){ |
@@ -194,14 +194,14 @@ void Molecule::CalcCOMXyz(){ | ||
194 | 194 | atomicMass = atom->GetAtomicMass(); |
195 | 195 | totalAtomicMass += atomicMass; |
196 | 196 | for(int j=0; j<3; j++){ |
197 | - this->COMXyz[j] += atomicXyz[j] * atomicMass; | |
197 | + this->xyzCOM[j] += atomicXyz[j] * atomicMass; | |
198 | 198 | } |
199 | 199 | } |
200 | 200 | for(int i=0; i<3; i++){ |
201 | - this->COMXyz[i]/=totalAtomicMass; | |
201 | + this->xyzCOM[i]/=totalAtomicMass; | |
202 | 202 | } |
203 | 203 | } |
204 | - this->wasCalculatedCOMXyz = true; | |
204 | + this->wasCalculatedXyzCOM = true; | |
205 | 205 | } |
206 | 206 | |
207 | 207 | int Molecule::GetTotalNumberAOs(){ |
@@ -248,19 +248,19 @@ void Molecule::OutputConfiguration(){ | ||
248 | 248 | |
249 | 249 | } |
250 | 250 | |
251 | -void Molecule::OutputCOMXyz(){ | |
251 | +void Molecule::OutputXyzCOM(){ | |
252 | 252 | double ang2AU = Parameters::GetInstance()->GetAngstrom2AU(); |
253 | 253 | cout << this->messageCOM; |
254 | 254 | cout << this->messageCOMTitleAng; |
255 | - printf("\t\t%e\t%e\t%e\n",this->COMXyz[0]/ang2AU, | |
256 | - this->COMXyz[1]/ang2AU, | |
257 | - this->COMXyz[2]/ang2AU); | |
255 | + printf("\t\t%e\t%e\t%e\n",this->xyzCOM[0]/ang2AU, | |
256 | + this->xyzCOM[1]/ang2AU, | |
257 | + this->xyzCOM[2]/ang2AU); | |
258 | 258 | cout << "\n"; |
259 | 259 | |
260 | 260 | cout << this->messageCOMTitleAU; |
261 | - printf("\t\t%e\t%e\t%e\n",this->COMXyz[0], | |
262 | - this->COMXyz[1], | |
263 | - this->COMXyz[2]); | |
261 | + printf("\t\t%e\t%e\t%e\n",this->xyzCOM[0], | |
262 | + this->xyzCOM[1], | |
263 | + this->xyzCOM[2]); | |
264 | 264 | cout << "\n"; |
265 | 265 | |
266 | 266 | } |
@@ -318,7 +318,7 @@ void Molecule::CalcPrincipalAxes(){ | ||
318 | 318 | |
319 | 319 | cout << this->messageStartPrincipalAxes; |
320 | 320 | |
321 | - double inertiaTensorOrigin[3] = {this->COMXyz[0], this->COMXyz[1], this->COMXyz[2]}; | |
321 | + double inertiaTensorOrigin[3] = {this->xyzCOM[0], this->xyzCOM[1], this->xyzCOM[2]}; | |
322 | 322 | if(Parameters::GetInstance()->GetInertiaTensorOrigin() != NULL){ |
323 | 323 | inertiaTensorOrigin[0] = Parameters::GetInstance()->GetInertiaTensorOrigin()[0]; |
324 | 324 | inertiaTensorOrigin[1] = Parameters::GetInstance()->GetInertiaTensorOrigin()[1]; |
@@ -452,10 +452,10 @@ void Molecule::Rotate(){ | ||
452 | 452 | |
453 | 453 | // Default values are set if some conditions are not specified. |
454 | 454 | if(this->rotatingOrigin == NULL){ |
455 | - if(!this->wasCalculatedCOMXyz){ | |
456 | - this->CalcCOMXyz(); | |
455 | + if(!this->wasCalculatedXyzCOM){ | |
456 | + this->CalcXyzCOM(); | |
457 | 457 | } |
458 | - this->SetRotatingOrigin(this->COMXyz[0], this->COMXyz[1], this->COMXyz[2]); | |
458 | + this->SetRotatingOrigin(this->xyzCOM[0], this->xyzCOM[1], this->xyzCOM[2]); | |
459 | 459 | } |
460 | 460 | |
461 | 461 | if(this->rotatingType == Axis && this->rotatingAxis == NULL){ |
@@ -548,11 +548,11 @@ void Molecule::Translate(){ | ||
548 | 548 | atom->GetXyz()[2] += z; |
549 | 549 | } |
550 | 550 | |
551 | - this->wasCalculatedCOMXyz = false; | |
552 | - this->CalcCOMXyz(); | |
551 | + this->wasCalculatedXyzCOM = false; | |
552 | + this->CalcXyzCOM(); | |
553 | 553 | |
554 | 554 | this->OutputConfiguration(); |
555 | - this->OutputCOMXyz(); | |
555 | + this->OutputXyzCOM(); | |
556 | 556 | |
557 | 557 | cout << this->messageDoneTranslate; |
558 | 558 | } |