• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

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

Commit MetaInfo

修訂16450a543591bf6e69a0c15e20d4168fa947d957 (tree)
時間2011-10-08 16:52:18
作者Mikiya Fujii <mikiya.fujii@gmai...>
CommiterMikiya Fujii

Log Message

Zindo/S-HF analytic force is implemented with out GTO expansion. #26483

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

Change Summary

差異

--- a/src/input.in
+++ b/src/input.in
@@ -1,8 +1,8 @@
11 // example of the input file
22 THEORY
3- cndo/2
3+ //cndo/2
44 //indo
5- //zindo/s
5+ zindo/s
66 //none
77 //principal_axes
88 //translate
@@ -30,7 +30,7 @@ SCF_END
3030 //CIS_END
3131
3232 MD
33- total_steps 10
33+ total_steps 100
3434 electronic_state 2
3535 dt 0.05
3636 MD_END
--- a/src/zindo/ZindoS.h
+++ b/src/zindo/ZindoS.h
@@ -1444,6 +1444,77 @@ void ZindoS::CalcForce(int electronicStateIndex){
14441444 Atom* atomA = (*molecule->GetAtomVect())[a];
14451445 int firstAOIndexA = atomA->GetFirstAOIndex();
14461446 int numberAOsA = atomA->GetValence().size();
1447+ double coreRepulsion[CartesianType_end] = {0.0,0.0,0.0};
1448+ double electronicForce1[CartesianType_end] = {0.0,0.0,0.0};
1449+ double electronicForce2[CartesianType_end] = {0.0,0.0,0.0};
1450+ double electronicForce3[CartesianType_end] = {0.0,0.0,0.0};
1451+ double*** overlapDer = MallocerFreer::GetInstance()->MallocDoubleMatrix3d
1452+ (OrbitalType_end, OrbitalType_end, CartesianType_end);
1453+ for(int b=0; b<this->molecule->GetAtomVect()->size(); b++){
1454+ if(a != b){
1455+ Atom* atomB = (*molecule->GetAtomVect())[b];
1456+ int firstAOIndexB = atomB->GetFirstAOIndex();
1457+ int numberAOsB = atomB->GetValence().size();
1458+
1459+ // calc. first derivative of overlap.
1460+ this->CalcDiatomicOverlapFirstDerivative(overlapDer, atomA, atomB);
1461+
1462+ for(int i=0; i<CartesianType_end; i++){
1463+ coreRepulsion[i] += this->GetDiatomCoreRepulsionFirstDerivative
1464+ (a, b, (CartesianType)i);
1465+ electronicForce1[i] += ( atomA->GetCoreCharge()*atomicElectronPopulation[b]
1466+ +atomB->GetCoreCharge()*atomicElectronPopulation[a])
1467+ *this->GetNishimotoMatagaTwoEleIntFirstDerivative
1468+ (atomA, s, atomB, s, (CartesianType)i);
1469+ }
1470+
1471+ for(int mu=firstAOIndexA; mu<firstAOIndexA+numberAOsA; mu++){
1472+ OrbitalType orbitalMu = atomA->GetValence()[mu-firstAOIndexA];
1473+ for(int nu=firstAOIndexB; nu<firstAOIndexB+numberAOsB; nu++){
1474+ OrbitalType orbitalNu = atomB->GetValence()[nu-firstAOIndexB];
1475+ double bondParameter = 0.5*(atomA->GetBondingParameter(
1476+ this->theory, orbitalMu)
1477+ +atomB->GetBondingParameter(
1478+ this->theory, orbitalNu));
1479+ for(int i=0; i<CartesianType_end; i++){
1480+ electronicForce2[i] += 2.0*this->orbitalElectronPopulation[mu][nu]
1481+ *bondParameter
1482+ *overlapDer[mu-firstAOIndexA][nu-firstAOIndexB][i];
1483+ electronicForce3[i] += (this->orbitalElectronPopulation[mu][mu]
1484+ *this->orbitalElectronPopulation[nu][nu]
1485+ -0.5*pow(this->orbitalElectronPopulation[mu][nu],2.0))
1486+ *this->GetNishimotoMatagaTwoEleIntFirstDerivative
1487+ (atomA, orbitalMu, atomB, orbitalNu,
1488+ (CartesianType)i);
1489+ }
1490+ }
1491+ }
1492+
1493+ for(int i=0; i<CartesianType_end; i++){
1494+ this->matrixForce[a][i] = -1.0*(coreRepulsion[i]
1495+ - electronicForce1[i]
1496+ + electronicForce2[i]
1497+ + electronicForce3[i]);
1498+ }
1499+
1500+ }
1501+ }
1502+ if(overlapDer != NULL){
1503+ MallocerFreer::GetInstance()->FreeDoubleMatrix3d(&overlapDer,
1504+ OrbitalType_end,
1505+ OrbitalType_end);
1506+ }
1507+ }
1508+
1509+
1510+ /*
1511+ // Calculate force. First derivative of overlap integral is
1512+ // calculated with GTO expansion technique.
1513+ //#pragma omp parallel for schedule(auto)
1514+ for(int a=0; a<this->molecule->GetAtomVect()->size(); a++){
1515+ Atom* atomA = (*molecule->GetAtomVect())[a];
1516+ int firstAOIndexA = atomA->GetFirstAOIndex();
1517+ int numberAOsA = atomA->GetValence().size();
14471518 for(int i=0; i<CartesianType_end; i++){
14481519
14491520 double coreRepulsion = 0.0;
@@ -1498,9 +1569,11 @@ void ZindoS::CalcForce(int electronicStateIndex){
14981569 + electronicForce3);
14991570 }
15001571 }
1572+ */
15011573
1502- /*
1574+ /*
15031575 // checking of calculated force
1576+ cout << "chek the force\n";
15041577 double checkSumForce[3] = {0.0, 0.0, 0.0};
15051578 for(int a=0; a<this->molecule->GetAtomVect()->size(); a++){
15061579 for(int i=0; i<CartesianType_end; i++){
@@ -1514,7 +1587,6 @@ void ZindoS::CalcForce(int electronicStateIndex){
15141587 cout << "force: " << i << " " << checkSumForce[i] << endl;
15151588 }
15161589 */
1517-
15181590 }
15191591
15201592 }