リビジョン | 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
@@ -438,7 +438,7 @@ void Molecule::CalcTotalCoreMass(){ | ||
438 | 438 | this->totalCoreMass = 0; |
439 | 439 | for(int i=0; i<this->atomVect->size(); i++){ |
440 | 440 | const Atom& atom = *(*this->atomVect)[i]; |
441 | - double coreMass = atom.GetAtomicMass() - static_cast<double>(atom.GetNumberValenceElectrons()); | |
441 | + double coreMass = atom.GetCoreMass(); | |
442 | 442 | this->totalCoreMass += coreMass; |
443 | 443 | } |
444 | 444 | } |
@@ -150,7 +150,7 @@ void MD::UpdateCoordinates(Molecule& molecule, double dt) const{ | ||
150 | 150 | #pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE) |
151 | 151 | for(int a=0; a<molecule.GetNumberAtoms(); a++){ |
152 | 152 | Atom* atom = molecule.GetAtom(a); |
153 | - double coreMass = atom->GetAtomicMass() - static_cast<double>(atom->GetNumberValenceElectrons()); | |
153 | + double coreMass = atom->GetCoreMass(); | |
154 | 154 | for(int i=0; i<CartesianType_end; i++){ |
155 | 155 | atom->GetXyz()[i] += dt*atom->GetPxyz()[i]/coreMass; |
156 | 156 | } |
@@ -185,7 +185,7 @@ double MD::OutputEnergies(boost::shared_ptr<ElectronicStructure> electronicStruc | ||
185 | 185 | double coreKineticEnergy = 0.0; |
186 | 186 | for(int a=0; a<this->molecule->GetNumberAtoms(); a++){ |
187 | 187 | Atom* atom = this->molecule->GetAtom(a); |
188 | - double coreMass = atom->GetAtomicMass() - static_cast<double>(atom->GetNumberValenceElectrons()); | |
188 | + double coreMass = atom->GetCoreMass(); | |
189 | 189 | for(int i=0; i<CartesianType_end; i++){ |
190 | 190 | coreKineticEnergy += 0.5*pow(atom->GetPxyz()[i],2.0)/coreMass; |
191 | 191 | } |
@@ -141,7 +141,7 @@ void Optimizer::UpdateMolecularCoordinates(Molecule& molecule, double const* con | ||
141 | 141 | #pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE) |
142 | 142 | for(int a=0; a<molecule.GetNumberAtoms(); a++){ |
143 | 143 | const Atom* atom = molecule.GetAtom(a); |
144 | - double coreMass = atom->GetAtomicMass() - static_cast<double>(atom->GetNumberValenceElectrons()); | |
144 | + double coreMass = atom->GetCoreMass(); | |
145 | 145 | for(int i=0; i<CartesianType_end; i++){ |
146 | 146 | atom->GetXyz()[i] += dt*matrixForce[a][i]/coreMass; |
147 | 147 | } |
@@ -104,7 +104,7 @@ void RPMD::UpdateMomenta(const vector<boost::shared_ptr<Molecule> >& molecularBe | ||
104 | 104 | Atom* atom = molecularBeads[b]->GetAtom(a); |
105 | 105 | Atom* preAtom = molecularBeads[preB]->GetAtom(a); |
106 | 106 | Atom* postAtom = molecularBeads[postB]->GetAtom(a); |
107 | - double coreMass = atom->GetAtomicMass() - static_cast<double>(atom->GetNumberValenceElectrons()); | |
107 | + double coreMass = atom->GetCoreMass(); | |
108 | 108 | for(int i=0; i<CartesianType_end; i++){ |
109 | 109 | double beadsForce = -1.0*coreMass*pow(kB*temperature*static_cast<double>(numBeads),2.0) |
110 | 110 | *(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 | ||
122 | 122 | for(int b=0; b<numBeads; b++){ |
123 | 123 | for(int a=0; a<numAtom; a++){ |
124 | 124 | Atom* atom = molecularBeads[b]->GetAtom(a); |
125 | - double coreMass = atom->GetAtomicMass() - static_cast<double>(atom->GetNumberValenceElectrons()); | |
125 | + double coreMass = atom->GetCoreMass(); | |
126 | 126 | for(int i=0; i<CartesianType_end; i++){ |
127 | 127 | atom->GetXyz()[i] += dt*atom->GetPxyz()[i]/coreMass; |
128 | 128 | } |
@@ -255,7 +255,7 @@ double RPMD::OutputEnergies(const vector<boost::shared_ptr<Molecule> >& molecula | ||
255 | 255 | double coreKineticEnergy = 0.0; |
256 | 256 | for(int a=0; a<numAtom; a++){ |
257 | 257 | Atom* atom = molecularBeads[b]->GetAtom(a); |
258 | - double coreMass = atom->GetAtomicMass() - static_cast<double>(atom->GetNumberValenceElectrons()); | |
258 | + double coreMass = atom->GetCoreMass(); | |
259 | 259 | for(int i=0; i<CartesianType_end; i++){ |
260 | 260 | coreKineticEnergy += 0.5*pow(atom->GetPxyz()[i],2.0)/coreMass; |
261 | 261 | } |
@@ -271,7 +271,7 @@ double RPMD::OutputEnergies(const vector<boost::shared_ptr<Molecule> >& molecula | ||
271 | 271 | for(int a=0; a<numAtom; a++){ |
272 | 272 | Atom* atom = molecularBeads[b]->GetAtom(a); |
273 | 273 | Atom* preAtom = molecularBeads[preB]->GetAtom(a); |
274 | - double coreMass = atom->GetAtomicMass() - static_cast<double>(atom->GetNumberValenceElectrons()); | |
274 | + double coreMass = atom->GetCoreMass(); | |
275 | 275 | double dx = atom->GetXyz()[XAxis] - preAtom->GetXyz()[XAxis]; |
276 | 276 | double dy = atom->GetXyz()[YAxis] - preAtom->GetXyz()[YAxis]; |
277 | 277 | double dz = atom->GetXyz()[ZAxis] - preAtom->GetXyz()[ZAxis]; |