修訂 | b06fe71ed18b89fd3676c7ab4b516ac477fca99a (tree) |
---|---|
時間 | 2012-06-03 15:35:24 |
作者 | Mikiya Fujii <mikiya.fujii@gmai...> |
Commiter | Mikiya Fujii |
Refactor CalcDiatomicOverlapFirstDerivative #28554
git-svn-id: https://svn.sourceforge.jp/svnroot/molds/trunk@693 1136aad2-a195-0410-b898-f5ea1d11b9d8
@@ -3374,7 +3374,7 @@ void Cndo2::CalcDiatomicOverlapFirstDerivative(double*** overlapFirstDeri, | ||
3374 | 3374 | |
3375 | 3375 | double** diatomicOverlap = NULL; |
3376 | 3376 | double** rotatingMatrix = NULL; |
3377 | - double** diaOverlapDeriR = NULL; | |
3377 | + double** diaOverlapFirstDeri = NULL; | |
3378 | 3378 | double*** rotMatFirstDerivatives = NULL; |
3379 | 3379 | |
3380 | 3380 | try{ |
@@ -3384,14 +3384,14 @@ void Cndo2::CalcDiatomicOverlapFirstDerivative(double*** overlapFirstDeri, | ||
3384 | 3384 | MallocerFreer::GetInstance()->Malloc<double>(&rotatingMatrix, |
3385 | 3385 | OrbitalType_end, |
3386 | 3386 | OrbitalType_end); |
3387 | - MallocerFreer::GetInstance()->Malloc<double>(&diaOverlapDeriR, OrbitalType_end, OrbitalType_end); | |
3387 | + MallocerFreer::GetInstance()->Malloc<double>(&diaOverlapFirstDeri, OrbitalType_end, OrbitalType_end); | |
3388 | 3388 | MallocerFreer::GetInstance()->Malloc<double>(&rotMatFirstDerivatives, |
3389 | 3389 | OrbitalType_end, |
3390 | 3390 | OrbitalType_end, |
3391 | 3391 | CartesianType_end); |
3392 | 3392 | this->CalcDiatomicOverlapInDiatomicFrame(diatomicOverlap, atomA, atomB); |
3393 | 3393 | this->CalcRotatingMatrix(rotatingMatrix, atomA, atomB); |
3394 | - this->CalcDiatomicOverlapFirstDerivativeInDiatomicFrame(diaOverlapDeriR, atomA, atomB); | |
3394 | + this->CalcDiatomicOverlapFirstDerivativeInDiatomicFrame(diaOverlapFirstDeri, atomA, atomB); | |
3395 | 3395 | this->CalcRotatingMatrixFirstDerivatives(rotMatFirstDerivatives, atomA, atomB); |
3396 | 3396 | |
3397 | 3397 | // rotate |
@@ -3408,7 +3408,7 @@ void Cndo2::CalcDiatomicOverlapFirstDerivative(double*** overlapFirstDeri, | ||
3408 | 3408 | temp1 += rotatingMatrix[i][k] |
3409 | 3409 | *rotatingMatrix[j][l] |
3410 | 3410 | *(Cartesian[c]/R) |
3411 | - *diaOverlapDeriR[k][l]; | |
3411 | + *diaOverlapFirstDeri[k][l]; | |
3412 | 3412 | temp2 += rotMatFirstDerivatives[i][k][c] |
3413 | 3413 | *rotatingMatrix[j][l] |
3414 | 3414 | *diatomicOverlap[k][l]; |
@@ -3425,24 +3425,24 @@ void Cndo2::CalcDiatomicOverlapFirstDerivative(double*** overlapFirstDeri, | ||
3425 | 3425 | catch(MolDSException ex){ |
3426 | 3426 | this->FreeDiatomicOverlapFirstDeriTemps(&diatomicOverlap, |
3427 | 3427 | &rotatingMatrix, |
3428 | - &diaOverlapDeriR, | |
3428 | + &diaOverlapFirstDeri, | |
3429 | 3429 | &rotMatFirstDerivatives); |
3430 | 3430 | throw ex; |
3431 | 3431 | } |
3432 | 3432 | // free |
3433 | 3433 | this->FreeDiatomicOverlapFirstDeriTemps(&diatomicOverlap, |
3434 | 3434 | &rotatingMatrix, |
3435 | - &diaOverlapDeriR, | |
3435 | + &diaOverlapFirstDeri, | |
3436 | 3436 | &rotMatFirstDerivatives); |
3437 | 3437 | } |
3438 | 3438 | |
3439 | 3439 | void Cndo2::FreeDiatomicOverlapFirstDeriTemps(double*** diatomicOverlap, |
3440 | 3440 | double*** rotatingMatrix, |
3441 | - double*** diaOverlapDeriR, | |
3441 | + double*** diaOverlapFirstDeri, | |
3442 | 3442 | double**** rotMatFirstDerivatives) const{ |
3443 | 3443 | MallocerFreer::GetInstance()->Free<double>(diatomicOverlap, OrbitalType_end, OrbitalType_end); |
3444 | 3444 | MallocerFreer::GetInstance()->Free<double>(rotatingMatrix, OrbitalType_end, OrbitalType_end); |
3445 | - MallocerFreer::GetInstance()->Free<double>(diaOverlapDeriR, OrbitalType_end, OrbitalType_end); | |
3445 | + MallocerFreer::GetInstance()->Free<double>(diaOverlapFirstDeri, OrbitalType_end, OrbitalType_end); | |
3446 | 3446 | MallocerFreer::GetInstance()->Free<double>(rotMatFirstDerivatives, OrbitalType_end, OrbitalType_end, CartesianType_end); |
3447 | 3447 | } |
3448 | 3448 |
@@ -166,6 +166,9 @@ protected: | ||
166 | 166 | void CalcDiatomicOverlapFirstDerivative(double*** overlapFirstDeri, |
167 | 167 | const MolDS_base_atoms::Atom& atomA, |
168 | 168 | const MolDS_base_atoms::Atom& atomB) const; |
169 | + void CalcDiatomicOverlapSecondDerivative(double*** overlapSecondDeri, | |
170 | + const MolDS_base_atoms::Atom& atomA, | |
171 | + const MolDS_base_atoms::Atom& atomB) const; | |
169 | 172 | void FreeDiatomicOverlapFirstDeriTemps(double*** diatomicOverlap, |
170 | 173 | double*** rotatingMatrix, |
171 | 174 | double*** diaOverlapDeriR, |