• 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

Revisãoffe6a88c556427d383ac4ae76d48d0a50f5ddeb9 (tree)
Hora2011-01-07 12:08:55
AutorMikiya Fujii <mikiya.fujii@gmai...>
CommiterMikiya Fujii

Mensagem de Log

Rename from COMXyz to xyzCOM and etc..

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

Mudança Sumário

Diff

--- a/src/base/InputParser.h
+++ b/src/base/InputParser.h
@@ -374,7 +374,7 @@ void InputParser::CalcMolecularBasics(Molecule* molecule){
374374
375375 molecule->CalcTotalNumberAOs();
376376 molecule->CalcTotalNumberValenceElectrons();
377- molecule->CalcCOMXyz();
377+ molecule->CalcXyzCOM();
378378
379379 }
380380
@@ -382,7 +382,7 @@ void InputParser::OutputMolecularBasics(Molecule* molecule){
382382
383383 molecule->OutputTotalNumberAtomsAOsValenceelectrons();
384384 molecule->OutputConfiguration();
385- molecule->OutputCOMXyz();
385+ molecule->OutputXyzCOM();
386386 }
387387
388388 void InputParser::OutputScfConditions(){
--- a/src/base/Molecule.h
+++ b/src/base/Molecule.h
@@ -18,13 +18,13 @@ public:
1818 Molecule();
1919 ~Molecule();
2020 vector<Atom*>* GetAtomVect();
21- double* GetCOMXyz();
22- void CalcCOMXyz();
21+ double* GetXyzCOM();
22+ void CalcXyzCOM();
2323 int GetTotalNumberAOs();
2424 void CalcTotalNumberAOs();
2525 int GetTotalNumberValenceElectrons();
2626 void CalcTotalNumberValenceElectrons();
27- void OutputCOMXyz();
27+ void OutputXyzCOM();
2828 void OutputTotalNumberAtomsAOsValenceelectrons();
2929 void OutputConfiguration();
3030 void CalcPrincipalAxes();
@@ -38,13 +38,13 @@ public:
3838 void Translate();
3939 private:
4040 vector<Atom*>* atomVect;
41- double* COMXyz;
41+ double* xyzCOM;
4242 double* rotatingOrigin;
4343 double* rotatingAxis;
4444 double rotatingAngle;
4545 EularAngle* rotatingEularAngles;
4646 RotatingType rotatingType;
47- bool wasCalculatedCOMXyz;
47+ bool wasCalculatedXyzCOM;
4848 int totalNumberAOs;
4949 int totalNumberValenceElectrons;
5050 void CalcInertiaTensor(double** inertiaTensor, double* inertiaTensorOrigin);
@@ -91,13 +91,13 @@ private:
9191
9292 Molecule::Molecule(){
9393 this->atomVect = new vector<Atom*>;
94- this->COMXyz = MallocerFreer::GetInstance()->MallocDoubleMatrix1d(3);
94+ this->xyzCOM = MallocerFreer::GetInstance()->MallocDoubleMatrix1d(3);
9595 this->rotatingOrigin = NULL;
9696 this->rotatingAxis = NULL;
9797 this->rotatingAngle = 0.0;
9898 this->rotatingType = Axis;
9999 this->rotatingEularAngles = NULL;
100- this->wasCalculatedCOMXyz = false;
100+ this->wasCalculatedXyzCOM = false;
101101 this->messageTotalNumberAOs = "\tTotal number of valence AOs: ";
102102 this->messageTotalNumberAtoms = "\tTotal number of atoms: ";
103103 this->messageTotalNumberValenceElectrons = "\tTotal number of valence electrons: ";
@@ -144,10 +144,10 @@ Molecule::~Molecule(){
144144 this->atomVect = NULL;
145145 //cout << "atomVect deleted\n";
146146 }
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";
151151 }
152152 if(this->rotatingOrigin != NULL){
153153 MallocerFreer::GetInstance()->FreeDoubleMatrix1d(this->rotatingOrigin);
@@ -170,22 +170,22 @@ vector<Atom*>* Molecule::GetAtomVect(){
170170 return this->atomVect;
171171 }
172172
173-double* Molecule::GetCOMXyz(){
174- if(!this->wasCalculatedCOMXyz){
175- this->CalcCOMXyz();
173+double* Molecule::GetXyzCOM(){
174+ if(!this->wasCalculatedXyzCOM){
175+ this->CalcXyzCOM();
176176 }
177- return this->COMXyz;
177+ return this->xyzCOM;
178178 }
179179
180-void Molecule::CalcCOMXyz(){
181- if(!this->wasCalculatedCOMXyz){
180+void Molecule::CalcXyzCOM(){
181+ if(!this->wasCalculatedXyzCOM){
182182 double totalAtomicMass;
183183 Atom* atom;
184184 double* atomicXyz;
185185 double atomicMass;
186186
187187 for(int j=0; j<3; j++){
188- this->COMXyz[j] = 0.0;
188+ this->xyzCOM[j] = 0.0;
189189 }
190190
191191 for(int i=0; i<this->atomVect->size(); i++){
@@ -194,14 +194,14 @@ void Molecule::CalcCOMXyz(){
194194 atomicMass = atom->GetAtomicMass();
195195 totalAtomicMass += atomicMass;
196196 for(int j=0; j<3; j++){
197- this->COMXyz[j] += atomicXyz[j] * atomicMass;
197+ this->xyzCOM[j] += atomicXyz[j] * atomicMass;
198198 }
199199 }
200200 for(int i=0; i<3; i++){
201- this->COMXyz[i]/=totalAtomicMass;
201+ this->xyzCOM[i]/=totalAtomicMass;
202202 }
203203 }
204- this->wasCalculatedCOMXyz = true;
204+ this->wasCalculatedXyzCOM = true;
205205 }
206206
207207 int Molecule::GetTotalNumberAOs(){
@@ -248,19 +248,19 @@ void Molecule::OutputConfiguration(){
248248
249249 }
250250
251-void Molecule::OutputCOMXyz(){
251+void Molecule::OutputXyzCOM(){
252252 double ang2AU = Parameters::GetInstance()->GetAngstrom2AU();
253253 cout << this->messageCOM;
254254 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);
258258 cout << "\n";
259259
260260 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]);
264264 cout << "\n";
265265
266266 }
@@ -318,7 +318,7 @@ void Molecule::CalcPrincipalAxes(){
318318
319319 cout << this->messageStartPrincipalAxes;
320320
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]};
322322 if(Parameters::GetInstance()->GetInertiaTensorOrigin() != NULL){
323323 inertiaTensorOrigin[0] = Parameters::GetInstance()->GetInertiaTensorOrigin()[0];
324324 inertiaTensorOrigin[1] = Parameters::GetInstance()->GetInertiaTensorOrigin()[1];
@@ -452,10 +452,10 @@ void Molecule::Rotate(){
452452
453453 // Default values are set if some conditions are not specified.
454454 if(this->rotatingOrigin == NULL){
455- if(!this->wasCalculatedCOMXyz){
456- this->CalcCOMXyz();
455+ if(!this->wasCalculatedXyzCOM){
456+ this->CalcXyzCOM();
457457 }
458- this->SetRotatingOrigin(this->COMXyz[0], this->COMXyz[1], this->COMXyz[2]);
458+ this->SetRotatingOrigin(this->xyzCOM[0], this->xyzCOM[1], this->xyzCOM[2]);
459459 }
460460
461461 if(this->rotatingType == Axis && this->rotatingAxis == NULL){
@@ -548,11 +548,11 @@ void Molecule::Translate(){
548548 atom->GetXyz()[2] += z;
549549 }
550550
551- this->wasCalculatedCOMXyz = false;
552- this->CalcCOMXyz();
551+ this->wasCalculatedXyzCOM = false;
552+ this->CalcXyzCOM();
553553
554554 this->OutputConfiguration();
555- this->OutputCOMXyz();
555+ this->OutputXyzCOM();
556556
557557 cout << this->messageDoneTranslate;
558558 }