• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

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

コミットメタ情報

リビジョン0359db9fe4c3396e77d6fe407df3c6ad2792d94c (tree)
日時2013-12-30 02:35:47
作者Mikiya Fujii <mikiya.fujii@gmai...>
コミッターMikiya Fujii

ログメッセージ

Atom::GetCoremass is used instead of Atom::GetAtomicMass in possigle place. #32750

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

変更サマリ

差分

--- a/src/base/Molecule.cpp
+++ b/src/base/Molecule.cpp
@@ -438,7 +438,7 @@ void Molecule::CalcTotalCoreMass(){
438438 this->totalCoreMass = 0;
439439 for(int i=0; i<this->atomVect->size(); i++){
440440 const Atom& atom = *(*this->atomVect)[i];
441- double coreMass = atom.GetAtomicMass() - static_cast<double>(atom.GetNumberValenceElectrons());
441+ double coreMass = atom.GetCoreMass();
442442 this->totalCoreMass += coreMass;
443443 }
444444 }
--- a/src/md/MD.cpp
+++ b/src/md/MD.cpp
@@ -150,7 +150,7 @@ void MD::UpdateCoordinates(Molecule& molecule, double dt) const{
150150 #pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
151151 for(int a=0; a<molecule.GetNumberAtoms(); a++){
152152 Atom* atom = molecule.GetAtom(a);
153- double coreMass = atom->GetAtomicMass() - static_cast<double>(atom->GetNumberValenceElectrons());
153+ double coreMass = atom->GetCoreMass();
154154 for(int i=0; i<CartesianType_end; i++){
155155 atom->GetXyz()[i] += dt*atom->GetPxyz()[i]/coreMass;
156156 }
@@ -185,7 +185,7 @@ double MD::OutputEnergies(boost::shared_ptr<ElectronicStructure> electronicStruc
185185 double coreKineticEnergy = 0.0;
186186 for(int a=0; a<this->molecule->GetNumberAtoms(); a++){
187187 Atom* atom = this->molecule->GetAtom(a);
188- double coreMass = atom->GetAtomicMass() - static_cast<double>(atom->GetNumberValenceElectrons());
188+ double coreMass = atom->GetCoreMass();
189189 for(int i=0; i<CartesianType_end; i++){
190190 coreKineticEnergy += 0.5*pow(atom->GetPxyz()[i],2.0)/coreMass;
191191 }
--- a/src/optimization/Optimizer.cpp
+++ b/src/optimization/Optimizer.cpp
@@ -141,7 +141,7 @@ void Optimizer::UpdateMolecularCoordinates(Molecule& molecule, double const* con
141141 #pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
142142 for(int a=0; a<molecule.GetNumberAtoms(); a++){
143143 const Atom* atom = molecule.GetAtom(a);
144- double coreMass = atom->GetAtomicMass() - static_cast<double>(atom->GetNumberValenceElectrons());
144+ double coreMass = atom->GetCoreMass();
145145 for(int i=0; i<CartesianType_end; i++){
146146 atom->GetXyz()[i] += dt*matrixForce[a][i]/coreMass;
147147 }
--- a/src/rpmd/RPMD.cpp
+++ b/src/rpmd/RPMD.cpp
@@ -104,7 +104,7 @@ void RPMD::UpdateMomenta(const vector<boost::shared_ptr<Molecule> >& molecularBe
104104 Atom* atom = molecularBeads[b]->GetAtom(a);
105105 Atom* preAtom = molecularBeads[preB]->GetAtom(a);
106106 Atom* postAtom = molecularBeads[postB]->GetAtom(a);
107- double coreMass = atom->GetAtomicMass() - static_cast<double>(atom->GetNumberValenceElectrons());
107+ double coreMass = atom->GetCoreMass();
108108 for(int i=0; i<CartesianType_end; i++){
109109 double beadsForce = -1.0*coreMass*pow(kB*temperature*static_cast<double>(numBeads),2.0)
110110 *(2.0*atom->GetXyz()[i] - preAtom->GetXyz()[i] - postAtom->GetXyz()[i]);
@@ -122,7 +122,7 @@ void RPMD::UpdateCoordinates(const vector<boost::shared_ptr<Molecule> >& molecul
122122 for(int b=0; b<numBeads; b++){
123123 for(int a=0; a<numAtom; a++){
124124 Atom* atom = molecularBeads[b]->GetAtom(a);
125- double coreMass = atom->GetAtomicMass() - static_cast<double>(atom->GetNumberValenceElectrons());
125+ double coreMass = atom->GetCoreMass();
126126 for(int i=0; i<CartesianType_end; i++){
127127 atom->GetXyz()[i] += dt*atom->GetPxyz()[i]/coreMass;
128128 }
@@ -255,7 +255,7 @@ double RPMD::OutputEnergies(const vector<boost::shared_ptr<Molecule> >& molecula
255255 double coreKineticEnergy = 0.0;
256256 for(int a=0; a<numAtom; a++){
257257 Atom* atom = molecularBeads[b]->GetAtom(a);
258- double coreMass = atom->GetAtomicMass() - static_cast<double>(atom->GetNumberValenceElectrons());
258+ double coreMass = atom->GetCoreMass();
259259 for(int i=0; i<CartesianType_end; i++){
260260 coreKineticEnergy += 0.5*pow(atom->GetPxyz()[i],2.0)/coreMass;
261261 }
@@ -271,7 +271,7 @@ double RPMD::OutputEnergies(const vector<boost::shared_ptr<Molecule> >& molecula
271271 for(int a=0; a<numAtom; a++){
272272 Atom* atom = molecularBeads[b]->GetAtom(a);
273273 Atom* preAtom = molecularBeads[preB]->GetAtom(a);
274- double coreMass = atom->GetAtomicMass() - static_cast<double>(atom->GetNumberValenceElectrons());
274+ double coreMass = atom->GetCoreMass();
275275 double dx = atom->GetXyz()[XAxis] - preAtom->GetXyz()[XAxis];
276276 double dy = atom->GetXyz()[YAxis] - preAtom->GetXyz()[YAxis];
277277 double dz = atom->GetXyz()[ZAxis] - preAtom->GetXyz()[ZAxis];