Révision | 5226ceb691d257aead87c2462639849b4c3b5251 (tree) |
---|---|
l'heure | 2013-12-19 11:21:10 |
Auteur | Mikiya Fujii <mikiya.fujii@gmai...> |
Commiter | Mikiya Fujii |
@@ -51,13 +51,17 @@ REQUIREMENTS: | ||
51 | 51 | To get and install the OpenBLAS-libraries, see the HP:<http://xianyi.github.com/OpenBLAS/>. |
52 | 52 | The version of the OpenBLAS would be no problem if 0.2.5 or later is used. |
53 | 53 | Note that "USE_OPENMP = 1" should be set for the installation of the opneBLAS. |
54 | - Furthermore, "INTERFACE64 = 1" is also needed when you install the OpenBLAS into 64-bits machines | |
54 | + Furthermore, "BINARY=64" and "INTERFACE64 = 1" are also needed | |
55 | + when you install the OpenBLAS into 64-bits machines. | |
56 | + An example of building the openBLAS-0.2.5 by M.F. is shown in: | |
57 | + http://d.hatena.ne.jp/futofuji/20130627/p1 | |
55 | 58 | |
56 | 59 | ============================================================================== |
57 | -COMPILE(using GNUmake): | |
58 | - In the "src" directory in the MolDS package. | |
60 | +COMPILE: | |
61 | + GNUMake is used to compile the MolDS in the "src" directory of the MolDS package. | |
62 | + MolDS officially suport the following three cases. | |
59 | 63 | |
60 | - Case i) The Intel mpi compiler (mpiicpc) which is wrapping the Intel c++ compiler (icpc) | |
64 | + Case i) The Intel mpi compiler (mpiicpc) wrapping the Intel c++ compiler (icpc) | |
61 | 65 | Change the "BOOST_TOP_DIR" in Makefile to the top directory of the |
62 | 66 | Boost C++ Libraries in your systems. |
63 | 67 |
@@ -67,7 +71,7 @@ COMPILE(using GNUmake): | ||
67 | 71 | To compile MolDS on 64 bits machine, |
68 | 72 | $ make INTEL=64 |
69 | 73 | |
70 | - Case ii) The openMPI compiler (mpicxx) which is wrapping the Intel c++ compiler (icpc) | |
74 | + Case ii) The openMPI compiler (mpicxx) wrapping the Intel c++ compiler (icpc) | |
71 | 75 | Change the "BOOST_TOP_DIR" in Makefile to the top directory of the |
72 | 76 | Boost C++ Libraries in your systems. |
73 | 77 |
@@ -77,8 +81,7 @@ COMPILE(using GNUmake): | ||
77 | 81 | To compile MolDS on 64 bits machine, |
78 | 82 | $ make INTEL=64 CC=mpicxx |
79 | 83 | |
80 | - | |
81 | - Case iii) The openMPI compiler (mpicxx) which is wrapping the GNU c++ compiler (g++) | |
84 | + Case iii) The openMPI compiler (mpicxx) wrapping the GNU c++ compiler (g++): | |
82 | 85 | Change the "BOOST_TOP_DIR" in "Makefile_GNU" to the top directory of the |
83 | 86 | Boost C++ Libraries in your systems. |
84 | 87 | Change the "OPENBLAS_TOP_DIR" in "Makefile_GNU" to the top directory of the |
@@ -193,27 +196,39 @@ CAPABILITIES: | ||
193 | 196 | ============================================================================== |
194 | 197 | HOW TO WRITE INPUT: |
195 | 198 | |
199 | + <Terminiology> | |
200 | + "hoge-directive" means line block stating "hoge" and ending "hoge_end" in input files. | |
201 | + Uppercase and lowercase letters are treated as identical in input files. | |
202 | + | |
196 | 203 | <Comment Out> |
197 | 204 | Lines starting with "//" or "#" in input-files are treated as comments. |
198 | 205 | |
199 | - <SCF> | |
206 | + <Theory> | |
200 | 207 | Write "cndo/2", "indo", "zindo/s", "mndo", "am1", "am1-d", |
201 | 208 | "pm3", "pm3-d", or "pm3/pddg" in theory-directive. |
202 | 209 | This theory-directive indicate a electronic structure theory used in your simulations. |
203 | 210 | MNDO only supports (can calculate) Heats of formation. |
204 | - SCF module outputs also the dipole moment arrond the center of cores of the molecule. | |
205 | - To calculate the dipole moment, STO-6G [DY_1977] is used. | |
206 | 211 | |
207 | 212 | E.g. |
208 | 213 | THEORY |
209 | 214 | indo |
210 | 215 | THEORY_END |
216 | + | |
217 | + <SCF> | |
218 | + Write SCF-directive. In the SCF-directive, settings(options) of SCF should be written. | |
219 | + | |
220 | + E.g. | |
221 | + SCF | |
222 | + (options) | |
223 | + SCf_END | |
211 | 224 | |
212 | 225 | -options |
213 | 226 | Write below options in SCF-directive. |
214 | 227 | "max_iter", "rms_density", "damping_thresh", "damping_weight", |
215 | 228 | "diis_num_error_vect", "diis_start_error", "diis_end_error", |
216 | 229 | "vdW", "vdW_s6", and "vdW_d" are prepared as options. |
230 | + SCF module outputs also the dipole moment arrond the center of cores of the molecule. | |
231 | + To calculate the dipole moment, STO-6G [DY_1977] is used. | |
217 | 232 | |
218 | 233 | The default value of the "max_iter" is 100. |
219 | 234 | The default value of the "rms_density" is 10**(-8.0). |
@@ -256,7 +271,25 @@ HOW TO WRITE INPUT: | ||
256 | 271 | vdW_s6 0.75 |
257 | 272 | vdW_d 30 |
258 | 273 | SCF_END |
259 | - | |
274 | + | |
275 | + <GEOMETRY> | |
276 | + To set geometry of the system calculated by MolDS should be written in geometry-directive. | |
277 | + Each line inside the geometry-directive indicates each atom of the system. | |
278 | + Namely, each line should containe one character and three doubles. | |
279 | + The character indicates atomtype and three doubles indicate the cartesian coordinates of | |
280 | + each atom in angstrom unit. | |
281 | + | |
282 | + GEOMETRY | |
283 | + C -0.1000 0.1000 0.0000 | |
284 | + C 1.6938 0.0000 -0.1000 | |
285 | + H -0.381 1.1411 0.0000 | |
286 | + H -0.2681 -0.5205 -0.9016 | |
287 | + H -0.3681 -0.4725 0.8016 | |
288 | + H 1.9519 0.5200 -0.9007 | |
289 | + H 1.8519 0.5300 0.8007 | |
290 | + H 1.7519 -1.0401 -0.1000 | |
291 | + GEOMETRY_END | |
292 | + | |
260 | 293 | <MEMORY> |
261 | 294 | For settings of memory usage, write options in memory-directive. |
262 | 295 |
@@ -276,26 +309,6 @@ HOW TO WRITE INPUT: | ||
276 | 309 | limit_heap 512 |
277 | 310 | MEMORY_END |
278 | 311 | |
279 | - <Frequencies (Normal modes analysis)> | |
280 | - write frequencies-directive. Note taht not only the frequencies but also the normal modes are calculated. | |
281 | - | |
282 | - E.g. | |
283 | - FREQUENCIES | |
284 | - (options) | |
285 | - FREQUENCIES_END | |
286 | - | |
287 | - -options | |
288 | - "electronic_state" is only prepared. | |
289 | - "electronic_state" is index of the electronic state used for calculating the normal modes. | |
290 | - electronic_state=0 means the electronic ground state. | |
291 | - electronic_state=1 means, then, first electornic excited state. | |
292 | - The default value of the "electronic_state" is 0. | |
293 | - | |
294 | - E.g. | |
295 | - FREQUENCIES | |
296 | - electronic_state 0 | |
297 | - FREQUENCIES_END | |
298 | - | |
299 | 312 | <MO Plot> |
300 | 313 | write MO plot directive. |
301 | 314 |
@@ -328,6 +341,66 @@ HOW TO WRITE INPUT: | ||
328 | 341 | file_prefix MOPlot_ |
329 | 342 | MOPLOT_END |
330 | 343 | |
344 | + <Environmental Point Charge(EPC) method> | |
345 | + Environmental point charge method is a simplified method of the QM/MM, | |
346 | + namely the environmental point changes are treated as atoms in the MM region. | |
347 | + The differences between the QM/MM and EPC are summarized below: | |
348 | + - Electrostatic interaction between QM and MM region: | |
349 | + QM/MM: Electrostatic interaction may be mutually added to QM and MM atoms. | |
350 | + EPC : Electrostatic field caused by the EPCs affects the QM region | |
351 | + although the each EPC is not affected by electrostatic field | |
352 | + caused by the QM atoms and other EPCs. | |
353 | + Namely, each EPC is fixed at point of space. | |
354 | + - Van der Waals interaction between QM and MM region: | |
355 | + QM/MM: Included. | |
356 | + EPC : Not included. | |
357 | + In this EPC method, core-core replustion between QM and MM atoms is implemented with | |
358 | + the method I (simple coulomb interaction: qq/r) of ref [LRCL_2000]. | |
359 | + This EPC method can be used with MNDO-series (MNDO, AM1, AM1-D, PM3, PM3-D, and PDDG/PM3) only. | |
360 | + To use this environmental point charges method, write EPC-directive. | |
361 | + | |
362 | + E.g. | |
363 | + EPC | |
364 | + (options) | |
365 | + EPC_END | |
366 | + | |
367 | + -options | |
368 | + "the cartesian coordinates and charge" is only prepared. | |
369 | + Namely, each line should containe 4 doubles and a term. | |
370 | + The first three doubles are the cartesian coordinates of | |
371 | + each environmental point charge in angstrom unit. | |
372 | + The term is "charge". The last double following the term, "charge", | |
373 | + is the charge in atomic unit, | |
374 | + e.g. -1 and 1 mean charge of an electron and a proton, respectively. | |
375 | + Multiple setting of the environmental point charge is approvable, of course. | |
376 | + | |
377 | + E.g. | |
378 | + EPC | |
379 | + 0.0 0.0 0.0 charge -1 | |
380 | + 2.2 1.5 3.0 charge -1.5 | |
381 | + 0.0 2.0 5.0 charge 0.3 | |
382 | + EPC_END | |
383 | + | |
384 | + <Frequencies (Normal modes analysis)> | |
385 | + write frequencies-directive. Note taht not only the frequencies but also the normal modes are calculated. | |
386 | + | |
387 | + E.g. | |
388 | + FREQUENCIES | |
389 | + (options) | |
390 | + FREQUENCIES_END | |
391 | + | |
392 | + -options | |
393 | + "electronic_state" is only prepared. | |
394 | + "electronic_state" is index of the electronic state used for calculating the normal modes. | |
395 | + electronic_state=0 means the electronic ground state. | |
396 | + electronic_state=1 means, then, first electornic excited state. | |
397 | + The default value of the "electronic_state" is 0. | |
398 | + | |
399 | + E.g. | |
400 | + FREQUENCIES | |
401 | + electronic_state 0 | |
402 | + FREQUENCIES_END | |
403 | + | |
331 | 404 | <CIS> |
332 | 405 | Write CIS-directive. |
333 | 406 |
@@ -481,15 +554,15 @@ HOW TO WRITE INPUT: | ||
481 | 554 | PARTICLEPLOT_END |
482 | 555 | |
483 | 556 | <OPT (geometry optimization)> |
484 | - Write OPT-directive. This module uses line search and steepest descent algorythms. | |
557 | + Write optimization-directive. This module uses line search and steepest descent algorythms. | |
485 | 558 | In the early stage the line search algorythm is used, |
486 | 559 | then the algorythm used in this module is switched to steepest descent algorythm. |
487 | 560 | Note that ZINDO/S is not suitable for geometry optimizations. |
488 | 561 | |
489 | 562 | E.g. |
490 | - OPTIMIZE | |
563 | + OPTIMIZATION | |
491 | 564 | (options) |
492 | - OPTIMIZE_END | |
565 | + OPTIMIZATION_END | |
493 | 566 | |
494 | 567 | -options |
495 | 568 | "method", "total_steps", "electronic_state", "max_gradient", "rms_gradient", |
@@ -528,16 +601,14 @@ HOW TO WRITE INPUT: | ||
528 | 601 | This parameter have no effect if method is "steepest_descent" or "conjugate_gradient". |
529 | 602 | |
530 | 603 | E.g. |
531 | - OPTIMIZE | |
604 | + OPTIMIZATION | |
532 | 605 | method steepest_descent |
533 | 606 | total_steps 50 |
534 | 607 | electronic_state 0 |
535 | 608 | max_gradient 0.00045 |
536 | 609 | rms_gradient 0.00030 |
537 | 610 | dt 50 |
538 | - OPTIMIZE_END | |
539 | - | |
540 | - | |
611 | + OPTIMIZATION_END | |
541 | 612 | |
542 | 613 | <MD (Molecular dynamics)> |
543 | 614 | Write MD-directive. Note that ZINDO/S is not suitable for molcular dynamics simulations. |
@@ -708,7 +779,6 @@ HOW TO WRITE INPUT: | ||
708 | 779 | "angles" indicates Euler angles for the rotation in degree unit. |
709 | 780 | The default values of "angles" are 0, 0, and 0. |
710 | 781 | This option is valid only for "type" set as Euler angles. |
711 | - | |
712 | 782 | |
713 | 783 | E.g. for "type" set as axis |
714 | 784 | ROTATE |
@@ -724,7 +794,6 @@ HOW TO WRITE INPUT: | ||
724 | 794 | angles 15 25 35 |
725 | 795 | ROTATE_END |
726 | 796 | |
727 | - | |
728 | 797 | <Translate Molecule> |
729 | 798 | Write translate-directive. |
730 | 799 |
@@ -50,6 +50,7 @@ | ||
50 | 50 | [BFB_1997] M. A. Blanco, M. Fl{\'o}rez, and M. Bermejo, J. Mol. Struct. 419, 19 (1997) |
51 | 51 | [BB_1998] E. Besalu, J. M. Bofill, Theor. Chem. Acc. 100, 265 (1998) |
52 | 52 | [I_1998] IWANAMI-SHOTEN "IWANAMI RIKAGAKUJITEN", ISBN4-00-080090-6 (1988) |
53 | +[LRCL_2000] F. J. Luque, N. Reuter, A. Cartier, and M. F. R.-Lopez, J. Phys. Chem. A 104, 10923 (2000) | |
53 | 54 | [RCJ_2002] M. P. Repasky, J. Chandrasekhar, and W. L. Jorgensen, J. Comp. Chem. 23, 1601 (2002) |
54 | 55 | [BGRJ_2003] I. T.-Brohman, C. R. W. Guimar\~{a}es, M. P. Repasky, and W. L. Jorgensen, J. Comp. Chem. 25, 138 (2003) |
55 | 56 | [S_2004] J. J. P. Stewart, J. Mol. Model. 10, 155 (2004) |
@@ -37,9 +37,9 @@ EXENAME = molds | ||
37 | 37 | DEPFILE = obj/objfile.dep |
38 | 38 | LDFLAGS = |
39 | 39 | |
40 | -ALL_CPP_FILES = base/Enums.cpp base/PrintController.cpp base/MolDSException.cpp base/MallocerFreer.cpp mpi/MpiProcess.cpp mpi/AsyncCommunicator.cpp wrappers/Blas.cpp wrappers/Lapack.cpp base/Utilities.cpp base/MathUtilities.cpp base/EularAngle.cpp base/Parameters.cpp base/RealSphericalHarmonicsIndex.cpp base/atoms/Atom.cpp base/atoms/Hatom.cpp base/atoms/Liatom.cpp base/atoms/Catom.cpp base/atoms/Natom.cpp base/atoms/Oatom.cpp base/atoms/Satom.cpp base/factories/AtomFactory.cpp base/Molecule.cpp base/InputParser.cpp base/GTOExpansionSTO.cpp base/loggers/MOLogger.cpp base/loggers/DensityLogger.cpp base/loggers/HoleDensityLogger.cpp base/loggers/ParticleDensityLogger.cpp cndo/Cndo2.cpp indo/Indo.cpp zindo/ZindoS.cpp mndo/Mndo.cpp am1/Am1.cpp am1/Am1D.cpp pm3/Pm3.cpp pm3/Pm3D.cpp pm3/Pm3Pddg.cpp base/factories/ElectronicStructureFactory.cpp md/MD.cpp mc/MC.cpp rpmd/RPMD.cpp nasco/NASCO.cpp optimization/Optimizer.cpp optimization/ConjugateGradient.cpp optimization/SteepestDescent.cpp optimization/BFGS.cpp optimization/GEDIIS.cpp base/factories/OptimizerFactory.cpp base/MolDS.cpp Main.cpp | |
41 | -ALL_HEAD_FILES = config.h base/Enums.h base/Uncopyable.h base/PrintController.h base/MolDSException.h base/containers/ThreadSafeQueue.h base/MallocerFreer.h mpi/MpiInt.h mpi/MpiProcess.h mpi/AsyncCommunicator.h wrappers/Blas.h wrappers/Lapack.h base/Utilities.h base/MathUtilities.h base/EularAngle.h base/Parameters.h base/RealSphericalHarmonicsIndex.h base/atoms/Atom.h base/atoms/Hatom.h base/atoms/Liatom.h base/atoms/Catom.h base/atoms/Natom.h base/atoms/Oatom.h base/atoms/Satom.h base/factories/AtomFactory.h base/Molecule.h base/InputParser.h base/GTOExpansionSTO.h base/loggers/MOLogger.h base/loggers/DensityLogger.h base/loggers/HoleDensityLogger.h base/loggers/ParticleDensityLogger.h base/ElectronicStructure.h cndo/Cndo2.h cndo/ReducedOverlapAOsParameters.h indo/Indo.h zindo/ZindoS.h mndo/Mndo.h am1/Am1.h am1/Am1D.h pm3/Pm3.h pm3/Pm3D.h pm3/Pm3Pddg.h base/factories/ElectronicStructureFactory.h md/MD.h mc/MC.h rpmd/RPMD.h nasco/NASCO.h optimization/Optimizer.h optimization/ConjugateGradient.h optimization/SteepestDescent.h optimization/BFGS.h optimization/GEDIIS.h base/factories/OptimizerFactory.h base/MolDS.h | |
42 | -ALL_OBJ_FILES = obj/Enums.o obj/PrintController.o obj/MolDSException.o obj/MallocerFreer.o obj/MpiProcess.o obj/AsyncCommunicator.o obj/Blas.o obj/Lapack.o obj/Utilities.o obj/MathUtilities.o obj/EularAngle.o obj/Parameters.o obj/RealSphericalHarmonicsIndex.o obj/Atom.o obj/Hatom.o obj/Liatom.o obj/Catom.o obj/Natom.o obj/Oatom.o obj/Satom.o obj/AtomFactory.o obj/Molecule.o obj/InputParser.o obj/GTOExpansionSTO.o obj/MOLogger.o obj/DensityLogger.o obj/HoleDensityLogger.o obj/ParticleDensityLogger.o obj/Cndo2.o obj/Indo.o obj/ZindoS.o obj/Mndo.o obj/Am1.o obj/Am1D.o obj/Pm3.o obj/Pm3D.o obj/Pm3Pddg.o obj/ElectronicStructureFactory.o obj/MD.o obj/MC.o obj/RPMD.o obj/NASCO.o obj/Optimizer.o obj/ConjugateGradient.o obj/SteepestDescent.o obj/BFGS.o obj/GEDIIS.o obj/OptimizerFactory.o obj/MolDS.o obj/Main.o | |
40 | +ALL_CPP_FILES = base/Enums.cpp base/PrintController.cpp base/MolDSException.cpp base/MallocerFreer.cpp mpi/MpiProcess.cpp mpi/AsyncCommunicator.cpp wrappers/Blas.cpp wrappers/Lapack.cpp base/Utilities.cpp base/MathUtilities.cpp base/EularAngle.cpp base/Parameters.cpp base/RealSphericalHarmonicsIndex.cpp base/atoms/Atom.cpp base/atoms/Hatom.cpp base/atoms/Liatom.cpp base/atoms/Catom.cpp base/atoms/Natom.cpp base/atoms/Oatom.cpp base/atoms/Satom.cpp base/atoms/mm/EnvironmentalPointCharge.cpp base/factories/AtomFactory.cpp base/Molecule.cpp base/InputParser.cpp base/GTOExpansionSTO.cpp base/loggers/MOLogger.cpp base/loggers/DensityLogger.cpp base/loggers/HoleDensityLogger.cpp base/loggers/ParticleDensityLogger.cpp cndo/Cndo2.cpp indo/Indo.cpp zindo/ZindoS.cpp mndo/Mndo.cpp am1/Am1.cpp am1/Am1D.cpp pm3/Pm3.cpp pm3/Pm3D.cpp pm3/Pm3Pddg.cpp base/factories/ElectronicStructureFactory.cpp md/MD.cpp mc/MC.cpp rpmd/RPMD.cpp nasco/NASCO.cpp optimization/Optimizer.cpp optimization/ConjugateGradient.cpp optimization/SteepestDescent.cpp optimization/BFGS.cpp optimization/GEDIIS.cpp base/factories/OptimizerFactory.cpp base/MolDS.cpp Main.cpp | |
41 | +ALL_HEAD_FILES = config.h base/Enums.h base/Uncopyable.h base/PrintController.h base/MolDSException.h base/containers/ThreadSafeQueue.h base/MallocerFreer.h mpi/MpiInt.h mpi/MpiProcess.h mpi/AsyncCommunicator.h wrappers/Blas.h wrappers/Lapack.h base/Utilities.h base/MathUtilities.h base/EularAngle.h base/Parameters.h base/RealSphericalHarmonicsIndex.h base/atoms/Atom.h base/atoms/Hatom.h base/atoms/Liatom.h base/atoms/Catom.h base/atoms/Natom.h base/atoms/Oatom.h base/atoms/Satom.h base/atoms/mm/EnvironmentalPointCharge.h base/factories/AtomFactory.h base/Molecule.h base/InputParser.h base/GTOExpansionSTO.h base/loggers/MOLogger.h base/loggers/DensityLogger.h base/loggers/HoleDensityLogger.h base/loggers/ParticleDensityLogger.h base/ElectronicStructure.h cndo/Cndo2.h cndo/ReducedOverlapAOsParameters.h indo/Indo.h zindo/ZindoS.h mndo/Mndo.h am1/Am1.h am1/Am1D.h pm3/Pm3.h pm3/Pm3D.h pm3/Pm3Pddg.h base/factories/ElectronicStructureFactory.h md/MD.h mc/MC.h rpmd/RPMD.h nasco/NASCO.h optimization/Optimizer.h optimization/ConjugateGradient.h optimization/SteepestDescent.h optimization/BFGS.h optimization/GEDIIS.h base/factories/OptimizerFactory.h base/MolDS.h | |
42 | +ALL_OBJ_FILES = obj/Enums.o obj/PrintController.o obj/MolDSException.o obj/MallocerFreer.o obj/MpiProcess.o obj/AsyncCommunicator.o obj/Blas.o obj/Lapack.o obj/Utilities.o obj/MathUtilities.o obj/EularAngle.o obj/Parameters.o obj/RealSphericalHarmonicsIndex.o obj/Atom.o obj/Hatom.o obj/Liatom.o obj/Catom.o obj/Natom.o obj/Oatom.o obj/Satom.o obj/EnvironmentalPointCharge.o obj/AtomFactory.o obj/Molecule.o obj/InputParser.o obj/GTOExpansionSTO.o obj/MOLogger.o obj/DensityLogger.o obj/HoleDensityLogger.o obj/ParticleDensityLogger.o obj/Cndo2.o obj/Indo.o obj/ZindoS.o obj/Mndo.o obj/Am1.o obj/Am1D.o obj/Pm3.o obj/Pm3D.o obj/Pm3Pddg.o obj/ElectronicStructureFactory.o obj/MD.o obj/MC.o obj/RPMD.o obj/NASCO.o obj/Optimizer.o obj/ConjugateGradient.o obj/SteepestDescent.o obj/BFGS.o obj/GEDIIS.o obj/OptimizerFactory.o obj/MolDS.o obj/Main.o | |
43 | 43 | |
44 | 44 | $(EXENAME): $(ALL_OBJ_FILES) |
45 | 45 | $(CC) -o $@ -Wl,-rpath=$(BOOST_LIB_DIR) -L$(BOOST_LIB_DIR) $(LDFLAGS) $(ALL_OBJ_FILES) $(LIBS) |
@@ -28,9 +28,9 @@ EXENAME = molds | ||
28 | 28 | DEPFILE = obj/objfile.dep |
29 | 29 | LDFLAGS = -Kfast,openmp -SSL2BLAMP -Xg |
30 | 30 | |
31 | -ALL_CPP_FILES = base/Enums.cpp base/PrintController.cpp base/MolDSException.cpp base/MallocerFreer.cpp mpi/MpiProcess.cpp mpi/AsyncCommunicator.cpp wrappers/Blas.cpp wrappers/Lapack.cpp base/Utilities.cpp base/MathUtilities.cpp base/EularAngle.cpp base/Parameters.cpp base/atoms/Atom.cpp base/atoms/Hatom.cpp base/atoms/Liatom.cpp base/atoms/Catom.cpp base/atoms/Natom.cpp base/atoms/Oatom.cpp base/atoms/Satom.cpp base/factories/AtomFactory.cpp base/Molecule.cpp base/InputParser.cpp base/GTOExpansionSTO.cpp base/RealSphericalHarmonicsIndex.cpp base/loggers/MOLogger.cpp base/loggers/DensityLogger.cpp base/loggers/HoleDensityLogger.cpp base/loggers/ParticleDensityLogger.cpp cndo/Cndo2.cpp indo/Indo.cpp zindo/ZindoS.cpp mndo/Mndo.cpp am1/Am1.cpp am1/Am1D.cpp pm3/Pm3.cpp pm3/Pm3D.cpp pm3/Pm3Pddg.cpp base/factories/ElectronicStructureFactory.cpp md/MD.cpp mc/MC.cpp rpmd/RPMD.cpp nasco/NASCO.cpp optimization/Optimizer.cpp optimization/ConjugateGradient.cpp optimization/SteepestDescent.cpp optimization/BFGS.cpp optimization/GEDIIS.cpp base/factories/OptimizerFactory.cpp base/MolDS.cpp Main.cpp | |
32 | -ALL_HEAD_FILES = config.h base/Enums.h base/Uncopyable.h base/PrintController.h base/MolDSException.h base/containers/ThreadSafeQueue.h base/MallocerFreer.h mpi/MpiInt.h mpi/MpiProcess.h mpi/AsyncCommunicator.h wrappers/Blas.h wrappers/Lapack.h base/Utilities.h base/MathUtilities.h base/EularAngle.h base/Parameters.h base/atoms/Atom.h base/atoms/Hatom.h base/atoms/Liatom.h base/atoms/Catom.h base/atoms/Natom.h base/atoms/Oatom.h base/atoms/Satom.h base/factories/AtomFactory.h base/Molecule.h base/InputParser.h base/GTOExpansionSTO.h base/RealSphericalHarmonicsIndex.h base/loggers/MOLogger.h base/loggers/DensityLogger.h base/loggers/HoleDensityLogger.h base/loggers/ParticleDensityLogger.h base/ElectronicStructure.h cndo/Cndo2.h cndo/ReducedOverlapAOsParameters.h indo/Indo.h zindo/ZindoS.h mndo/Mndo.h am1/Am1.h am1/Am1D.h pm3/Pm3.h pm3/Pm3D.h pm3/Pm3Pddg.h base/factories/ElectronicStructureFactory.h md/MD.h mc/MC.h rpmd/RPMD.h nasco/NASCO.h optimization/Optimizer.h optimization/ConjugateGradient.h optimization/SteepestDescent.h optimization/BFGS.h optimization/GEDIIS.h base/factories/OptimizerFactory.h base/MolDS.h | |
33 | -ALL_OBJ_FILES = obj/Enums.o obj/PrintController.o obj/MolDSException.o obj/MallocerFreer.o obj/MpiProcess.o obj/AsyncCommunicator.o obj/Blas.o obj/Lapack.o obj/Utilities.o obj/MathUtilities.o obj/EularAngle.o obj/Parameters.o obj/Atom.o obj/Hatom.o obj/Liatom.o obj/Catom.o obj/Natom.o obj/Oatom.o obj/Satom.o obj/AtomFactory.o obj/Molecule.o obj/InputParser.o obj/GTOExpansionSTO.o obj/RealSphericalHarmonicsIndex.o obj/MOLogger.o obj/DensityLogger.o obj/HoleDensityLogger.o obj/ParticleDensityLogger.o obj/Cndo2.o obj/Indo.o obj/ZindoS.o obj/Mndo.o obj/Am1.o obj/Am1D.o obj/Pm3.o obj/Pm3D.o obj/Pm3Pddg.o obj/ElectronicStructureFactory.o obj/MD.o obj/MC.o obj/RPMD.o obj/NASCO.o obj/Optimizer.o obj/ConjugateGradient.o obj/SteepestDescent.o obj/BFGS.o obj/GEDIIS.o obj/OptimizerFactory.o obj/MolDS.o obj/Main.o | |
31 | +ALL_CPP_FILES = base/Enums.cpp base/PrintController.cpp base/MolDSException.cpp base/MallocerFreer.cpp mpi/MpiProcess.cpp mpi/AsyncCommunicator.cpp wrappers/Blas.cpp wrappers/Lapack.cpp base/Utilities.cpp base/MathUtilities.cpp base/EularAngle.cpp base/Parameters.cpp base/atoms/Atom.cpp base/atoms/Hatom.cpp base/atoms/Liatom.cpp base/atoms/Catom.cpp base/atoms/Natom.cpp base/atoms/Oatom.cpp base/atoms/Satom.cpp base/atoms/mm/EnvironmentalPointCharge.cpp base/factories/AtomFactory.cpp base/Molecule.cpp base/InputParser.cpp base/GTOExpansionSTO.cpp base/RealSphericalHarmonicsIndex.cpp base/loggers/MOLogger.cpp base/loggers/DensityLogger.cpp base/loggers/HoleDensityLogger.cpp base/loggers/ParticleDensityLogger.cpp cndo/Cndo2.cpp indo/Indo.cpp zindo/ZindoS.cpp mndo/Mndo.cpp am1/Am1.cpp am1/Am1D.cpp pm3/Pm3.cpp pm3/Pm3D.cpp pm3/Pm3Pddg.cpp base/factories/ElectronicStructureFactory.cpp md/MD.cpp mc/MC.cpp rpmd/RPMD.cpp nasco/NASCO.cpp optimization/Optimizer.cpp optimization/ConjugateGradient.cpp optimization/SteepestDescent.cpp optimization/BFGS.cpp optimization/GEDIIS.cpp base/factories/OptimizerFactory.cpp base/MolDS.cpp Main.cpp | |
32 | +ALL_HEAD_FILES = config.h base/Enums.h base/Uncopyable.h base/PrintController.h base/MolDSException.h base/containers/ThreadSafeQueue.h base/MallocerFreer.h mpi/MpiInt.h mpi/MpiProcess.h mpi/AsyncCommunicator.h wrappers/Blas.h wrappers/Lapack.h base/Utilities.h base/MathUtilities.h base/EularAngle.h base/Parameters.h base/atoms/Atom.h base/atoms/Hatom.h base/atoms/Liatom.h base/atoms/Catom.h base/atoms/Natom.h base/atoms/Oatom.h base/atoms/Satom.h base/atoms/mm/EnvironmentalPointCharge.h base/factories/AtomFactory.h base/Molecule.h base/InputParser.h base/GTOExpansionSTO.h base/RealSphericalHarmonicsIndex.h base/loggers/MOLogger.h base/loggers/DensityLogger.h base/loggers/HoleDensityLogger.h base/loggers/ParticleDensityLogger.h base/ElectronicStructure.h cndo/Cndo2.h cndo/ReducedOverlapAOsParameters.h indo/Indo.h zindo/ZindoS.h mndo/Mndo.h am1/Am1.h am1/Am1D.h pm3/Pm3.h pm3/Pm3D.h pm3/Pm3Pddg.h base/factories/ElectronicStructureFactory.h md/MD.h mc/MC.h rpmd/RPMD.h nasco/NASCO.h optimization/Optimizer.h optimization/ConjugateGradient.h optimization/SteepestDescent.h optimization/BFGS.h optimization/GEDIIS.h base/factories/OptimizerFactory.h base/MolDS.h | |
33 | +ALL_OBJ_FILES = obj/Enums.o obj/PrintController.o obj/MolDSException.o obj/MallocerFreer.o obj/MpiProcess.o obj/AsyncCommunicator.o obj/Blas.o obj/Lapack.o obj/Utilities.o obj/MathUtilities.o obj/EularAngle.o obj/Parameters.o obj/Atom.o obj/Hatom.o obj/Liatom.o obj/Catom.o obj/Natom.o obj/Oatom.o obj/Satom.o obj/EnvironmentalPointCharge.o obj/AtomFactory.o obj/Molecule.o obj/InputParser.o obj/GTOExpansionSTO.o obj/RealSphericalHarmonicsIndex.o obj/MOLogger.o obj/DensityLogger.o obj/HoleDensityLogger.o obj/ParticleDensityLogger.o obj/Cndo2.o obj/Indo.o obj/ZindoS.o obj/Mndo.o obj/Am1.o obj/Am1D.o obj/Pm3.o obj/Pm3D.o obj/Pm3Pddg.o obj/ElectronicStructureFactory.o obj/MD.o obj/MC.o obj/RPMD.o obj/NASCO.o obj/Optimizer.o obj/ConjugateGradient.o obj/SteepestDescent.o obj/BFGS.o obj/GEDIIS.o obj/OptimizerFactory.o obj/MolDS.o obj/Main.o | |
34 | 34 | |
35 | 35 | $(EXENAME): $(ALL_OBJ_FILES) |
36 | 36 | $(CC) -o $@ $(LDFLAGS) -Wl,-rpath=$(BOOST_LIB_DIR) $(LDFLAGS) $(ALL_OBJ_FILES) -L$(BOOST_LIB_DIR) $(LIBS) |
@@ -34,9 +34,9 @@ EXENAME = molds | ||
34 | 34 | DEPFILE = obj/objfile.dep |
35 | 35 | LDFLAGS = |
36 | 36 | |
37 | -ALL_CPP_FILES = base/Enums.cpp base/PrintController.cpp base/MolDSException.cpp base/MallocerFreer.cpp mpi/MpiProcess.cpp mpi/AsyncCommunicator.cpp wrappers/Blas.cpp wrappers/Lapack.cpp base/Utilities.cpp base/MathUtilities.cpp base/EularAngle.cpp base/Parameters.cpp base/atoms/Atom.cpp base/atoms/Hatom.cpp base/atoms/Liatom.cpp base/atoms/Catom.cpp base/atoms/Natom.cpp base/atoms/Oatom.cpp base/atoms/Satom.cpp base/factories/AtomFactory.cpp base/Molecule.cpp base/InputParser.cpp base/GTOExpansionSTO.cpp base/RealSphericalHarmonicsIndex.cpp base/loggers/MOLogger.cpp base/loggers/DensityLogger.cpp base/loggers/HoleDensityLogger.cpp base/loggers/ParticleDensityLogger.cpp cndo/Cndo2.cpp indo/Indo.cpp zindo/ZindoS.cpp mndo/Mndo.cpp am1/Am1.cpp am1/Am1D.cpp pm3/Pm3.cpp pm3/Pm3D.cpp pm3/Pm3Pddg.cpp base/factories/ElectronicStructureFactory.cpp md/MD.cpp mc/MC.cpp rpmd/RPMD.cpp nasco/NASCO.cpp optimization/Optimizer.cpp optimization/ConjugateGradient.cpp optimization/SteepestDescent.cpp optimization/BFGS.cpp optimization/GEDIIS.cpp base/factories/OptimizerFactory.cpp base/MolDS.cpp Main.cpp | |
38 | -ALL_HEAD_FILES = config.h base/Enums.h base/Uncopyable.h base/PrintController.h base/MolDSException.h base/containers/ThreadSafeQueue.h base/MallocerFreer.h mpi/MpiInt.h mpi/MpiProcess.h mpi/AsyncCommunicator.h wrappers/Blas.h wrappers/Lapack.h base/Utilities.h base/MathUtilities.h base/EularAngle.h base/Parameters.h base/atoms/Atom.h base/atoms/Hatom.h base/atoms/Liatom.h base/atoms/Catom.h base/atoms/Natom.h base/atoms/Oatom.h base/atoms/Satom.h base/factories/AtomFactory.h base/Molecule.h base/InputParser.h base/GTOExpansionSTO.h base/RealSphericalHarmonicsIndex.h base/loggers/MOLogger.h base/loggers/DensityLogger.h base/loggers/HoleDensityLogger.h base/loggers/ParticleDensityLogger.h base/ElectronicStructure.h cndo/Cndo2.h cndo/ReducedOverlapAOsParameters.h indo/Indo.h zindo/ZindoS.h mndo/Mndo.h am1/Am1.h am1/Am1D.h pm3/Pm3.h pm3/Pm3D.h pm3/Pm3Pddg.h base/factories/ElectronicStructureFactory.h md/MD.h mc/MC.h rpmd/RPMD.h nasco/NASCO.h optimization/Optimizer.h optimization/ConjugateGradient.h optimization/SteepestDescent.h optimization/BFGS.h optimization/GEDIIS.h base/factories/OptimizerFactory.h base/MolDS.h | |
39 | -ALL_OBJ_FILES = obj/Enums.o obj/PrintController.o obj/MolDSException.o obj/MallocerFreer.o obj/MpiProcess.o obj/AsyncCommunicator.o obj/Blas.o obj/Lapack.o obj/Utilities.o obj/MathUtilities.o obj/EularAngle.o obj/Parameters.o obj/Atom.o obj/Hatom.o obj/Liatom.o obj/Catom.o obj/Natom.o obj/Oatom.o obj/Satom.o obj/AtomFactory.o obj/Molecule.o obj/InputParser.o obj/GTOExpansionSTO.o obj/RealSphericalHarmonicsIndex.o obj/MOLogger.o obj/DensityLogger.o obj/HoleDensityLogger.o obj/ParticleDensityLogger.o obj/Cndo2.o obj/Indo.o obj/ZindoS.o obj/Mndo.o obj/Am1.o obj/Am1D.o obj/Pm3.o obj/Pm3D.o obj/Pm3Pddg.o obj/ElectronicStructureFactory.o obj/MD.o obj/MC.o obj/RPMD.o obj/NASCO.o obj/Optimizer.o obj/ConjugateGradient.o obj/SteepestDescent.o obj/BFGS.o obj/GEDIIS.o obj/OptimizerFactory.o obj/MolDS.o obj/Main.o | |
37 | +ALL_CPP_FILES = base/Enums.cpp base/PrintController.cpp base/MolDSException.cpp base/MallocerFreer.cpp mpi/MpiProcess.cpp mpi/AsyncCommunicator.cpp wrappers/Blas.cpp wrappers/Lapack.cpp base/Utilities.cpp base/MathUtilities.cpp base/EularAngle.cpp base/Parameters.cpp base/atoms/Atom.cpp base/atoms/Hatom.cpp base/atoms/Liatom.cpp base/atoms/Catom.cpp base/atoms/Natom.cpp base/atoms/Oatom.cpp base/atoms/Satom.cpp base/atoms/mm/EnvironmentalPointCharge.cpp base/factories/AtomFactory.cpp base/Molecule.cpp base/InputParser.cpp base/GTOExpansionSTO.cpp base/RealSphericalHarmonicsIndex.cpp base/loggers/MOLogger.cpp base/loggers/DensityLogger.cpp base/loggers/HoleDensityLogger.cpp base/loggers/ParticleDensityLogger.cpp cndo/Cndo2.cpp indo/Indo.cpp zindo/ZindoS.cpp mndo/Mndo.cpp am1/Am1.cpp am1/Am1D.cpp pm3/Pm3.cpp pm3/Pm3D.cpp pm3/Pm3Pddg.cpp base/factories/ElectronicStructureFactory.cpp md/MD.cpp mc/MC.cpp rpmd/RPMD.cpp nasco/NASCO.cpp optimization/Optimizer.cpp optimization/ConjugateGradient.cpp optimization/SteepestDescent.cpp optimization/BFGS.cpp optimization/GEDIIS.cpp base/factories/OptimizerFactory.cpp base/MolDS.cpp Main.cpp | |
38 | +ALL_HEAD_FILES = config.h base/Enums.h base/Uncopyable.h base/PrintController.h base/MolDSException.h base/containers/ThreadSafeQueue.h base/MallocerFreer.h mpi/MpiInt.h mpi/MpiProcess.h mpi/AsyncCommunicator.h wrappers/Blas.h wrappers/Lapack.h base/Utilities.h base/MathUtilities.h base/EularAngle.h base/Parameters.h base/atoms/Atom.h base/atoms/Hatom.h base/atoms/Liatom.h base/atoms/Catom.h base/atoms/Natom.h base/atoms/Oatom.h base/atoms/Satom.h base/atoms/mm/EnvironmentalPointCharge.h base/factories/AtomFactory.h base/Molecule.h base/InputParser.h base/GTOExpansionSTO.h base/RealSphericalHarmonicsIndex.h base/loggers/MOLogger.h base/loggers/DensityLogger.h base/loggers/HoleDensityLogger.h base/loggers/ParticleDensityLogger.h base/ElectronicStructure.h cndo/Cndo2.h cndo/ReducedOverlapAOsParameters.h indo/Indo.h zindo/ZindoS.h mndo/Mndo.h am1/Am1.h am1/Am1D.h pm3/Pm3.h pm3/Pm3D.h pm3/Pm3Pddg.h base/factories/ElectronicStructureFactory.h md/MD.h mc/MC.h rpmd/RPMD.h nasco/NASCO.h optimization/Optimizer.h optimization/ConjugateGradient.h optimization/SteepestDescent.h optimization/BFGS.h optimization/GEDIIS.h base/factories/OptimizerFactory.h base/MolDS.h | |
39 | +ALL_OBJ_FILES = obj/Enums.o obj/PrintController.o obj/MolDSException.o obj/MallocerFreer.o obj/MpiProcess.o obj/AsyncCommunicator.o obj/Blas.o obj/Lapack.o obj/Utilities.o obj/MathUtilities.o obj/EularAngle.o obj/Parameters.o obj/Atom.o obj/Hatom.o obj/Liatom.o obj/Catom.o obj/Natom.o obj/Oatom.o obj/Satom.o obj/EnvironmentalPointCharge.o obj/AtomFactory.o obj/Molecule.o obj/InputParser.o obj/GTOExpansionSTO.o obj/RealSphericalHarmonicsIndex.o obj/MOLogger.o obj/DensityLogger.o obj/HoleDensityLogger.o obj/ParticleDensityLogger.o obj/Cndo2.o obj/Indo.o obj/ZindoS.o obj/Mndo.o obj/Am1.o obj/Am1D.o obj/Pm3.o obj/Pm3D.o obj/Pm3Pddg.o obj/ElectronicStructureFactory.o obj/MD.o obj/MC.o obj/RPMD.o obj/NASCO.o obj/Optimizer.o obj/ConjugateGradient.o obj/SteepestDescent.o obj/BFGS.o obj/GEDIIS.o obj/OptimizerFactory.o obj/MolDS.o obj/Main.o | |
40 | 40 | |
41 | 41 | $(EXENAME): $(ALL_OBJ_FILES) |
42 | 42 | $(CC) -o $@ $(LDFLAGS) -Wl,-rpath=$(BOOST_LIB_DIR) -Wl,-rpath=$(OPENBLAS_LIB_DIR) $(LDFLAGS) $(ALL_OBJ_FILES) -L$(BOOST_LIB_DIR) -L$(OPENBLAS_LIB_DIR) $(LIBS) |
@@ -81,31 +81,39 @@ void Am1::SetMessages(){ | ||
81 | 81 | = "Error in am1::Am1::CalcCISMatrix: Non available orbital is contained.\n"; |
82 | 82 | this->errorMessageDavidsonNotConverged = "Error in am1::Am1::DoCISDavidson: Davidson did not met convergence criterion. \n"; |
83 | 83 | this->errorMessageGetSemiEmpiricalMultipoleInteractionBadMultipoles |
84 | - = "Error in am1:: Am1::GetSemiEmpiricalMultipoleInteraction: Bad multipole combintaion is set\n"; | |
84 | + = "Error in am1::Am1::GetSemiEmpiricalMultipoleInteraction: Bad multipole combintaion is set\n"; | |
85 | + this->errorMessageGetSemiEmpiricalMultipoleInteractionBadAtomTypes | |
86 | + = "Error in am1::Am1::GetSemiEmpiricalMultipoleInteraction: Bad atom types are set\n"; | |
85 | 87 | this->errorMessageGetSemiEmpiricalMultipoleInteraction1stDeriBadMultipoles |
86 | - = "Error in am1:: Am1::GetSemiEmpiricalMultipoleInteraction1stDerivative: Bad multipole combintaion is set\n"; | |
88 | + = "Error in am1::Am1::GetSemiEmpiricalMultipoleInteraction1stDerivative: Bad multipole combintaion is set\n"; | |
87 | 89 | this->errorMessageGetSemiEmpiricalMultipoleInteraction2ndDeriBadMultipoles |
88 | - = "Error in am1:: Am1::GetSemiEmpiricalMultipoleInteraction2ndDerivative: Bad multipole combintaion is set\n"; | |
90 | + = "Error in am1::Am1::GetSemiEmpiricalMultipoleInteraction2ndDerivative: Bad multipole combintaion is set\n"; | |
89 | 91 | this->errorMessageGetNddoRepulsionIntegral |
90 | 92 | = "Error in am1::Am1::GetNddoRepulsionIntegral: Bad orbital is set.\n"; |
93 | + this->errorMessageGetNddoRepulsionIntegralBadAtomTypes | |
94 | + = "Error in am1::Am1::GetNddoRepulsionIntegral: Bad atom types are set.\n"; | |
91 | 95 | this->errorMessageGetNddoRepulsionIntegral1stDerivative |
92 | 96 | = "Error in am1::Am1::GetNddoRepulsionIntegral1stDerivative: Bad orbital is set.\n"; |
93 | 97 | this->errorMessageGetNddoRepulsionIntegral2ndDerivative |
94 | 98 | = "Error in am1::Am1::GetNddoRepulsionIntegral2ndDerivative: Bad orbital is set.\n"; |
95 | - this->errorMessageCalcTwoElecTwoCoreNullMatrix | |
96 | - = "Error in am1::Am1::CalcTwoElecTwoCore: The two elec two core matrix is NULL.\n"; | |
97 | - this->errorMessageCalcDiatomicTwoElecTwoCoreSameAtoms | |
98 | - = "Error in am1::Am1::CalcDiatomicTwoElecTwoCore: Atom A and B is same.\n"; | |
99 | - this->errorMessageCalcDiatomicTwoElecTwoCore1stDerivativesSameAtoms | |
100 | - = "Error in am1::Am1::CalcDiatomicTwoElecTwoCore1stDerivatives: Atom A and B is same.\n"; | |
101 | - this->errorMessageCalcDiatomicTwoElecTwoCore2ndDerivativesSameAtoms | |
102 | - = "Error in am1::Am1::CalcDiatomicTwoElecTwoCore2ndDerivatives: Atom A and B is same.\n"; | |
103 | - this->errorMessageCalcDiatomicTwoElecTwoCoreNullMatrix | |
104 | - = "Error in am1::Am1::CalcDiatomicTwoElecTwoCore: The two elec two core diatomic matrix is NULL.\n"; | |
105 | - this->errorMessageCalcDiatomicTwoElecTwoCore1stDerivativesNullMatrix | |
106 | - = "Error in am1::Am1::CalcDiatomicTwoElecTwoCore1stDerivatives: The two elec two core diatomic matrix is NULL.\n"; | |
107 | - this->errorMessageCalcDiatomicTwoElecTwoCore2ndDerivativesNullMatrix | |
108 | - = "Error in am1::Am1::CalcDiatomicTwoElecTwoCore2ndDerivatives: The two elec two core diatomic matrix is NULL.\n"; | |
99 | + this->errorMessageCalcTwoElecsTwoAtomCoresNullMatrix | |
100 | + = "Error in am1::Am1::CalcTwoElecsTwoAtomCores: The two elec two atom core matrix is NULL.\n"; | |
101 | + this->errorMessageCalcTwoElecsAtomEpcCoresNullMatrix | |
102 | + = "Error in am1::Am1::CalcTwoElecsAtomEpcCores: The two elec atom-epc core matrix is NULL.\n"; | |
103 | + this->errorMessageCalcDiatomicTwoElecsTwoCoresSameAtoms | |
104 | + = "Error in am1::Am1::CalcDiatomicTwoElecsTwoCores: Atom A and B is same atom (not EPC).\n"; | |
105 | + this->errorMessageCalcDiatomicTwoElecsTwoCoresSameEpcs | |
106 | + = "Error in am1::Am1::CalcDiatomicTwoElecsTwoCores: Atom A and B is same EPC.\n"; | |
107 | + this->errorMessageCalcDiatomicTwoElecsTwoCores1stDerivativesSameAtoms | |
108 | + = "Error in am1::Am1::CalcDiatomicTwoElecsTwoCores1stDerivatives: Atom A and B is same.\n"; | |
109 | + this->errorMessageCalcDiatomicTwoElecsTwoCores2ndDerivativesSameAtoms | |
110 | + = "Error in am1::Am1::CalcDiatomicTwoElecsTwoCores2ndDerivatives: Atom A and B is same.\n"; | |
111 | + this->errorMessageCalcDiatomicTwoElecsTwoCoresNullMatrix | |
112 | + = "Error in am1::Am1::CalcDiatomicTwoElecsTwoCores: The two elec two core diatomic matrix is NULL.\n"; | |
113 | + this->errorMessageCalcDiatomicTwoElecsTwoCores1stDerivativesNullMatrix | |
114 | + = "Error in am1::Am1::CalcDiatomicTwoElecsTwoCores1stDerivatives: The two elec two core diatomic matrix is NULL.\n"; | |
115 | + this->errorMessageCalcDiatomicTwoElecsTwoCores2ndDerivativesNullMatrix | |
116 | + = "Error in am1::Am1::CalcDiatomicTwoElecsTwoCores2ndDerivatives: The two elec two core diatomic matrix is NULL.\n"; | |
109 | 117 | this->errorMessageGetElectronicEnergyEnergyNotCalculated |
110 | 118 | = "Error in am1::Am1::GetElectronicEnergy: Set electronic state is not calculated by CIS.\n"; |
111 | 119 | this->errorMessageGetElectronicEnergyNULLCISEnergy |
@@ -84,30 +84,38 @@ void Am1D::SetMessages(){ | ||
84 | 84 | this->errorMessageDavidsonNotConverged = "Error in am1::Am1D::DoCISDavidson: Davidson did not met convergence criterion. \n"; |
85 | 85 | this->errorMessageGetSemiEmpiricalMultipoleInteractionBadMultipoles |
86 | 86 | = "Error in am1::Am1D::GetSemiEmpiricalMultipoleInteraction: Bad multipole combintaion is set\n"; |
87 | + this->errorMessageGetSemiEmpiricalMultipoleInteractionBadAtomTypes | |
88 | + = "Error in am1::Am1D::GetSemiEmpiricalMultipoleInteraction: Bad atom types are set\n"; | |
87 | 89 | this->errorMessageGetSemiEmpiricalMultipoleInteraction1stDeriBadMultipoles |
88 | 90 | = "Error in am1::Am1D::GetSemiEmpiricalMultipoleInteraction1stDerivative: Bad multipole combintaion is set\n"; |
89 | 91 | this->errorMessageGetSemiEmpiricalMultipoleInteraction2ndDeriBadMultipoles |
90 | 92 | = "Error in am1::Am1D::GetSemiEmpiricalMultipoleInteraction2ndDerivative: Bad multipole combintaion is set\n"; |
91 | 93 | this->errorMessageGetNddoRepulsionIntegral |
92 | 94 | = "Error in am1::Am1D::GetNddoRepulsionIntegral: Bad orbital is set.\n"; |
95 | + this->errorMessageGetNddoRepulsionIntegralBadAtomTypes | |
96 | + = "Error in am1::Am1D::GetNddoRepulsionIntegral: Bad atom types are set.\n"; | |
93 | 97 | this->errorMessageGetNddoRepulsionIntegral1stDerivative |
94 | 98 | = "Error in am1::Am1D::GetNddoRepulsionIntegral1stDerivative: Bad orbital is set.\n"; |
95 | 99 | this->errorMessageGetNddoRepulsionIntegral2ndDerivative |
96 | 100 | = "Error in am1::Am1D::GetNddoRepulsionIntegral2ndDerivative: Bad orbital is set.\n"; |
97 | - this->errorMessageCalcTwoElecTwoCoreNullMatrix | |
98 | - = "Error in am1::Am1D::CalcTwoElecTwoCore: The two elec two core matrix is NULL.\n"; | |
99 | - this->errorMessageCalcDiatomicTwoElecTwoCoreSameAtoms | |
100 | - = "Error in am1::Am1D::CalcDiatomicTwoElecTwoCore: Atom A and B is same.\n"; | |
101 | - this->errorMessageCalcDiatomicTwoElecTwoCore1stDerivativesSameAtoms | |
102 | - = "Error in am1::Am1D::CalcDiatomicTwoElecTwoCore1stDerivatives: Atom A and B is same.\n"; | |
103 | - this->errorMessageCalcDiatomicTwoElecTwoCore2ndDerivativesSameAtoms | |
104 | - = "Error in am1::Am1D::CalcDiatomicTwoElecTwoCore2ndDerivatives: Atom A and B is same.\n"; | |
105 | - this->errorMessageCalcDiatomicTwoElecTwoCoreNullMatrix | |
106 | - = "Error in am1::Am1D::CalcDiatomicTwoElecTwoCore: The two elec two core diatomic matrix is NULL.\n"; | |
107 | - this->errorMessageCalcDiatomicTwoElecTwoCore1stDerivativesNullMatrix | |
108 | - = "Error in am1::Am1D::CalcDiatomicTwoElecTwoCore1stDerivatives: The two elec two core diatomic matrix is NULL.\n"; | |
109 | - this->errorMessageCalcDiatomicTwoElecTwoCore2ndDerivativesNullMatrix | |
110 | - = "Error in am1::Am1D::CalcDiatomicTwoElecTwoCore2ndDerivatives: The two elec two core diatomic matrix is NULL.\n"; | |
101 | + this->errorMessageCalcTwoElecsTwoAtomCoresNullMatrix | |
102 | + = "Error in am1::Am1D::CalcTwoElecsTwoAtomCores: The two elec two atom core matrix is NULL.\n"; | |
103 | + this->errorMessageCalcTwoElecsAtomEpcCoresNullMatrix | |
104 | + = "Error in am1::Am1D::CalcTwoElecsAtomEpcCores: The two elec atom-epc core matrix is NULL.\n"; | |
105 | + this->errorMessageCalcDiatomicTwoElecsTwoCoresSameAtoms | |
106 | + = "Error in am1::Am1D::CalcDiatomicTwoElecsTwoCores: Atom A and B is same atom (not EPC).\n"; | |
107 | + this->errorMessageCalcDiatomicTwoElecsTwoCoresSameEpcs | |
108 | + = "Error in am1::Am1D::CalcDiatomicTwoElecsTwoCores: Atom A and B is same EPC.\n"; | |
109 | + this->errorMessageCalcDiatomicTwoElecsTwoCores1stDerivativesSameAtoms | |
110 | + = "Error in am1::Am1D::CalcDiatomicTwoElecsTwoCores1stDerivatives: Atom A and B is same.\n"; | |
111 | + this->errorMessageCalcDiatomicTwoElecsTwoCores2ndDerivativesSameAtoms | |
112 | + = "Error in am1::Am1D::CalcDiatomicTwoElecsTwoCores2ndDerivatives: Atom A and B is same.\n"; | |
113 | + this->errorMessageCalcDiatomicTwoElecsTwoCoresNullMatrix | |
114 | + = "Error in am1::Am1D::CalcDiatomicTwoElecsTwoCores: The two elec two core diatomic matrix is NULL.\n"; | |
115 | + this->errorMessageCalcDiatomicTwoElecsTwoCores1stDerivativesNullMatrix | |
116 | + = "Error in am1::Am1D::CalcDiatomicTwoElecsTwoCores1stDerivatives: The two elec two core diatomic matrix is NULL.\n"; | |
117 | + this->errorMessageCalcDiatomicTwoElecsTwoCores2ndDerivativesNullMatrix | |
118 | + = "Error in am1::Am1D::CalcDiatomicTwoElecsTwoCores2ndDerivatives: The two elec two core diatomic matrix is NULL.\n"; | |
111 | 119 | this->errorMessageGetElectronicEnergyEnergyNotCalculated |
112 | 120 | = "Error in am1::Am1D::GetElectronicEnergy: Set electronic state is not calculated by CIS.\n"; |
113 | 121 | this->errorMessageGetElectronicEnergyNULLCISEnergy |
@@ -125,6 +125,7 @@ RENUMSTR_BEGIN( AtomType, AtomTypeStr ) | ||
125 | 125 | RENUMSTR( S, "S" ) |
126 | 126 | RENUMSTR( Cl, "Cl" ) |
127 | 127 | RENUMSTR( Ar, "Ar" ) |
128 | + RENUMSTR( EPC, "Environmental Point Charge" ) | |
128 | 129 | RENUMSTR( AtomType_end, "AtomType_end" ) |
129 | 130 | RENUMSTR_END() |
130 | 131 |
@@ -111,235 +111,235 @@ void GTOExpansionSTO::SetCoefficientsExponents(){ | ||
111 | 111 | //STO-1G, k-shell |
112 | 112 | { |
113 | 113 | // 1s |
114 | - exponents[STO1G][k][sAzimuthal][0] = 2.709498091*pow(10.0,-1.0); coefficients[STO1G][k][sAzimuthal][0] = 1.0000; | |
114 | + exponents[STO1G][k][sAzimuthal][0] = 2.709498091e-1; coefficients[STO1G][k][sAzimuthal][0] = 1.0000; | |
115 | 115 | } |
116 | 116 | |
117 | 117 | //STO-1G, l-shell |
118 | 118 | { |
119 | 119 | // 2s |
120 | - exponents[STO1G][l][sAzimuthal][0] = 1.012151084*pow(10.0,-1.0); coefficients[STO1G][l][sAzimuthal][0] = 1.0000; | |
120 | + exponents[STO1G][l][sAzimuthal][0] = 1.012151084e-1; coefficients[STO1G][l][sAzimuthal][0] = 1.0000; | |
121 | 121 | // 2p |
122 | - exponents[STO1G][l][pAzimuthal][0] = 1.759666885*pow(10.0,-1.0); coefficients[STO1G][l][pAzimuthal][0] = 1.0000; | |
122 | + exponents[STO1G][l][pAzimuthal][0] = 1.759666885e-1; coefficients[STO1G][l][pAzimuthal][0] = 1.0000; | |
123 | 123 | } |
124 | 124 | |
125 | 125 | //STO-1G, m-shell |
126 | 126 | { |
127 | 127 | // 3s |
128 | - exponents[STO1G][m][sAzimuthal][0] = 5.296881757*pow(10.0,-2.0); coefficients[STO1G][m][sAzimuthal][0] = 1.0000; | |
128 | + exponents[STO1G][m][sAzimuthal][0] = 5.296881757e-2; coefficients[STO1G][m][sAzimuthal][0] = 1.0000; | |
129 | 129 | // 3p |
130 | - exponents[STO1G][m][pAzimuthal][0] = 9.113614253*pow(10.0,-2.0); coefficients[STO1G][m][pAzimuthal][0] = 1.0000; | |
130 | + exponents[STO1G][m][pAzimuthal][0] = 9.113614253e-2; coefficients[STO1G][m][pAzimuthal][0] = 1.0000; | |
131 | 131 | // 3d |
132 | - exponents[STO1G][m][dAzimuthal][0] = 1.302270363*pow(10.0,-1.0); coefficients[STO1G][m][dAzimuthal][0] = 1.0000; | |
132 | + exponents[STO1G][m][dAzimuthal][0] = 1.302270363e-1; coefficients[STO1G][m][dAzimuthal][0] = 1.0000; | |
133 | 133 | } |
134 | 134 | |
135 | 135 | //STO-2G, k-shell |
136 | 136 | { |
137 | 137 | // 1s |
138 | - exponents[STO2G][k][sAzimuthal][0] = 8.518186635*pow(10.0,-1.0); coefficients[STO2G][k][sAzimuthal][0] = 4.301284983*pow(10,-1.0); | |
139 | - exponents[STO2G][k][sAzimuthal][1] = 1.516232927*pow(10.0,-1.0); coefficients[STO2G][k][sAzimuthal][1] = 6.789135305*pow(10,-1.0); | |
138 | + exponents[STO2G][k][sAzimuthal][0] = 8.518186635e-1; coefficients[STO2G][k][sAzimuthal][0] = 4.301284983e-1; | |
139 | + exponents[STO2G][k][sAzimuthal][1] = 1.516232927e-1; coefficients[STO2G][k][sAzimuthal][1] = 6.789135305e-1; | |
140 | 140 | } |
141 | 141 | |
142 | 142 | //STO-2G, l-shell |
143 | 143 | { |
144 | 144 | // 2s |
145 | - exponents[STO2G][l][sAzimuthal][0] = 1.292278611*pow(10.0,-1.0); coefficients[STO2G][l][sAzimuthal][0] = 7.470867124*pow(10,-1.0); | |
146 | - exponents[STO2G][l][sAzimuthal][1] = 4.908584205*pow(10.0,-2.0); coefficients[STO2G][l][sAzimuthal][1] = 2.855980556*pow(10,-1.0); | |
145 | + exponents[STO2G][l][sAzimuthal][0] = 1.292278611e-1; coefficients[STO2G][l][sAzimuthal][0] = 7.470867124e-1; | |
146 | + exponents[STO2G][l][sAzimuthal][1] = 4.908584205e-2; coefficients[STO2G][l][sAzimuthal][1] = 2.855980556e-1; | |
147 | 147 | // 2p |
148 | - exponents[STO2G][l][pAzimuthal][0] = 4.323908358*pow(10.0,-1.0); coefficients[STO2G][l][pAzimuthal][0] = 4.522627513*pow(10,-1.0); | |
149 | - exponents[STO2G][l][pAzimuthal][1] = 1.069439065*pow(10.0,-1.0); coefficients[STO2G][l][pAzimuthal][1] = 6.713122642*pow(10,-1.0); | |
148 | + exponents[STO2G][l][pAzimuthal][0] = 4.323908358e-1; coefficients[STO2G][l][pAzimuthal][0] = 4.522627513e-1; | |
149 | + exponents[STO2G][l][pAzimuthal][1] = 1.069439065e-1; coefficients[STO2G][l][pAzimuthal][1] = 6.713122642e-1; | |
150 | 150 | } |
151 | 151 | |
152 | 152 | //STO-2G, m-shell |
153 | 153 | { |
154 | 154 | // 3s |
155 | - exponents[STO2G][m][sAzimuthal][0] = 6.694095822*pow(10.0,-1.0); coefficients[STO2G][m][sAzimuthal][0] =-1.529645716*pow(10,-1.0); | |
156 | - exponents[STO2G][m][sAzimuthal][1] = 5.837135094*pow(10.0,-2.0); coefficients[STO2G][m][sAzimuthal][1] = 1.051370110; | |
155 | + exponents[STO2G][m][sAzimuthal][0] = 6.694095822e-1; coefficients[STO2G][m][sAzimuthal][0] =-1.529645716e-1; | |
156 | + exponents[STO2G][m][sAzimuthal][1] = 5.837135094e-2; coefficients[STO2G][m][sAzimuthal][1] = 1.051370110; | |
157 | 157 | // 3p |
158 | - exponents[STO2G][m][pAzimuthal][0] = 1.458620964*pow(10.0,-1.0); coefficients[STO2G][m][pAzimuthal][0] = 5.349653144*pow(10,-1.0); | |
159 | - exponents[STO2G][m][pAzimuthal][1] = 5.664210742*pow(10.0,-2.0); coefficients[STO2G][m][pAzimuthal][1] = 5.299607212*pow(10,-1.0); | |
158 | + exponents[STO2G][m][pAzimuthal][0] = 1.458620964e-1; coefficients[STO2G][m][pAzimuthal][0] = 5.349653144e-1; | |
159 | + exponents[STO2G][m][pAzimuthal][1] = 5.664210742e-2; coefficients[STO2G][m][pAzimuthal][1] = 5.299607212e-1; | |
160 | 160 | // 3d |
161 | - exponents[STO2G][m][dAzimuthal][0] = 2.777427345*pow(10.0,-1.0); coefficients[STO2G][m][dAzimuthal][0] = 4.666137923*pow(10,-1.0); | |
162 | - exponents[STO2G][m][dAzimuthal][1] = 8.336507714*pow(10.0,-2.0); coefficients[STO2G][m][dAzimuthal][1] = 6.644706516*pow(10,-1.0); | |
161 | + exponents[STO2G][m][dAzimuthal][0] = 2.777427345e-1; coefficients[STO2G][m][dAzimuthal][0] = 4.666137923e-1; | |
162 | + exponents[STO2G][m][dAzimuthal][1] = 8.336507714e-2; coefficients[STO2G][m][dAzimuthal][1] = 6.644706516e-1; | |
163 | 163 | } |
164 | 164 | |
165 | 165 | //STO-3G, k-shell |
166 | 166 | { |
167 | 167 | // 1s |
168 | - exponents[STO3G][k][sAzimuthal][0] = 2.227660584; coefficients[STO3G][k][sAzimuthal][0] = 1.543289673*pow(10,-1.0); | |
169 | - exponents[STO3G][k][sAzimuthal][1] = 4.057711562*pow(10.0,-1.0); coefficients[STO3G][k][sAzimuthal][1] = 5.353281423*pow(10,-1.0); | |
170 | - exponents[STO3G][k][sAzimuthal][2] = 1.098175104*pow(10.0,-1.0); coefficients[STO3G][k][sAzimuthal][2] = 4.446345422*pow(10,-1.0); | |
168 | + exponents[STO3G][k][sAzimuthal][0] = 2.227660584e00; coefficients[STO3G][k][sAzimuthal][0] = 1.543289673e-1; | |
169 | + exponents[STO3G][k][sAzimuthal][1] = 4.057711562e-1; coefficients[STO3G][k][sAzimuthal][1] = 5.353281423e-1; | |
170 | + exponents[STO3G][k][sAzimuthal][2] = 1.098175104e-1; coefficients[STO3G][k][sAzimuthal][2] = 4.446345422e-1; | |
171 | 171 | } |
172 | 172 | |
173 | 173 | //STO-3G, l-shell |
174 | 174 | { |
175 | 175 | // 2s |
176 | - exponents[STO3G][l][sAzimuthal][0] = 2.581578398; coefficients[STO3G][l][sAzimuthal][0] =-5.994474934*pow(10,-2.0); | |
177 | - exponents[STO3G][l][sAzimuthal][1] = 1.567622104*pow(10.0,-1.0); coefficients[STO3G][l][sAzimuthal][1] = 5.960385398*pow(10,-1.0); | |
178 | - exponents[STO3G][l][sAzimuthal][2] = 6.018332272*pow(10.0,-2.0); coefficients[STO3G][l][sAzimuthal][2] = 4.581786291*pow(10,-1.0); | |
176 | + exponents[STO3G][l][sAzimuthal][0] = 2.581578398e00; coefficients[STO3G][l][sAzimuthal][0] =-5.994474934e-2; | |
177 | + exponents[STO3G][l][sAzimuthal][1] = 1.567622104e-1; coefficients[STO3G][l][sAzimuthal][1] = 5.960385398e-1; | |
178 | + exponents[STO3G][l][sAzimuthal][2] = 6.018332272e-2; coefficients[STO3G][l][sAzimuthal][2] = 4.581786291e-1; | |
179 | 179 | // 2p |
180 | - exponents[STO3G][l][pAzimuthal][0] = 9.192379002*pow(10.0,-1.0); coefficients[STO3G][l][pAzimuthal][0] = 1.623948553*pow(10,-1.0); | |
181 | - exponents[STO3G][l][pAzimuthal][1] = 2.359194503*pow(10.0,-1.0); coefficients[STO3G][l][pAzimuthal][1] = 5.661708862*pow(10,-1.0); | |
182 | - exponents[STO3G][l][pAzimuthal][2] = 8.009805746*pow(10.0,-2.0); coefficients[STO3G][l][pAzimuthal][2] = 4.223071752*pow(10,-1.0); | |
180 | + exponents[STO3G][l][pAzimuthal][0] = 9.192379002e-1; coefficients[STO3G][l][pAzimuthal][0] = 1.623948553e-1; | |
181 | + exponents[STO3G][l][pAzimuthal][1] = 2.359194503e-1; coefficients[STO3G][l][pAzimuthal][1] = 5.661708862e-1; | |
182 | + exponents[STO3G][l][pAzimuthal][2] = 8.009805746e-2; coefficients[STO3G][l][pAzimuthal][2] = 4.223071752e-1; | |
183 | 183 | } |
184 | 184 | |
185 | 185 | //STO-3G, m-shell |
186 | 186 | { |
187 | 187 | // 3s |
188 | - exponents[STO3G][m][sAzimuthal][0] = 5.641487709*pow(10.0,-1.0); coefficients[STO3G][m][sAzimuthal][0] =-1.782577972*pow(10,-1.0); | |
189 | - exponents[STO3G][m][sAzimuthal][1] = 6.924421391*pow(10.0,-2.0); coefficients[STO3G][m][sAzimuthal][1] = 8.612761663*pow(10,-1.0); | |
190 | - exponents[STO3G][m][sAzimuthal][2] = 3.269529097*pow(10.0,-2.0); coefficients[STO3G][m][sAzimuthal][2] = 2.261841969*pow(10,-1.0); | |
188 | + exponents[STO3G][m][sAzimuthal][0] = 5.641487709e-1; coefficients[STO3G][m][sAzimuthal][0] =-1.782577972e-1; | |
189 | + exponents[STO3G][m][sAzimuthal][1] = 6.924421391e-2; coefficients[STO3G][m][sAzimuthal][1] = 8.612761663e-1; | |
190 | + exponents[STO3G][m][sAzimuthal][2] = 3.269529097e-2; coefficients[STO3G][m][sAzimuthal][2] = 2.261841969e-1; | |
191 | 191 | // 3p |
192 | - exponents[STO3G][m][pAzimuthal][0] = 2.692880368; coefficients[STO3G][m][pAzimuthal][0] =-1.061945788*pow(10,-2.0); | |
193 | - exponents[STO3G][m][pAzimuthal][1] = 1.489359592*pow(10.0,-1.0); coefficients[STO3G][m][pAzimuthal][1] = 5.218564264*pow(10,-1.0); | |
194 | - exponents[STO3G][m][pAzimuthal][2] = 5.739585040*pow(10.0,-2.0); coefficients[STO3G][m][pAzimuthal][2] = 5.450015143*pow(10,-1.0); | |
192 | + exponents[STO3G][m][pAzimuthal][0] = 2.692880368e00; coefficients[STO3G][m][pAzimuthal][0] =-1.061945788e-2; | |
193 | + exponents[STO3G][m][pAzimuthal][1] = 1.489359592e-1; coefficients[STO3G][m][pAzimuthal][1] = 5.218564264e-1; | |
194 | + exponents[STO3G][m][pAzimuthal][2] = 5.739585040e-2; coefficients[STO3G][m][pAzimuthal][2] = 5.450015143e-1; | |
195 | 195 | // 3d |
196 | - exponents[STO3G][m][dAzimuthal][0] = 5.229112225*pow(10.0,-1.0); coefficients[STO3G][m][dAzimuthal][0] = 1.686596060*pow(10,-1.0); | |
197 | - exponents[STO3G][m][dAzimuthal][1] = 1.639595876*pow(10.0,-1.0); coefficients[STO3G][m][dAzimuthal][1] = 5.847984817*pow(10,-1.0); | |
198 | - exponents[STO3G][m][dAzimuthal][2] = 6.386630021*pow(10.0,-2.0); coefficients[STO3G][m][dAzimuthal][2] = 4.056779523*pow(10,-1.0); | |
196 | + exponents[STO3G][m][dAzimuthal][0] = 5.229112225e-1; coefficients[STO3G][m][dAzimuthal][0] = 1.686596060e-1; | |
197 | + exponents[STO3G][m][dAzimuthal][1] = 1.639595876e-1; coefficients[STO3G][m][dAzimuthal][1] = 5.847984817e-1; | |
198 | + exponents[STO3G][m][dAzimuthal][2] = 6.386630021e-2; coefficients[STO3G][m][dAzimuthal][2] = 4.056779523e-1; | |
199 | 199 | } |
200 | 200 | |
201 | 201 | //STO-4G, k-shell |
202 | 202 | { |
203 | 203 | // 1s |
204 | - exponents[STO4G][k][sAzimuthal][0] = 5.216844534; coefficients[STO4G][k][sAzimuthal][0] = 5.675242080*pow(10,-2.0); | |
205 | - exponents[STO4G][k][sAzimuthal][1] = 9.546182760*pow(10.0,-1.0); coefficients[STO4G][k][sAzimuthal][1] = 2.601413550*pow(10,-1.0); | |
206 | - exponents[STO4G][k][sAzimuthal][2] = 2.652034102*pow(10.0,-1.0); coefficients[STO4G][k][sAzimuthal][2] = 5.328461143*pow(10,-1.0); | |
207 | - exponents[STO4G][k][sAzimuthal][3] = 8.801862774*pow(10.0,-2.0); coefficients[STO4G][k][sAzimuthal][3] = 2.916254405*pow(10,-1.0); | |
204 | + exponents[STO4G][k][sAzimuthal][0] = 5.216844534e00; coefficients[STO4G][k][sAzimuthal][0] = 5.675242080e-2; | |
205 | + exponents[STO4G][k][sAzimuthal][1] = 9.546182760e-1; coefficients[STO4G][k][sAzimuthal][1] = 2.601413550e-1; | |
206 | + exponents[STO4G][k][sAzimuthal][2] = 2.652034102e-1; coefficients[STO4G][k][sAzimuthal][2] = 5.328461143e-1; | |
207 | + exponents[STO4G][k][sAzimuthal][3] = 8.801862774e-2; coefficients[STO4G][k][sAzimuthal][3] = 2.916254405e-1; | |
208 | 208 | } |
209 | 209 | |
210 | 210 | //STO-4G, l-shell |
211 | 211 | { |
212 | 212 | // 2s |
213 | - exponents[STO4G][l][sAzimuthal][0] = 1.161525551*pow(10.0, 1.0); coefficients[STO4G][l][sAzimuthal][0] =-1.198411747*pow(10,-2.0); | |
214 | - exponents[STO4G][l][sAzimuthal][1] = 2.000243111; coefficients[STO4G][l][sAzimuthal][1] =-5.472052539*pow(10,-2.0); | |
215 | - exponents[STO4G][l][sAzimuthal][2] = 1.607280687*pow(10.0,-1.0); coefficients[STO4G][l][sAzimuthal][2] = 5.805587176*pow(10,-1.0); | |
216 | - exponents[STO4G][l][sAzimuthal][3] = 6.125744532*pow(10.0,-2.0); coefficients[STO4G][l][sAzimuthal][3] = 4.770079976*pow(10,-1.0); | |
213 | + exponents[STO4G][l][sAzimuthal][0] = 1.161525551e01; coefficients[STO4G][l][sAzimuthal][0] =-1.198411747e-2; | |
214 | + exponents[STO4G][l][sAzimuthal][1] = 2.000243111e00; coefficients[STO4G][l][sAzimuthal][1] =-5.472052539e-2; | |
215 | + exponents[STO4G][l][sAzimuthal][2] = 1.607280687e-1; coefficients[STO4G][l][sAzimuthal][2] = 5.805587176e-1; | |
216 | + exponents[STO4G][l][sAzimuthal][3] = 6.125744532e-2; coefficients[STO4G][l][sAzimuthal][3] = 4.770079976e-1; | |
217 | 217 | // 2p |
218 | - exponents[STO4G][l][pAzimuthal][0] = 1.798260992; coefficients[STO4G][l][pAzimuthal][0] = 5.713170255*pow(10,-2.0); | |
219 | - exponents[STO4G][l][pAzimuthal][1] = 4.662622228*pow(10.0,-1.0); coefficients[STO4G][l][pAzimuthal][1] = 2.857455515*pow(10,-1.0); | |
220 | - exponents[STO4G][l][pAzimuthal][2] = 1.643718620*pow(10.0,-1.0); coefficients[STO4G][l][pAzimuthal][2] = 5.517873105*pow(10,-1.0); | |
221 | - exponents[STO4G][l][pAzimuthal][3] = 6.543927065*pow(10.0,-2.0); coefficients[STO4G][l][pAzimuthal][3] = 2.632314924*pow(10,-1.0); | |
218 | + exponents[STO4G][l][pAzimuthal][0] = 1.798260992e00; coefficients[STO4G][l][pAzimuthal][0] = 5.713170255e-2; | |
219 | + exponents[STO4G][l][pAzimuthal][1] = 4.662622228e-1; coefficients[STO4G][l][pAzimuthal][1] = 2.857455515e-1; | |
220 | + exponents[STO4G][l][pAzimuthal][2] = 1.643718620e-1; coefficients[STO4G][l][pAzimuthal][2] = 5.517873105e-1; | |
221 | + exponents[STO4G][l][pAzimuthal][3] = 6.543927065e-2; coefficients[STO4G][l][pAzimuthal][3] = 2.632314924e-1; | |
222 | 222 | } |
223 | 223 | |
224 | 224 | //STO-4G, m-shell |
225 | 225 | { |
226 | 226 | // 3s |
227 | - exponents[STO4G][m][sAzimuthal][0] = 1.513265591; coefficients[STO4G][m][sAzimuthal][0] =-3.295496352*pow(10,-2.0); | |
228 | - exponents[STO4G][m][sAzimuthal][1] = 4.262497508*pow(10.0,-1.0); coefficients[STO4G][m][sAzimuthal][1] =-1.724516959*pow(10,-1.0); | |
229 | - exponents[STO4G][m][sAzimuthal][2] = 7.643320863*pow(10.0,-2.0); coefficients[STO4G][m][sAzimuthal][2] = 7.518511194*pow(10,-1.0); | |
230 | - exponents[STO4G][m][sAzimuthal][3] = 3.760545063*pow(10.0,-2.0); coefficients[STO4G][m][sAzimuthal][3] = 3.589627317*pow(10,-1.0); | |
227 | + exponents[STO4G][m][sAzimuthal][0] = 1.513265591e00; coefficients[STO4G][m][sAzimuthal][0] =-3.295496352e-2; | |
228 | + exponents[STO4G][m][sAzimuthal][1] = 4.262497508e-1; coefficients[STO4G][m][sAzimuthal][1] =-1.724516959e-1; | |
229 | + exponents[STO4G][m][sAzimuthal][2] = 7.643320863e-2; coefficients[STO4G][m][sAzimuthal][2] = 7.518511194e-1; | |
230 | + exponents[STO4G][m][sAzimuthal][3] = 3.760545063e-2; coefficients[STO4G][m][sAzimuthal][3] = 3.589627317e-1; | |
231 | 231 | // 3p |
232 | - exponents[STO4G][m][pAzimuthal][0] = 1.853180239; coefficients[STO4G][m][pAzimuthal][0] =-1.434249391*pow(10,-2.0); | |
233 | - exponents[STO4G][m][pAzimuthal][1] = 1.915075719*pow(10.0,-1.0); coefficients[STO4G][m][pAzimuthal][1] = 2.755177589*pow(10,-1.0); | |
234 | - exponents[STO4G][m][pAzimuthal][2] = 8.655487938*pow(10.0,-2.0); coefficients[STO4G][m][pAzimuthal][2] = 5.846750879*pow(10,-1.0); | |
235 | - exponents[STO4G][m][pAzimuthal][3] = 4.184253862*pow(10.0,-2.0); coefficients[STO4G][m][pAzimuthal][3] = 2.144986514*pow(10,-1.0); | |
232 | + exponents[STO4G][m][pAzimuthal][0] = 1.853180239e00; coefficients[STO4G][m][pAzimuthal][0] =-1.434249391e-2; | |
233 | + exponents[STO4G][m][pAzimuthal][1] = 1.915075719e-1; coefficients[STO4G][m][pAzimuthal][1] = 2.755177589e-1; | |
234 | + exponents[STO4G][m][pAzimuthal][2] = 8.655487938e-2; coefficients[STO4G][m][pAzimuthal][2] = 5.846750879e-1; | |
235 | + exponents[STO4G][m][pAzimuthal][3] = 4.184253862e-2; coefficients[STO4G][m][pAzimuthal][3] = 2.144986514e-1; | |
236 | 236 | // 3d |
237 | - exponents[STO4G][m][dAzimuthal][0] = 9.185846715*pow(10.0,-1.0); coefficients[STO4G][m][dAzimuthal][0] = 5.799057705*pow(10,-2.0); | |
238 | - exponents[STO4G][m][dAzimuthal][1] = 2.920461109*pow(10.0,-1.0); coefficients[STO4G][m][dAzimuthal][1] = 3.045581349*pow(10,-1.0); | |
239 | - exponents[STO4G][m][dAzimuthal][2] = 1.187568890*pow(10.0,-1.0); coefficients[STO4G][m][dAzimuthal][2] = 5.601358038*pow(10,-1.0); | |
240 | - exponents[STO4G][m][dAzimuthal][3] = 5.286755896*pow(10.0,-2.0); coefficients[STO4G][m][dAzimuthal][3] = 2.432423313*pow(10,-1.0); | |
237 | + exponents[STO4G][m][dAzimuthal][0] = 9.185846715e-1; coefficients[STO4G][m][dAzimuthal][0] = 5.799057705e-2; | |
238 | + exponents[STO4G][m][dAzimuthal][1] = 2.920461109e-1; coefficients[STO4G][m][dAzimuthal][1] = 3.045581349e-1; | |
239 | + exponents[STO4G][m][dAzimuthal][2] = 1.187568890e-1; coefficients[STO4G][m][dAzimuthal][2] = 5.601358038e-1; | |
240 | + exponents[STO4G][m][dAzimuthal][3] = 5.286755896e-2; coefficients[STO4G][m][dAzimuthal][3] = 2.432423313e-1; | |
241 | 241 | } |
242 | 242 | |
243 | 243 | //STO-5G, k-shell |
244 | 244 | { |
245 | 245 | // 1s |
246 | - exponents[STO5G][k][sAzimuthal][0] = 1.130563696*pow(10.0, 1.0); coefficients[STO5G][k][sAzimuthal][0] = 2.214055312*pow(10,-2.0); | |
247 | - exponents[STO5G][k][sAzimuthal][1] = 2.071728178; coefficients[STO5G][k][sAzimuthal][1] = 1.135411520*pow(10,-1.0); | |
248 | - exponents[STO5G][k][sAzimuthal][2] = 5.786484833*pow(10.0,-1.0); coefficients[STO5G][k][sAzimuthal][2] = 3.318161484*pow(10,-1.0); | |
249 | - exponents[STO5G][k][sAzimuthal][3] = 1.975724573*pow(10.0,-1.0); coefficients[STO5G][k][sAzimuthal][3] = 4.825700713*pow(10,-1.0); | |
250 | - exponents[STO5G][k][sAzimuthal][4] = 7.445271746*pow(10.0,-2.0); coefficients[STO5G][k][sAzimuthal][4] = 1.935721966*pow(10,-1.0); | |
246 | + exponents[STO5G][k][sAzimuthal][0] = 1.130563696e01; coefficients[STO5G][k][sAzimuthal][0] = 2.214055312e-2; | |
247 | + exponents[STO5G][k][sAzimuthal][1] = 2.071728178e00; coefficients[STO5G][k][sAzimuthal][1] = 1.135411520e-1; | |
248 | + exponents[STO5G][k][sAzimuthal][2] = 5.786484833e-1; coefficients[STO5G][k][sAzimuthal][2] = 3.318161484e-1; | |
249 | + exponents[STO5G][k][sAzimuthal][3] = 1.975724573e-1; coefficients[STO5G][k][sAzimuthal][3] = 4.825700713e-1; | |
250 | + exponents[STO5G][k][sAzimuthal][4] = 7.445271746e-2; coefficients[STO5G][k][sAzimuthal][4] = 1.935721966e-1; | |
251 | 251 | } |
252 | 252 | |
253 | 253 | //STO-5G, l-shell |
254 | 254 | { |
255 | 255 | // 2s |
256 | - exponents[STO5G][l][sAzimuthal][0] = 8.984956862; coefficients[STO5G][l][sAzimuthal][0] =-1.596349096*pow(10,-2.0); | |
257 | - exponents[STO5G][l][sAzimuthal][1] = 1.673710636; coefficients[STO5G][l][sAzimuthal][1] =-5.685884883*pow(10,-2.0); | |
258 | - exponents[STO5G][l][sAzimuthal][2] = 1.944726668*pow(10.0,-1.0); coefficients[STO5G][l][sAzimuthal][2] = 3.698265599*pow(10,-1.0); | |
259 | - exponents[STO5G][l][sAzimuthal][3] = 8.806345634*pow(10.0,-2.0); coefficients[STO5G][l][sAzimuthal][3] = 5.480512593*pow(10,-1.0); | |
260 | - exponents[STO5G][l][sAzimuthal][4] = 4.249068522*pow(10.0,-2.0); coefficients[STO5G][l][sAzimuthal][4] = 1.472634893*pow(10,-1.0); | |
256 | + exponents[STO5G][l][sAzimuthal][0] = 8.984956862e00; coefficients[STO5G][l][sAzimuthal][0] =-1.596349096e-2; | |
257 | + exponents[STO5G][l][sAzimuthal][1] = 1.673710636e00; coefficients[STO5G][l][sAzimuthal][1] =-5.685884883e-2; | |
258 | + exponents[STO5G][l][sAzimuthal][2] = 1.944726668e-1; coefficients[STO5G][l][sAzimuthal][2] = 3.698265599e-1; | |
259 | + exponents[STO5G][l][sAzimuthal][3] = 8.806345634e-2; coefficients[STO5G][l][sAzimuthal][3] = 5.480512593e-1; | |
260 | + exponents[STO5G][l][sAzimuthal][4] = 4.249068522e-2; coefficients[STO5G][l][sAzimuthal][4] = 1.472634893e-1; | |
261 | 261 | // 2p |
262 | - exponents[STO5G][l][pAzimuthal][0] = 3.320386533; coefficients[STO5G][l][pAzimuthal][0] = 2.079051117*pow(10,-2.0); | |
263 | - exponents[STO5G][l][pAzimuthal][1] = 8.643257633*pow(10.0,-1.0); coefficients[STO5G][l][pAzimuthal][1] = 1.235472099*pow(10,-1.0); | |
264 | - exponents[STO5G][l][pAzimuthal][2] = 3.079819284*pow(10.0,-1.0); coefficients[STO5G][l][pAzimuthal][2] = 3.667738986*pow(10,-1.0); | |
265 | - exponents[STO5G][l][pAzimuthal][3] = 1.273309895*pow(10.0,-1.0); coefficients[STO5G][l][pAzimuthal][3] = 4.834930290*pow(10,-1.0); | |
266 | - exponents[STO5G][l][pAzimuthal][4] = 5.606243164*pow(10.0,-2.0); coefficients[STO5G][l][pAzimuthal][4] = 1.653444074*pow(10,-1.0); | |
262 | + exponents[STO5G][l][pAzimuthal][0] = 3.320386533e00; coefficients[STO5G][l][pAzimuthal][0] = 2.079051117e-2; | |
263 | + exponents[STO5G][l][pAzimuthal][1] = 8.643257633e-1; coefficients[STO5G][l][pAzimuthal][1] = 1.235472099e-1; | |
264 | + exponents[STO5G][l][pAzimuthal][2] = 3.079819284e-1; coefficients[STO5G][l][pAzimuthal][2] = 3.667738986e-1; | |
265 | + exponents[STO5G][l][pAzimuthal][3] = 1.273309895e-1; coefficients[STO5G][l][pAzimuthal][3] = 4.834930290e-1; | |
266 | + exponents[STO5G][l][pAzimuthal][4] = 5.606243164e-2; coefficients[STO5G][l][pAzimuthal][4] = 1.653444074e-1; | |
267 | 267 | } |
268 | 268 | |
269 | 269 | //STO-5G, m-shell |
270 | 270 | { |
271 | 271 | // 3s |
272 | - exponents[STO5G][m][sAzimuthal][0] = 4.275877914; coefficients[STO5G][m][sAzimuthal][0] =-3.920358850*pow(10,-3.0); | |
273 | - exponents[STO5G][m][sAzimuthal][1] = 1.132409433; coefficients[STO5G][m][sAzimuthal][1] =-4.168430506*pow(10,-2.0); | |
274 | - exponents[STO5G][m][sAzimuthal][2] = 4.016256968*pow(10.0,-1.0); coefficients[STO5G][m][sAzimuthal][2] =-1.637440990*pow(10,-1.0); | |
275 | - exponents[STO5G][m][sAzimuthal][3] = 7.732370620*pow(10.0,-2.0); coefficients[STO5G][m][sAzimuthal][3] = 7.419373723*pow(10,-1.0); | |
276 | - exponents[STO5G][m][sAzimuthal][4] = 3.800708627*pow(10.0,-2.0); coefficients[STO5G][m][sAzimuthal][4] = 3.724364929*pow(10,-1.0); | |
272 | + exponents[STO5G][m][sAzimuthal][0] = 4.275877914e00; coefficients[STO5G][m][sAzimuthal][0] =-3.920358850e-3; | |
273 | + exponents[STO5G][m][sAzimuthal][1] = 1.132409433e00; coefficients[STO5G][m][sAzimuthal][1] =-4.168430506e-2; | |
274 | + exponents[STO5G][m][sAzimuthal][2] = 4.016256968e-1; coefficients[STO5G][m][sAzimuthal][2] =-1.637440990e-1; | |
275 | + exponents[STO5G][m][sAzimuthal][3] = 7.732370620e-2; coefficients[STO5G][m][sAzimuthal][3] = 7.419373723e-1; | |
276 | + exponents[STO5G][m][sAzimuthal][4] = 3.800708627e-2; coefficients[STO5G][m][sAzimuthal][4] = 3.724364929e-1; | |
277 | 277 | // 3p |
278 | - exponents[STO5G][m][pAzimuthal][0] = 6.466803859; coefficients[STO5G][m][pAzimuthal][0] =-2.329023747*pow(10,-3.0); | |
279 | - exponents[STO5G][m][pAzimuthal][1] = 1.555914802; coefficients[STO5G][m][pAzimuthal][1] =-1.357395221*pow(10,-2.0); | |
280 | - exponents[STO5G][m][pAzimuthal][2] = 1.955925255*pow(10.0,-1.0); coefficients[STO5G][m][pAzimuthal][2] = 2.632185383*pow(10,-1.0); | |
281 | - exponents[STO5G][m][pAzimuthal][3] = 8.809647701*pow(10.0,-2.0); coefficients[STO5G][m][pAzimuthal][3] = 5.880427024*pow(10,-1.0); | |
282 | - exponents[STO5G][m][pAzimuthal][4] = 4.234835707*pow(10.0,-2.0); coefficients[STO5G][m][pAzimuthal][4] = 2.242794445*pow(10,-1.0); | |
278 | + exponents[STO5G][m][pAzimuthal][0] = 6.466803859e00; coefficients[STO5G][m][pAzimuthal][0] =-2.329023747e-3; | |
279 | + exponents[STO5G][m][pAzimuthal][1] = 1.555914802e00; coefficients[STO5G][m][pAzimuthal][1] =-1.357395221e-2; | |
280 | + exponents[STO5G][m][pAzimuthal][2] = 1.955925255e-1; coefficients[STO5G][m][pAzimuthal][2] = 2.632185383e-1; | |
281 | + exponents[STO5G][m][pAzimuthal][3] = 8.809647701e-2; coefficients[STO5G][m][pAzimuthal][3] = 5.880427024e-1; | |
282 | + exponents[STO5G][m][pAzimuthal][4] = 4.234835707e-2; coefficients[STO5G][m][pAzimuthal][4] = 2.242794445e-1; | |
283 | 283 | // 3d |
284 | - exponents[STO5G][m][dAzimuthal][0] = 1.539033958; coefficients[STO5G][m][dAzimuthal][0] = 2.020869128*pow(10,-2.0); | |
285 | - exponents[STO5G][m][dAzimuthal][1] = 4.922090297*pow(10.0,-1.0); coefficients[STO5G][m][dAzimuthal][1] = 1.321157923*pow(10,-1.0); | |
286 | - exponents[STO5G][m][dAzimuthal][2] = 2.029756928*pow(10.0,-1.0); coefficients[STO5G][m][dAzimuthal][2] = 3.911240346*pow(10,-1.0); | |
287 | - exponents[STO5G][m][dAzimuthal][3] = 9.424112917*pow(10.0,-2.0); coefficients[STO5G][m][dAzimuthal][3] = 4.779609701*pow(10,-1.0); | |
288 | - exponents[STO5G][m][dAzimuthal][4] = 4.569058269*pow(10.0,-2.0); coefficients[STO5G][m][dAzimuthal][4] = 1.463662294*pow(10,-1.0); | |
284 | + exponents[STO5G][m][dAzimuthal][0] = 1.539033958e00; coefficients[STO5G][m][dAzimuthal][0] = 2.020869128e-2; | |
285 | + exponents[STO5G][m][dAzimuthal][1] = 4.922090297e-1; coefficients[STO5G][m][dAzimuthal][1] = 1.321157923e-1; | |
286 | + exponents[STO5G][m][dAzimuthal][2] = 2.029756928e-1; coefficients[STO5G][m][dAzimuthal][2] = 3.911240346e-1; | |
287 | + exponents[STO5G][m][dAzimuthal][3] = 9.424112917e-2; coefficients[STO5G][m][dAzimuthal][3] = 4.779609701e-1; | |
288 | + exponents[STO5G][m][dAzimuthal][4] = 4.569058269e-2; coefficients[STO5G][m][dAzimuthal][4] = 1.463662294e-1; | |
289 | 289 | } |
290 | 290 | |
291 | 291 | //STO-6G, k-shell |
292 | 292 | { |
293 | 293 | // 1s |
294 | - exponents[STO6G][k][sAzimuthal][0] = 2.310303149*pow(10.0, 1.0); coefficients[STO6G][k][sAzimuthal][0] = 9.163596280*pow(10,-3.0); | |
295 | - exponents[STO6G][k][sAzimuthal][1] = 4.235915534; coefficients[STO6G][k][sAzimuthal][1] = 4.936149294*pow(10,-2.0); | |
296 | - exponents[STO6G][k][sAzimuthal][2] = 1.185056519; coefficients[STO6G][k][sAzimuthal][2] = 1.685383049*pow(10,-1.0); | |
297 | - exponents[STO6G][k][sAzimuthal][3] = 4.070988982*pow(10.0,-1.0); coefficients[STO6G][k][sAzimuthal][3] = 3.705627997*pow(10,-1.0); | |
298 | - exponents[STO6G][k][sAzimuthal][4] = 1.580884151*pow(10.0,-1.0); coefficients[STO6G][k][sAzimuthal][4] = 4.164915298*pow(10,-1.0); | |
299 | - exponents[STO6G][k][sAzimuthal][5] = 6.510953954*pow(10.0,-2.0); coefficients[STO6G][k][sAzimuthal][5] = 1.303340841*pow(10,-1.0); | |
294 | + exponents[STO6G][k][sAzimuthal][0] = 2.310303149e01; coefficients[STO6G][k][sAzimuthal][0] = 9.163596280e-3; | |
295 | + exponents[STO6G][k][sAzimuthal][1] = 4.235915534e00; coefficients[STO6G][k][sAzimuthal][1] = 4.936149294e-2; | |
296 | + exponents[STO6G][k][sAzimuthal][2] = 1.185056519e00; coefficients[STO6G][k][sAzimuthal][2] = 1.685383049e-1; | |
297 | + exponents[STO6G][k][sAzimuthal][3] = 4.070988982e-1; coefficients[STO6G][k][sAzimuthal][3] = 3.705627997e-1; | |
298 | + exponents[STO6G][k][sAzimuthal][4] = 1.580884151e-1; coefficients[STO6G][k][sAzimuthal][4] = 4.164915298e-1; | |
299 | + exponents[STO6G][k][sAzimuthal][5] = 6.510953954e-2; coefficients[STO6G][k][sAzimuthal][5] = 1.303340841e-1; | |
300 | 300 | } |
301 | 301 | |
302 | 302 | //STO-6G, l-shell |
303 | 303 | { |
304 | 304 | // 2s |
305 | - exponents[STO6G][l][sAzimuthal][0] = 2.768496241*pow(10.0, 1.0); coefficients[STO6G][l][sAzimuthal][0] =-4.151277819*pow(10,-3.0); | |
306 | - exponents[STO6G][l][sAzimuthal][1] = 5.077140627; coefficients[STO6G][l][sAzimuthal][1] =-2.067024148*pow(10,-2.0); | |
307 | - exponents[STO6G][l][sAzimuthal][2] = 1.426786050; coefficients[STO6G][l][sAzimuthal][2] =-5.150303337*pow(10,-2.0); | |
308 | - exponents[STO6G][l][sAzimuthal][3] = 2.040335729*pow(10.0,-1.0); coefficients[STO6G][l][sAzimuthal][3] = 3.346271174*pow(10,-1.0); | |
309 | - exponents[STO6G][l][sAzimuthal][4] = 9.260298399*pow(10.0,-2.0); coefficients[STO6G][l][sAzimuthal][4] = 5.621061301*pow(10,-1.0); | |
310 | - exponents[STO6G][l][sAzimuthal][5] = 4.416183978*pow(10.0,-2.0); coefficients[STO6G][l][sAzimuthal][5] = 1.712994697*pow(10,-1.0); | |
305 | + exponents[STO6G][l][sAzimuthal][0] = 2.768496241e01; coefficients[STO6G][l][sAzimuthal][0] =-4.151277819e-3; | |
306 | + exponents[STO6G][l][sAzimuthal][1] = 5.077140627e00; coefficients[STO6G][l][sAzimuthal][1] =-2.067024148e-2; | |
307 | + exponents[STO6G][l][sAzimuthal][2] = 1.426786050e00; coefficients[STO6G][l][sAzimuthal][2] =-5.150303337e-2; | |
308 | + exponents[STO6G][l][sAzimuthal][3] = 2.040335729e-1; coefficients[STO6G][l][sAzimuthal][3] = 3.346271174e-1; | |
309 | + exponents[STO6G][l][sAzimuthal][4] = 9.260298399e-2; coefficients[STO6G][l][sAzimuthal][4] = 5.621061301e-1; | |
310 | + exponents[STO6G][l][sAzimuthal][5] = 4.416183978e-2; coefficients[STO6G][l][sAzimuthal][5] = 1.712994697e-1; | |
311 | 311 | // 2p |
312 | - exponents[STO6G][l][pAzimuthal][0] = 5.868285913; coefficients[STO6G][l][pAzimuthal][0] = 7.924233646*pow(10,-3.0); | |
313 | - exponents[STO6G][l][pAzimuthal][1] = 1.530329631; coefficients[STO6G][l][pAzimuthal][1] = 5.144104825*pow(10,-2.0); | |
314 | - exponents[STO6G][l][pAzimuthal][2] = 5.475665231*pow(10.0,-1.0); coefficients[STO6G][l][pAzimuthal][2] = 1.898400060*pow(10,-1.0); | |
315 | - exponents[STO6G][l][pAzimuthal][3] = 2.288932733*pow(10.0,-1.0); coefficients[STO6G][l][pAzimuthal][3] = 4.049863191*pow(10,-1.0); | |
316 | - exponents[STO6G][l][pAzimuthal][4] = 1.046655969*pow(10.0,-1.0); coefficients[STO6G][l][pAzimuthal][4] = 4.012362861*pow(10,-1.0); | |
317 | - exponents[STO6G][l][pAzimuthal][5] = 4.948220127*pow(10.0,-2.0); coefficients[STO6G][l][pAzimuthal][5] = 1.051855189*pow(10,-1.0); | |
312 | + exponents[STO6G][l][pAzimuthal][0] = 5.868285913e00; coefficients[STO6G][l][pAzimuthal][0] = 7.924233646e-3; | |
313 | + exponents[STO6G][l][pAzimuthal][1] = 1.530329631e00; coefficients[STO6G][l][pAzimuthal][1] = 5.144104825e-2; | |
314 | + exponents[STO6G][l][pAzimuthal][2] = 5.475665231e-1; coefficients[STO6G][l][pAzimuthal][2] = 1.898400060e-1; | |
315 | + exponents[STO6G][l][pAzimuthal][3] = 2.288932733e-1; coefficients[STO6G][l][pAzimuthal][3] = 4.049863191e-1; | |
316 | + exponents[STO6G][l][pAzimuthal][4] = 1.046655969e-1; coefficients[STO6G][l][pAzimuthal][4] = 4.012362861e-1; | |
317 | + exponents[STO6G][l][pAzimuthal][5] = 4.948220127e-2; coefficients[STO6G][l][pAzimuthal][5] = 1.051855189e-1; | |
318 | 318 | } |
319 | 319 | |
320 | 320 | //STO-6G, m-shell |
321 | 321 | { |
322 | 322 | // 3s |
323 | - exponents[STO6G][m][sAzimuthal][0] = 3.273031938; coefficients[STO6G][m][sAzimuthal][0] =-6.775596947*pow(10,-3.0); | |
324 | - exponents[STO6G][m][sAzimuthal][1] = 9.200611311*pow(10.0,-1.0); coefficients[STO6G][m][sAzimuthal][1] =-5.639325779*pow(10,-2.0); | |
325 | - exponents[STO6G][m][sAzimuthal][2] = 3.593349765*pow(10.0,-1.0); coefficients[STO6G][m][sAzimuthal][2] =-1.587656086*pow(10,-1.0); | |
326 | - exponents[STO6G][m][sAzimuthal][3] = 8.636686991*pow(10.0,-2.0); coefficients[STO6G][m][sAzimuthal][3] = 5.534527651*pow(10,-1.0); | |
327 | - exponents[STO6G][m][sAzimuthal][4] = 4.797373812*pow(10.0,-2.0); coefficients[STO6G][m][sAzimuthal][4] = 5.015351020*pow(10,-1.0); | |
328 | - exponents[STO6G][m][sAzimuthal][5] = 2.724741144*pow(10.0,-2.0); coefficients[STO6G][m][sAzimuthal][5] = 7.223633674*pow(10,-2.0); | |
323 | + exponents[STO6G][m][sAzimuthal][0] = 3.273031938e00; coefficients[STO6G][m][sAzimuthal][0] =-6.775596947e-3; | |
324 | + exponents[STO6G][m][sAzimuthal][1] = 9.200611311e-1; coefficients[STO6G][m][sAzimuthal][1] =-5.639325779e-2; | |
325 | + exponents[STO6G][m][sAzimuthal][2] = 3.593349765e-1; coefficients[STO6G][m][sAzimuthal][2] =-1.587656086e-1; | |
326 | + exponents[STO6G][m][sAzimuthal][3] = 8.636686991e-2; coefficients[STO6G][m][sAzimuthal][3] = 5.534527651e-1; | |
327 | + exponents[STO6G][m][sAzimuthal][4] = 4.797373812e-2; coefficients[STO6G][m][sAzimuthal][4] = 5.015351020e-1; | |
328 | + exponents[STO6G][m][sAzimuthal][5] = 2.724741144e-2; coefficients[STO6G][m][sAzimuthal][5] = 7.223633674e-2; | |
329 | 329 | // 3p |
330 | - exponents[STO6G][m][pAzimuthal][0] = 5.077973607; coefficients[STO6G][m][pAzimuthal][0] =-3.329929840*pow(10,-3.0); | |
331 | - exponents[STO6G][m][pAzimuthal][1] = 1.340786940; coefficients[STO6G][m][pAzimuthal][1] =-1.419488340*pow(10,-2.0); | |
332 | - exponents[STO6G][m][pAzimuthal][2] = 2.248434849*pow(10.0,-1.0); coefficients[STO6G][m][pAzimuthal][2] = 1.639395770*pow(10,-1.0); | |
333 | - exponents[STO6G][m][pAzimuthal][3] = 1.131741848*pow(10.0,-1.0); coefficients[STO6G][m][pAzimuthal][3] = 4.485358256*pow(10,-1.0); | |
334 | - exponents[STO6G][m][pAzimuthal][4] = 6.076408893*pow(10.0,-2.0); coefficients[STO6G][m][pAzimuthal][4] = 3.908813050*pow(10,-1.0); | |
335 | - exponents[STO6G][m][pAzimuthal][5] = 3.315424265*pow(10.0,-2.0); coefficients[STO6G][m][pAzimuthal][5] = 7.411456232*pow(10,-2.0); | |
330 | + exponents[STO6G][m][pAzimuthal][0] = 5.077973607e00; coefficients[STO6G][m][pAzimuthal][0] =-3.329929840e-3; | |
331 | + exponents[STO6G][m][pAzimuthal][1] = 1.340786940e00; coefficients[STO6G][m][pAzimuthal][1] =-1.419488340e-2; | |
332 | + exponents[STO6G][m][pAzimuthal][2] = 2.248434849e-1; coefficients[STO6G][m][pAzimuthal][2] = 1.639395770e-1; | |
333 | + exponents[STO6G][m][pAzimuthal][3] = 1.131741848e-1; coefficients[STO6G][m][pAzimuthal][3] = 4.485358256e-1; | |
334 | + exponents[STO6G][m][pAzimuthal][4] = 6.076408893e-2; coefficients[STO6G][m][pAzimuthal][4] = 3.908813050e-1; | |
335 | + exponents[STO6G][m][pAzimuthal][5] = 3.315424265e-2; coefficients[STO6G][m][pAzimuthal][5] = 7.411456232e-2; | |
336 | 336 | // 3d |
337 | - exponents[STO6G][m][dAzimuthal][0] = 2.488296923; coefficients[STO6G][m][dAzimuthal][0] = 7.283828112*pow(10,-3.0); | |
338 | - exponents[STO6G][m][dAzimuthal][1] = 7.981487853*pow(10.0,-1.0); coefficients[STO6G][m][dAzimuthal][1] = 5.386799363*pow(10,-2.0); | |
339 | - exponents[STO6G][m][dAzimuthal][2] = 3.311327490*pow(10.0,-1.0); coefficients[STO6G][m][dAzimuthal][2] = 2.072139149*pow(10,-1.0); | |
340 | - exponents[STO6G][m][dAzimuthal][3] = 1.559114463*pow(10.0,-1.0); coefficients[STO6G][m][dAzimuthal][3] = 4.266269092*pow(10,-1.0); | |
341 | - exponents[STO6G][m][dAzimuthal][4] = 7.877734732*pow(10.0,-2.0); coefficients[STO6G][m][dAzimuthal][4] = 3.843100204*pow(10,-1.0); | |
342 | - exponents[STO6G][m][dAzimuthal][5] = 4.058484363*pow(10.0,-2.0); coefficients[STO6G][m][dAzimuthal][5] = 8.902827546*pow(10,-2.0); | |
337 | + exponents[STO6G][m][dAzimuthal][0] = 2.488296923e00; coefficients[STO6G][m][dAzimuthal][0] = 7.283828112e-3; | |
338 | + exponents[STO6G][m][dAzimuthal][1] = 7.981487853e-1; coefficients[STO6G][m][dAzimuthal][1] = 5.386799363e-2; | |
339 | + exponents[STO6G][m][dAzimuthal][2] = 3.311327490e-1; coefficients[STO6G][m][dAzimuthal][2] = 2.072139149e-1; | |
340 | + exponents[STO6G][m][dAzimuthal][3] = 1.559114463e-1; coefficients[STO6G][m][dAzimuthal][3] = 4.266269092e-1; | |
341 | + exponents[STO6G][m][dAzimuthal][4] = 7.877734732e-2; coefficients[STO6G][m][dAzimuthal][4] = 3.843100204e-1; | |
342 | + exponents[STO6G][m][dAzimuthal][5] = 4.058484363e-2; coefficients[STO6G][m][dAzimuthal][5] = 8.902827546e-2; | |
343 | 343 | } |
344 | 344 | |
345 | 345 | } |
@@ -82,6 +82,8 @@ void InputParser::SetMessages(){ | ||
82 | 82 | = "Error in base::InputParser::GetInputTerms: Input file is empty.\n"; |
83 | 83 | this->errorMessageNotFoundInputFile |
84 | 84 | = "Error in base::InputParser::StoreInputTermsFromFile: Not found.\n"; |
85 | + this->errorMessageNonValidTheoriesEpc | |
86 | + = "Error in base::InputParser::ValidateEpcConditions: Theory you set is not supported for EPC. The supported theories are MNDO-sefies(MNDO, AM1, AM1D, PM3, PM3D, PDDG/PM3) only.\n"; | |
85 | 87 | this->errorMessageNonValidTheoriesMD |
86 | 88 | = "Error in base::InputParser::ValidateMdConditions: Theory you set is not supported for MD.\n"; |
87 | 89 | this->errorMessageNonValidExcitedStatesMD |
@@ -248,6 +250,11 @@ void InputParser::SetMessages(){ | ||
248 | 250 | this->stringGeometry = "geometry"; |
249 | 251 | this->stringGeometryEnd = "geometry_end"; |
250 | 252 | |
253 | + // Environmental Point Charge | |
254 | + this->stringEpc = "epc"; | |
255 | + this->stringEpcEnd = "epc_end"; | |
256 | + this->stringEpcCharge = "charge"; | |
257 | + | |
251 | 258 | // SCF |
252 | 259 | this->stringScf = "scf"; |
253 | 260 | this->stringScfEnd = "scf_end"; |
@@ -488,6 +495,26 @@ int InputParser::ParseMolecularGeometry(Molecule* molecule, vector<string>* inpu | ||
488 | 495 | return parseIndex; |
489 | 496 | } |
490 | 497 | |
498 | +int InputParser::ParseEpcsConfiguration(Molecule* molecule, vector<string>* inputTerms, int parseIndex) const{ | |
499 | + parseIndex++; | |
500 | + while((*inputTerms)[parseIndex].compare(this->stringEpcEnd) != 0){ | |
501 | + double x = atof((*inputTerms)[parseIndex+0].c_str()) * Parameters::GetInstance()->GetAngstrom2AU(); | |
502 | + double y = atof((*inputTerms)[parseIndex+1].c_str()) * Parameters::GetInstance()->GetAngstrom2AU(); | |
503 | + double z = atof((*inputTerms)[parseIndex+2].c_str()) * Parameters::GetInstance()->GetAngstrom2AU(); | |
504 | + parseIndex += 3; | |
505 | + double charge = 0.0; | |
506 | + if((*inputTerms)[parseIndex].compare(this->stringEpcCharge) == 0){ | |
507 | + charge = atof((*inputTerms)[parseIndex+1].c_str()); | |
508 | + parseIndex += 2; | |
509 | + } | |
510 | + AtomType atomType = EPC; | |
511 | + int index = molecule->GetNumberEpcs(); | |
512 | + Atom* atom = AtomFactory::Create(atomType, index, x, y, z, charge); | |
513 | + molecule->AddEpc(atom); | |
514 | + } | |
515 | + return parseIndex; | |
516 | +} | |
517 | + | |
491 | 518 | int InputParser::ParseConditionsSCF(vector<string>* inputTerms, int parseIndex) const{ |
492 | 519 | parseIndex++; |
493 | 520 | while((*inputTerms)[parseIndex].compare(this->stringScfEnd) != 0){ |
@@ -1169,6 +1196,11 @@ void InputParser::Parse(Molecule* molecule, int argc, char *argv[]) const{ | ||
1169 | 1196 | i = this->ParseMolecularGeometry(molecule, &inputTerms, i); |
1170 | 1197 | } |
1171 | 1198 | |
1199 | + // Environmental Point Charges Configuration(EPC) | |
1200 | + if(inputTerms[i].compare(this->stringEpc) == 0){ | |
1201 | + i = this->ParseEpcsConfiguration(molecule, &inputTerms, i); | |
1202 | + } | |
1203 | + | |
1172 | 1204 | // scf condition |
1173 | 1205 | if(inputTerms[i].compare(this->stringScf) == 0){ |
1174 | 1206 | i = this->ParseConditionsSCF(&inputTerms, i); |
@@ -1249,6 +1281,7 @@ void InputParser::Parse(Molecule* molecule, int argc, char *argv[]) const{ | ||
1249 | 1281 | // calculate basics and validate conditions |
1250 | 1282 | this->CalcMolecularBasics(molecule); |
1251 | 1283 | this->ValidateVdWConditions(); |
1284 | + this->ValidateEpcConditions(*molecule); | |
1252 | 1285 | if(Parameters::GetInstance()->RequiresCIS()){ |
1253 | 1286 | this->ValidateCisConditions(*molecule); |
1254 | 1287 | } |
@@ -1326,6 +1359,25 @@ void InputParser::ValidateVdWConditions() const{ | ||
1326 | 1359 | } |
1327 | 1360 | } |
1328 | 1361 | |
1362 | +void InputParser::ValidateEpcConditions(const Molecule& molecule) const{ | |
1363 | + if(molecule.GetNumberEpcs()<=0){return;} | |
1364 | + TheoryType theory = Parameters::GetInstance()->GetCurrentTheory(); | |
1365 | + // Validate theory | |
1366 | + if(theory == MNDO || | |
1367 | + theory == AM1 || | |
1368 | + theory == AM1D || | |
1369 | + theory == PM3 || | |
1370 | + theory == PM3D || | |
1371 | + theory == PM3PDDG ){ | |
1372 | + } | |
1373 | + else{ | |
1374 | + stringstream ss; | |
1375 | + ss << this->errorMessageNonValidTheoriesEpc; | |
1376 | + ss << this->errorMessageTheory << TheoryTypeStr(theory) << endl; | |
1377 | + throw MolDSException(ss.str()); | |
1378 | + } | |
1379 | +} | |
1380 | + | |
1329 | 1381 | void InputParser::ValidateCisConditions(const Molecule& molecule) const{ |
1330 | 1382 | |
1331 | 1383 | // direct CIS |
@@ -1550,6 +1602,7 @@ void InputParser::OutputMolecularBasics(Molecule* molecule) const{ | ||
1550 | 1602 | molecule->OutputConfiguration(); |
1551 | 1603 | molecule->OutputXyzCOM(); |
1552 | 1604 | molecule->OutputXyzCOC(); |
1605 | + molecule->OutputEpcs(); | |
1553 | 1606 | } |
1554 | 1607 | |
1555 | 1608 | void InputParser::OutputScfConditions() const{ |
@@ -35,6 +35,7 @@ private: | ||
35 | 35 | void SetMessages(); |
36 | 36 | std::string errorMessageInputFileEmpty; |
37 | 37 | std::string errorMessageNotFoundInputFile; |
38 | + std::string errorMessageNonValidTheoriesEpc; | |
38 | 39 | std::string errorMessageNonValidTheoriesMD; |
39 | 40 | std::string errorMessageNonValidExcitedStatesMD; |
40 | 41 | std::string errorMessageNonValidExcitedStatesMC; |
@@ -173,6 +174,10 @@ private: | ||
173 | 174 | // geometry |
174 | 175 | std::string stringGeometry; |
175 | 176 | std::string stringGeometryEnd; |
177 | + // EPC | |
178 | + std::string stringEpc; | |
179 | + std::string stringEpcEnd; | |
180 | + std::string stringEpcCharge; | |
176 | 181 | // SCF |
177 | 182 | std::string stringScf; |
178 | 183 | std::string stringScfEnd; |
@@ -297,6 +302,7 @@ private: | ||
297 | 302 | std::string stringFrequenciesElecState; |
298 | 303 | void CalcMolecularBasics(Molecule* molecule) const; |
299 | 304 | void ValidateVdWConditions() const; |
305 | + void ValidateEpcConditions(const Molecule& molecule) const; | |
300 | 306 | void ValidateCisConditions(const Molecule& molecule) const; |
301 | 307 | void ValidateMdConditions(const Molecule& molecule) const; |
302 | 308 | void ValidateMcConditions(const Molecule& molecule) const; |
@@ -324,6 +330,7 @@ private: | ||
324 | 330 | void StoreInputTermsFromFile(std::vector<std::string>& inputTerms, char* fileName) const; |
325 | 331 | void AddInputTermsFromString(std::vector<std::string>& inputTerms, std::string str) const; |
326 | 332 | int ParseMolecularGeometry(Molecule* molecule, std::vector<std::string>* inputTerms, int parseIndex) const; |
333 | + int ParseEpcsConfiguration(Molecule* molecule, std::vector<std::string>* inputTerms, int parseIndex) const; | |
327 | 334 | int ParseTheory(std::vector<std::string>* inputTerms, int parseIndex) const; |
328 | 335 | int ParseConditionsSCF(std::vector<std::string>* inputTerms, int parseIndex) const; |
329 | 336 | int ParseConditionsPrincipalAxes(std::vector<std::string>* inputTerms, int parseIndex) const; |
@@ -30,6 +30,7 @@ public: | ||
30 | 30 | //1d |
31 | 31 | template<typename T> void Malloc(T** matrix, size_t size1) const{ |
32 | 32 | if(*matrix!=NULL) return; |
33 | + if(size1<=0) return; | |
33 | 34 | double requiredMalloc = this->GetMemoryAmount<T>(size1); |
34 | 35 | this->CheckLimitHeap(requiredMalloc); |
35 | 36 | *matrix = new T[size1](); |
@@ -58,6 +59,7 @@ public: | ||
58 | 59 | // 2d |
59 | 60 | template<typename T> void Malloc(T*** matrix, size_t size1, size_t size2) const{ |
60 | 61 | if(*matrix!=NULL) return; |
62 | + if(size1*size2<=0) return; | |
61 | 63 | double requiredMalloc = this->GetMemoryAmount<T*>(size1); |
62 | 64 | this->CheckLimitHeap(requiredMalloc); |
63 | 65 |
@@ -100,6 +102,7 @@ public: | ||
100 | 102 | // 3d |
101 | 103 | template<typename T> void Malloc(T**** matrix, size_t size1, size_t size2, size_t size3) const{ |
102 | 104 | if(*matrix!=NULL) return; |
105 | + if(size1*size2*size3<=0) return; | |
103 | 106 | double requiredMalloc = this->GetMemoryAmount<T**>(size1); |
104 | 107 | this->CheckLimitHeap(requiredMalloc); |
105 | 108 |
@@ -144,6 +147,7 @@ public: | ||
144 | 147 | //4d |
145 | 148 | template<typename T> void Malloc(T***** matrix, size_t size1, size_t size2, size_t size3, size_t size4) const{ |
146 | 149 | if(*matrix!=NULL) return; |
150 | + if(size1*size2*size3*size4<=0) return; | |
147 | 151 | double requiredMalloc = this->GetMemoryAmount<T***>(size1); |
148 | 152 | this->CheckLimitHeap(requiredMalloc); |
149 | 153 |
@@ -189,6 +193,7 @@ public: | ||
189 | 193 | //5d |
190 | 194 | template<typename T> void Malloc(T****** matrix, size_t size1, size_t size2, size_t size3, size_t size4, size_t size5) const{ |
191 | 195 | if(*matrix!=NULL) return; |
196 | + if(size1*size2*size3*size4*size5<=0) return; | |
192 | 197 | double requiredMalloc = this->GetMemoryAmount<T****>(size1); |
193 | 198 | this->CheckLimitHeap(requiredMalloc); |
194 | 199 |
@@ -235,6 +240,7 @@ public: | ||
235 | 240 | //6d |
236 | 241 | template<typename T> void Malloc(T******* matrix, size_t size1, size_t size2, size_t size3, size_t size4, size_t size5, size_t size6) const{ |
237 | 242 | if(*matrix!=NULL) return; |
243 | + if(size1*size2*size3*size4*size5*size6<=0) return; | |
238 | 244 | double requiredMalloc = this->GetMemoryAmount<T*****>(size1); |
239 | 245 | this->CheckLimitHeap(requiredMalloc); |
240 | 246 |
@@ -282,6 +288,7 @@ public: | ||
282 | 288 | //7d |
283 | 289 | template<typename T> void Malloc(T******** matrix, size_t size1, size_t size2, size_t size3, size_t size4, size_t size5, size_t size6, size_t size7) const{ |
284 | 290 | if(*matrix!=NULL) return; |
291 | + if(size1*size2*size3*size4*size5*size6*size7<=0) return; | |
285 | 292 | double requiredMalloc = this->GetMemoryAmount<T******>(size1); |
286 | 293 | this->CheckLimitHeap(requiredMalloc); |
287 | 294 |
@@ -57,15 +57,30 @@ Molecule::Molecule(const Molecule& rhs){ | ||
57 | 57 | Molecule& Molecule::operator=(const Molecule& rhs){ |
58 | 58 | double* oldXyzCOM = this->xyzCOM; |
59 | 59 | double* oldXyzCOC = this->xyzCOC; |
60 | - double** oldDistanceMatrix = this->distanceMatrix; | |
60 | + double** oldDistanceAtoms = this->distanceAtoms; | |
61 | + double** oldDistanceEpcs = this->distanceEpcs; | |
62 | + double** oldDistanceAtomsEpcs = this->distanceAtomsEpcs; | |
61 | 63 | vector<Atom*>* oldAtomVect = this->atomVect; |
64 | + vector<Atom*>* oldEpcVect = this->epcVect; | |
62 | 65 | this->CopyInitialize(rhs); |
63 | - this->Finalize(&oldAtomVect, &oldXyzCOM, &oldXyzCOC, &oldDistanceMatrix); | |
66 | + this->Finalize(&oldAtomVect, | |
67 | + &oldEpcVect, | |
68 | + &oldXyzCOM, | |
69 | + &oldXyzCOC, | |
70 | + &oldDistanceAtoms, | |
71 | + &oldDistanceEpcs, | |
72 | + &oldDistanceAtomsEpcs); | |
64 | 73 | return *this; |
65 | 74 | } |
66 | 75 | |
67 | 76 | Molecule::~Molecule(){ |
68 | - this->Finalize(&this->atomVect, &this->xyzCOM, &this->xyzCOC, &this->distanceMatrix); | |
77 | + this->Finalize(&this->atomVect, | |
78 | + &this->epcVect, | |
79 | + &this->xyzCOM, | |
80 | + &this->xyzCOC, | |
81 | + &this->distanceAtoms, | |
82 | + &this->distanceEpcs, | |
83 | + &this->distanceAtomsEpcs); | |
69 | 84 | //this->OutputLog("molecule deleted\n"); |
70 | 85 | } |
71 | 86 |
@@ -78,48 +93,107 @@ void Molecule::CopyInitialize(const Molecule& rhs){ | ||
78 | 93 | this->totalNumberAOs = rhs.totalNumberAOs; |
79 | 94 | this->totalNumberValenceElectrons = rhs.totalNumberValenceElectrons; |
80 | 95 | this->totalCoreMass = rhs.totalCoreMass; |
81 | - for(int i=0; i<rhs.atomVect->size(); i++){ | |
82 | - Atom* atom = (*rhs.atomVect)[i]; | |
83 | - this->atomVect->push_back(AtomFactory::Create(atom->GetAtomType(), | |
84 | - atom->GetIndex(), | |
85 | - atom->GetXyz()[XAxis], | |
86 | - atom->GetXyz()[YAxis], | |
87 | - atom->GetXyz()[ZAxis], | |
88 | - atom->GetPxyz()[XAxis], | |
89 | - atom->GetPxyz()[YAxis], | |
90 | - atom->GetPxyz()[ZAxis])); | |
91 | - (*this->atomVect)[i]->SetFirstAOIndex(atom->GetFirstAOIndex()); | |
92 | - } | |
93 | - int atomNum = this->atomVect->size(); | |
94 | - MallocerFreer::GetInstance()->Malloc<double>(&this->distanceMatrix, atomNum, atomNum); | |
95 | - for(int i=0; i<atomNum; i++){ | |
96 | - for(int j=0; j<atomNum; j++){ | |
97 | - this->distanceMatrix[i][j] = rhs.distanceMatrix[i][j]; | |
96 | + if(rhs.atomVect != NULL){ | |
97 | + int atomNum = rhs.atomVect->size(); | |
98 | + for(int i=0; i<atomNum; i++){ | |
99 | + Atom* atom = (*rhs.atomVect)[i]; | |
100 | + this->atomVect->push_back(AtomFactory::Create(atom->GetAtomType(), | |
101 | + atom->GetIndex(), | |
102 | + atom->GetXyz()[XAxis], | |
103 | + atom->GetXyz()[YAxis], | |
104 | + atom->GetXyz()[ZAxis], | |
105 | + atom->GetPxyz()[XAxis], | |
106 | + atom->GetPxyz()[YAxis], | |
107 | + atom->GetPxyz()[ZAxis])); | |
108 | + (*this->atomVect)[i]->SetFirstAOIndex(atom->GetFirstAOIndex()); | |
109 | + } | |
110 | + MallocerFreer::GetInstance()->Malloc<double>(&this->distanceAtoms, atomNum, atomNum); | |
111 | + for(int i=0; i<atomNum; i++){ | |
112 | + for(int j=0; j<atomNum; j++){ | |
113 | + this->distanceAtoms[i][j] = rhs.distanceAtoms[i][j]; | |
114 | + } | |
115 | + } | |
116 | + } | |
117 | + if(rhs.epcVect != NULL){ | |
118 | + int epcNum = rhs.epcVect->size(); | |
119 | + for(int i=0; i<epcNum; i++){ | |
120 | + Atom* epc = (*rhs.epcVect)[i]; | |
121 | + this->epcVect->push_back( | |
122 | + AtomFactory::Create(EPC, | |
123 | + epc->GetIndex(), | |
124 | + epc->GetXyz()[XAxis], | |
125 | + epc->GetXyz()[YAxis], | |
126 | + epc->GetXyz()[ZAxis], | |
127 | + epc->GetPxyz()[XAxis], | |
128 | + epc->GetPxyz()[YAxis], | |
129 | + epc->GetPxyz()[ZAxis], | |
130 | + epc->GetCoreCharge())); | |
131 | + (*this->epcVect)[i]->SetFirstAOIndex(epc->GetFirstAOIndex()); | |
132 | + } | |
133 | + MallocerFreer::GetInstance()->Malloc<double>(&this->distanceEpcs, epcNum, epcNum); | |
134 | + for(int i=0; i<epcNum; i++){ | |
135 | + for(int j=0; j<epcNum; j++){ | |
136 | + this->distanceEpcs[i][j] = rhs.distanceEpcs[i][j]; | |
137 | + } | |
138 | + } | |
139 | + } | |
140 | + if(rhs.atomVect != NULL && rhs.epcVect != NULL){ | |
141 | + int atomNum = rhs.atomVect->size(); | |
142 | + int epcNum = rhs.epcVect->size(); | |
143 | + MallocerFreer::GetInstance()->Malloc<double>(&this->distanceAtomsEpcs, atomNum, epcNum); | |
144 | + for(int i=0; i<atomNum; i++){ | |
145 | + for(int j=0; j<epcNum; j++){ | |
146 | + this->distanceAtomsEpcs[i][j] = rhs.distanceAtomsEpcs[i][j]; | |
147 | + } | |
98 | 148 | } |
99 | 149 | } |
100 | - | |
101 | 150 | } |
102 | 151 | |
103 | 152 | void Molecule::Initialize(){ |
104 | 153 | this->SetMessages(); |
105 | - this->xyzCOM = NULL; | |
106 | - this->xyzCOC = NULL; | |
107 | - this->distanceMatrix = NULL; | |
108 | - this->atomVect = NULL; | |
154 | + this->xyzCOM = NULL; | |
155 | + this->xyzCOC = NULL; | |
156 | + this->distanceAtoms = NULL; | |
157 | + this->distanceEpcs = NULL; | |
158 | + this->distanceAtomsEpcs = NULL; | |
159 | + this->atomVect = NULL; | |
160 | + this->epcVect = NULL; | |
109 | 161 | try{ |
110 | 162 | this->atomVect = new vector<Atom*>; |
163 | + this->epcVect = new vector<Atom*>; | |
111 | 164 | MallocerFreer::GetInstance()->Malloc<double>(&this->xyzCOM, CartesianType_end); |
112 | 165 | MallocerFreer::GetInstance()->Malloc<double>(&this->xyzCOC, CartesianType_end); |
113 | 166 | } |
114 | 167 | catch(exception ex){ |
115 | - this->Finalize(&this->atomVect, &this->xyzCOM, &this->xyzCOC, &this->distanceMatrix); | |
168 | + this->Finalize(&this->atomVect, | |
169 | + &this->epcVect, | |
170 | + &this->xyzCOM, | |
171 | + &this->xyzCOC, | |
172 | + &this->distanceAtoms, | |
173 | + &this->distanceEpcs, | |
174 | + &this->distanceAtomsEpcs); | |
116 | 175 | throw MolDSException(ex.what()); |
117 | 176 | } |
118 | 177 | } |
119 | 178 | |
120 | -void Molecule::Finalize(vector<Atom*>** atomVect, double** xyzCOM, double** xyzCOC, double*** distanceMatrix){ | |
121 | - int atomNum = (*atomVect)->size(); | |
179 | +void Molecule::Finalize(vector<Atom*>** atomVect, | |
180 | + vector<Atom*>** epcVect, | |
181 | + double** xyzCOM, | |
182 | + double** xyzCOC, | |
183 | + double*** distanceAtoms, | |
184 | + double*** distanceEpcs, | |
185 | + double*** distanceAtomsEpcs){ | |
186 | + MallocerFreer::GetInstance()->Free<double>(xyzCOM, CartesianType_end); | |
187 | + MallocerFreer::GetInstance()->Free<double>(xyzCOC, CartesianType_end); | |
188 | + int atomNum=0; | |
189 | + int epcNum = 0; | |
190 | + if(*atomVect != NULL && *epcVect != NULL){ | |
191 | + atomNum = (*atomVect)->size(); | |
192 | + epcNum = (*epcVect)->size(); | |
193 | + MallocerFreer::GetInstance()->Free<double>(distanceAtomsEpcs, atomNum, epcNum); | |
194 | + } | |
122 | 195 | if(*atomVect != NULL){ |
196 | + atomNum = (*atomVect)->size(); | |
123 | 197 | for(int i=0; i<atomNum; i++){ |
124 | 198 | if((**atomVect)[i] != NULL){ |
125 | 199 | delete (**atomVect)[i]; |
@@ -130,16 +204,31 @@ void Molecule::Finalize(vector<Atom*>** atomVect, double** xyzCOM, double** xyzC | ||
130 | 204 | delete *atomVect; |
131 | 205 | *atomVect = NULL; |
132 | 206 | //this->OutputLog("atomVect deleted\n"); |
207 | + MallocerFreer::GetInstance()->Free<double>(distanceAtoms, atomNum, atomNum); | |
208 | + } | |
209 | + if(*epcVect != NULL){ | |
210 | + epcNum = (*epcVect)->size(); | |
211 | + for(int i=0; i<epcNum; i++){ | |
212 | + if((**epcVect)[i] != NULL){ | |
213 | + delete (**epcVect)[i]; | |
214 | + (**epcVect)[i] = NULL; | |
215 | + } | |
216 | + } | |
217 | + (*epcVect)->clear(); | |
218 | + delete *epcVect; | |
219 | + *epcVect = NULL; | |
220 | + //this->OutputLog("epcVect deleted\n"); | |
221 | + MallocerFreer::GetInstance()->Free<double>(distanceEpcs, epcNum, epcNum); | |
133 | 222 | } |
134 | - MallocerFreer::GetInstance()->Free<double>(xyzCOM, CartesianType_end); | |
135 | - MallocerFreer::GetInstance()->Free<double>(xyzCOC, CartesianType_end); | |
136 | - MallocerFreer::GetInstance()->Free<double>(distanceMatrix, atomNum, atomNum); | |
137 | 223 | } |
138 | 224 | |
139 | 225 | void Molecule::SetMessages(){ |
140 | 226 | this->errorMessageGetAtomNull = "Error in base::Molecule::GetAtom: atomVect is NULL.\n"; |
227 | + this->errorMessageGetEPCNull = "Error in base::Molecule::GetEnviromentalPointCharge: enviromentalPointChargeVect is NULL.\n"; | |
141 | 228 | this->errorMessageAddAtomNull = "Error in base::Molecule::AddAtom: atomVect is NULL.\n"; |
229 | + this->errorMessageAddEPCNull = "Error in base::Molecule::AddEnviromentalPointCharge: enviromentalPointChargeVect is NULL.\n"; | |
142 | 230 | this->errorMessageGetNumberAtomsNull = "Error in base::Molecule::GetNumberAtoms: atomVect is NULL.\n"; |
231 | + this->errorMessageGetNumberEPCsNull = "Error in base::Molecule::GetNumberEnviromentalPointChargess: epcVect is NULL.\n"; | |
143 | 232 | this->errorMessageGetXyzCOMNull = "Error in base::Molecule::GetXyzCOM: xyzCOM is NULL.\n"; |
144 | 233 | this->errorMessageGetXyzCOCNull = "Error in base::Molecule::GetXyzCOC: xyzCOC is NULL.\n"; |
145 | 234 | this->errorMessageCalcXyzCOMNull = "Error in base::Molecule::CalcXyzCOM: xyzCOM is NULL.\n"; |
@@ -151,6 +240,9 @@ void Molecule::SetMessages(){ | ||
151 | 240 | this->messageAtomCoordinates = "\tAtom coordinates:"; |
152 | 241 | this->messageAtomMomenta = "\tAtom momenta:"; |
153 | 242 | this->messageAtomMomentaTitle = "\t\t\t| i-th | atom type | px[a.u.] | py[a.u.] | pz[a.u.] |\t\t| px[u] | py[u] | pz[u] | [u] = [(g/Mol)*(angst/fs)]\n"; |
243 | + this->messageEpcConfiguration = "\tEnvironmental Point Charge(EPC) configuration:\n"; | |
244 | + this->messageEpcCoordinates = "\tEPC coordinates:"; | |
245 | + this->messageEpcCoordinatesTitle = "\t\t\t\t| i-th | charge[a.u.] | x[a.u.] | y[a.u.] | z[a.u.] |\t\t| x[angst.] | y[angst.] | z[angst.] |\n"; | |
154 | 246 | this->messageCOM = "\tCenter of Mass:"; |
155 | 247 | this->messageCOC = "\tCenter of Core:"; |
156 | 248 | this->messageCOMTitle = "\t\t\t| x[a.u.] | y[a.u.] | z[a.u.] |\t\t| x[angst.] | y[angst.] | z[angst.] |\n"; |
@@ -182,7 +274,13 @@ void Molecule::AddAtom(Atom* atom){ | ||
182 | 274 | if(this->atomVect==NULL) throw MolDSException(this->errorMessageAddAtomNull); |
183 | 275 | #endif |
184 | 276 | this->atomVect->push_back(atom); |
185 | - | |
277 | +} | |
278 | + | |
279 | +void Molecule::AddEpc(Atom* epc){ | |
280 | +#ifdef MOLDS_DBG | |
281 | + if(this->epcVect==NULL) throw MolDSException(this->errorMessageAddEPCNull); | |
282 | +#endif | |
283 | + this->epcVect->push_back(epc); | |
186 | 284 | } |
187 | 285 | |
188 | 286 | double const* Molecule::GetXyzCOM() const{ |
@@ -251,9 +349,9 @@ void Molecule::CalcXyzCOC(){ | ||
251 | 349 | } |
252 | 350 | } |
253 | 351 | |
254 | -void Molecule::CalcDistanceMatrix(){ | |
255 | - if(this->distanceMatrix==NULL){ | |
256 | - MallocerFreer::GetInstance()->Malloc<double>(&this->distanceMatrix, this->atomVect->size(), this->atomVect->size()); | |
352 | +void Molecule::CalcDistanceAtoms(){ | |
353 | + if(this->distanceAtoms==NULL){ | |
354 | + MallocerFreer::GetInstance()->Malloc<double>(&this->distanceAtoms, this->atomVect->size(), this->atomVect->size()); | |
257 | 355 | } |
258 | 356 | for(int a=0; a<this->atomVect->size(); a++){ |
259 | 357 | const Atom& atomA = *(*this->atomVect)[a]; |
@@ -263,8 +361,45 @@ void Molecule::CalcDistanceMatrix(){ | ||
263 | 361 | distance = sqrt( pow(atomA.GetXyz()[0] - atomB.GetXyz()[0], 2.0) |
264 | 362 | +pow(atomA.GetXyz()[1] - atomB.GetXyz()[1], 2.0) |
265 | 363 | +pow(atomA.GetXyz()[2] - atomB.GetXyz()[2], 2.0) ); |
266 | - this->distanceMatrix[a][b] = distance; | |
267 | - this->distanceMatrix[b][a] = distance; | |
364 | + this->distanceAtoms[a][b] = distance; | |
365 | + this->distanceAtoms[b][a] = distance; | |
366 | + } | |
367 | + } | |
368 | +} | |
369 | + | |
370 | +void Molecule::CalcDistanceEpcs(){ | |
371 | + if(this->epcVect == NULL){return;} | |
372 | + if(this->distanceEpcs==NULL){ | |
373 | + MallocerFreer::GetInstance()->Malloc<double>(&this->distanceEpcs, this->epcVect->size(), this->epcVect->size()); | |
374 | + } | |
375 | + for(int a=0; a<this->epcVect->size(); a++){ | |
376 | + const Atom& epcA = *(*this->epcVect)[a]; | |
377 | + for(int b=a; b<this->epcVect->size(); b++){ | |
378 | + const Atom& epcB = *(*this->epcVect)[b]; | |
379 | + double distance=0.0; | |
380 | + distance = sqrt( pow(epcA.GetXyz()[0] - epcB.GetXyz()[0], 2.0) | |
381 | + +pow(epcA.GetXyz()[1] - epcB.GetXyz()[1], 2.0) | |
382 | + +pow(epcA.GetXyz()[2] - epcB.GetXyz()[2], 2.0) ); | |
383 | + this->distanceEpcs[a][b] = distance; | |
384 | + this->distanceEpcs[b][a] = distance; | |
385 | + } | |
386 | + } | |
387 | +} | |
388 | + | |
389 | +void Molecule::CalcDistanceAtomsEpcs(){ | |
390 | + if(this->epcVect == NULL){return;} | |
391 | + if(this->distanceAtomsEpcs==NULL){ | |
392 | + MallocerFreer::GetInstance()->Malloc<double>(&this->distanceAtomsEpcs, this->atomVect->size(), this->epcVect->size()); | |
393 | + } | |
394 | + for(int a=0; a<this->atomVect->size(); a++){ | |
395 | + const Atom& atom = *(*this->atomVect)[a]; | |
396 | + for(int b=0; b<this->epcVect->size(); b++){ | |
397 | + const Atom& epc = *(*this->epcVect)[b]; | |
398 | + double distance=0.0; | |
399 | + distance = sqrt( pow(atom.GetXyz()[0] - epc.GetXyz()[0], 2.0) | |
400 | + +pow(atom.GetXyz()[1] - epc.GetXyz()[1], 2.0) | |
401 | + +pow(atom.GetXyz()[2] - epc.GetXyz()[2], 2.0) ); | |
402 | + this->distanceAtomsEpcs[a][b] = distance; | |
268 | 403 | } |
269 | 404 | } |
270 | 405 | } |
@@ -279,7 +414,9 @@ void Molecule::CalcBasics(){ | ||
279 | 414 | void Molecule::CalcBasicsConfiguration(){ |
280 | 415 | this->CalcXyzCOM(); |
281 | 416 | this->CalcXyzCOC(); |
282 | - this->CalcDistanceMatrix(); | |
417 | + this->CalcDistanceAtoms(); | |
418 | + this->CalcDistanceEpcs(); | |
419 | + this->CalcDistanceAtomsEpcs(); | |
283 | 420 | } |
284 | 421 | |
285 | 422 | void Molecule::CalcTotalNumberAOs(){ |
@@ -347,6 +484,27 @@ void Molecule::OutputMomenta() const{ | ||
347 | 484 | this->OutputLog("\n"); |
348 | 485 | } |
349 | 486 | |
487 | +void Molecule::OutputEpcs() const{ | |
488 | + if(this->epcVect == NULL || this->epcVect->size() <= 0) {return;} | |
489 | + double ang2AU = Parameters::GetInstance()->GetAngstrom2AU(); | |
490 | + this->OutputLog(this->messageEpcConfiguration); | |
491 | + this->OutputLog(this->messageEpcCoordinatesTitle); | |
492 | + for(int a=0; a<this->epcVect->size(); a++){ | |
493 | + const Atom& atom = *(*this->epcVect)[a]; | |
494 | + this->OutputLog(boost::format("%s\t%d\t%e\t%e\t%e\t%e\t\t%e\t%e\t%e\n") | |
495 | + % this->messageEpcCoordinates | |
496 | + % a | |
497 | + % atom.GetCoreCharge() | |
498 | + % atom.GetXyz()[0] | |
499 | + % atom.GetXyz()[1] | |
500 | + % atom.GetXyz()[2] | |
501 | + % (atom.GetXyz()[0]/ang2AU) | |
502 | + % (atom.GetXyz()[1]/ang2AU) | |
503 | + % (atom.GetXyz()[2]/ang2AU)); | |
504 | + } | |
505 | + this->OutputLog("\n"); | |
506 | +} | |
507 | + | |
350 | 508 | void Molecule::OutputXyzCOM() const{ |
351 | 509 | double ang2AU = Parameters::GetInstance()->GetAngstrom2AU(); |
352 | 510 | this->OutputLog(this->messageCOMTitle); |
@@ -673,14 +831,6 @@ void Molecule::OutputTranslatingConditions(double const* translatingDifference) | ||
673 | 831 | % (translatingDifference[2]/angst2AU)); |
674 | 832 | } |
675 | 833 | |
676 | -//double Molecule::GetDistanceAtoms(int indexAtomA, int indexAtomB) const{ | |
677 | -// return this->distanceMatrix[indexAtomA][indexAtomB]; | |
678 | -//} | |
679 | -// | |
680 | -//double Molecule::GetDistanceAtoms(const Atom& atomA, const Atom& atomB) const{ | |
681 | -// return this->GetDistanceAtoms(atomA.GetIndex(), atomB.GetIndex()); | |
682 | -//} | |
683 | - | |
684 | 834 | void Molecule::SynchronizeConfigurationTo(const Molecule& ref){ |
685 | 835 | for(int a=0; a<this->GetNumberAtoms(); a++){ |
686 | 836 | Atom& atom = *this->GetAtom(a); |
@@ -38,7 +38,20 @@ public: | ||
38 | 38 | #endif |
39 | 39 | return (*this->atomVect)[atomIndex]; |
40 | 40 | } |
41 | + inline int GetNumberEpcs() const{ | |
42 | +#ifdef MOLDS_DBG | |
43 | + if(this->epcVect==NULL) throw MolDS_base::MolDSException(this->errorMessageGetNumberEPCsNull); | |
44 | +#endif | |
45 | + return this->epcVect->size(); | |
46 | + } | |
47 | + inline MolDS_base_atoms::Atom* GetEpc(int epcIndex) const{ | |
48 | +#ifdef MOLDS_DBG | |
49 | + if(this->epcVect==NULL) throw MolDS_base::MolDSException(this->errorMessageGetEPCNull); | |
50 | +#endif | |
51 | + return (*this->epcVect)[epcIndex]; | |
52 | + } | |
41 | 53 | void AddAtom(MolDS_base_atoms::Atom* atom); |
54 | + void AddEpc(MolDS_base_atoms::Atom* epc); | |
42 | 55 | double const* GetXyzCOM() const; |
43 | 56 | double const* GetXyzCOC() const; |
44 | 57 | void CalcBasics(); |
@@ -51,12 +64,19 @@ public: | ||
51 | 64 | void OutputTotalNumberAtomsAOsValenceelectrons() const; |
52 | 65 | void OutputConfiguration() const; |
53 | 66 | void OutputMomenta() const; |
67 | + void OutputEpcs() const; | |
54 | 68 | void CalcPrincipalAxes(); |
55 | 69 | void Rotate(); |
56 | 70 | void Translate(); |
57 | - double GetDistanceAtoms(int indexAtomA, int indexAtomB) const{return this->distanceMatrix[indexAtomA][indexAtomB];}; | |
71 | + double GetDistanceAtoms(int indexAtomA, int indexAtomB) const{return this->distanceAtoms[indexAtomA][indexAtomB];}; | |
58 | 72 | double GetDistanceAtoms(const MolDS_base_atoms::Atom& atomA, |
59 | 73 | const MolDS_base_atoms::Atom& atomB) const{return this->GetDistanceAtoms(atomA.GetIndex(), atomB.GetIndex());}; |
74 | + double GetDistanceEpcs(int indexEpcA, int indexEpcB) const{return this->distanceEpcs[indexEpcA][indexEpcB];}; | |
75 | + double GetDistanceEpcs(const MolDS_base_atoms::Atom& epcA, | |
76 | + const MolDS_base_atoms::Atom& epcB) const{return this->GetDistanceEpcs(epcA.GetIndex(), epcB.GetIndex());}; | |
77 | + double GetDistanceAtomEpc(int indexAtom, int indexEpc) const{return this->distanceAtomsEpcs[indexAtom][indexEpc];}; | |
78 | + double GetDistanceAtomEpc(const MolDS_base_atoms::Atom& atom, | |
79 | + const MolDS_base_atoms::Atom& epc) const{return this->GetDistanceAtomEpc(atom.GetIndex(), epc.GetIndex());}; | |
60 | 80 | void SynchronizeConfigurationTo (const Molecule& ref); |
61 | 81 | void SynchronizeMomentaTo (const Molecule& ref); |
62 | 82 | void SynchronizePhaseSpacePointTo(const Molecule& ref); |
@@ -65,22 +85,33 @@ public: | ||
65 | 85 | void BroadcastPhaseSpacePointToAllProcesses(int root) const; |
66 | 86 | private: |
67 | 87 | std::vector<MolDS_base_atoms::Atom*>* atomVect; |
88 | + std::vector<MolDS_base_atoms::Atom*>* epcVect; // Vector of Environmental Point Charges | |
68 | 89 | double* xyzCOM; // x, y, z coordinates of Center of Mass; |
69 | 90 | double* xyzCOC; // x, y, z coordinates of Center of Core; |
70 | - double** distanceMatrix; // distance between each atom; | |
91 | + double** distanceAtoms; // distance between each atom; | |
92 | + double** distanceEpcs; // distance between each environmental point charge; | |
93 | + double** distanceAtomsEpcs;// distance between each atom and environmental point charge; | |
71 | 94 | int totalNumberAOs; |
72 | 95 | int totalNumberValenceElectrons; |
73 | 96 | double totalCoreMass; |
74 | 97 | void Initialize(); |
75 | 98 | void CopyInitialize(const Molecule& rhs); |
76 | - void Finalize(std::vector<MolDS_base_atoms::Atom*>** atomVect, double** xyzCOM, double** xyzCOC, double*** distanceMatrix); | |
99 | + void Finalize(std::vector<MolDS_base_atoms::Atom*>** atomVect, | |
100 | + std::vector<MolDS_base_atoms::Atom*>** epcVect, | |
101 | + double** xyzCOM, | |
102 | + double** xyzCOC, | |
103 | + double*** distanceAtoms, | |
104 | + double*** distanceEpcs, | |
105 | + double*** distanceAtomsEpcs); | |
77 | 106 | void SetMessages(); |
78 | 107 | void CalcTotalNumberValenceElectrons(); |
79 | 108 | void CalcTotalNumberAOs(); |
80 | 109 | void CalcTotalCoreMass(); |
81 | 110 | void CalcXyzCOM(); |
82 | 111 | void CalcXyzCOC(); |
83 | - void CalcDistanceMatrix(); | |
112 | + void CalcDistanceAtoms(); | |
113 | + void CalcDistanceEpcs(); | |
114 | + void CalcDistanceAtomsEpcs(); | |
84 | 115 | void CalcInertiaTensor(double** inertiaTensor, |
85 | 116 | double const* inertiaTensorOrigin); |
86 | 117 | void FreeInertiaTensorMoments(double*** inertiaTensor, |
@@ -98,8 +129,11 @@ private: | ||
98 | 129 | MolDS_base::EularAngle rotatingEularAngles)const; |
99 | 130 | void OutputTranslatingConditions(double const* translatingDifference) const; |
100 | 131 | std::string errorMessageGetAtomNull; |
132 | + std::string errorMessageGetEPCNull; | |
101 | 133 | std::string errorMessageAddAtomNull; |
134 | + std::string errorMessageAddEPCNull; | |
102 | 135 | std::string errorMessageGetNumberAtomsNull; |
136 | + std::string errorMessageGetNumberEPCsNull; | |
103 | 137 | std::string errorMessageGetXyzCOMNull; |
104 | 138 | std::string errorMessageGetXyzCOCNull; |
105 | 139 | std::string errorMessageCalcXyzCOMNull; |
@@ -111,6 +145,9 @@ private: | ||
111 | 145 | std::string messageAtomCoordinatesTitle; |
112 | 146 | std::string messageAtomMomenta; |
113 | 147 | std::string messageAtomMomentaTitle; |
148 | + std::string messageEpcConfiguration; | |
149 | + std::string messageEpcCoordinates; | |
150 | + std::string messageEpcCoordinatesTitle; | |
114 | 151 | std::string messageCOM; |
115 | 152 | std::string messageCOC; |
116 | 153 | std::string messageCOMTitle; |
@@ -43,16 +43,16 @@ namespace MolDS_base{ | ||
43 | 43 | Parameters* Parameters::parameters = NULL; |
44 | 44 | // Physical constsnts |
45 | 45 | const double Parameters::eV2AU = 0.03674903; |
46 | -const double Parameters::j2AU = pow(10.0,18.0)/4.35974394; | |
46 | +const double Parameters::j2AU = 1.0e18/4.35974394; | |
47 | 47 | const double Parameters::kcalMolin2AU = 0.00159360175; |
48 | 48 | const double Parameters::angstrom2AU = 1.0/0.5291772; |
49 | 49 | const double Parameters::nm2AU = 10.0*Parameters::angstrom2AU; |
50 | -const double Parameters::kayser2AU = 4.556336*pow(10.0,-6.0); | |
51 | -const double Parameters::fs2AU = 1.0/(2.418884326505*pow(10.0,-2.0)); | |
52 | -const double Parameters::gMolin2AU = pow(10.0,5.0)/(6.0221415*9.1095); | |
50 | +const double Parameters::kayser2AU = 4.556336e-6; | |
51 | +const double Parameters::fs2AU = 1.0/(2.418884326505e-2); | |
52 | +const double Parameters::gMolin2AU = 1.0e5/(6.0221415*9.1095); | |
53 | 53 | const double Parameters::degree2Radian = M_PI / 180.0; |
54 | -const double Parameters::boltzmann = 3.166791*pow(10.0,-6.0); | |
55 | -const double Parameters::avogadro = 6.0221415*pow(10.0, 23.0); | |
54 | +const double Parameters::boltzmann = 3.166791e-6; | |
55 | +const double Parameters::avogadro = 6.0221415e23; | |
56 | 56 | const double Parameters::debye2AU = 0.393430191; |
57 | 57 | |
58 | 58 | // constant |
@@ -114,13 +114,13 @@ void Parameters::SetDefaultValues(){ | ||
114 | 114 | this->currentSimulation = Once; |
115 | 115 | this->currentTheory = CNDO2; |
116 | 116 | // SCF |
117 | - this->thresholdSCF = pow(10.0, -8.0); | |
117 | + this->thresholdSCF = 1.0e-8; | |
118 | 118 | this->maxIterationsSCF = 100; |
119 | 119 | this->dampingThreshSCF = 1.0; |
120 | 120 | this->dampingWeightSCF = 0.8; |
121 | 121 | this->diisNumErrorVectSCF = 5; |
122 | - this->diisStartErrorSCF = pow(10.0, -2.0); | |
123 | - this->diisEndErrorSCF = pow(10.0, -8.0); | |
122 | + this->diisStartErrorSCF = 1.0e-2; | |
123 | + this->diisEndErrorSCF = 1.0e-8; | |
124 | 124 | this->requiresVdWSCF = false; |
125 | 125 | this->vdWScalingFactorSCF = 1.40; |
126 | 126 | this->vdWDampingFactorSCF = 23.0; |
@@ -171,7 +171,7 @@ void Parameters::SetDefaultValues(){ | ||
171 | 171 | this->isDavidsonCIS = true; |
172 | 172 | this->maxIterationsCIS = 100; |
173 | 173 | this->maxDimensionsCIS = 100; |
174 | - this->normToleranceCIS = pow(10.0, -6.0); | |
174 | + this->normToleranceCIS = 1.0e-6; | |
175 | 175 | this->numberPrintCoefficientsCIS = 1; |
176 | 176 | this->requiresExcitonEnergiesCIS = false; |
177 | 177 | this->requiresAllTransitionDipoleMomentsCIS = false; |
@@ -47,6 +47,7 @@ public: | ||
47 | 47 | double GetBondingParameter(MolDS_base::TheoryType theory, |
48 | 48 | MolDS_base::OrbitalType orbital) const; |
49 | 49 | inline double GetCoreCharge() const{return this->coreCharge;} |
50 | + inline void SetCoreCharge(double charge) {this->coreCharge=charge;} | |
50 | 51 | inline int GetFirstAOIndex() const{return this->firstAOIndex;} |
51 | 52 | inline void SetFirstAOIndex(int firstAOIndex){this->firstAOIndex = firstAOIndex;} |
52 | 53 | inline int GetLastAOIndex() const{return this->firstAOIndex + this->valence.size()-1;} |
@@ -0,0 +1,52 @@ | ||
1 | +//************************************************************************// | |
2 | +// Copyright (C) 2011-2012 Mikiya Fujii // | |
3 | +// // | |
4 | +// This file is part of MolDS. // | |
5 | +// // | |
6 | +// MolDS is free software: you can redistribute it and/or modify // | |
7 | +// it under the terms of the GNU General Public License as published by // | |
8 | +// the Free Software Foundation, either version 3 of the License, or // | |
9 | +// (at your option) any later version. // | |
10 | +// // | |
11 | +// MolDS is distributed in the hope that it will be useful, // | |
12 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of // | |
13 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // | |
14 | +// GNU General Public License for more details. // | |
15 | +// // | |
16 | +// You should have received a copy of the GNU General Public License // | |
17 | +// along with MolDS. If not, see <http://www.gnu.org/licenses/>. // | |
18 | +//************************************************************************// | |
19 | +#include<stdio.h> | |
20 | +#include<stdlib.h> | |
21 | +#include<iostream> | |
22 | +#include<sstream> | |
23 | +#include<math.h> | |
24 | +#include<vector> | |
25 | +#include<boost/format.hpp> | |
26 | +#include"../../Enums.h" | |
27 | +#include"../../Uncopyable.h" | |
28 | +#include"../../PrintController.h" | |
29 | +#include"../../MolDSException.h" | |
30 | +#include"../../MallocerFreer.h" | |
31 | +#include"../../../mpi/MpiInt.h" | |
32 | +#include"../../../mpi/MpiProcess.h" | |
33 | +#include"../../EularAngle.h" | |
34 | +#include"../../Parameters.h" | |
35 | +#include"../../RealSphericalHarmonicsIndex.h" | |
36 | +#include"../Atom.h" | |
37 | +#include"EnvironmentalPointCharge.h" | |
38 | +using namespace std; | |
39 | +using namespace MolDS_base; | |
40 | +namespace MolDS_base_atoms_mm{ | |
41 | +EnvironmentalPointCharge::EnvironmentalPointCharge(int index) : MolDS_base_atoms::Atom(index){ | |
42 | + this->SetAtomicParameters(); | |
43 | +} | |
44 | + | |
45 | +void EnvironmentalPointCharge::SetAtomicParameters(){ | |
46 | + this->atomType = EPC; | |
47 | + this->valence.push_back(s); | |
48 | + for(int i=0; i<this->valence.size();i++){ | |
49 | + this->realSphericalHarmonicsIndeces.push_back(new RealSphericalHarmonicsIndex(this->valence[i])); | |
50 | + } | |
51 | +} | |
52 | +} |
@@ -0,0 +1,30 @@ | ||
1 | +//************************************************************************// | |
2 | +// Copyright (C) 2011-2012 Mikiya Fujii // | |
3 | +// // | |
4 | +// This file is part of MolDS. // | |
5 | +// // | |
6 | +// MolDS is free software: you can redistribute it and/or modify // | |
7 | +// it under the terms of the GNU General Public License as published by // | |
8 | +// the Free Software Foundation, either version 3 of the License, or // | |
9 | +// (at your option) any later version. // | |
10 | +// // | |
11 | +// MolDS is distributed in the hope that it will be useful, // | |
12 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of // | |
13 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // | |
14 | +// GNU General Public License for more details. // | |
15 | +// // | |
16 | +// You should have received a copy of the GNU General Public License // | |
17 | +// along with MolDS. If not, see <http://www.gnu.org/licenses/>. // | |
18 | +//************************************************************************// | |
19 | +#ifndef INCLUDED_ENVIRONMENTAL_POINT_CHARGE | |
20 | +#define INCLUDED_ENVIRONMENTAL_POINT_CHARGE | |
21 | +namespace MolDS_base_atoms_mm{ | |
22 | +class EnvironmentalPointCharge : public MolDS_base_atoms::Atom { | |
23 | +public: | |
24 | + EnvironmentalPointCharge(int index); | |
25 | +private: | |
26 | + EnvironmentalPointCharge(); | |
27 | + void SetAtomicParameters(); | |
28 | +}; | |
29 | +} | |
30 | +#endif |
@@ -38,14 +38,17 @@ | ||
38 | 38 | #include"../atoms/Natom.h" |
39 | 39 | #include"../atoms/Oatom.h" |
40 | 40 | #include"../atoms/Satom.h" |
41 | +#include"../atoms/mm/EnvironmentalPointCharge.h" | |
41 | 42 | #include"AtomFactory.h" |
42 | 43 | using namespace std; |
43 | 44 | using namespace MolDS_base; |
44 | 45 | using namespace MolDS_base_atoms; |
46 | +using namespace MolDS_base_atoms_mm; | |
45 | 47 | namespace MolDS_base_factories{ |
46 | 48 | |
47 | -string AtomFactory::errorMessageNotEnableAtom = "Error in base::AtomFactory::Create: Not Enable AtomType is set."; | |
48 | -string AtomFactory::errorMessageAtomType = "\tatom type = "; | |
49 | +string AtomFactory::errorMessageNotEnableAtom = "Error in base::AtomFactory::Create: Not Enable AtomType is set."; | |
50 | +string AtomFactory::errorMessageNotEnvironmentalPointCharge = "Error in base::AtomFactory::Create: Not Environmental point charge is set."; | |
51 | +string AtomFactory::errorMessageAtomType = "\tatom type = "; | |
49 | 52 | |
50 | 53 | Atom* AtomFactory::Create(AtomType atomType, int index, double x, double y, double z, double px, double py, double pz){ |
51 | 54 | Atom* atom=NULL; |
@@ -78,12 +81,36 @@ Atom* AtomFactory::Create(AtomType atomType, int index, double x, double y, doub | ||
78 | 81 | return atom; |
79 | 82 | } |
80 | 83 | |
84 | +Atom* AtomFactory::Create(AtomType atomType, int index, double x, double y, double z, double px, double py, double pz, double charge){ | |
85 | + Atom* atom=NULL; | |
86 | + if(atomType == EPC){ | |
87 | + atom = new EnvironmentalPointCharge(index); | |
88 | + } | |
89 | + else{ | |
90 | + stringstream ss; | |
91 | + ss << AtomFactory::errorMessageNotEnvironmentalPointCharge << endl; | |
92 | + ss << AtomFactory::errorMessageAtomType << AtomTypeStr(atomType) << endl; | |
93 | + throw MolDSException(ss.str()); | |
94 | + } | |
95 | + atom->SetXyz(x, y, z); | |
96 | + atom->SetPxyz(px, py, pz); | |
97 | + atom->SetCoreCharge(charge); | |
98 | + return atom; | |
99 | +} | |
100 | + | |
81 | 101 | Atom* AtomFactory::Create(AtomType atomType, int index, double x, double y, double z){ |
82 | 102 | double px=0.0; |
83 | 103 | double py=0.0; |
84 | 104 | double pz=0.0; |
85 | 105 | return AtomFactory::Create(atomType, index, x, y, z, px, py, pz); |
86 | 106 | } |
107 | + | |
108 | +Atom* AtomFactory::Create(AtomType atomType, int index, double x, double y, double z, double charge){ | |
109 | + double px=0.0; | |
110 | + double py=0.0; | |
111 | + double pz=0.0; | |
112 | + return AtomFactory::Create(atomType, index, x, y, z, px, py, pz, charge); | |
113 | +} | |
87 | 114 | } |
88 | 115 | |
89 | 116 |
@@ -35,11 +35,27 @@ public: | ||
35 | 35 | int index, |
36 | 36 | double x, |
37 | 37 | double y, |
38 | + double z, | |
39 | + double px, | |
40 | + double py, | |
41 | + double pz, | |
42 | + double charge); | |
43 | + static MolDS_base_atoms::Atom* Create(MolDS_base::AtomType atomType, | |
44 | + int index, | |
45 | + double x, | |
46 | + double y, | |
38 | 47 | double z); |
48 | + static MolDS_base_atoms::Atom* Create(MolDS_base::AtomType atomType, | |
49 | + int index, | |
50 | + double x, | |
51 | + double y, | |
52 | + double z, | |
53 | + double charge); | |
39 | 54 | private: |
40 | 55 | AtomFactory(); |
41 | 56 | ~AtomFactory(); |
42 | 57 | static std::string errorMessageNotEnableAtom; |
58 | + static std::string errorMessageNotEnvironmentalPointCharge; | |
43 | 59 | static std::string errorMessageAtomType; |
44 | 60 | }; |
45 | 61 |
@@ -71,9 +71,10 @@ Cndo2::Cndo2(){ | ||
71 | 71 | //protected variables |
72 | 72 | this->molecule = NULL; |
73 | 73 | this->theory = CNDO2; |
74 | - this->coreRepulsionEnergy = 0.0; | |
75 | - this->vdWCorrectionEnergy = 0.0; | |
76 | - this->matrixCISdimension = 0; | |
74 | + this->coreRepulsionEnergy = 0.0; | |
75 | + this->coreEpcCoulombEnergy = 0.0; | |
76 | + this->vdWCorrectionEnergy = 0.0; | |
77 | + this->matrixCISdimension = 0; | |
77 | 78 | this->fockMatrix = NULL; |
78 | 79 | this->energiesMO = NULL; |
79 | 80 | this->orbitalElectronPopulation = NULL; |
@@ -81,17 +82,18 @@ Cndo2::Cndo2(){ | ||
81 | 82 | this->atomicElectronPopulation = NULL; |
82 | 83 | this->atomicElectronPopulationCIS = NULL; |
83 | 84 | this->atomicUnpairedPopulationCIS = NULL; |
84 | - this->overlapAOs = NULL; | |
85 | - this->twoElecTwoCore = NULL; | |
86 | - this->cartesianMatrix = NULL; | |
85 | + this->overlapAOs = NULL; | |
86 | + this->twoElecsTwoAtomCores = NULL; | |
87 | + this->twoElecsAtomEpcCores = NULL; | |
88 | + this->cartesianMatrix = NULL; | |
87 | 89 | this->electronicTransitionDipoleMoments = NULL; |
88 | - this->coreDipoleMoment = NULL; | |
89 | - this->normalForceConstants = NULL; | |
90 | - this->normalModes = NULL; | |
91 | - this->matrixCIS = NULL; | |
92 | - this->excitedEnergies = NULL; | |
93 | - this->freeExcitonEnergiesCIS = NULL; | |
94 | - this->matrixForce = NULL; | |
90 | + this->coreDipoleMoment = NULL; | |
91 | + this->normalForceConstants = NULL; | |
92 | + this->normalModes = NULL; | |
93 | + this->matrixCIS = NULL; | |
94 | + this->excitedEnergies = NULL; | |
95 | + this->freeExcitonEnergiesCIS = NULL; | |
96 | + this->matrixForce = NULL; | |
95 | 97 | |
96 | 98 | //protected methods |
97 | 99 | this->SetMessages(); |
@@ -227,12 +229,16 @@ void Cndo2::SetMessages(){ | ||
227 | 229 | this->messageUnpairedAtoms = "\tUnpaired electron population:"; |
228 | 230 | this->messageUnpairedAtomsTitle = "\t\t\t\t| k-th eigenstate | i-th atom | atom type | Unpaired electron population[a.u.]| \n"; |
229 | 231 | this->messageElecEnergy = "\tElectronic energy(SCF):"; |
230 | - this->messageNoteElecEnergy = "\tNote that this electronic energy includes core-repulsions.\n\n"; | |
231 | - this->messageNoteElecEnergyVdW = "\tNote that this electronic energy includes core-repulsions and vdW correction.\n\n"; | |
232 | + this->messageNoteElecEnergy = "\tNote that this electronic energy includes core-repulsions.\n\n"; | |
233 | + this->messageNoteElecEnergyVdW = "\tNote that this electronic energy includes core-repulsions and vdW correction.\n\n"; | |
234 | + this->messageNoteElecEnergyEpcVdW = "\tNote that this electronic energy includes core-repulsions, core-EPC coulomb, and vdW correction.\n\n"; | |
235 | + this->messageNoteElecEnergyEpc = "\tNote that this electronic energy includes core-repulsions and core-EPC coulomb.\n\n"; | |
232 | 236 | this->messageElecEnergyTitle = "\t\t\t\t| [a.u.] | [eV] |\n"; |
233 | 237 | this->messageUnitSec = "[s]."; |
234 | 238 | this->messageCoreRepulsionTitle = "\t\t\t\t| [a.u.] | [eV] |\n"; |
235 | 239 | this->messageCoreRepulsion = "\tCore repulsion energy:"; |
240 | + this->messageCoreEpcCoulombTitle = "\t\t\t\t\t\t\t\t| [a.u.] | [eV] |\n"; | |
241 | + this->messageCoreEpcCoulomb = "\tCoulomb interaction between cores and EPCs energy:"; | |
236 | 242 | this->messageVdWCorrectionTitle = "\t\t\t\t\t\t| [a.u.] | [eV] |\n"; |
237 | 243 | this->messageVdWCorrection = "\tEmpirical van der Waals correction:"; |
238 | 244 | this->messageElectronicDipoleMomentTitle = "\t\t\t\t\t| x[a.u.] | y[a.u.] | z[a.u.] | magnitude[a.u.] |\t\t| x[debye] | y[debye] | z[debye] | magnitude[debye] |\n"; |
@@ -340,6 +346,7 @@ void Cndo2::CheckEnableAtomType(const Molecule& molecule) const{ | ||
340 | 346 | } |
341 | 347 | |
342 | 348 | void Cndo2::CalcCoreRepulsionEnergy(){ |
349 | + // interaction between atoms | |
343 | 350 | double energy = 0.0; |
344 | 351 | for(int i=0; i<this->molecule->GetNumberAtoms(); i++){ |
345 | 352 | for(int j=i+1; j<this->molecule->GetNumberAtoms(); j++){ |
@@ -347,6 +354,17 @@ void Cndo2::CalcCoreRepulsionEnergy(){ | ||
347 | 354 | } |
348 | 355 | } |
349 | 356 | this->coreRepulsionEnergy = energy; |
357 | + | |
358 | + // interaction between atoms and epcs | |
359 | + if(this->molecule->GetNumberEpcs()<=0){return;} | |
360 | + energy = 0.0; | |
361 | + for(int i=0; i<this->molecule->GetNumberAtoms(); i++){ | |
362 | + for(int j=0; j<this->molecule->GetNumberEpcs(); j++){ | |
363 | + energy += this->GetAtomCoreEpcCoulombEnergy(i, j); | |
364 | + } | |
365 | + } | |
366 | + this->coreEpcCoulombEnergy = energy; | |
367 | + | |
350 | 368 | } |
351 | 369 | |
352 | 370 | double Cndo2::GetDiatomCoreRepulsionEnergy(int indexAtomA, int indexAtomB) const{ |
@@ -356,6 +374,11 @@ double Cndo2::GetDiatomCoreRepulsionEnergy(int indexAtomA, int indexAtomB) const | ||
356 | 374 | return atomA.GetCoreCharge()*atomB.GetCoreCharge()/distance; |
357 | 375 | } |
358 | 376 | |
377 | +double Cndo2::GetAtomCoreEpcCoulombEnergy(int indexAtom, int indexEpc) const{ | |
378 | + // do nothiing | |
379 | + return 0.0; | |
380 | +} | |
381 | + | |
359 | 382 | // First derivative of diatomic core repulsion energy. |
360 | 383 | // This derivative is related to the coordinate of atomA. |
361 | 384 | double Cndo2::GetDiatomCoreRepulsion1stDerivative(int indexAtomA, int indexAtomB, |
@@ -516,11 +539,11 @@ void Cndo2::DoSCF(bool requiresGuess){ | ||
516 | 539 | |
517 | 540 | // temporary matrices for scf |
518 | 541 | double** oldOrbitalElectronPopulation = NULL; |
519 | - double*** diisStoredDensityMatrix = NULL; | |
520 | - double*** diisStoredErrorVect = NULL; | |
521 | - double** diisErrorProducts = NULL; | |
522 | - double** tmpDiisErrorProducts = NULL; | |
523 | - double* diisErrorCoefficients = NULL; | |
542 | + double*** diisStoredDensityMatrix = NULL; | |
543 | + double*** diisStoredErrorVect = NULL; | |
544 | + double** diisErrorProducts = NULL; | |
545 | + double** tmpDiisErrorProducts = NULL; | |
546 | + double* diisErrorCoefficients = NULL; | |
524 | 547 | |
525 | 548 | try{ |
526 | 549 | this->MallocSCFTemporaryMatrices(&oldOrbitalElectronPopulation, |
@@ -533,7 +556,9 @@ void Cndo2::DoSCF(bool requiresGuess){ | ||
533 | 556 | this->CalcGammaAB(this->gammaAB, *this->molecule); |
534 | 557 | this->CalcOverlapAOs(this->overlapAOs, *this->molecule); |
535 | 558 | this->CalcCartesianMatrixByGTOExpansion(this->cartesianMatrix, *this->molecule, STO6G); |
536 | - this->CalcTwoElecTwoCore(this->twoElecTwoCore, *this->molecule); | |
559 | + this->CalcTwoElecsTwoCores(this->twoElecsTwoAtomCores, | |
560 | + this->twoElecsAtomEpcCores, | |
561 | + *this->molecule); | |
537 | 562 | |
538 | 563 | // SCF |
539 | 564 | double rmsDensity=0.0; |
@@ -556,7 +581,7 @@ void Cndo2::DoSCF(bool requiresGuess){ | ||
556 | 581 | this->gammaAB, |
557 | 582 | this->orbitalElectronPopulation, |
558 | 583 | this->atomicElectronPopulation, |
559 | - this->twoElecTwoCore, | |
584 | + this->twoElecsTwoAtomCores, | |
560 | 585 | isGuess); |
561 | 586 | |
562 | 587 | // diagonalization of the Fock matrix |
@@ -649,12 +674,13 @@ void Cndo2::CalcSCFProperties(){ | ||
649 | 674 | this->CalcVdWCorrectionEnergy(); |
650 | 675 | } |
651 | 676 | this->CalcElecSCFEnergy(&this->elecSCFEnergy, |
652 | - *this->molecule, | |
653 | - this->energiesMO, | |
654 | - this->fockMatrix, | |
655 | - this->gammaAB, | |
656 | - this->coreRepulsionEnergy, | |
657 | - this->vdWCorrectionEnergy); | |
677 | + *this->molecule, | |
678 | + this->energiesMO, | |
679 | + this->fockMatrix, | |
680 | + this->gammaAB, | |
681 | + this->coreRepulsionEnergy, | |
682 | + this->coreEpcCoulombEnergy, | |
683 | + this->vdWCorrectionEnergy); | |
658 | 684 | this->CalcCoreDipoleMoment(this->coreDipoleMoment, *this->molecule); |
659 | 685 | this->CalcElectronicDipoleMomentGroundState(this->electronicTransitionDipoleMoments, |
660 | 686 | this->cartesianMatrix, |
@@ -744,8 +770,9 @@ double const* const* Cndo2::GetForce(int elecState){ | ||
744 | 770 | return this->matrixForce[0]; |
745 | 771 | } |
746 | 772 | |
747 | -void Cndo2::CalcTwoElecTwoCore(double****** twoElecTwoCore, | |
748 | - const Molecule& molecule) const{ | |
773 | +void Cndo2::CalcTwoElecsTwoCores(double****** twoElecsTwoAtomCores, | |
774 | + double****** twoElecsAtomEpcCores, | |
775 | + const Molecule& molecule) const{ | |
749 | 776 | // do nothing for CNDO, INDO, and ZINDO/S. |
750 | 777 | // two electron two core integrals are not needed for CNDO, INDO, and ZINDO/S. |
751 | 778 | } |
@@ -986,9 +1013,15 @@ void Cndo2::OutputSCFEnergies() const{ | ||
986 | 1013 | this->OutputLog(boost::format("%s\t%e\t%e\n") % this->messageElecEnergy |
987 | 1014 | % this->elecSCFEnergy |
988 | 1015 | % (this->elecSCFEnergy/eV2AU)); |
989 | - if(Parameters::GetInstance()->RequiresVdWSCF()){ | |
1016 | + if(Parameters::GetInstance()->RequiresVdWSCF() && this->molecule->GetNumberEpcs()<=0){ | |
990 | 1017 | this->OutputLog(this->messageNoteElecEnergyVdW); |
991 | 1018 | } |
1019 | + else if(Parameters::GetInstance()->RequiresVdWSCF() && 0<this->molecule->GetNumberEpcs()){ | |
1020 | + this->OutputLog(this->messageNoteElecEnergyEpcVdW); | |
1021 | + } | |
1022 | + else if(!Parameters::GetInstance()->RequiresVdWSCF() && 0<this->molecule->GetNumberEpcs()){ | |
1023 | + this->OutputLog(this->messageNoteElecEnergyEpc); | |
1024 | + } | |
992 | 1025 | else{ |
993 | 1026 | this->OutputLog(this->messageNoteElecEnergy); |
994 | 1027 | } |
@@ -999,6 +1032,14 @@ void Cndo2::OutputSCFEnergies() const{ | ||
999 | 1032 | % this->coreRepulsionEnergy |
1000 | 1033 | % (this->coreRepulsionEnergy/eV2AU)); |
1001 | 1034 | |
1035 | + // output coulomb interaction between atoms and epcs | |
1036 | + if(0<this->molecule->GetNumberEpcs()){ | |
1037 | + this->OutputLog(this->messageCoreEpcCoulombTitle); | |
1038 | + this->OutputLog(boost::format("%s\t%e\t%e\n\n") % this->messageCoreEpcCoulomb | |
1039 | + % this->coreEpcCoulombEnergy | |
1040 | + % (this->coreEpcCoulombEnergy/eV2AU)); | |
1041 | + } | |
1042 | + | |
1002 | 1043 | // output van der Waals correction |
1003 | 1044 | if(Parameters::GetInstance()->RequiresVdWSCF()){ |
1004 | 1045 | this->OutputLog(this->messageVdWCorrectionTitle); |
@@ -1190,6 +1231,7 @@ void Cndo2::CalcElecSCFEnergy(double* elecSCFEnergy, | ||
1190 | 1231 | double const* const* fockMatrix, |
1191 | 1232 | double const* const* gammaAB, |
1192 | 1233 | double coreRepulsionEnergy, |
1234 | + double coreEpcCoulombEnergy, | |
1193 | 1235 | double vdWCorrectionEnergy) const{ |
1194 | 1236 | double electronicEnergy = 0.0; |
1195 | 1237 | // use density matrix for electronic energy |
@@ -1214,7 +1256,7 @@ void Cndo2::CalcElecSCFEnergy(double* elecSCFEnergy, | ||
1214 | 1256 | this->gammaAB, |
1215 | 1257 | this->orbitalElectronPopulation, |
1216 | 1258 | this->atomicElectronPopulation, |
1217 | - this->twoElecTwoCore, | |
1259 | + this->twoElecsTwoAtomCores, | |
1218 | 1260 | isGuess); |
1219 | 1261 | this->CalcFockMatrix(hMatrix, |
1220 | 1262 | molecule, |
@@ -1222,7 +1264,7 @@ void Cndo2::CalcElecSCFEnergy(double* elecSCFEnergy, | ||
1222 | 1264 | this->gammaAB, |
1223 | 1265 | dammyOrbitalElectronPopulation, |
1224 | 1266 | dammyAtomicElectronPopulation, |
1225 | - this->twoElecTwoCore, | |
1267 | + this->twoElecsTwoAtomCores, | |
1226 | 1268 | isGuess); |
1227 | 1269 | |
1228 | 1270 | for(int i=0; i<totalNumberAOs; i++){ |
@@ -1269,7 +1311,10 @@ void Cndo2::CalcElecSCFEnergy(double* elecSCFEnergy, | ||
1269 | 1311 | } |
1270 | 1312 | */ |
1271 | 1313 | |
1272 | - *elecSCFEnergy = electronicEnergy + coreRepulsionEnergy + vdWCorrectionEnergy; | |
1314 | + *elecSCFEnergy = electronicEnergy | |
1315 | + +coreRepulsionEnergy | |
1316 | + +coreEpcCoulombEnergy | |
1317 | + +vdWCorrectionEnergy; | |
1273 | 1318 | } |
1274 | 1319 | |
1275 | 1320 | void Cndo2::FreeElecEnergyMatrices(double*** fMatrix, |
@@ -1386,7 +1431,7 @@ void Cndo2::CalcFockMatrix(double** fockMatrix, | ||
1386 | 1431 | double const* const* gammaAB, |
1387 | 1432 | double const* const* orbitalElectronPopulation, |
1388 | 1433 | double const* atomicElectronPopulation, |
1389 | - double const* const* const* const* const* const* twoElecTwoCore, | |
1434 | + double const* const* const* const* const* const* twoElecsTwoAtomCores, | |
1390 | 1435 | bool isGuess) const{ |
1391 | 1436 | int totalNumberAOs = molecule.GetTotalNumberAOs(); |
1392 | 1437 | int totalNumberAtoms = molecule.GetNumberAtoms(); |
@@ -1423,7 +1468,7 @@ void Cndo2::CalcFockMatrix(double** fockMatrix, | ||
1423 | 1468 | gammaAB, |
1424 | 1469 | orbitalElectronPopulation, |
1425 | 1470 | atomicElectronPopulation, |
1426 | - twoElecTwoCore, | |
1471 | + twoElecsTwoAtomCores, | |
1427 | 1472 | isGuess); |
1428 | 1473 | } |
1429 | 1474 | else if(mu < nu){ |
@@ -1438,7 +1483,7 @@ void Cndo2::CalcFockMatrix(double** fockMatrix, | ||
1438 | 1483 | gammaAB, |
1439 | 1484 | overlapAOs, |
1440 | 1485 | orbitalElectronPopulation, |
1441 | - twoElecTwoCore, | |
1486 | + twoElecsTwoAtomCores, | |
1442 | 1487 | isGuess); |
1443 | 1488 | } |
1444 | 1489 | else{ |
@@ -1495,7 +1540,7 @@ double Cndo2::GetFockDiagElement(const Atom& atomA, | ||
1495 | 1540 | double const* const* gammaAB, |
1496 | 1541 | double const* const* orbitalElectronPopulation, |
1497 | 1542 | double const* atomicElectronPopulation, |
1498 | - double const* const* const* const* const* const* twoElecTwoCore, | |
1543 | + double const* const* const* const* const* const* twoElecsTwoAtomCores, | |
1499 | 1544 | bool isGuess) const{ |
1500 | 1545 | double value; |
1501 | 1546 | int firstAOIndexA = atomA.GetFirstAOIndex(); |
@@ -1531,7 +1576,7 @@ double Cndo2::GetFockOffDiagElement(const Atom& atomA, | ||
1531 | 1576 | double const* const* gammaAB, |
1532 | 1577 | double const* const* overlapAOs, |
1533 | 1578 | double const* const* orbitalElectronPopulation, |
1534 | - double const* const* const* const* const* const* twoElecTwoCore, | |
1579 | + double const* const* const* const* const* const* twoElecsTwoAtomCores, | |
1535 | 1580 | bool isGuess) const{ |
1536 | 1581 | double value; |
1537 | 1582 | double K = this->GetBondingAdjustParameterK(atomA.GetValenceShellType(), atomB.GetValenceShellType()); |
@@ -94,6 +94,7 @@ protected: | ||
94 | 94 | MolDS_base::Molecule* molecule; |
95 | 95 | MolDS_base::TheoryType theory; |
96 | 96 | double coreRepulsionEnergy; |
97 | + double coreEpcCoulombEnergy; | |
97 | 98 | double vdWCorrectionEnergy; |
98 | 99 | int matrixCISdimension; |
99 | 100 | double** fockMatrix; |
@@ -104,7 +105,8 @@ protected: | ||
104 | 105 | double** atomicElectronPopulationCIS; |
105 | 106 | double** atomicUnpairedPopulationCIS; |
106 | 107 | double** overlapAOs; // overlap integral between AOs |
107 | - double****** twoElecTwoCore; | |
108 | + double****** twoElecsTwoAtomCores; | |
109 | + double****** twoElecsAtomEpcCores; | |
108 | 110 | double*** cartesianMatrix; // cartesian matrix represented by AOs |
109 | 111 | double*** electronicTransitionDipoleMoments; // Diagnonal terms are electronic dipole moments of each eigenstates (i.e. electronicDipole[0][0][XAxis] is the x-component of the electronic dipole moment of the ground state. electronicDipole[10][10][XAxis] is the x-component of the electronic dipole moment of the 10-th excited state). Off-diagonal terms are transition dipole moments between eigenstates (i.e. electronicDipole[10][0][XAxis] is the x-component of the transition dipole moment from the ground state to 10-th excited state.). |
110 | 112 | double* coreDipoleMoment; // dipole moment of configuration. |
@@ -131,6 +133,7 @@ protected: | ||
131 | 133 | double GetBondingAdjustParameterK(MolDS_base::ShellType shellA, |
132 | 134 | MolDS_base::ShellType shellB) const; |
133 | 135 | virtual double GetDiatomCoreRepulsionEnergy(int indexAtomA, int indexAtomB) const; |
136 | + virtual double GetAtomCoreEpcCoulombEnergy (int indexAtom, int indexEpc) const; | |
134 | 137 | virtual double GetDiatomCoreRepulsion1stDerivative(int indexAtomA, |
135 | 138 | int indexAtomB, |
136 | 139 | MolDS_base::CartesianType axisA) const; |
@@ -170,7 +173,7 @@ protected: | ||
170 | 173 | double const* const* gammaAB, |
171 | 174 | double const* const* orbitalElectronPopulation, |
172 | 175 | double const* atomicElectronPopulation, |
173 | - double const* const* const* const* const* const* twoElecTwoCore, | |
176 | + double const* const* const* const* const* const* twoElecsTwoAtomCores, | |
174 | 177 | bool isGuess) const; |
175 | 178 | virtual double GetFockOffDiagElement(const MolDS_base_atoms::Atom& atomA, |
176 | 179 | const MolDS_base_atoms::Atom& atomB, |
@@ -182,7 +185,7 @@ protected: | ||
182 | 185 | double const* const* gammaAB, |
183 | 186 | double const* const* overlapAOs, |
184 | 187 | double const* const* orbitalElectronPopulation, |
185 | - double const* const* const* const* const* const* twoElecTwoCore, | |
188 | + double const* const* const* const* const* const* twoElecsTwoAtomCores, | |
186 | 189 | bool isGuess) const; |
187 | 190 | void TransposeFockMatrixMatrix(double** transposedFockMatrix) const; |
188 | 191 | virtual void CalcDiatomicOverlapAOsInDiatomicFrame(double** diatomicOverlapAOs, |
@@ -250,8 +253,9 @@ protected: | ||
250 | 253 | const MolDS_base::Molecule& molecule, |
251 | 254 | double const* const* fockMatrix, |
252 | 255 | double const* const* gammaAB) const; |
253 | - virtual void CalcTwoElecTwoCore(double****** twoElecTwoCore, | |
254 | - const MolDS_base::Molecule& molecule) const; | |
256 | + virtual void CalcTwoElecsTwoCores(double****** twoElecsTwoAtomCores, | |
257 | + double****** twoElecsAtomEpcCores, | |
258 | + const MolDS_base::Molecule& molecule) const; | |
255 | 259 | virtual void CalcForce(const std::vector<int>& elecStates); |
256 | 260 | void CalcRotatingMatrix1stDerivatives(double*** rotMat1stDerivatives, |
257 | 261 | const MolDS_base_atoms::Atom& atomA, |
@@ -303,11 +307,15 @@ private: | ||
303 | 307 | std::string messageElecEnergy; |
304 | 308 | std::string messageNoteElecEnergy; |
305 | 309 | std::string messageNoteElecEnergyVdW; |
310 | + std::string messageNoteElecEnergyEpcVdW; | |
311 | + std::string messageNoteElecEnergyEpc; | |
306 | 312 | std::string messageElecEnergyTitle; |
307 | 313 | std::string messageOcc; |
308 | 314 | std::string messageUnOcc; |
309 | 315 | std::string messageCoreRepulsionTitle; |
310 | 316 | std::string messageCoreRepulsion; |
317 | + std::string messageCoreEpcCoulombTitle; | |
318 | + std::string messageCoreEpcCoulomb; | |
311 | 319 | std::string messageVdWCorrectionTitle; |
312 | 320 | std::string messageVdWCorrection; |
313 | 321 | std::string messageElectronicDipoleMomentTitle; |
@@ -463,7 +471,7 @@ private: | ||
463 | 471 | double const* const* gammaAB, |
464 | 472 | double const* const* orbitalElectronPopulation, |
465 | 473 | double const* atomicElectronPopulation, |
466 | - double const* const* const* const* const* const* twoElecTwoCore, | |
474 | + double const* const* const* const* const* const* twoElecsTwoAtomCores, | |
467 | 475 | bool isGuess) const; |
468 | 476 | void RotateDiatmicOverlapAOsToSpaceFrame(double** diatomicOverlapAOs, |
469 | 477 | double const* const* rotatingMatrix, |
@@ -510,6 +518,7 @@ private: | ||
510 | 518 | double const* const* fockMatrix, |
511 | 519 | double const* const* gammaAB, |
512 | 520 | double coreRepulsionEnergy, |
521 | + double coreEpcCoulombEnergy, | |
513 | 522 | double vdWCorrectionEnergy) const; |
514 | 523 | void FreeElecEnergyMatrices(double*** fMatrix, |
515 | 524 | double*** hMatrix, |
@@ -113,7 +113,7 @@ double Indo::GetFockDiagElement(const Atom& atomA, | ||
113 | 113 | double const* const* gammaAB, |
114 | 114 | double const* const* orbitalElectronPopulation, |
115 | 115 | double const* atomicElectronPopulation, |
116 | - double const* const* const* const* const* const* twoElecTwoCore, | |
116 | + double const* const* const* const* const* const* twoElecsTwoAtomCores, | |
117 | 117 | bool isGuess) const{ |
118 | 118 | double value; |
119 | 119 | int firstAOIndexA = atomA.GetFirstAOIndex(); |
@@ -160,7 +160,7 @@ double Indo::GetFockOffDiagElement(const Atom& atomA, | ||
160 | 160 | double const* const* gammaAB, |
161 | 161 | double const* const* overlapAOs, |
162 | 162 | double const* const* orbitalElectronPopulation, |
163 | - double const* const* const* const* const* const* twoElecTwoCore, | |
163 | + double const* const* const* const* const* const* twoElecsTwoAtomCores, | |
164 | 164 | bool isGuess) const{ |
165 | 165 | double value; |
166 | 166 | double K = this->GetBondingAdjustParameterK(atomA.GetValenceShellType(), atomB.GetValenceShellType()); |
@@ -37,7 +37,7 @@ protected: | ||
37 | 37 | double const* const* gammaAB, |
38 | 38 | double const* const* orbitalElectronPopulation, |
39 | 39 | double const* atomicElectronPopulation, |
40 | - double const* const* const* const* const* const* twoElecTwoCore, | |
40 | + double const* const* const* const* const* const* twoElecsTwoAtomCores, | |
41 | 41 | bool isGuess) const; |
42 | 42 | virtual double GetFockOffDiagElement(const MolDS_base_atoms::Atom& atomA, |
43 | 43 | const MolDS_base_atoms::Atom& atomB, |
@@ -49,7 +49,7 @@ protected: | ||
49 | 49 | double const* const* gammaAB, |
50 | 50 | double const* const* overelap, |
51 | 51 | double const* const* orbitalElectronPopulation, |
52 | - double const* const* const* const* const* const* twoElecTwoCore, | |
52 | + double const* const* const* const* const* const* twoElecsTwoAtomCores, | |
53 | 53 | bool isGuess) const; |
54 | 54 | virtual double GetMolecularIntegralElement(int moI, int moJ, int moK, int moL, |
55 | 55 | const MolDS_base::Molecule& molecule, |
@@ -49,6 +49,7 @@ | ||
49 | 49 | #include"../base/atoms/Natom.h" |
50 | 50 | #include"../base/atoms/Oatom.h" |
51 | 51 | #include"../base/atoms/Satom.h" |
52 | +#include"../base/atoms/mm/EnvironmentalPointCharge.h" | |
52 | 53 | #include"../base/Molecule.h" |
53 | 54 | #include"../base/ElectronicStructure.h" |
54 | 55 | #include"../cndo/Cndo2.h" |
@@ -68,24 +69,37 @@ Mndo::Mndo() : MolDS_zindo::ZindoS(){ | ||
68 | 69 | this->SetMessages(); |
69 | 70 | this->SetEnableAtomTypes(); |
70 | 71 | // private variables |
71 | - this->twoElecTwoCoreMpiBuff = NULL; | |
72 | + this->twoElecsTwoAtomCoresMpiBuff = NULL; | |
73 | + this->twoElecsAtomEpcCoresMpiBuff = NULL; | |
72 | 74 | this->heatsFormation = 0.0; |
73 | 75 | //this->OutputLog("Mndo created\n"); |
74 | 76 | } |
75 | 77 | |
76 | 78 | Mndo::~Mndo(){ |
77 | 79 | OrbitalType twoElecLimit = dxy; |
78 | - MallocerFreer::GetInstance()->Free<double>(&this->twoElecTwoCore, | |
80 | + MallocerFreer::GetInstance()->Free<double>(&this->twoElecsTwoAtomCores, | |
79 | 81 | this->molecule->GetNumberAtoms(), |
80 | 82 | this->molecule->GetNumberAtoms(), |
81 | 83 | twoElecLimit, |
82 | 84 | twoElecLimit, |
83 | 85 | twoElecLimit, |
84 | 86 | twoElecLimit); |
87 | + MallocerFreer::GetInstance()->Free<double>(&this->twoElecsAtomEpcCores, | |
88 | + this->molecule->GetNumberAtoms(), | |
89 | + this->molecule->GetNumberEpcs(), | |
90 | + twoElecLimit, | |
91 | + twoElecLimit, | |
92 | + twoElecLimit, | |
93 | + twoElecLimit); | |
85 | 94 | int numBuff = (twoElecLimit+1)*twoElecLimit/2; |
86 | - MallocerFreer::GetInstance()->Free<double>(&this->twoElecTwoCoreMpiBuff, | |
95 | + MallocerFreer::GetInstance()->Free<double>(&this->twoElecsTwoAtomCoresMpiBuff, | |
96 | + this->molecule->GetNumberAtoms(), | |
87 | 97 | this->molecule->GetNumberAtoms(), |
98 | + numBuff, | |
99 | + numBuff); | |
100 | + MallocerFreer::GetInstance()->Free<double>(&this->twoElecsAtomEpcCoresMpiBuff, | |
88 | 101 | this->molecule->GetNumberAtoms(), |
102 | + this->molecule->GetNumberEpcs(), | |
89 | 103 | numBuff, |
90 | 104 | numBuff); |
91 | 105 | MallocerFreer::GetInstance()->Free<double>(&this->normalForceConstants, |
@@ -98,19 +112,31 @@ Mndo::~Mndo(){ | ||
98 | 112 | void Mndo::SetMolecule(Molecule* molecule){ |
99 | 113 | ZindoS::SetMolecule(molecule); |
100 | 114 | OrbitalType twoElecLimit = dxy; |
101 | - MallocerFreer::GetInstance()->Malloc<double>(&this->twoElecTwoCore, | |
115 | + MallocerFreer::GetInstance()->Malloc<double>(&this->twoElecsTwoAtomCores, | |
102 | 116 | molecule->GetNumberAtoms(), |
103 | 117 | molecule->GetNumberAtoms(), |
104 | 118 | twoElecLimit, |
105 | 119 | twoElecLimit, |
106 | 120 | twoElecLimit, |
107 | 121 | twoElecLimit); |
122 | + MallocerFreer::GetInstance()->Malloc<double>(&this->twoElecsAtomEpcCores, | |
123 | + molecule->GetNumberAtoms(), | |
124 | + molecule->GetNumberEpcs(), | |
125 | + twoElecLimit, | |
126 | + twoElecLimit, | |
127 | + twoElecLimit, | |
128 | + twoElecLimit); | |
108 | 129 | int numBuff = (twoElecLimit+1)*twoElecLimit/2; |
109 | - MallocerFreer::GetInstance()->Malloc<double>(&this->twoElecTwoCoreMpiBuff, | |
130 | + MallocerFreer::GetInstance()->Malloc<double>(&this->twoElecsTwoAtomCoresMpiBuff, | |
110 | 131 | this->molecule->GetNumberAtoms(), |
111 | 132 | this->molecule->GetNumberAtoms(), |
112 | 133 | numBuff, |
113 | 134 | numBuff); |
135 | + MallocerFreer::GetInstance()->Malloc<double>(&this->twoElecsAtomEpcCoresMpiBuff, | |
136 | + this->molecule->GetNumberAtoms(), | |
137 | + this->molecule->GetNumberEpcs(), | |
138 | + numBuff, | |
139 | + numBuff); | |
114 | 140 | MallocerFreer::GetInstance()->Malloc<double>(&this->normalForceConstants, |
115 | 141 | CartesianType_end*molecule->GetNumberAtoms()); |
116 | 142 | MallocerFreer::GetInstance()->Malloc<double>(&this->normalModes, |
@@ -131,34 +157,42 @@ void Mndo::SetMessages(){ | ||
131 | 157 | this->errorMessageCalcCISMatrix |
132 | 158 | = "Error in mndo::Mndo::CalcCISMatrix: Non available orbital is contained.\n"; |
133 | 159 | this->errorMessageDavidsonNotConverged = "Error in mndo::Mndo::DoCISDavidson: Davidson did not met convergence criterion. \n"; |
160 | + this->errorMessageGetSemiEmpiricalMultipoleInteractionBadAtomTypes | |
161 | + = "Error in mndo::Mndo::GetSemiEmpiricalMultipoleInteraction: Bad atom types are set\n"; | |
134 | 162 | this->errorMessageGetSemiEmpiricalMultipoleInteractionBadMultipoles |
135 | - = "Error in mndo:: Mndo::GetSemiEmpiricalMultipoleInteraction: Bad multipole combintaion is set\n"; | |
163 | + = "Error in mndo::Mndo::GetSemiEmpiricalMultipoleInteraction: Bad multipole combintaion is set\n"; | |
136 | 164 | this->errorMessageGetSemiEmpiricalMultipoleInteraction1stDeriBadMultipoles |
137 | - = "Error in mndo:: Mndo::GetSemiEmpiricalMultipoleInteraction1stDerivative: Bad multipole combintaion is set\n"; | |
165 | + = "Error in mndo::Mndo::GetSemiEmpiricalMultipoleInteraction1stDerivative: Bad multipole combintaion is set\n"; | |
138 | 166 | this->errorMessageGetSemiEmpiricalMultipoleInteraction2ndDeriBadMultipoles |
139 | - = "Error in mndo:: Mndo::GetSemiEmpiricalMultipoleInteraction2ndDerivative: Bad multipole combintaion is set\n"; | |
167 | + = "Error in mndo::Mndo::GetSemiEmpiricalMultipoleInteraction2ndDerivative: Bad multipole combintaion is set\n"; | |
140 | 168 | this->errorMessageMultipoleA = "Multipole A is: "; |
141 | 169 | this->errorMessageMultipoleB = "Multipole B is: "; |
142 | 170 | this->errorMessageGetNddoRepulsionIntegral |
143 | 171 | = "Error in mndo::Mndo::GetNddoRepulsionIntegral: Bad orbital is set.\n"; |
172 | + this->errorMessageGetNddoRepulsionIntegralBadAtomTypes | |
173 | + = "Error in mndo::Mndo::GetNddoRepulsionIntegral: Bad atom types are set.\n"; | |
144 | 174 | this->errorMessageGetNddoRepulsionIntegral1stDerivative |
145 | 175 | = "Error in mndo::Mndo::GetNddoRepulsionIntegral1stDerivative: Bad orbital is set.\n"; |
146 | 176 | this->errorMessageGetNddoRepulsionIntegral2ndDerivative |
147 | 177 | = "Error in mndo::Mndo::GetNddoRepulsionIntegral2ndDerivative: Bad orbital is set.\n"; |
148 | - this->errorMessageCalcTwoElecTwoCoreNullMatrix | |
149 | - = "Error in mndo::Mndo::CalcTwoElecTwoCore: The two elec two core matrix is NULL.\n"; | |
150 | - this->errorMessageCalcDiatomicTwoElecTwoCoreSameAtoms | |
151 | - = "Error in mndo::Mndo::CalcDiatomicTwoElecTwoCore: Atom A and B is same.\n"; | |
152 | - this->errorMessageCalcDiatomicTwoElecTwoCore1stDerivativesSameAtoms | |
153 | - = "Error in mndo::Mndo::CalcDiatomicTwoElecTwoCore1stDerivatives: Atom A and B is same.\n"; | |
154 | - this->errorMessageCalcDiatomicTwoElecTwoCore2ndDerivativesSameAtoms | |
155 | - = "Error in mndo::Mndo::CalcDiatomicTwoElecTwoCore2ndDerivatives: Atom A and B is same.\n"; | |
156 | - this->errorMessageCalcDiatomicTwoElecTwoCoreNullMatrix | |
157 | - = "Error in mndo::Mndo::CalcDiatomicTwoElecTwoCore: The two elec two core diatomic matrix is NULL.\n"; | |
158 | - this->errorMessageCalcDiatomicTwoElecTwoCore1stDerivativesNullMatrix | |
159 | - = "Error in mndo::Mndo::CalcDiatomicTwoElecTwoCore1stDerivatives: The two elec two core diatomic matrix is NULL.\n"; | |
160 | - this->errorMessageCalcDiatomicTwoElecTwoCore2ndDerivativesNullMatrix | |
161 | - = "Error in mndo::Mndo::CalcDiatomicTwoElecTwoCore2ndDerivatives: The two elec two core diatomic matrix is NULL.\n"; | |
178 | + this->errorMessageCalcTwoElecsTwoAtomCoresNullMatrix | |
179 | + = "Error in mndo::Mndo::CalcTwoElecsTwoAtomCores: The two elec two atom cores matrix is NULL.\n"; | |
180 | + this->errorMessageCalcTwoElecsAtomEpcCoresNullMatrix | |
181 | + = "Error in mndo::Mndo::CalcTwoElecsAtomEpcCores: The two elec atom-epc cores matrix is NULL.\n"; | |
182 | + this->errorMessageCalcDiatomicTwoElecsTwoCoresSameAtoms | |
183 | + = "Error in mndo::Mndo::CalcDiatomicTwoElecsTwoCores: Atom A and B is same atom (not EPC).\n"; | |
184 | + this->errorMessageCalcDiatomicTwoElecsTwoCoresSameEpcs | |
185 | + = "Error in mndo::Mndo::CalcDiatomicTwoElecsTwoCores: Atom A and B is same EPC.\n"; | |
186 | + this->errorMessageCalcDiatomicTwoElecsTwoCores1stDerivativesSameAtoms | |
187 | + = "Error in mndo::Mndo::CalcDiatomicTwoElecsTwoCores1stDerivatives: Atom A and B is same.\n"; | |
188 | + this->errorMessageCalcDiatomicTwoElecsTwoCores2ndDerivativesSameAtoms | |
189 | + = "Error in mndo::Mndo::CalcDiatomicTwoElecsTwoCores2ndDerivatives: Atom A and B is same.\n"; | |
190 | + this->errorMessageCalcDiatomicTwoElecsTwoCoresNullMatrix | |
191 | + = "Error in mndo::Mndo::CalcDiatomicTwoElecsTwoCores: The two elec two core diatomic matrix is NULL.\n"; | |
192 | + this->errorMessageCalcDiatomicTwoElecsTwoCores1stDerivativesNullMatrix | |
193 | + = "Error in mndo::Mndo::CalcDiatomicTwoElecsTwoCores1stDerivatives: The two elec two core diatomic matrix is NULL.\n"; | |
194 | + this->errorMessageCalcDiatomicTwoElecsTwoCores2ndDerivativesNullMatrix | |
195 | + = "Error in mndo::Mndo::CalcDiatomicTwoElecsTwoCores2ndDerivatives: The two elec two core diatomic matrix is NULL.\n"; | |
162 | 196 | this->errorMessageGetElectronicEnergyEnergyNotCalculated |
163 | 197 | = "Error in mndo::Mndo::GetElectronicEnergy: Set electronic state is not calculated by CIS.\n"; |
164 | 198 | this->errorMessageGetElectronicEnergyNULLCISEnergy |
@@ -283,11 +317,20 @@ double Mndo::GetAuxiliaryDiatomCoreRepulsionEnergy2ndDerivative(const Atom& atom | ||
283 | 317 | double Mndo::GetDiatomCoreRepulsionEnergy(int indexAtomA, int indexAtomB) const{ |
284 | 318 | const Atom& atomA = *this->molecule->GetAtom(indexAtomA); |
285 | 319 | const Atom& atomB = *this->molecule->GetAtom(indexAtomB); |
286 | - double temp = this->GetAuxiliaryDiatomCoreRepulsionEnergy(atomA, | |
287 | - atomB, | |
288 | - this->molecule->GetDistanceAtoms(atomA, atomB)); | |
289 | - double twoElecInt = this->GetNddoRepulsionIntegral(atomA, s, s, atomB, s, s); | |
290 | - return atomA.GetCoreCharge()*atomB.GetCoreCharge()*twoElecInt*temp; | |
320 | + double tmp = this->GetAuxiliaryDiatomCoreRepulsionEnergy(atomA, | |
321 | + atomB, | |
322 | + this->molecule->GetDistanceAtoms(atomA, atomB)); | |
323 | + return atomA.GetCoreCharge() | |
324 | + *atomB.GetCoreCharge() | |
325 | + *this->twoElecsTwoAtomCores[indexAtomA][indexAtomB][s][s][s][s] | |
326 | + *tmp; | |
327 | +} | |
328 | + | |
329 | +double Mndo::GetAtomCoreEpcCoulombEnergy(int indexAtom, int indexEpc) const{ | |
330 | + const Atom& atom = *this->molecule->GetAtom(indexAtom); | |
331 | + const Atom& epc = *this->molecule->GetAtom(indexEpc); | |
332 | + double distance = this->molecule->GetDistanceAtomEpc(indexAtom, indexEpc); | |
333 | + return atom.GetCoreCharge()*epc.GetCoreCharge()/distance; | |
291 | 334 | } |
292 | 335 | |
293 | 336 | // First derivative of diatomic core repulsion energy. |
@@ -299,13 +342,13 @@ double Mndo::GetDiatomCoreRepulsion1stDerivative(int indexAtomA, | ||
299 | 342 | const Atom& atomA = *this->molecule->GetAtom(indexAtomA); |
300 | 343 | const Atom& atomB = *this->molecule->GetAtom(indexAtomB); |
301 | 344 | double distanceAB = this->molecule->GetDistanceAtoms(indexAtomA, indexAtomB); |
302 | - double twoElecInt = this->GetNddoRepulsionIntegral(atomA, s, s, atomB, s, s); | |
345 | + double twoElecInt = this->twoElecsTwoAtomCores[indexAtomA][indexAtomB][s][s][s][s]; | |
303 | 346 | double twoElecInt1stDeriv = this->GetNddoRepulsionIntegral1stDerivative( |
304 | 347 | atomA, s, s, atomB, s, s, axisA); |
305 | - double temp = this->GetAuxiliaryDiatomCoreRepulsionEnergy(atomA, atomB, distanceAB); | |
306 | - double tempDeriv = this->GetAuxiliaryDiatomCoreRepulsionEnergy1stDerivative(atomA, atomB, distanceAB, axisA); | |
348 | + double tmp = this->GetAuxiliaryDiatomCoreRepulsionEnergy(atomA, atomB, distanceAB); | |
349 | + double tmpDeriv = this->GetAuxiliaryDiatomCoreRepulsionEnergy1stDerivative(atomA, atomB, distanceAB, axisA); | |
307 | 350 | value = atomA.GetCoreCharge()*atomB.GetCoreCharge() |
308 | - *(twoElecInt1stDeriv*temp + twoElecInt*tempDeriv); | |
351 | + *(twoElecInt1stDeriv*tmp + twoElecInt*tmpDeriv); | |
309 | 352 | return value; |
310 | 353 | } |
311 | 354 |
@@ -319,8 +362,7 @@ double Mndo::GetDiatomCoreRepulsion2ndDerivative(int indexAtomA, | ||
319 | 362 | const Atom& atomA = *this->molecule->GetAtom(indexAtomA); |
320 | 363 | const Atom& atomB = *this->molecule->GetAtom(indexAtomB); |
321 | 364 | double distanceAB = this->molecule->GetDistanceAtoms(indexAtomA, indexAtomB); |
322 | - double twoElecInt = this->GetNddoRepulsionIntegral(atomA, s, s, | |
323 | - atomB, s, s); | |
365 | + double twoElecInt = this->twoElecsTwoAtomCores[indexAtomA][indexAtomB][s][s][s][s]; | |
324 | 366 | double twoElecInt1stDeriv1 = this->GetNddoRepulsionIntegral1stDerivative(atomA, s, s, |
325 | 367 | atomB, s, s, |
326 | 368 | axisA1); |
@@ -332,28 +374,28 @@ double Mndo::GetDiatomCoreRepulsion2ndDerivative(int indexAtomA, | ||
332 | 374 | axisA1, |
333 | 375 | axisA2); |
334 | 376 | |
335 | - double temp = this->GetAuxiliaryDiatomCoreRepulsionEnergy(atomA, | |
336 | - atomB, | |
337 | - distanceAB); | |
338 | - double temp1stDeriv1 = this->GetAuxiliaryDiatomCoreRepulsionEnergy1stDerivative(atomA, | |
339 | - atomB, | |
340 | - distanceAB, | |
341 | - axisA1); | |
342 | - double temp1stDeriv2 = this->GetAuxiliaryDiatomCoreRepulsionEnergy1stDerivative(atomA, | |
343 | - atomB, | |
344 | - distanceAB, | |
345 | - axisA2); | |
346 | - double temp2ndDeriv = this->GetAuxiliaryDiatomCoreRepulsionEnergy2ndDerivative(atomA, | |
377 | + double tmp = this->GetAuxiliaryDiatomCoreRepulsionEnergy(atomA, | |
378 | + atomB, | |
379 | + distanceAB); | |
380 | + double tmp1stDeriv1 = this->GetAuxiliaryDiatomCoreRepulsionEnergy1stDerivative(atomA, | |
381 | + atomB, | |
382 | + distanceAB, | |
383 | + axisA1); | |
384 | + double tmp1stDeriv2 = this->GetAuxiliaryDiatomCoreRepulsionEnergy1stDerivative(atomA, | |
347 | 385 | atomB, |
348 | 386 | distanceAB, |
349 | - axisA1, | |
350 | 387 | axisA2); |
388 | + double tmp2ndDeriv = this->GetAuxiliaryDiatomCoreRepulsionEnergy2ndDerivative(atomA, | |
389 | + atomB, | |
390 | + distanceAB, | |
391 | + axisA1, | |
392 | + axisA2); | |
351 | 393 | |
352 | 394 | value = atomA.GetCoreCharge()*atomB.GetCoreCharge(); |
353 | - value *= twoElecInt*temp2ndDeriv | |
354 | - +twoElecInt1stDeriv1*temp1stDeriv2 | |
355 | - +twoElecInt1stDeriv2*temp1stDeriv1 | |
356 | - +twoElecInt2ndDeriv*temp; | |
395 | + value *= twoElecInt*tmp2ndDeriv | |
396 | + +twoElecInt1stDeriv1*tmp1stDeriv2 | |
397 | + +twoElecInt1stDeriv2*tmp1stDeriv1 | |
398 | + +twoElecInt2ndDeriv*tmp; | |
357 | 399 | return value; |
358 | 400 | } |
359 | 401 |
@@ -402,7 +444,7 @@ double Mndo::GetFockDiagElement(const Atom& atomA, | ||
402 | 444 | double const* const* gammaAB, |
403 | 445 | double const* const* orbitalElectronPopulation, |
404 | 446 | double const* atomicElectronPopulation, |
405 | - double const* const* const* const* const* const* twoElecTwoCore, | |
447 | + double const* const* const* const* const* const* twoElecsTwoAtomCores, | |
406 | 448 | bool isGuess) const{ |
407 | 449 | double value=0.0; |
408 | 450 | int firstAOIndexA = atomA.GetFirstAOIndex(); |
@@ -432,22 +474,33 @@ double Mndo::GetFockDiagElement(const Atom& atomA, | ||
432 | 474 | for(int sigma=0; sigma<valenceSizeB; sigma++){ |
433 | 475 | temp += orbitalElectronPopulation[lambda+firstAOIndexB] |
434 | 476 | [sigma+firstAOIndexB] |
435 | - *twoElecTwoCore[indexAtomA][B][mu][mu][lambda][sigma]; | |
477 | + *twoElecsTwoAtomCores[indexAtomA][B][mu][mu][lambda][sigma]; | |
436 | 478 | } |
437 | 479 | /* |
438 | 480 | temp += MolDS_wrappers::Blas::GetInstance()->Ddot(valenceSizeB, |
439 | 481 | &orbitalElectronPopulation[lambda+firstAOIndexB][firstAOIndexB], |
440 | - &twoElecTwoCore[indexAtomA][B][mu][mu][lambda][0]); | |
482 | + &twoElecsTwoAtomCores[indexAtomA][B][mu][mu][lambda][0]); | |
441 | 483 | */ |
442 | 484 | } |
443 | 485 | temp += this->GetElectronCoreAttraction(indexAtomA, |
444 | 486 | B, |
445 | 487 | mu, |
446 | 488 | mu, |
447 | - twoElecTwoCore); | |
489 | + twoElecsTwoAtomCores); | |
448 | 490 | } |
449 | 491 | } |
450 | 492 | value += temp; |
493 | + | |
494 | + // coulomb repulsion with point charge * | |
495 | + int numEpcs = molecule.GetNumberEpcs(); | |
496 | + if(0<numEpcs){ | |
497 | + double elecCharge = -1.0; | |
498 | + for(int i=0; i<numEpcs; i++){ | |
499 | + double epcCharge = molecule.GetEpc(i)->GetCoreCharge(); | |
500 | + value += elecCharge*epcCharge*twoElecsAtomEpcCores[indexAtomA][i][mu][mu][s][s]; | |
501 | + } | |
502 | + } | |
503 | + | |
451 | 504 | } |
452 | 505 | return value; |
453 | 506 | } |
@@ -462,7 +515,7 @@ double Mndo::GetFockOffDiagElement(const Atom& atomA, | ||
462 | 515 | double const* const* gammaAB, |
463 | 516 | double const* const* overlapAOs, |
464 | 517 | double const* const* orbitalElectronPopulation, |
465 | - double const* const* const* const* const* const* twoElecTwoCore, | |
518 | + double const* const* const* const* const* const* twoElecsTwoAtomCores, | |
466 | 519 | bool isGuess) const{ |
467 | 520 | double value = 0.0; |
468 | 521 | int firstAOIndexA = atomA.GetFirstAOIndex(); |
@@ -495,19 +548,28 @@ double Mndo::GetFockOffDiagElement(const Atom& atomA, | ||
495 | 548 | for(int sigma=0; sigma<valenceSizeBB; sigma++){ |
496 | 549 | temp += orbitalElectronPopulation[lambda+firstAOIndexBB] |
497 | 550 | [sigma+firstAOIndexBB] |
498 | - *twoElecTwoCore[indexAtomA][BB][mu][nu][lambda][sigma]; | |
551 | + *twoElecsTwoAtomCores[indexAtomA][BB][mu][nu][lambda][sigma]; | |
499 | 552 | } |
500 | 553 | /* |
501 | 554 | temp += MolDS_wrappers::Blas::GetInstance()->Ddot(valenceSizeBB, |
502 | 555 | &orbitalElectronPopulation[lambda+firstAOIndexBB][firstAOIndexBB], |
503 | - &twoElecTwoCore[indexAtomA][BB][mu][nu][lambda][0]); | |
556 | + &twoElecsTwoAtomCores[indexAtomA][BB][mu][nu][lambda][0]); | |
504 | 557 | */ |
505 | 558 | } |
506 | 559 | temp += this->GetElectronCoreAttraction(indexAtomA, |
507 | 560 | BB, |
508 | 561 | mu, |
509 | 562 | nu, |
510 | - twoElecTwoCore); | |
563 | + twoElecsTwoAtomCores); | |
564 | + } | |
565 | + } | |
566 | + // coulomb repulsion with point charge * | |
567 | + int numEpcs = molecule.GetNumberEpcs(); | |
568 | + if(0<numEpcs){ | |
569 | + double elecCharge = -1.0; | |
570 | + for(int i=0; i<numEpcs; i++){ | |
571 | + double epcCharge = molecule.GetEpc(i)->GetCoreCharge(); | |
572 | + value += elecCharge*epcCharge*twoElecsAtomEpcCores[indexAtomA][i][mu][nu][s][s]; | |
511 | 573 | } |
512 | 574 | } |
513 | 575 | } |
@@ -518,15 +580,15 @@ double Mndo::GetFockOffDiagElement(const Atom& atomA, | ||
518 | 580 | for(int lambda=0; lambda<valenceSizeB; lambda++){ |
519 | 581 | //temp -= 0.5*orbitalElectronPopulation[lambda+firstAOIndexB] |
520 | 582 | // [sigma+firstAOIndexA] |
521 | - // *twoElecTwoCore[indexAtomA][indexAtomB][mu][sigma][nu][lambda]; | |
583 | + // *twoElecsTwoAtomCores[indexAtomA][indexAtomB][mu][sigma][nu][lambda]; | |
522 | 584 | temp -= 0.5*orbitalElectronPopulation[sigma+firstAOIndexA] |
523 | 585 | [lambda+firstAOIndexB] |
524 | - *twoElecTwoCore[indexAtomA][indexAtomB][mu][sigma][nu][lambda]; | |
586 | + *twoElecsTwoAtomCores[indexAtomA][indexAtomB][mu][sigma][nu][lambda]; | |
525 | 587 | } |
526 | 588 | /* |
527 | 589 | temp -= 0.5*MolDS_wrappers::Blas::GetInstance()->Ddot(valenceSizeB, |
528 | 590 | &orbitalElectronPopulation[sigma+firstAOIndexA][firstAOIndexB], |
529 | - &twoElecTwoCore[indexAtomA][indexAtomB][mu][sigma][nu][0]); | |
591 | + &twoElecsTwoAtomCores[indexAtomA][indexAtomB][mu][sigma][nu][0]); | |
530 | 592 | */ |
531 | 593 | } |
532 | 594 | } |
@@ -600,24 +662,24 @@ double Mndo::GetElectronCoreAttraction(int indexAtomA, | ||
600 | 662 | int indexAtomB, |
601 | 663 | int mu, |
602 | 664 | int nu, |
603 | - double const* const* const* const* const* const* twoElecTwoCore) const{ | |
665 | + double const* const* const* const* const* const* twoElecsTwoAtomCores) const{ | |
604 | 666 | const Atom& atomB = *this->molecule->GetAtom(indexAtomB); |
605 | - return -1.0*atomB.GetCoreCharge()*twoElecTwoCore[indexAtomA][indexAtomB][mu][nu][s][s]; | |
667 | + return -1.0*atomB.GetCoreCharge()*twoElecsTwoAtomCores[indexAtomA][indexAtomB][mu][nu][s][s]; | |
606 | 668 | } |
607 | 669 | |
608 | 670 | // First derivative of electron in atom A (mu and nu) and core (atom B) attraction. |
609 | 671 | // This derivative is related to the coordinate of atomA. |
610 | -// Note that diatomicTwoElecTwoCore1stDerivative is dioatomic one. | |
672 | +// Note that diatomicTwoElecsTwoCores1stDerivative is dioatomic one. | |
611 | 673 | // see Eq. (16) in [DT_1977-2] with f_2 = 0. |
612 | 674 | double Mndo::GetElectronCoreAttraction1stDerivative(int indexAtomA, |
613 | 675 | int indexAtomB, |
614 | 676 | int mu, |
615 | 677 | int nu, |
616 | - double const* const* const* const* const* diatomicTwoElecTwoCore1stDerivatives, | |
678 | + double const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivatives, | |
617 | 679 | CartesianType axisA) const{ |
618 | 680 | const Atom& atomB = *this->molecule->GetAtom(indexAtomB); |
619 | 681 | double value = -1.0*atomB.GetCoreCharge() |
620 | - *diatomicTwoElecTwoCore1stDerivatives[mu][nu][s][s][axisA]; | |
682 | + *diatomicTwoElecsTwoCores1stDerivatives[mu][nu][s][s][axisA]; | |
621 | 683 | return value; |
622 | 684 | } |
623 | 685 |
@@ -666,12 +728,12 @@ double Mndo::GetMolecularIntegralElement(int moI, int moJ, int moK, int moL, | ||
666 | 728 | for(int lambda=firstAOIndexB; lambda<=lastAOIndexB; lambda++){ |
667 | 729 | for(int sigma=lambda; sigma<=lastAOIndexB; sigma++){ |
668 | 730 | OrbitalType orbitalSigma = atomB.GetValence(sigma-firstAOIndexB); |
669 | - gamma = this->twoElecTwoCore[A] | |
670 | - [B] | |
671 | - [mu-firstAOIndexA] | |
672 | - [nu-firstAOIndexA] | |
673 | - [lambda-firstAOIndexB] | |
674 | - [sigma-firstAOIndexB]; | |
731 | + gamma = this->twoElecsTwoAtomCores[A] | |
732 | + [B] | |
733 | + [mu-firstAOIndexA] | |
734 | + [nu-firstAOIndexA] | |
735 | + [lambda-firstAOIndexB] | |
736 | + [sigma-firstAOIndexB]; | |
675 | 737 | |
676 | 738 | value += gamma*fockMatrix[moI][mu] |
677 | 739 | *fockMatrix[moJ][nu] |
@@ -821,12 +883,12 @@ void Mndo::CalcCISMatrix(double** matrixCIS) const{ | ||
821 | 883 | double tmpMuNuLamda16 = tmpMuNu12*fockMatrix[moB][lambda]; |
822 | 884 | for(int sigma=lambda; sigma<=lastAOIndexB; sigma++){ |
823 | 885 | OrbitalType orbitalSigma = atomB.GetValence(sigma-firstAOIndexB); |
824 | - gamma = this->twoElecTwoCore[A] | |
825 | - [B] | |
826 | - [mu-firstAOIndexA] | |
827 | - [nu-firstAOIndexA] | |
828 | - [lambda-firstAOIndexB] | |
829 | - [sigma-firstAOIndexB]; | |
886 | + gamma = this->twoElecsTwoAtomCores[A] | |
887 | + [B] | |
888 | + [mu-firstAOIndexA] | |
889 | + [nu-firstAOIndexA] | |
890 | + [lambda-firstAOIndexB] | |
891 | + [sigma-firstAOIndexB]; | |
830 | 892 | |
831 | 893 | value += gamma*tmpMuNuLamda01*fockMatrix[moB][sigma]; |
832 | 894 | value += gamma*tmpMuNuLamda02*fockMatrix[moI][sigma]; |
@@ -993,14 +1055,14 @@ double Mndo::GetCISCoefficientTwoElecIntegral(int k, | ||
993 | 1055 | |
994 | 1056 | void Mndo::MallocTempMatricesEachThreadCalcHessianSCF(double***** diatomicOverlapAOs1stDerivs, |
995 | 1057 | double****** diatomicOverlapAOs2ndDerivs, |
996 | - double******* diatomicTwoElecTwoCore1stDerivs, | |
997 | - double******** diatomicTwoElecTwoCore2ndDerivs, | |
1058 | + double******* diatomicTwoElecsTwoCores1stDerivs, | |
1059 | + double******** diatomicTwoElecsTwoCores2ndDerivs, | |
998 | 1060 | double*** tmpRotMat, |
999 | 1061 | double*** tmpRotMat1stDeriv, |
1000 | 1062 | double**** tmpRotMat1stDerivs, |
1001 | 1063 | double***** tmpRotMat2ndDerivs, |
1002 | - double***** tmpDiatomicTwoElecTwoCore, | |
1003 | - double****** tmpDiatomicTwoElecTwoCore1stDerivs, | |
1064 | + double***** tmpDiatomicTwoElecsTwoCores, | |
1065 | + double****** tmpDiatomicTwoElecsTwoCores1stDerivs, | |
1004 | 1066 | double*** tmpDiaOverlapAOsInDiaFrame, |
1005 | 1067 | double*** tmpDiaOverlapAOs1stDerivInDiaFrame, |
1006 | 1068 | double*** tmpDiaOverlapAOs2ndDerivInDiaFrame, |
@@ -1021,14 +1083,14 @@ void Mndo::MallocTempMatricesEachThreadCalcHessianSCF(double***** diatomicOve | ||
1021 | 1083 | OrbitalType_end, |
1022 | 1084 | CartesianType_end, |
1023 | 1085 | CartesianType_end); |
1024 | - MallocerFreer::GetInstance()->Malloc<double>(diatomicTwoElecTwoCore1stDerivs, | |
1086 | + MallocerFreer::GetInstance()->Malloc<double>(diatomicTwoElecsTwoCores1stDerivs, | |
1025 | 1087 | this->molecule->GetNumberAtoms(), |
1026 | 1088 | dxy, |
1027 | 1089 | dxy, |
1028 | 1090 | dxy, |
1029 | 1091 | dxy, |
1030 | 1092 | CartesianType_end); |
1031 | - MallocerFreer::GetInstance()->Malloc<double>(diatomicTwoElecTwoCore2ndDerivs, | |
1093 | + MallocerFreer::GetInstance()->Malloc<double>(diatomicTwoElecsTwoCores2ndDerivs, | |
1032 | 1094 | this->molecule->GetNumberAtoms(), |
1033 | 1095 | dxy, |
1034 | 1096 | dxy, |
@@ -1051,12 +1113,12 @@ void Mndo::MallocTempMatricesEachThreadCalcHessianSCF(double***** diatomicOve | ||
1051 | 1113 | OrbitalType_end, |
1052 | 1114 | CartesianType_end, |
1053 | 1115 | CartesianType_end); |
1054 | - MallocerFreer::GetInstance()->Malloc<double>(tmpDiatomicTwoElecTwoCore, | |
1116 | + MallocerFreer::GetInstance()->Malloc<double>(tmpDiatomicTwoElecsTwoCores, | |
1055 | 1117 | dxy, |
1056 | 1118 | dxy, |
1057 | 1119 | dxy, |
1058 | 1120 | dxy); |
1059 | - MallocerFreer::GetInstance()->Malloc<double>(tmpDiatomicTwoElecTwoCore1stDerivs, | |
1121 | + MallocerFreer::GetInstance()->Malloc<double>(tmpDiatomicTwoElecsTwoCores1stDerivs, | |
1060 | 1122 | dxy, |
1061 | 1123 | dxy, |
1062 | 1124 | dxy, |
@@ -1093,14 +1155,14 @@ void Mndo::MallocTempMatricesEachThreadCalcHessianSCF(double***** diatomicOve | ||
1093 | 1155 | |
1094 | 1156 | void Mndo::FreeTempMatricesEachThreadCalcHessianSCF(double***** diatomicOverlapAOs1stDerivs, |
1095 | 1157 | double****** diatomicOverlapAOs2ndDerivs, |
1096 | - double******* diatomicTwoElecTwoCore1stDerivs, | |
1097 | - double******** diatomicTwoElecTwoCore2ndDerivs, | |
1158 | + double******* diatomicTwoElecsTwoCores1stDerivs, | |
1159 | + double******** diatomicTwoElecsTwoCores2ndDerivs, | |
1098 | 1160 | double*** tmpRotMat, |
1099 | 1161 | double*** tmpRotMat1stDeriv, |
1100 | 1162 | double**** tmpRotMat1stDerivs, |
1101 | 1163 | double***** tmpRotMat2ndDerivs, |
1102 | - double***** tmpDiatomicTwoElecTwoCore, | |
1103 | - double****** tmpDiatomicTwoElecTwoCore1stDerivs, | |
1164 | + double***** tmpDiatomicTwoElecsTwoCores, | |
1165 | + double****** tmpDiatomicTwoElecsTwoCores1stDerivs, | |
1104 | 1166 | double*** tmpDiaOverlapAOsInDiaFrame, |
1105 | 1167 | double*** tmpDiaOverlapAOs1stDerivInDiaFrame, |
1106 | 1168 | double*** tmpDiaOverlapAOs2ndDerivInDiaFrame, |
@@ -1121,14 +1183,14 @@ void Mndo::FreeTempMatricesEachThreadCalcHessianSCF(double***** diatomicOverl | ||
1121 | 1183 | OrbitalType_end, |
1122 | 1184 | CartesianType_end, |
1123 | 1185 | CartesianType_end); |
1124 | - MallocerFreer::GetInstance()->Free<double>(diatomicTwoElecTwoCore1stDerivs, | |
1186 | + MallocerFreer::GetInstance()->Free<double>(diatomicTwoElecsTwoCores1stDerivs, | |
1125 | 1187 | this->molecule->GetNumberAtoms(), |
1126 | 1188 | dxy, |
1127 | 1189 | dxy, |
1128 | 1190 | dxy, |
1129 | 1191 | dxy, |
1130 | 1192 | CartesianType_end); |
1131 | - MallocerFreer::GetInstance()->Free<double>(diatomicTwoElecTwoCore2ndDerivs, | |
1193 | + MallocerFreer::GetInstance()->Free<double>(diatomicTwoElecsTwoCores2ndDerivs, | |
1132 | 1194 | this->molecule->GetNumberAtoms(), |
1133 | 1195 | dxy, |
1134 | 1196 | dxy, |
@@ -1151,12 +1213,12 @@ void Mndo::FreeTempMatricesEachThreadCalcHessianSCF(double***** diatomicOverl | ||
1151 | 1213 | OrbitalType_end, |
1152 | 1214 | CartesianType_end, |
1153 | 1215 | CartesianType_end); |
1154 | - MallocerFreer::GetInstance()->Free<double>(tmpDiatomicTwoElecTwoCore, | |
1216 | + MallocerFreer::GetInstance()->Free<double>(tmpDiatomicTwoElecsTwoCores, | |
1155 | 1217 | dxy, |
1156 | 1218 | dxy, |
1157 | 1219 | dxy, |
1158 | 1220 | dxy); |
1159 | - MallocerFreer::GetInstance()->Free<double>(tmpDiatomicTwoElecTwoCore1stDerivs, | |
1221 | + MallocerFreer::GetInstance()->Free<double>(tmpDiatomicTwoElecsTwoCores1stDerivs, | |
1160 | 1222 | dxy, |
1161 | 1223 | dxy, |
1162 | 1224 | dxy, |
@@ -1202,18 +1264,18 @@ double Mndo::GetAuxiliaryHessianElement1(int mu, | ||
1202 | 1264 | CartesianType axisA1, |
1203 | 1265 | CartesianType axisA2, |
1204 | 1266 | double const* const* orbitalElectronPopulation, |
1205 | - double const* const* const* const* const* const* diatomicTwoElecTwoCore2ndDerivs) const{ | |
1267 | + double const* const* const* const* const* const* diatomicTwoElecsTwoCores2ndDerivs) const{ | |
1206 | 1268 | const Atom& atomA = *this->molecule->GetAtom(indexAtomA); |
1207 | 1269 | const Atom& atomC = *this->molecule->GetAtom(indexAtomC); |
1208 | 1270 | int firstAOIndexA = atomA.GetFirstAOIndex(); |
1209 | 1271 | double value = orbitalElectronPopulation[mu] |
1210 | 1272 | [nu] |
1211 | - *diatomicTwoElecTwoCore2ndDerivs[mu-firstAOIndexA] | |
1212 | - [nu-firstAOIndexA] | |
1213 | - [s] | |
1214 | - [s] | |
1215 | - [axisA1] | |
1216 | - [axisA2]; | |
1273 | + *diatomicTwoElecsTwoCores2ndDerivs[mu-firstAOIndexA] | |
1274 | + [nu-firstAOIndexA] | |
1275 | + [s] | |
1276 | + [s] | |
1277 | + [axisA1] | |
1278 | + [axisA2]; | |
1217 | 1279 | return value*atomC.GetCoreCharge(); |
1218 | 1280 | } |
1219 | 1281 |
@@ -1228,7 +1290,7 @@ double Mndo::GetAuxiliaryHessianElement2(int mu, | ||
1228 | 1290 | CartesianType axisA, |
1229 | 1291 | CartesianType axisB, |
1230 | 1292 | double const* const* const* const* orbitalElectronPopulation1stDerivs, |
1231 | - double const* const* const* const* const* diatomicTwoElecTwoCore1stDerivs) const{ | |
1293 | + double const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivs) const{ | |
1232 | 1294 | const Atom& atomA = *this->molecule->GetAtom(indexAtomA); |
1233 | 1295 | const Atom& atomC = *this->molecule->GetAtom(indexAtomC); |
1234 | 1296 | int firstAOIndexA = atomA.GetFirstAOIndex(); |
@@ -1236,11 +1298,11 @@ double Mndo::GetAuxiliaryHessianElement2(int mu, | ||
1236 | 1298 | [nu] |
1237 | 1299 | [indexAtomB] |
1238 | 1300 | [axisB] |
1239 | - *diatomicTwoElecTwoCore1stDerivs[mu-firstAOIndexA] | |
1240 | - [nu-firstAOIndexA] | |
1241 | - [s] | |
1242 | - [s] | |
1243 | - [axisA]; | |
1301 | + *diatomicTwoElecsTwoCores1stDerivs[mu-firstAOIndexA] | |
1302 | + [nu-firstAOIndexA] | |
1303 | + [s] | |
1304 | + [s] | |
1305 | + [axisA]; | |
1244 | 1306 | return value*atomC.GetCoreCharge(); |
1245 | 1307 | } |
1246 | 1308 |
@@ -1254,18 +1316,18 @@ double Mndo::GetAuxiliaryHessianElement3(int lambda, | ||
1254 | 1316 | CartesianType axisA1, |
1255 | 1317 | CartesianType axisA2, |
1256 | 1318 | double const* const* orbitalElectronPopulation, |
1257 | - double const* const* const* const* const* const* diatomicTwoElecTwoCore2ndDerivs) const{ | |
1319 | + double const* const* const* const* const* const* diatomicTwoElecsTwoCores2ndDerivs) const{ | |
1258 | 1320 | const Atom& atomA = *this->molecule->GetAtom(indexAtomA); |
1259 | 1321 | const Atom& atomC = *this->molecule->GetAtom(indexAtomC); |
1260 | 1322 | int firstAOIndexC = atomC.GetFirstAOIndex(); |
1261 | 1323 | double value = orbitalElectronPopulation[lambda] |
1262 | 1324 | [sigma] |
1263 | - *diatomicTwoElecTwoCore2ndDerivs[s] | |
1264 | - [s] | |
1265 | - [lambda-firstAOIndexC] | |
1266 | - [sigma-firstAOIndexC] | |
1267 | - [axisA1] | |
1268 | - [axisA2]; | |
1325 | + *diatomicTwoElecsTwoCores2ndDerivs[s] | |
1326 | + [s] | |
1327 | + [lambda-firstAOIndexC] | |
1328 | + [sigma-firstAOIndexC] | |
1329 | + [axisA1] | |
1330 | + [axisA2]; | |
1269 | 1331 | return value*atomA.GetCoreCharge(); |
1270 | 1332 | } |
1271 | 1333 |
@@ -1280,7 +1342,7 @@ double Mndo::GetAuxiliaryHessianElement4(int lambda, | ||
1280 | 1342 | CartesianType axisA, |
1281 | 1343 | CartesianType axisB, |
1282 | 1344 | double const* const* const* const* orbitalElectronPopulation1stDerivs, |
1283 | - double const* const* const* const* const* diatomicTwoElecTwoCore1stDerivs) const{ | |
1345 | + double const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivs) const{ | |
1284 | 1346 | const Atom& atomA = *this->molecule->GetAtom(indexAtomA); |
1285 | 1347 | const Atom& atomC = *this->molecule->GetAtom(indexAtomC); |
1286 | 1348 | int firstAOIndexC = atomC.GetFirstAOIndex(); |
@@ -1288,11 +1350,11 @@ double Mndo::GetAuxiliaryHessianElement4(int lambda, | ||
1288 | 1350 | [sigma] |
1289 | 1351 | [indexAtomB] |
1290 | 1352 | [axisB] |
1291 | - *diatomicTwoElecTwoCore1stDerivs[s] | |
1292 | - [s] | |
1293 | - [lambda-firstAOIndexC] | |
1294 | - [sigma-firstAOIndexC] | |
1295 | - [axisA]; | |
1353 | + *diatomicTwoElecsTwoCores1stDerivs[s] | |
1354 | + [s] | |
1355 | + [lambda-firstAOIndexC] | |
1356 | + [sigma-firstAOIndexC] | |
1357 | + [axisA]; | |
1296 | 1358 | return value*atomA.GetCoreCharge(); |
1297 | 1359 | } |
1298 | 1360 |
@@ -1365,7 +1427,7 @@ double Mndo::GetAuxiliaryHessianElement7(int mu, | ||
1365 | 1427 | CartesianType axisA1, |
1366 | 1428 | CartesianType axisA2, |
1367 | 1429 | double const* const* orbitalElectronPopulation, |
1368 | - double const* const* const* const* const* const* diatomicTwoElecTwoCore2ndDerivs) const{ | |
1430 | + double const* const* const* const* const* const* diatomicTwoElecsTwoCores2ndDerivs) const{ | |
1369 | 1431 | const Atom& atomA = *molecule->GetAtom(indexAtomA); |
1370 | 1432 | const Atom& atomC = *molecule->GetAtom(indexAtomC); |
1371 | 1433 | int firstAOIndexA = atomA.GetFirstAOIndex(); |
@@ -1373,12 +1435,12 @@ double Mndo::GetAuxiliaryHessianElement7(int mu, | ||
1373 | 1435 | double temp1 = orbitalElectronPopulation[mu][nu]*orbitalElectronPopulation[lambda][sigma]; |
1374 | 1436 | double temp2 = orbitalElectronPopulation[mu][lambda]*orbitalElectronPopulation[nu][sigma]; |
1375 | 1437 | double value = (temp1 - 0.5*temp2) |
1376 | - *diatomicTwoElecTwoCore2ndDerivs[mu-firstAOIndexA] | |
1377 | - [nu-firstAOIndexA] | |
1378 | - [lambda-firstAOIndexC] | |
1379 | - [sigma-firstAOIndexC] | |
1380 | - [axisA1] | |
1381 | - [axisA2]; | |
1438 | + *diatomicTwoElecsTwoCores2ndDerivs[mu-firstAOIndexA] | |
1439 | + [nu-firstAOIndexA] | |
1440 | + [lambda-firstAOIndexC] | |
1441 | + [sigma-firstAOIndexC] | |
1442 | + [axisA1] | |
1443 | + [axisA2]; | |
1382 | 1444 | return value; |
1383 | 1445 | } |
1384 | 1446 |
@@ -1396,7 +1458,7 @@ double Mndo::GetAuxiliaryHessianElement8(int mu, | ||
1396 | 1458 | CartesianType axisB, |
1397 | 1459 | double const* const* orbitalElectronPopulation, |
1398 | 1460 | double const* const* const* const* orbitalElectronPopulation1stDerivs, |
1399 | - double const* const* const* const* const* diatomicTwoElecTwoCore1stDerivs) const{ | |
1461 | + double const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivs) const{ | |
1400 | 1462 | const Atom& atomA = *molecule->GetAtom(indexAtomA); |
1401 | 1463 | const Atom& atomC = *molecule->GetAtom(indexAtomC); |
1402 | 1464 | int firstAOIndexA = atomA.GetFirstAOIndex(); |
@@ -1410,11 +1472,11 @@ double Mndo::GetAuxiliaryHessianElement8(int mu, | ||
1410 | 1472 | double temp4 = orbitalElectronPopulation [mu][lambda] |
1411 | 1473 | *orbitalElectronPopulation1stDerivs[nu][sigma] [indexAtomB][axisB]; |
1412 | 1474 | double value = ((temp1 + temp2) - 0.5*(temp3 + temp4)) |
1413 | - *diatomicTwoElecTwoCore1stDerivs[mu-firstAOIndexA] | |
1414 | - [nu-firstAOIndexA] | |
1415 | - [lambda-firstAOIndexC] | |
1416 | - [sigma-firstAOIndexC] | |
1417 | - [axisA]; | |
1475 | + *diatomicTwoElecsTwoCores1stDerivs[mu-firstAOIndexA] | |
1476 | + [nu-firstAOIndexA] | |
1477 | + [lambda-firstAOIndexC] | |
1478 | + [sigma-firstAOIndexC] | |
1479 | + [axisA]; | |
1418 | 1480 | return value; |
1419 | 1481 | } |
1420 | 1482 |
@@ -1428,8 +1490,8 @@ double Mndo::GetHessianElementSameAtomsSCF(int indexAtomA, | ||
1428 | 1490 | double const* const* const* const* orbitalElectronPopulation1stDerivs, |
1429 | 1491 | double const* const* const* const* diatomicOverlapAOs1stDerivs, |
1430 | 1492 | double const* const* const* const* const* diatomicOverlapAOs2ndDerivs, |
1431 | - double const* const* const* const* const* const* diatomicTwoElecTwoCore1stDerivs, | |
1432 | - double const* const* const* const* const* const* const* diatomicTwoElecTwoCore2ndDerivs) const{ | |
1493 | + double const* const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivs, | |
1494 | + double const* const* const* const* const* const* const* diatomicTwoElecsTwoCores2ndDerivs) const{ | |
1433 | 1495 | double value=0.0; |
1434 | 1496 | int indexAtomB = indexAtomA; |
1435 | 1497 | const Atom& atomA = *this->molecule->GetAtom(indexAtomA); |
@@ -1451,7 +1513,7 @@ double Mndo::GetHessianElementSameAtomsSCF(int indexAtomA, | ||
1451 | 1513 | static_cast<CartesianType>(axisA1), |
1452 | 1514 | static_cast<CartesianType>(axisA2), |
1453 | 1515 | orbitalElectronPopulation, |
1454 | - diatomicTwoElecTwoCore2ndDerivs[indexAtomC]); | |
1516 | + diatomicTwoElecsTwoCores2ndDerivs[indexAtomC]); | |
1455 | 1517 | value -= this->GetAuxiliaryHessianElement2(mu, |
1456 | 1518 | nu, |
1457 | 1519 | indexAtomA, |
@@ -1460,7 +1522,7 @@ double Mndo::GetHessianElementSameAtomsSCF(int indexAtomA, | ||
1460 | 1522 | static_cast<CartesianType>(axisA1), |
1461 | 1523 | static_cast<CartesianType>(axisA2), |
1462 | 1524 | orbitalElectronPopulation1stDerivs, |
1463 | - diatomicTwoElecTwoCore1stDerivs[indexAtomC]); | |
1525 | + diatomicTwoElecsTwoCores1stDerivs[indexAtomC]); | |
1464 | 1526 | } |
1465 | 1527 | } |
1466 | 1528 | for(int lambda=firstAOIndexC; lambda<firstAOIndexC+numberAOsC; lambda++){ |
@@ -1472,7 +1534,7 @@ double Mndo::GetHessianElementSameAtomsSCF(int indexAtomA, | ||
1472 | 1534 | static_cast<CartesianType>(axisA1), |
1473 | 1535 | static_cast<CartesianType>(axisA2), |
1474 | 1536 | orbitalElectronPopulation, |
1475 | - diatomicTwoElecTwoCore2ndDerivs[indexAtomC]); | |
1537 | + diatomicTwoElecsTwoCores2ndDerivs[indexAtomC]); | |
1476 | 1538 | value -= this->GetAuxiliaryHessianElement4(lambda, |
1477 | 1539 | sigma, |
1478 | 1540 | indexAtomA, |
@@ -1481,7 +1543,7 @@ double Mndo::GetHessianElementSameAtomsSCF(int indexAtomA, | ||
1481 | 1543 | static_cast<CartesianType>(axisA1), |
1482 | 1544 | static_cast<CartesianType>(axisA2), |
1483 | 1545 | orbitalElectronPopulation1stDerivs, |
1484 | - diatomicTwoElecTwoCore1stDerivs[indexAtomC]); | |
1546 | + diatomicTwoElecsTwoCores1stDerivs[indexAtomC]); | |
1485 | 1547 | } |
1486 | 1548 | } |
1487 | 1549 | for(int mu=firstAOIndexA; mu<=lastAOIndexA; mu++){ |
@@ -1518,7 +1580,7 @@ double Mndo::GetHessianElementSameAtomsSCF(int indexAtomA, | ||
1518 | 1580 | static_cast<CartesianType>(axisA1), |
1519 | 1581 | static_cast<CartesianType>(axisA2), |
1520 | 1582 | orbitalElectronPopulation, |
1521 | - diatomicTwoElecTwoCore2ndDerivs[indexAtomC]); | |
1583 | + diatomicTwoElecsTwoCores2ndDerivs[indexAtomC]); | |
1522 | 1584 | value += this->GetAuxiliaryHessianElement8(mu, |
1523 | 1585 | nu, |
1524 | 1586 | lambda, |
@@ -1530,7 +1592,7 @@ double Mndo::GetHessianElementSameAtomsSCF(int indexAtomA, | ||
1530 | 1592 | static_cast<CartesianType>(axisA2), |
1531 | 1593 | orbitalElectronPopulation, |
1532 | 1594 | orbitalElectronPopulation1stDerivs, |
1533 | - diatomicTwoElecTwoCore1stDerivs[indexAtomC]); | |
1595 | + diatomicTwoElecsTwoCores1stDerivs[indexAtomC]); | |
1534 | 1596 | } |
1535 | 1597 | } |
1536 | 1598 | } |
@@ -1565,8 +1627,8 @@ double Mndo::GetHessianElementDifferentAtomsSCF(int indexAtomA, | ||
1565 | 1627 | double const* const* const* const* orbitalElectronPopulation1stDerivs, |
1566 | 1628 | double const* const* const* const* diatomicOverlapAOs1stDerivs, |
1567 | 1629 | double const* const* const* const* const* diatomicOverlapAOs2ndDerivs, |
1568 | - double const* const* const* const* const* const* diatomicTwoElecTwoCore1stDerivs, | |
1569 | - double const* const* const* const* const* const* const* diatomicTwoElecTwoCore2ndDerivs) const{ | |
1630 | + double const* const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivs, | |
1631 | + double const* const* const* const* const* const* const* diatomicTwoElecsTwoCores2ndDerivs) const{ | |
1570 | 1632 | double value=0.0; |
1571 | 1633 | const Atom& atomA = *this->molecule->GetAtom(indexAtomA); |
1572 | 1634 | const Atom& atomB = *this->molecule->GetAtom(indexAtomB); |
@@ -1585,7 +1647,7 @@ double Mndo::GetHessianElementDifferentAtomsSCF(int indexAtomA, | ||
1585 | 1647 | static_cast<CartesianType>(axisA), |
1586 | 1648 | static_cast<CartesianType>(axisB), |
1587 | 1649 | orbitalElectronPopulation, |
1588 | - diatomicTwoElecTwoCore2ndDerivs[indexAtomB]); | |
1650 | + diatomicTwoElecsTwoCores2ndDerivs[indexAtomB]); | |
1589 | 1651 | } |
1590 | 1652 | } |
1591 | 1653 | for(int lambda=firstAOIndexB; lambda<=lastAOIndexB; lambda++){ |
@@ -1597,7 +1659,7 @@ double Mndo::GetHessianElementDifferentAtomsSCF(int indexAtomA, | ||
1597 | 1659 | static_cast<CartesianType>(axisA), |
1598 | 1660 | static_cast<CartesianType>(axisB), |
1599 | 1661 | orbitalElectronPopulation, |
1600 | - diatomicTwoElecTwoCore2ndDerivs[indexAtomB]); | |
1662 | + diatomicTwoElecsTwoCores2ndDerivs[indexAtomB]); | |
1601 | 1663 | } |
1602 | 1664 | } |
1603 | 1665 | for(int mu=firstAOIndexA; mu<=lastAOIndexA; mu++){ |
@@ -1625,7 +1687,7 @@ double Mndo::GetHessianElementDifferentAtomsSCF(int indexAtomA, | ||
1625 | 1687 | static_cast<CartesianType>(axisA), |
1626 | 1688 | static_cast<CartesianType>(axisB), |
1627 | 1689 | orbitalElectronPopulation, |
1628 | - diatomicTwoElecTwoCore2ndDerivs[indexAtomB]); | |
1690 | + diatomicTwoElecsTwoCores2ndDerivs[indexAtomB]); | |
1629 | 1691 | } |
1630 | 1692 | } |
1631 | 1693 | } |
@@ -1648,7 +1710,7 @@ double Mndo::GetHessianElementDifferentAtomsSCF(int indexAtomA, | ||
1648 | 1710 | static_cast<CartesianType>(axisA), |
1649 | 1711 | static_cast<CartesianType>(axisB), |
1650 | 1712 | orbitalElectronPopulation1stDerivs, |
1651 | - diatomicTwoElecTwoCore1stDerivs[indexAtomC]); | |
1713 | + diatomicTwoElecsTwoCores1stDerivs[indexAtomC]); | |
1652 | 1714 | } |
1653 | 1715 | } |
1654 | 1716 | for(int lambda=firstAOIndexC; lambda<firstAOIndexC+numberAOsC; lambda++){ |
@@ -1661,7 +1723,7 @@ double Mndo::GetHessianElementDifferentAtomsSCF(int indexAtomA, | ||
1661 | 1723 | static_cast<CartesianType>(axisA), |
1662 | 1724 | static_cast<CartesianType>(axisB), |
1663 | 1725 | orbitalElectronPopulation1stDerivs, |
1664 | - diatomicTwoElecTwoCore1stDerivs[indexAtomC]); | |
1726 | + diatomicTwoElecsTwoCores1stDerivs[indexAtomC]); | |
1665 | 1727 | } |
1666 | 1728 | } |
1667 | 1729 | for(int mu=firstAOIndexA; mu<=lastAOIndexA; mu++){ |
@@ -1692,7 +1754,7 @@ double Mndo::GetHessianElementDifferentAtomsSCF(int indexAtomA, | ||
1692 | 1754 | static_cast<CartesianType>(axisB), |
1693 | 1755 | orbitalElectronPopulation, |
1694 | 1756 | orbitalElectronPopulation1stDerivs, |
1695 | - diatomicTwoElecTwoCore1stDerivs[indexAtomC]); | |
1757 | + diatomicTwoElecsTwoCores1stDerivs[indexAtomC]); | |
1696 | 1758 | } |
1697 | 1759 | } |
1698 | 1760 | } |
@@ -1731,37 +1793,37 @@ void Mndo::CalcHessianSCF(double** hessianSCF, bool isMassWeighted) const{ | ||
1731 | 1793 | stringstream ompErrors; |
1732 | 1794 | #pragma omp parallel |
1733 | 1795 | { |
1734 | - double**** diatomicOverlapAOs1stDerivs = NULL; | |
1735 | - double***** diatomicOverlapAOs2ndDerivs = NULL; | |
1736 | - double****** diatomicTwoElecTwoCore1stDerivs = NULL; | |
1737 | - double******* diatomicTwoElecTwoCore2ndDerivs = NULL; | |
1738 | - double** tmpRotMat = NULL; | |
1739 | - double*** tmpRotMat1stDerivs = NULL; | |
1740 | - double**** tmpRotMat2ndDerivs = NULL; | |
1741 | - double**** tmpDiatomicTwoElecTwoCore = NULL; | |
1742 | - double***** tmpDiatomicTwoElecTwoCore1stDerivs = NULL; | |
1743 | - double** tmpDiaOverlapAOsInDiaFrame = NULL; // diatomic overlapAOs in diatomic frame | |
1744 | - double** tmpDiaOverlapAOs1stDerivInDiaFrame = NULL; // first derivative of the diaOverlapAOs. This derivative is related to the distance between two atoms. | |
1745 | - double** tmpDiaOverlapAOs2ndDerivInDiaFrame = NULL; // second derivative of the diaOverlapAOs. This derivative is related to the distance between two atoms. | |
1746 | - double*** tmpDiaOverlapAOs1stDerivs = NULL; // first derivatives of the diaOverlapAOs. This derivatives are related to the all Cartesian coordinates. | |
1747 | - double**** tmpDiaOverlapAOs2ndDerivs = NULL; //sedond derivatives of the diaOverlapAOs. This derivatives are related to the all Cartesian coordinates. | |
1748 | - double** tmpRotMat1stDeriv = NULL; | |
1749 | - double** tmpRotatedDiatomicOverlap = NULL; | |
1750 | - double* tmpRotatedDiatomicOverlapVec = NULL; // used in dgemmm | |
1751 | - double** tmpMatrixBC = NULL; // used in dgemmm | |
1752 | - double* tmpVectorBC = NULL; // used in dgemmm | |
1796 | + double**** diatomicOverlapAOs1stDerivs = NULL; | |
1797 | + double***** diatomicOverlapAOs2ndDerivs = NULL; | |
1798 | + double****** diatomicTwoElecsTwoCores1stDerivs = NULL; | |
1799 | + double******* diatomicTwoElecsTwoCores2ndDerivs = NULL; | |
1800 | + double** tmpRotMat = NULL; | |
1801 | + double*** tmpRotMat1stDerivs = NULL; | |
1802 | + double**** tmpRotMat2ndDerivs = NULL; | |
1803 | + double**** tmpDiatomicTwoElecsTwoCores = NULL; | |
1804 | + double***** tmpDiatomicTwoElecsTwoCores1stDerivs = NULL; | |
1805 | + double** tmpDiaOverlapAOsInDiaFrame = NULL; // diatomic overlapAOs in diatomic frame | |
1806 | + double** tmpDiaOverlapAOs1stDerivInDiaFrame = NULL; // first derivative of the diaOverlapAOs. This derivative is related to the distance between two atoms. | |
1807 | + double** tmpDiaOverlapAOs2ndDerivInDiaFrame = NULL; // second derivative of the diaOverlapAOs. This derivative is related to the distance between two atoms. | |
1808 | + double*** tmpDiaOverlapAOs1stDerivs = NULL; // first derivatives of the diaOverlapAOs. This derivatives are related to the all Cartesian coordinates. | |
1809 | + double**** tmpDiaOverlapAOs2ndDerivs = NULL; //sedond derivatives of the diaOverlapAOs. This derivatives are related to the all Cartesian coordinates. | |
1810 | + double** tmpRotMat1stDeriv = NULL; | |
1811 | + double** tmpRotatedDiatomicOverlap = NULL; | |
1812 | + double* tmpRotatedDiatomicOverlapVec = NULL; // used in dgemmm | |
1813 | + double** tmpMatrixBC = NULL; // used in dgemmm | |
1814 | + double* tmpVectorBC = NULL; // used in dgemmm | |
1753 | 1815 | |
1754 | 1816 | try{ |
1755 | 1817 | this->MallocTempMatricesEachThreadCalcHessianSCF(&diatomicOverlapAOs1stDerivs, |
1756 | 1818 | &diatomicOverlapAOs2ndDerivs, |
1757 | - &diatomicTwoElecTwoCore1stDerivs, | |
1758 | - &diatomicTwoElecTwoCore2ndDerivs, | |
1819 | + &diatomicTwoElecsTwoCores1stDerivs, | |
1820 | + &diatomicTwoElecsTwoCores2ndDerivs, | |
1759 | 1821 | &tmpRotMat, |
1760 | 1822 | &tmpRotMat1stDeriv, |
1761 | 1823 | &tmpRotMat1stDerivs, |
1762 | 1824 | &tmpRotMat2ndDerivs, |
1763 | - &tmpDiatomicTwoElecTwoCore, | |
1764 | - &tmpDiatomicTwoElecTwoCore1stDerivs, | |
1825 | + &tmpDiatomicTwoElecsTwoCores, | |
1826 | + &tmpDiatomicTwoElecsTwoCores1stDerivs, | |
1765 | 1827 | &tmpDiaOverlapAOsInDiaFrame, |
1766 | 1828 | &tmpDiaOverlapAOs1stDerivInDiaFrame, |
1767 | 1829 | &tmpDiaOverlapAOs2ndDerivInDiaFrame, |
@@ -1804,20 +1866,20 @@ void Mndo::CalcHessianSCF(double** hessianSCF, bool isMassWeighted) const{ | ||
1804 | 1866 | tmpRotMat2ndDerivs, |
1805 | 1867 | indexAtomA, |
1806 | 1868 | indexAtomB); |
1807 | - this->CalcDiatomicTwoElecTwoCore1stDerivatives(diatomicTwoElecTwoCore1stDerivs[indexAtomB], | |
1808 | - tmpRotMat, | |
1809 | - tmpRotMat1stDerivs, | |
1810 | - tmpDiatomicTwoElecTwoCore, | |
1811 | - indexAtomA, | |
1812 | - indexAtomB); | |
1813 | - this->CalcDiatomicTwoElecTwoCore2ndDerivatives(diatomicTwoElecTwoCore2ndDerivs[indexAtomB], | |
1814 | - tmpRotMat, | |
1815 | - tmpRotMat1stDerivs, | |
1816 | - tmpRotMat2ndDerivs, | |
1817 | - tmpDiatomicTwoElecTwoCore, | |
1818 | - tmpDiatomicTwoElecTwoCore1stDerivs, | |
1819 | - indexAtomA, | |
1820 | - indexAtomB); | |
1869 | + this->CalcDiatomicTwoElecsTwoCores1stDerivatives(diatomicTwoElecsTwoCores1stDerivs[indexAtomB], | |
1870 | + tmpRotMat, | |
1871 | + tmpRotMat1stDerivs, | |
1872 | + tmpDiatomicTwoElecsTwoCores, | |
1873 | + indexAtomA, | |
1874 | + indexAtomB); | |
1875 | + this->CalcDiatomicTwoElecsTwoCores2ndDerivatives(diatomicTwoElecsTwoCores2ndDerivs[indexAtomB], | |
1876 | + tmpRotMat, | |
1877 | + tmpRotMat1stDerivs, | |
1878 | + tmpRotMat2ndDerivs, | |
1879 | + tmpDiatomicTwoElecsTwoCores, | |
1880 | + tmpDiatomicTwoElecsTwoCores1stDerivs, | |
1881 | + indexAtomA, | |
1882 | + indexAtomB); | |
1821 | 1883 | } |
1822 | 1884 | } |
1823 | 1885 |
@@ -1837,8 +1899,8 @@ void Mndo::CalcHessianSCF(double** hessianSCF, bool isMassWeighted) const{ | ||
1837 | 1899 | orbitalElectronPopulation1stDerivs, |
1838 | 1900 | diatomicOverlapAOs1stDerivs, |
1839 | 1901 | diatomicOverlapAOs2ndDerivs, |
1840 | - diatomicTwoElecTwoCore1stDerivs, | |
1841 | - diatomicTwoElecTwoCore2ndDerivs); | |
1902 | + diatomicTwoElecsTwoCores1stDerivs, | |
1903 | + diatomicTwoElecsTwoCores2ndDerivs); | |
1842 | 1904 | if(isMassWeighted){ |
1843 | 1905 | hessianSCF[k][l] /= sqrt(atomA.GetCoreMass()*atomB.GetCoreMass()); |
1844 | 1906 | } |
@@ -1855,8 +1917,8 @@ void Mndo::CalcHessianSCF(double** hessianSCF, bool isMassWeighted) const{ | ||
1855 | 1917 | orbitalElectronPopulation1stDerivs, |
1856 | 1918 | diatomicOverlapAOs1stDerivs, |
1857 | 1919 | diatomicOverlapAOs2ndDerivs, |
1858 | - diatomicTwoElecTwoCore1stDerivs, | |
1859 | - diatomicTwoElecTwoCore2ndDerivs); | |
1920 | + diatomicTwoElecsTwoCores1stDerivs, | |
1921 | + diatomicTwoElecsTwoCores2ndDerivs); | |
1860 | 1922 | if(isMassWeighted){ |
1861 | 1923 | hessianSCF[k][l] /= atomA.GetCoreMass(); |
1862 | 1924 | } |
@@ -1873,14 +1935,14 @@ void Mndo::CalcHessianSCF(double** hessianSCF, bool isMassWeighted) const{ | ||
1873 | 1935 | } |
1874 | 1936 | this->FreeTempMatricesEachThreadCalcHessianSCF(&diatomicOverlapAOs1stDerivs, |
1875 | 1937 | &diatomicOverlapAOs2ndDerivs, |
1876 | - &diatomicTwoElecTwoCore1stDerivs, | |
1877 | - &diatomicTwoElecTwoCore2ndDerivs, | |
1938 | + &diatomicTwoElecsTwoCores1stDerivs, | |
1939 | + &diatomicTwoElecsTwoCores2ndDerivs, | |
1878 | 1940 | &tmpRotMat, |
1879 | 1941 | &tmpRotMat1stDeriv, |
1880 | 1942 | &tmpRotMat1stDerivs, |
1881 | 1943 | &tmpRotMat2ndDerivs, |
1882 | - &tmpDiatomicTwoElecTwoCore, | |
1883 | - &tmpDiatomicTwoElecTwoCore1stDerivs, | |
1944 | + &tmpDiatomicTwoElecsTwoCores, | |
1945 | + &tmpDiatomicTwoElecsTwoCores1stDerivs, | |
1884 | 1946 | &tmpDiaOverlapAOsInDiaFrame, |
1885 | 1947 | &tmpDiaOverlapAOs1stDerivInDiaFrame, |
1886 | 1948 | &tmpDiaOverlapAOs2ndDerivInDiaFrame, |
@@ -1988,12 +2050,12 @@ void Mndo::CalcOrbitalElectronPopulation1stDerivatives(double**** orbitalElectro | ||
1988 | 2050 | for(int indexAtomA=0; indexAtomA<this->molecule->GetNumberAtoms(); indexAtomA++){ |
1989 | 2051 | for(int axis=XAxis; axis<CartesianType_end; axis++){ |
1990 | 2052 | double temp=0.0; |
1991 | - printf("hoge-cphf: atom:%d axis:%s start\n ",indexAtomA,CartesianTypeStr(axis)); | |
2053 | + printf("cphf: atom:%d axis:%s start\n ",indexAtomA,CartesianTypeStr(axis)); | |
1992 | 2054 | for(int mu=0; mu<totalNumberAOs; mu++){ |
1993 | 2055 | temp += orbitalElectronPopulation1stDerivs[mu][mu][indexAtomA][axis]; |
1994 | 2056 | printf("%e\n",orbitalElectronPopulation1stDerivs[mu][mu][indexAtomA][axis]); |
1995 | 2057 | } |
1996 | - printf("hoge-cphf: atom:%d axis:%s %e\n\n",indexAtomA,CartesianTypeStr(axis),temp); | |
2058 | + printf("cphf: atom:%d axis:%s %e\n\n",indexAtomA,CartesianTypeStr(axis),temp); | |
1997 | 2059 | } |
1998 | 2060 | } |
1999 | 2061 | */ |
@@ -2070,11 +2132,11 @@ void Mndo::CalcStaticFirstOrderFock(double* staticFirstOrderFock, | ||
2070 | 2132 | CartesianType axisA) const{ |
2071 | 2133 | MallocerFreer::GetInstance()->Initialize<double>(staticFirstOrderFock, |
2072 | 2134 | nonRedundantQIndeces.size()+redundantQIndeces.size()); |
2073 | - double***** diatomicTwoElecTwoCore1stDerivs = NULL; | |
2074 | - double*** diatomicOverlapAOs1stDerivs = NULL; | |
2075 | - double** tmpRotMat = NULL; | |
2076 | - double*** tmpRotMat1stDerivs = NULL; | |
2077 | - double**** tmpDiatomicTwoElecTwoCore = NULL; | |
2135 | + double***** diatomicTwoElecsTwoCores1stDerivs = NULL; | |
2136 | + double*** diatomicOverlapAOs1stDerivs = NULL; | |
2137 | + double** tmpRotMat = NULL; | |
2138 | + double*** tmpRotMat1stDerivs = NULL; | |
2139 | + double**** tmpDiatomicTwoElecsTwoCores = NULL; | |
2078 | 2140 | |
2079 | 2141 | double** tmpDiaOverlapAOsInDiaFrame = NULL; // diatomic overlapAOs in diatomic frame |
2080 | 2142 | double** tmpDiaOverlapAOs1stDerivInDiaFrame = NULL; // first derivative of the diaOverlapAOs. This derivative is related to the distance between two atoms. |
@@ -2084,11 +2146,11 @@ void Mndo::CalcStaticFirstOrderFock(double* staticFirstOrderFock, | ||
2084 | 2146 | double** tmpMatrixBC = NULL; |
2085 | 2147 | double* tmpVectorBC = NULL; |
2086 | 2148 | try{ |
2087 | - this->MallocTempMatricesStaticFirstOrderFock(&diatomicTwoElecTwoCore1stDerivs, | |
2149 | + this->MallocTempMatricesStaticFirstOrderFock(&diatomicTwoElecsTwoCores1stDerivs, | |
2088 | 2150 | &diatomicOverlapAOs1stDerivs, |
2089 | 2151 | &tmpRotMat, |
2090 | 2152 | &tmpRotMat1stDerivs, |
2091 | - &tmpDiatomicTwoElecTwoCore); | |
2153 | + &tmpDiatomicTwoElecsTwoCores); | |
2092 | 2154 | MallocerFreer::GetInstance()->Malloc<double>(&tmpDiaOverlapAOsInDiaFrame, OrbitalType_end, OrbitalType_end); |
2093 | 2155 | MallocerFreer::GetInstance()->Malloc<double>(&tmpDiaOverlapAOs1stDerivInDiaFrame, OrbitalType_end, OrbitalType_end); |
2094 | 2156 | MallocerFreer::GetInstance()->Malloc<double>(&tmpRotMat1stDeriv, OrbitalType_end, OrbitalType_end); |
@@ -2108,11 +2170,11 @@ void Mndo::CalcStaticFirstOrderFock(double* staticFirstOrderFock, | ||
2108 | 2170 | int coreChargeB = atomB.GetCoreCharge(); |
2109 | 2171 | |
2110 | 2172 | // calc. first derivative of two elec two core interaction |
2111 | - this->CalcDiatomicTwoElecTwoCore1stDerivatives(diatomicTwoElecTwoCore1stDerivs, | |
2112 | - tmpRotMat, | |
2113 | - tmpRotMat1stDerivs, | |
2114 | - tmpDiatomicTwoElecTwoCore, | |
2115 | - indexAtomA, indexAtomB); | |
2173 | + this->CalcDiatomicTwoElecsTwoCores1stDerivatives(diatomicTwoElecsTwoCores1stDerivs, | |
2174 | + tmpRotMat, | |
2175 | + tmpRotMat1stDerivs, | |
2176 | + tmpDiatomicTwoElecsTwoCores, | |
2177 | + indexAtomA, indexAtomB); | |
2116 | 2178 | // calc. first derivative of overlapAOs. |
2117 | 2179 | this->CalcDiatomicOverlapAOs1stDerivatives(diatomicOverlapAOs1stDerivs, |
2118 | 2180 | tmpDiaOverlapAOsInDiaFrame, |
@@ -2157,22 +2219,22 @@ void Mndo::CalcStaticFirstOrderFock(double* staticFirstOrderFock, | ||
2157 | 2219 | *this->fockMatrix[moI][lambda] |
2158 | 2220 | *this->fockMatrix[moJ][mu] |
2159 | 2221 | *this->orbitalElectronPopulation[nu][sigma]; |
2160 | - staticFirstOrderFock[i] += temp1*diatomicTwoElecTwoCore1stDerivs[mu-firstAOIndexA] | |
2161 | - [nu-firstAOIndexA] | |
2162 | - [lambda-firstAOIndexB] | |
2163 | - [sigma-firstAOIndexB] | |
2164 | - [axisA]; | |
2222 | + staticFirstOrderFock[i] += temp1*diatomicTwoElecsTwoCores1stDerivs[mu-firstAOIndexA] | |
2223 | + [nu-firstAOIndexA] | |
2224 | + [lambda-firstAOIndexB] | |
2225 | + [sigma-firstAOIndexB] | |
2226 | + [axisA]; | |
2165 | 2227 | } //sigma-loop |
2166 | 2228 | } // lambda-loop |
2167 | 2229 | |
2168 | 2230 | double temp2 = this->fockMatrix[moI][mu] |
2169 | 2231 | *this->fockMatrix[moJ][nu] |
2170 | 2232 | *coreChargeB |
2171 | - *diatomicTwoElecTwoCore1stDerivs[mu-firstAOIndexA] | |
2172 | - [nu-firstAOIndexA] | |
2173 | - [s] | |
2174 | - [s] | |
2175 | - [axisA]; | |
2233 | + *diatomicTwoElecsTwoCores1stDerivs[mu-firstAOIndexA] | |
2234 | + [nu-firstAOIndexA] | |
2235 | + [s] | |
2236 | + [s] | |
2237 | + [axisA]; | |
2176 | 2238 | staticFirstOrderFock[i] -= temp2; |
2177 | 2239 | |
2178 | 2240 | } // nu-loop |
@@ -2184,11 +2246,11 @@ void Mndo::CalcStaticFirstOrderFock(double* staticFirstOrderFock, | ||
2184 | 2246 | double temp3 = this->fockMatrix[moI][lambda] |
2185 | 2247 | *this->fockMatrix[moJ][sigma] |
2186 | 2248 | *coreChargeA |
2187 | - *diatomicTwoElecTwoCore1stDerivs[s] | |
2188 | - [s] | |
2189 | - [lambda-firstAOIndexB] | |
2190 | - [sigma-firstAOIndexB] | |
2191 | - [axisA]; | |
2249 | + *diatomicTwoElecsTwoCores1stDerivs[s] | |
2250 | + [s] | |
2251 | + [lambda-firstAOIndexB] | |
2252 | + [sigma-firstAOIndexB] | |
2253 | + [axisA]; | |
2192 | 2254 | staticFirstOrderFock[i] -= temp3; |
2193 | 2255 | |
2194 | 2256 | } //sigma-loop |
@@ -2216,11 +2278,11 @@ void Mndo::CalcStaticFirstOrderFock(double* staticFirstOrderFock, | ||
2216 | 2278 | } |
2217 | 2279 | } |
2218 | 2280 | catch(MolDSException ex){ |
2219 | - this->FreeTempMatricesStaticFirstOrderFock(&diatomicTwoElecTwoCore1stDerivs, | |
2281 | + this->FreeTempMatricesStaticFirstOrderFock(&diatomicTwoElecsTwoCores1stDerivs, | |
2220 | 2282 | &diatomicOverlapAOs1stDerivs, |
2221 | 2283 | &tmpRotMat, |
2222 | 2284 | &tmpRotMat1stDerivs, |
2223 | - &tmpDiatomicTwoElecTwoCore); | |
2285 | + &tmpDiatomicTwoElecsTwoCores); | |
2224 | 2286 | MallocerFreer::GetInstance()->Free<double>(&tmpDiaOverlapAOsInDiaFrame, OrbitalType_end, OrbitalType_end); |
2225 | 2287 | MallocerFreer::GetInstance()->Free<double>(&tmpDiaOverlapAOs1stDerivInDiaFrame, OrbitalType_end, OrbitalType_end); |
2226 | 2288 | //MallocerFreer::GetInstance()->Free<double>(&tmpRotMat, OrbitalType_end, OrbitalType_end); |
@@ -2232,11 +2294,11 @@ void Mndo::CalcStaticFirstOrderFock(double* staticFirstOrderFock, | ||
2232 | 2294 | MallocerFreer::GetInstance()->Free<double>(&tmpVectorBC, OrbitalType_end*OrbitalType_end); |
2233 | 2295 | throw ex; |
2234 | 2296 | } |
2235 | - this->FreeTempMatricesStaticFirstOrderFock(&diatomicTwoElecTwoCore1stDerivs, | |
2297 | + this->FreeTempMatricesStaticFirstOrderFock(&diatomicTwoElecsTwoCores1stDerivs, | |
2236 | 2298 | &diatomicOverlapAOs1stDerivs, |
2237 | 2299 | &tmpRotMat, |
2238 | 2300 | &tmpRotMat1stDerivs, |
2239 | - &tmpDiatomicTwoElecTwoCore); | |
2301 | + &tmpDiatomicTwoElecsTwoCores); | |
2240 | 2302 | MallocerFreer::GetInstance()->Free<double>(&tmpDiaOverlapAOsInDiaFrame, OrbitalType_end, OrbitalType_end); |
2241 | 2303 | MallocerFreer::GetInstance()->Free<double>(&tmpDiaOverlapAOs1stDerivInDiaFrame, OrbitalType_end, OrbitalType_end); |
2242 | 2304 | //MallocerFreer::GetInstance()->Free<double>(&tmpRotMat, OrbitalType_end, OrbitalType_end); |
@@ -2255,12 +2317,12 @@ void Mndo::CalcStaticFirstOrderFock(double* staticFirstOrderFock, | ||
2255 | 2317 | */ |
2256 | 2318 | } |
2257 | 2319 | |
2258 | -void Mndo::MallocTempMatricesStaticFirstOrderFock(double****** diatomicTwoElecTwoCore1stDeriv, | |
2320 | +void Mndo::MallocTempMatricesStaticFirstOrderFock(double****** diatomicTwoElecsTwoCores1stDeriv, | |
2259 | 2321 | double**** diatomicOverlapAOs1stDeriv, |
2260 | 2322 | double*** tmpRotMat, |
2261 | 2323 | double**** tmpRotMat1stDerivs, |
2262 | - double***** tmpDiatomicTwoElecTwoCore)const{ | |
2263 | - MallocerFreer::GetInstance()->Malloc<double>(diatomicTwoElecTwoCore1stDeriv, | |
2324 | + double***** tmpDiatomicTwoElecsTwoCores)const{ | |
2325 | + MallocerFreer::GetInstance()->Malloc<double>(diatomicTwoElecsTwoCores1stDeriv, | |
2264 | 2326 | dxy, |
2265 | 2327 | dxy, |
2266 | 2328 | dxy, |
@@ -2277,19 +2339,19 @@ void Mndo::MallocTempMatricesStaticFirstOrderFock(double****** diatomicTwoElecTw | ||
2277 | 2339 | OrbitalType_end, |
2278 | 2340 | OrbitalType_end, |
2279 | 2341 | CartesianType_end); |
2280 | - MallocerFreer::GetInstance()->Malloc<double>(tmpDiatomicTwoElecTwoCore, | |
2342 | + MallocerFreer::GetInstance()->Malloc<double>(tmpDiatomicTwoElecsTwoCores, | |
2281 | 2343 | dxy, |
2282 | 2344 | dxy, |
2283 | 2345 | dxy, |
2284 | 2346 | dxy); |
2285 | 2347 | } |
2286 | 2348 | |
2287 | -void Mndo::FreeTempMatricesStaticFirstOrderFock(double****** diatomicTwoElecTwoCore1stDeriv, | |
2349 | +void Mndo::FreeTempMatricesStaticFirstOrderFock(double****** diatomicTwoElecsTwoCores1stDeriv, | |
2288 | 2350 | double**** diatomicOverlapAOs1stDeriv, |
2289 | 2351 | double*** tmpRotMat, |
2290 | 2352 | double**** tmpRotMat1stDerivs, |
2291 | - double***** tmpDiatomicTwoElecTwoCore)const{ | |
2292 | - MallocerFreer::GetInstance()->Free<double>(diatomicTwoElecTwoCore1stDeriv, | |
2353 | + double***** tmpDiatomicTwoElecsTwoCores)const{ | |
2354 | + MallocerFreer::GetInstance()->Free<double>(diatomicTwoElecsTwoCores1stDeriv, | |
2293 | 2355 | dxy, |
2294 | 2356 | dxy, |
2295 | 2357 | dxy, |
@@ -2306,7 +2368,7 @@ void Mndo::FreeTempMatricesStaticFirstOrderFock(double****** diatomicTwoElecTwoC | ||
2306 | 2368 | OrbitalType_end, |
2307 | 2369 | OrbitalType_end, |
2308 | 2370 | CartesianType_end); |
2309 | - MallocerFreer::GetInstance()->Free<double>(tmpDiatomicTwoElecTwoCore, | |
2371 | + MallocerFreer::GetInstance()->Free<double>(tmpDiatomicTwoElecsTwoCores, | |
2310 | 2372 | dxy, |
2311 | 2373 | dxy, |
2312 | 2374 | dxy, |
@@ -2405,7 +2467,7 @@ void Mndo::FreeTempMatricesSolveCPHF(double*** matrixCPHF, | ||
2405 | 2467 | void Mndo::CalcForceSCFElecCoreAttractionPart(double* force, |
2406 | 2468 | int indexAtomA, |
2407 | 2469 | int indexAtomB, |
2408 | - double const* const* const* const* const* diatomicTwoElecTwoCore1stDerivs) const{ | |
2470 | + double const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivs) const{ | |
2409 | 2471 | const Atom& atomA = *this->molecule->GetAtom(indexAtomA); |
2410 | 2472 | int firstAOIndexA = atomA.GetFirstAOIndex(); |
2411 | 2473 | int lastAOIndexA = atomA.GetLastAOIndex(); |
@@ -2418,7 +2480,7 @@ void Mndo::CalcForceSCFElecCoreAttractionPart(double* force, | ||
2418 | 2480 | indexAtomB, |
2419 | 2481 | mu-firstAOIndexA, |
2420 | 2482 | nu-firstAOIndexA, |
2421 | - diatomicTwoElecTwoCore1stDerivs, | |
2483 | + diatomicTwoElecsTwoCores1stDerivs, | |
2422 | 2484 | (CartesianType)i); |
2423 | 2485 | } |
2424 | 2486 | } |
@@ -2457,7 +2519,7 @@ void Mndo::CalcForceSCFOverlapAOsPart(double* force, | ||
2457 | 2519 | void Mndo::CalcForceSCFTwoElecPart(double* force, |
2458 | 2520 | int indexAtomA, |
2459 | 2521 | int indexAtomB, |
2460 | - double const* const* const* const* const* diatomicTwoElecTwoCore1stDerivs) const{ | |
2522 | + double const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivs) const{ | |
2461 | 2523 | const Atom& atomA = *this->molecule->GetAtom(indexAtomA); |
2462 | 2524 | const Atom& atomB = *this->molecule->GetAtom(indexAtomB); |
2463 | 2525 | int firstAOIndexA = atomA.GetFirstAOIndex(); |
@@ -2472,19 +2534,19 @@ void Mndo::CalcForceSCFTwoElecPart(double* force, | ||
2472 | 2534 | force[i] -= 0.5 |
2473 | 2535 | *this->orbitalElectronPopulation[mu][nu] |
2474 | 2536 | *this->orbitalElectronPopulation[lambda][sigma] |
2475 | - *diatomicTwoElecTwoCore1stDerivs[mu-firstAOIndexA] | |
2476 | - [nu-firstAOIndexA] | |
2477 | - [lambda-firstAOIndexB] | |
2478 | - [sigma-firstAOIndexB] | |
2479 | - [(CartesianType)i]; | |
2537 | + *diatomicTwoElecsTwoCores1stDerivs[mu-firstAOIndexA] | |
2538 | + [nu-firstAOIndexA] | |
2539 | + [lambda-firstAOIndexB] | |
2540 | + [sigma-firstAOIndexB] | |
2541 | + [(CartesianType)i]; | |
2480 | 2542 | force[i] += 0.25 |
2481 | 2543 | *this->orbitalElectronPopulation[mu][lambda] |
2482 | 2544 | *this->orbitalElectronPopulation[nu][sigma] |
2483 | - *diatomicTwoElecTwoCore1stDerivs[mu-firstAOIndexA] | |
2484 | - [nu-firstAOIndexA] | |
2485 | - [lambda-firstAOIndexB] | |
2486 | - [sigma-firstAOIndexB] | |
2487 | - [(CartesianType)i]; | |
2545 | + *diatomicTwoElecsTwoCores1stDerivs[mu-firstAOIndexA] | |
2546 | + [nu-firstAOIndexA] | |
2547 | + [lambda-firstAOIndexB] | |
2548 | + [sigma-firstAOIndexB] | |
2549 | + [(CartesianType)i]; | |
2488 | 2550 | } |
2489 | 2551 | } |
2490 | 2552 | } |
@@ -2496,7 +2558,7 @@ void Mndo::CalcForceExcitedStaticPart(double* force, | ||
2496 | 2558 | int elecStateIndex, |
2497 | 2559 | int indexAtomA, |
2498 | 2560 | int indexAtomB, |
2499 | - double const* const* const* const* const* diatomicTwoElecTwoCore1stDerivs) const{ | |
2561 | + double const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivs) const{ | |
2500 | 2562 | const Atom& atomA = *this->molecule->GetAtom(indexAtomA); |
2501 | 2563 | const Atom& atomB = *this->molecule->GetAtom(indexAtomB); |
2502 | 2564 | int firstAOIndexA = atomA.GetFirstAOIndex(); |
@@ -2513,11 +2575,11 @@ void Mndo::CalcForceExcitedStaticPart(double* force, | ||
2513 | 2575 | -1.0*this->etaMatrixForce[elecStateIndex][mu][lambda] |
2514 | 2576 | *this->etaMatrixForce[elecStateIndex][nu][sigma]; |
2515 | 2577 | force[i] += temp |
2516 | - *diatomicTwoElecTwoCore1stDerivs[mu-firstAOIndexA] | |
2517 | - [nu-firstAOIndexA] | |
2518 | - [lambda-firstAOIndexB] | |
2519 | - [sigma-firstAOIndexB] | |
2520 | - [i]; | |
2578 | + *diatomicTwoElecsTwoCores1stDerivs[mu-firstAOIndexA] | |
2579 | + [nu-firstAOIndexA] | |
2580 | + [lambda-firstAOIndexB] | |
2581 | + [sigma-firstAOIndexB] | |
2582 | + [i]; | |
2521 | 2583 | } |
2522 | 2584 | } |
2523 | 2585 | } |
@@ -2529,7 +2591,7 @@ void Mndo::CalcForceExcitedElecCoreAttractionPart(double* force, | ||
2529 | 2591 | int elecStateIndex, |
2530 | 2592 | int indexAtomA, |
2531 | 2593 | int indexAtomB, |
2532 | - double const* const* const* const* const* diatomicTwoElecTwoCore1stDerivs) const{ | |
2594 | + double const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivs) const{ | |
2533 | 2595 | const Atom& atomA = *this->molecule->GetAtom(indexAtomA); |
2534 | 2596 | int firstAOIndexA = atomA.GetFirstAOIndex(); |
2535 | 2597 | int lastAOIndexA = atomA.GetLastAOIndex(); |
@@ -2542,7 +2604,7 @@ void Mndo::CalcForceExcitedElecCoreAttractionPart(double* force, | ||
2542 | 2604 | indexAtomB, |
2543 | 2605 | mu-firstAOIndexA, |
2544 | 2606 | nu-firstAOIndexA, |
2545 | - diatomicTwoElecTwoCore1stDerivs, | |
2607 | + diatomicTwoElecsTwoCores1stDerivs, | |
2546 | 2608 | (CartesianType)i); |
2547 | 2609 | } |
2548 | 2610 | } |
@@ -2553,7 +2615,7 @@ void Mndo::CalcForceExcitedTwoElecPart(double* force, | ||
2553 | 2615 | int elecStateIndex, |
2554 | 2616 | int indexAtomA, |
2555 | 2617 | int indexAtomB, |
2556 | - double const* const* const* const* const* diatomicTwoElecTwoCore1stDerivs) const{ | |
2618 | + double const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivs) const{ | |
2557 | 2619 | const Atom& atomA = *this->molecule->GetAtom(indexAtomA); |
2558 | 2620 | const Atom& atomB = *this->molecule->GetAtom(indexAtomB); |
2559 | 2621 | int firstAOIndexA = atomA.GetFirstAOIndex(); |
@@ -2567,19 +2629,19 @@ void Mndo::CalcForceExcitedTwoElecPart(double* force, | ||
2567 | 2629 | for(int i=0; i<CartesianType_end; i++){ |
2568 | 2630 | force[i] -= this->zMatrixForce[elecStateIndex][mu][nu] |
2569 | 2631 | *this->orbitalElectronPopulation[lambda][sigma] |
2570 | - *diatomicTwoElecTwoCore1stDerivs[mu-firstAOIndexA] | |
2571 | - [nu-firstAOIndexA] | |
2572 | - [lambda-firstAOIndexB] | |
2573 | - [sigma-firstAOIndexB] | |
2574 | - [i]; | |
2632 | + *diatomicTwoElecsTwoCores1stDerivs[mu-firstAOIndexA] | |
2633 | + [nu-firstAOIndexA] | |
2634 | + [lambda-firstAOIndexB] | |
2635 | + [sigma-firstAOIndexB] | |
2636 | + [i]; | |
2575 | 2637 | force[i] += 0.50 |
2576 | 2638 | *this->zMatrixForce[elecStateIndex][mu][lambda] |
2577 | 2639 | *this->orbitalElectronPopulation[nu][sigma] |
2578 | - *diatomicTwoElecTwoCore1stDerivs[mu-firstAOIndexA] | |
2579 | - [nu-firstAOIndexA] | |
2580 | - [lambda-firstAOIndexB] | |
2581 | - [sigma-firstAOIndexB] | |
2582 | - [(CartesianType)i]; | |
2640 | + *diatomicTwoElecsTwoCores1stDerivs[mu-firstAOIndexA] | |
2641 | + [nu-firstAOIndexA] | |
2642 | + [lambda-firstAOIndexB] | |
2643 | + [sigma-firstAOIndexB] | |
2644 | + [(CartesianType)i]; | |
2583 | 2645 | } |
2584 | 2646 | } |
2585 | 2647 | } |
@@ -2608,10 +2670,10 @@ void Mndo::CalcForce(const vector<int>& elecStates){ | ||
2608 | 2670 | #pragma omp parallel |
2609 | 2671 | { |
2610 | 2672 | double*** diatomicOverlapAOs1stDerivs = NULL; |
2611 | - double***** diatomicTwoElecTwoCore1stDerivs = NULL; | |
2612 | - double** tmpRotMat = NULL; | |
2613 | - double*** tmpRotMat1stDerivs = NULL; | |
2614 | - double**** tmpDiatomicTwoElecTwoCore = NULL; | |
2673 | + double***** diatomicTwoElecsTwoCores1stDerivs = NULL; | |
2674 | + double** tmpRotMat = NULL; | |
2675 | + double*** tmpRotMat1stDerivs = NULL; | |
2676 | + double**** tmpDiatomicTwoElecsTwoCores = NULL; | |
2615 | 2677 | |
2616 | 2678 | double** tmpDiaOverlapAOsInDiaFrame = NULL; // diatomic overlapAOs in diatomic frame |
2617 | 2679 | double** tmpDiaOverlapAOs1stDerivInDiaFrame = NULL; // first derivative of the diaOverlapAOs. This derivative is related to the distance between two atoms. |
@@ -2622,7 +2684,7 @@ void Mndo::CalcForce(const vector<int>& elecStates){ | ||
2622 | 2684 | double* tmpVectorBC = NULL; // used in dgemmm |
2623 | 2685 | try{ |
2624 | 2686 | this->MallocTempMatricesCalcForce(&diatomicOverlapAOs1stDerivs, |
2625 | - &diatomicTwoElecTwoCore1stDerivs, | |
2687 | + &diatomicTwoElecsTwoCores1stDerivs, | |
2626 | 2688 | &tmpDiaOverlapAOsInDiaFrame, |
2627 | 2689 | &tmpDiaOverlapAOs1stDerivInDiaFrame, |
2628 | 2690 | &tmpRotMat, |
@@ -2632,7 +2694,7 @@ void Mndo::CalcForce(const vector<int>& elecStates){ | ||
2632 | 2694 | &tmpRotatedDiatomicOverlapVec, |
2633 | 2695 | &tmpMatrixBC, |
2634 | 2696 | &tmpVectorBC, |
2635 | - &tmpDiatomicTwoElecTwoCore); | |
2697 | + &tmpDiatomicTwoElecsTwoCores); | |
2636 | 2698 | |
2637 | 2699 | #pragma omp for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE) |
2638 | 2700 | for(int b=0; b<this->molecule->GetNumberAtoms(); b++){ |
@@ -2655,11 +2717,11 @@ void Mndo::CalcForce(const vector<int>& elecStates){ | ||
2655 | 2717 | atomA, |
2656 | 2718 | atomB); |
2657 | 2719 | // calc. first derivative of two elec two core interaction |
2658 | - this->CalcDiatomicTwoElecTwoCore1stDerivatives(diatomicTwoElecTwoCore1stDerivs, | |
2659 | - tmpRotMat, | |
2660 | - tmpRotMat1stDerivs, | |
2661 | - tmpDiatomicTwoElecTwoCore, | |
2662 | - a, b); | |
2720 | + this->CalcDiatomicTwoElecsTwoCores1stDerivatives(diatomicTwoElecsTwoCores1stDerivs, | |
2721 | + tmpRotMat, | |
2722 | + tmpRotMat1stDerivs, | |
2723 | + tmpDiatomicTwoElecsTwoCores, | |
2724 | + a, b); | |
2663 | 2725 | |
2664 | 2726 | // core repulsion part |
2665 | 2727 | double coreRepulsion[CartesianType_end] = {0.0,0.0,0.0}; |
@@ -2676,7 +2738,7 @@ void Mndo::CalcForce(const vector<int>& elecStates){ | ||
2676 | 2738 | this->CalcForceSCFElecCoreAttractionPart(forceElecCoreAttPart, |
2677 | 2739 | a, |
2678 | 2740 | b, |
2679 | - diatomicTwoElecTwoCore1stDerivs); | |
2741 | + diatomicTwoElecsTwoCores1stDerivs); | |
2680 | 2742 | // overlapAOs part (ground state) |
2681 | 2743 | double forceOverlapAOsPart[CartesianType_end] = {0.0,0.0,0.0}; |
2682 | 2744 | this->CalcForceSCFOverlapAOsPart(forceOverlapAOsPart, |
@@ -2688,7 +2750,7 @@ void Mndo::CalcForce(const vector<int>& elecStates){ | ||
2688 | 2750 | this->CalcForceSCFTwoElecPart(forceTwoElecPart, |
2689 | 2751 | a, |
2690 | 2752 | b, |
2691 | - diatomicTwoElecTwoCore1stDerivs); | |
2753 | + diatomicTwoElecsTwoCores1stDerivs); | |
2692 | 2754 | // sum up contributions from each part (ground state) |
2693 | 2755 | #pragma omp critical |
2694 | 2756 | { |
@@ -2713,7 +2775,7 @@ void Mndo::CalcForce(const vector<int>& elecStates){ | ||
2713 | 2775 | n, |
2714 | 2776 | a, |
2715 | 2777 | b, |
2716 | - diatomicTwoElecTwoCore1stDerivs); | |
2778 | + diatomicTwoElecsTwoCores1stDerivs); | |
2717 | 2779 | // sum up contributions from static part (excited state) |
2718 | 2780 | #pragma omp critical |
2719 | 2781 | { |
@@ -2731,7 +2793,7 @@ void Mndo::CalcForce(const vector<int>& elecStates){ | ||
2731 | 2793 | n, |
2732 | 2794 | a, |
2733 | 2795 | b, |
2734 | - diatomicTwoElecTwoCore1stDerivs); | |
2796 | + diatomicTwoElecsTwoCores1stDerivs); | |
2735 | 2797 | // overlapAOs part (excited states) |
2736 | 2798 | double forceExcitedOverlapAOsPart[CartesianType_end] = {0.0,0.0,0.0}; |
2737 | 2799 | this->CalcForceExcitedOverlapAOsPart(forceExcitedOverlapAOsPart, |
@@ -2745,7 +2807,7 @@ void Mndo::CalcForce(const vector<int>& elecStates){ | ||
2745 | 2807 | n, |
2746 | 2808 | a, |
2747 | 2809 | b, |
2748 | - diatomicTwoElecTwoCore1stDerivs); | |
2810 | + diatomicTwoElecsTwoCores1stDerivs); | |
2749 | 2811 | // sum up contributions from response part (excited state) |
2750 | 2812 | #pragma omp critical |
2751 | 2813 | { |
@@ -2767,7 +2829,7 @@ void Mndo::CalcForce(const vector<int>& elecStates){ | ||
2767 | 2829 | ex.Serialize(ompErrors); |
2768 | 2830 | } |
2769 | 2831 | this->FreeTempMatricesCalcForce(&diatomicOverlapAOs1stDerivs, |
2770 | - &diatomicTwoElecTwoCore1stDerivs, | |
2832 | + &diatomicTwoElecsTwoCores1stDerivs, | |
2771 | 2833 | &tmpDiaOverlapAOsInDiaFrame, |
2772 | 2834 | &tmpDiaOverlapAOs1stDerivInDiaFrame, |
2773 | 2835 | &tmpRotMat, |
@@ -2777,7 +2839,7 @@ void Mndo::CalcForce(const vector<int>& elecStates){ | ||
2777 | 2839 | &tmpRotatedDiatomicOverlapVec, |
2778 | 2840 | &tmpMatrixBC, |
2779 | 2841 | &tmpVectorBC, |
2780 | - &tmpDiatomicTwoElecTwoCore); | |
2842 | + &tmpDiatomicTwoElecsTwoCores); | |
2781 | 2843 | } // end of omp-parallelized region |
2782 | 2844 | // Exception throwing for omp-region |
2783 | 2845 | if(!ompErrors.str().empty()){ |
@@ -2791,7 +2853,7 @@ void Mndo::CalcForce(const vector<int>& elecStates){ | ||
2791 | 2853 | } |
2792 | 2854 | |
2793 | 2855 | void Mndo::MallocTempMatricesCalcForce(double**** diatomicOverlapAOs1stDerivs, |
2794 | - double****** diatomicTwoElecTwoCore1stDerivs, | |
2856 | + double****** diatomicTwoElecsTwoCores1stDerivs, | |
2795 | 2857 | double*** tmpDiaOverlapAOsInDiaFrame, |
2796 | 2858 | double*** tmpDiaOverlapAOs1stDerivInDiaFrame, |
2797 | 2859 | double*** tmpRotMat, |
@@ -2801,12 +2863,12 @@ void Mndo::MallocTempMatricesCalcForce(double**** diatomicOverlapAOs1stDerivs, | ||
2801 | 2863 | double** tmpRotatedDiatomicOverlapVec, |
2802 | 2864 | double*** tmpMatrixBC, |
2803 | 2865 | double** tmpVectorBC, |
2804 | - double***** tmpDiatomicTwoElecTwoCore) const{ | |
2866 | + double***** tmpDiatomicTwoElecsTwoCores) const{ | |
2805 | 2867 | MallocerFreer::GetInstance()->Malloc<double>(diatomicOverlapAOs1stDerivs, |
2806 | 2868 | OrbitalType_end, |
2807 | 2869 | OrbitalType_end, |
2808 | 2870 | CartesianType_end); |
2809 | - MallocerFreer::GetInstance()->Malloc<double>(diatomicTwoElecTwoCore1stDerivs, | |
2871 | + MallocerFreer::GetInstance()->Malloc<double>(diatomicTwoElecsTwoCores1stDerivs, | |
2810 | 2872 | dxy, |
2811 | 2873 | dxy, |
2812 | 2874 | dxy, |
@@ -2838,7 +2900,7 @@ void Mndo::MallocTempMatricesCalcForce(double**** diatomicOverlapAOs1stDerivs, | ||
2838 | 2900 | OrbitalType_end); |
2839 | 2901 | MallocerFreer::GetInstance()->Malloc<double>(tmpVectorBC, |
2840 | 2902 | OrbitalType_end*OrbitalType_end); |
2841 | - MallocerFreer::GetInstance()->Malloc<double>(tmpDiatomicTwoElecTwoCore, | |
2903 | + MallocerFreer::GetInstance()->Malloc<double>(tmpDiatomicTwoElecsTwoCores, | |
2842 | 2904 | dxy, |
2843 | 2905 | dxy, |
2844 | 2906 | dxy, |
@@ -2846,7 +2908,7 @@ void Mndo::MallocTempMatricesCalcForce(double**** diatomicOverlapAOs1stDerivs, | ||
2846 | 2908 | } |
2847 | 2909 | |
2848 | 2910 | void Mndo::FreeTempMatricesCalcForce(double**** diatomicOverlapAOs1stDerivs, |
2849 | - double****** diatomicTwoElecTwoCore1stDerivs, | |
2911 | + double****** diatomicTwoElecsTwoCores1stDerivs, | |
2850 | 2912 | double*** tmpDiaOverlapAOsInDiaFrame, |
2851 | 2913 | double*** tmpDiaOverlapAOs1stDerivInDiaFrame, |
2852 | 2914 | double*** tmpRotMat, |
@@ -2856,12 +2918,12 @@ void Mndo::FreeTempMatricesCalcForce(double**** diatomicOverlapAOs1stDerivs, | ||
2856 | 2918 | double** tmpRotatedDiatomicOverlapVec, |
2857 | 2919 | double*** tmpMatrixBC, |
2858 | 2920 | double** tmpVectorBC, |
2859 | - double***** tmpDiatomicTwoElecTwoCore) const{ | |
2921 | + double***** tmpDiatomicTwoElecsTwoCores) const{ | |
2860 | 2922 | MallocerFreer::GetInstance()->Free<double>(diatomicOverlapAOs1stDerivs, |
2861 | 2923 | OrbitalType_end, |
2862 | 2924 | OrbitalType_end, |
2863 | 2925 | CartesianType_end); |
2864 | - MallocerFreer::GetInstance()->Free<double>(diatomicTwoElecTwoCore1stDerivs, | |
2926 | + MallocerFreer::GetInstance()->Free<double>(diatomicTwoElecsTwoCores1stDerivs, | |
2865 | 2927 | dxy, |
2866 | 2928 | dxy, |
2867 | 2929 | dxy, |
@@ -2893,7 +2955,7 @@ void Mndo::FreeTempMatricesCalcForce(double**** diatomicOverlapAOs1stDerivs, | ||
2893 | 2955 | OrbitalType_end); |
2894 | 2956 | MallocerFreer::GetInstance()->Free<double>(tmpVectorBC, |
2895 | 2957 | OrbitalType_end*OrbitalType_end); |
2896 | - MallocerFreer::GetInstance()->Free<double>(tmpDiatomicTwoElecTwoCore, | |
2958 | + MallocerFreer::GetInstance()->Free<double>(tmpDiatomicTwoElecsTwoCores, | |
2897 | 2959 | dxy, |
2898 | 2960 | dxy, |
2899 | 2961 | dxy, |
@@ -2926,12 +2988,12 @@ double Mndo::GetSmallQElement(int moI, | ||
2926 | 2988 | for(int lambda=firstAOIndexB; lambda<=lastAOIndexB; lambda++){ |
2927 | 2989 | for(int sigma=lambda; sigma<=lastAOIndexB; sigma++){ |
2928 | 2990 | double twoElecInt = 0.0; |
2929 | - twoElecInt = this->twoElecTwoCore[A] | |
2930 | - [B] | |
2931 | - [mu-firstAOIndexA] | |
2932 | - [nu-firstAOIndexA] | |
2933 | - [lambda-firstAOIndexB] | |
2934 | - [sigma-firstAOIndexB]; | |
2991 | + twoElecInt = this->twoElecsTwoAtomCores[A] | |
2992 | + [B] | |
2993 | + [mu-firstAOIndexA] | |
2994 | + [nu-firstAOIndexA] | |
2995 | + [lambda-firstAOIndexB] | |
2996 | + [sigma-firstAOIndexB]; | |
2935 | 2997 | double temp = 0.0; |
2936 | 2998 | if(isMoPOcc){ |
2937 | 2999 | int p = numberOcc - (moP+1); |
@@ -3201,7 +3263,7 @@ double Mndo::GetAuxiliaryKNRKRElement(int moI, int moJ, int moK, int moL) const{ | ||
3201 | 3263 | } |
3202 | 3264 | double gamma = 0.0; |
3203 | 3265 | if(A!=B){ |
3204 | - gamma = this->twoElecTwoCore[A][B][muOffSet][nuOffSet][lambdaOffSet][sigmaOffSet]; | |
3266 | + gamma = this->twoElecsTwoAtomCores[A][B][muOffSet][nuOffSet][lambdaOffSet][sigmaOffSet]; | |
3205 | 3267 | } |
3206 | 3268 | else{ |
3207 | 3269 | if(mu==nu && lambda==sigma){ |
@@ -3289,12 +3351,12 @@ double Mndo::GetAuxiliaryKNRKRElement(int moI, int moJ, int moK, int moL) const{ | ||
3289 | 3351 | for(int sigma=firstAOIndexB; sigma<=lastAOIndexB; sigma++){ |
3290 | 3352 | twoElec[A*dxy*dxy+(mu-firstAOIndexA)*dxy+(nu-firstAOIndexA)] |
3291 | 3353 | [B*dxy*dxy+(lambda-firstAOIndexB)*dxy+(sigma-firstAOIndexB)] = |
3292 | - this->twoElecTwoCore[A] | |
3293 | - [B] | |
3294 | - [mu-firstAOIndexA] | |
3295 | - [nu-firstAOIndexA] | |
3296 | - [lambda-firstAOIndexB] | |
3297 | - [sigma-firstAOIndexB]; | |
3354 | + this->twoElecsTwoAtomCores[A] | |
3355 | + [B] | |
3356 | + [mu-firstAOIndexA] | |
3357 | + [nu-firstAOIndexA] | |
3358 | + [lambda-firstAOIndexB] | |
3359 | + [sigma-firstAOIndexB]; | |
3298 | 3360 | } |
3299 | 3361 | } |
3300 | 3362 | } |
@@ -3411,12 +3473,12 @@ double Mndo::GetAuxiliaryKNRKRElement(int moI, int moJ, int moK, int moL) const{ | ||
3411 | 3473 | for(int sigma=firstAOIndexB; sigma<=lastAOIndexB; sigma++){ |
3412 | 3474 | twoElec[A*dxy*dxy+(mu-firstAOIndexA)*dxy+(nu-firstAOIndexA)] |
3413 | 3475 | [B*dxy*dxy+(lambda-firstAOIndexB)*dxy+(sigma-firstAOIndexB)] = |
3414 | - this->twoElecTwoCore[A] | |
3415 | - [B] | |
3416 | - [mu-firstAOIndexA] | |
3417 | - [nu-firstAOIndexA] | |
3418 | - [lambda-firstAOIndexB] | |
3419 | - [sigma-firstAOIndexB]; | |
3476 | + this->twoElecsTwoAtomCores[A] | |
3477 | + [B] | |
3478 | + [mu-firstAOIndexA] | |
3479 | + [nu-firstAOIndexA] | |
3480 | + [lambda-firstAOIndexB] | |
3481 | + [sigma-firstAOIndexB]; | |
3420 | 3482 | } |
3421 | 3483 | } |
3422 | 3484 | } |
@@ -3486,15 +3548,22 @@ double Mndo::GetAuxiliaryKNRKRElement(int moI, int moJ, int moK, int moL) const{ | ||
3486 | 3548 | return value; |
3487 | 3549 | } |
3488 | 3550 | |
3489 | -void Mndo::CalcTwoElecTwoCore(double****** twoElecTwoCore, | |
3490 | - const Molecule& molecule) const{ | |
3551 | +void Mndo::CalcTwoElecsTwoCores(double****** twoElecsTwoAtomCores, | |
3552 | + double****** twoElecsAtomEpcCores, | |
3553 | + const Molecule& molecule) const{ | |
3554 | + this->CalcTwoElecsTwoAtomCores(twoElecsTwoAtomCores, molecule); | |
3555 | + this->CalcTwoElecsAtomEpcCores(twoElecsAtomEpcCores, molecule); | |
3556 | +} | |
3557 | + | |
3558 | +void Mndo::CalcTwoElecsTwoAtomCores(double****** twoElecsTwoAtomCores, | |
3559 | + const Molecule& molecule) const{ | |
3491 | 3560 | #ifdef MOLDS_DBG |
3492 | - if(twoElecTwoCore == NULL){ | |
3493 | - throw MolDSException(this->errorMessageCalcTwoElecTwoCoreNullMatrix); | |
3561 | + if(twoElecsTwoAtomCores == NULL){ | |
3562 | + throw MolDSException(this->errorMessageCalcTwoElecsTwoAtomCoresNullMatrix); | |
3494 | 3563 | } |
3495 | 3564 | #endif |
3496 | 3565 | int totalNumberAtoms = molecule.GetNumberAtoms(); |
3497 | - MallocerFreer::GetInstance()->Initialize<double>(twoElecTwoCore, | |
3566 | + MallocerFreer::GetInstance()->Initialize<double>(twoElecsTwoAtomCores, | |
3498 | 3567 | totalNumberAtoms, |
3499 | 3568 | totalNumberAtoms, |
3500 | 3569 | dxy, dxy, dxy, dxy); |
@@ -3512,34 +3581,34 @@ void Mndo::CalcTwoElecTwoCore(double****** twoElecTwoCore, | ||
3512 | 3581 | if(mpiRank == calcRank){ |
3513 | 3582 | #pragma omp parallel |
3514 | 3583 | { |
3515 | - double**** diatomicTwoElecTwoCore = NULL; | |
3516 | - double* tmpDiatomicTwoElecTwoCore = NULL; | |
3517 | - double** tmpRotMat = NULL; | |
3518 | - double** tmpMatrixBC = NULL; | |
3519 | - double* tmpVectorBC = NULL; | |
3584 | + double**** diatomicTwoElecsTwoCores = NULL; | |
3585 | + double* tmpDiatomicTwoElecsTwoCores = NULL; | |
3586 | + double** tmpRotMat = NULL; | |
3587 | + double** tmpMatrixBC = NULL; | |
3588 | + double* tmpVectorBC = NULL; | |
3520 | 3589 | try{ |
3521 | - MallocerFreer::GetInstance()->Malloc<double>(&diatomicTwoElecTwoCore, dxy, dxy, dxy, dxy); | |
3522 | - MallocerFreer::GetInstance()->Malloc<double>(&tmpDiatomicTwoElecTwoCore, dxy*dxy*dxy*dxy); | |
3523 | - MallocerFreer::GetInstance()->Malloc<double>(&tmpRotMat, OrbitalType_end, OrbitalType_end); | |
3524 | - MallocerFreer::GetInstance()->Malloc<double>(&tmpMatrixBC, dxy*dxy, dxy*dxy); | |
3525 | - MallocerFreer::GetInstance()->Malloc<double>(&tmpVectorBC, dxy*dxy*dxy*dxy); | |
3590 | + MallocerFreer::GetInstance()->Malloc<double>(&diatomicTwoElecsTwoCores, dxy, dxy, dxy, dxy); | |
3591 | + MallocerFreer::GetInstance()->Malloc<double>(&tmpDiatomicTwoElecsTwoCores, dxy*dxy*dxy*dxy); | |
3592 | + MallocerFreer::GetInstance()->Malloc<double>(&tmpRotMat, OrbitalType_end, OrbitalType_end); | |
3593 | + MallocerFreer::GetInstance()->Malloc<double>(&tmpMatrixBC, dxy*dxy, dxy*dxy); | |
3594 | + MallocerFreer::GetInstance()->Malloc<double>(&tmpVectorBC, dxy*dxy*dxy*dxy); | |
3526 | 3595 | // note that terms with condition a==b are not needed to calculate. |
3527 | 3596 | #pragma omp for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE) |
3528 | 3597 | for(int b=a+1; b<totalNumberAtoms; b++){ |
3529 | - this->CalcDiatomicTwoElecTwoCore(diatomicTwoElecTwoCore, | |
3530 | - tmpDiatomicTwoElecTwoCore, | |
3531 | - tmpRotMat, | |
3532 | - tmpMatrixBC, | |
3533 | - tmpVectorBC, | |
3534 | - a, b); | |
3598 | + this->CalcDiatomicTwoElecsTwoCores(diatomicTwoElecsTwoCores, | |
3599 | + tmpDiatomicTwoElecsTwoCores, | |
3600 | + tmpRotMat, | |
3601 | + tmpMatrixBC, | |
3602 | + tmpVectorBC, | |
3603 | + a, b); | |
3535 | 3604 | int i=0; |
3536 | 3605 | for(int mu=0; mu<dxy; mu++){ |
3537 | 3606 | for(int nu=mu; nu<dxy; nu++){ |
3538 | 3607 | int j=0; |
3539 | 3608 | for(int lambda=0; lambda<dxy; lambda++){ |
3540 | 3609 | for(int sigma=lambda; sigma<dxy; sigma++){ |
3541 | - this->twoElecTwoCoreMpiBuff[a][b][i][j] | |
3542 | - = diatomicTwoElecTwoCore[mu][nu][lambda][sigma]; | |
3610 | + this->twoElecsTwoAtomCoresMpiBuff[a][b][i][j] | |
3611 | + = diatomicTwoElecsTwoCores[mu][nu][lambda][sigma]; | |
3543 | 3612 | j++; |
3544 | 3613 | } |
3545 | 3614 | } |
@@ -3552,11 +3621,11 @@ void Mndo::CalcTwoElecTwoCore(double****** twoElecTwoCore, | ||
3552 | 3621 | #pragma omp critical |
3553 | 3622 | ex.Serialize(errorStream); |
3554 | 3623 | } |
3555 | - MallocerFreer::GetInstance()->Free<double>(&diatomicTwoElecTwoCore, dxy, dxy, dxy, dxy); | |
3556 | - MallocerFreer::GetInstance()->Free<double>(&tmpDiatomicTwoElecTwoCore, dxy*dxy*dxy*dxy); | |
3557 | - MallocerFreer::GetInstance()->Free<double>(&tmpRotMat, OrbitalType_end, OrbitalType_end); | |
3558 | - MallocerFreer::GetInstance()->Free<double>(&tmpMatrixBC, dxy*dxy, dxy*dxy); | |
3559 | - MallocerFreer::GetInstance()->Free<double>(&tmpVectorBC, dxy*dxy*dxy*dxy); | |
3624 | + MallocerFreer::GetInstance()->Free<double>(&diatomicTwoElecsTwoCores, dxy, dxy, dxy, dxy); | |
3625 | + MallocerFreer::GetInstance()->Free<double>(&tmpDiatomicTwoElecsTwoCores, dxy*dxy*dxy*dxy); | |
3626 | + MallocerFreer::GetInstance()->Free<double>(&tmpRotMat, OrbitalType_end, OrbitalType_end); | |
3627 | + MallocerFreer::GetInstance()->Free<double>(&tmpMatrixBC, dxy*dxy, dxy*dxy); | |
3628 | + MallocerFreer::GetInstance()->Free<double>(&tmpVectorBC, dxy*dxy*dxy*dxy); | |
3560 | 3629 | } |
3561 | 3630 | } |
3562 | 3631 | if(errorStream.str().empty()){ |
@@ -3565,7 +3634,7 @@ void Mndo::CalcTwoElecTwoCore(double****** twoElecTwoCore, | ||
3565 | 3634 | OrbitalType twoElecLimit = dxy; |
3566 | 3635 | int numBuff = (twoElecLimit+1)*twoElecLimit/2; |
3567 | 3636 | int num = (totalNumberAtoms-b)*numBuff*numBuff; |
3568 | - asyncCommunicator.SetBroadcastedMessage(&this->twoElecTwoCoreMpiBuff[a][b][0][0], num, calcRank); | |
3637 | + asyncCommunicator.SetBroadcastedMessage(&this->twoElecsTwoAtomCoresMpiBuff[a][b][0][0], num, calcRank); | |
3569 | 3638 | } |
3570 | 3639 | } |
3571 | 3640 | } |
@@ -3584,15 +3653,15 @@ void Mndo::CalcTwoElecTwoCore(double****** twoElecTwoCore, | ||
3584 | 3653 | int j=0; |
3585 | 3654 | for(int lambda=0; lambda<dxy; lambda++){ |
3586 | 3655 | for(int sigma=lambda; sigma<dxy; sigma++){ |
3587 | - double value = this->twoElecTwoCoreMpiBuff[a][b][i][j]; | |
3588 | - twoElecTwoCore[a][b][mu][nu][lambda][sigma] = value; | |
3589 | - twoElecTwoCore[a][b][mu][nu][sigma][lambda] = value; | |
3590 | - twoElecTwoCore[a][b][nu][mu][lambda][sigma] = value; | |
3591 | - twoElecTwoCore[a][b][nu][mu][sigma][lambda] = value; | |
3592 | - twoElecTwoCore[b][a][lambda][sigma][mu][nu] = value; | |
3593 | - twoElecTwoCore[b][a][lambda][sigma][nu][mu] = value; | |
3594 | - twoElecTwoCore[b][a][sigma][lambda][mu][nu] = value; | |
3595 | - twoElecTwoCore[b][a][sigma][lambda][nu][mu] = value; | |
3656 | + double value = this->twoElecsTwoAtomCoresMpiBuff[a][b][i][j]; | |
3657 | + twoElecsTwoAtomCores[a][b][mu][nu][lambda][sigma] = value; | |
3658 | + twoElecsTwoAtomCores[a][b][mu][nu][sigma][lambda] = value; | |
3659 | + twoElecsTwoAtomCores[a][b][nu][mu][lambda][sigma] = value; | |
3660 | + twoElecsTwoAtomCores[a][b][nu][mu][sigma][lambda] = value; | |
3661 | + twoElecsTwoAtomCores[b][a][lambda][sigma][mu][nu] = value; | |
3662 | + twoElecsTwoAtomCores[b][a][lambda][sigma][nu][mu] = value; | |
3663 | + twoElecsTwoAtomCores[b][a][sigma][lambda][mu][nu] = value; | |
3664 | + twoElecsTwoAtomCores[b][a][sigma][lambda][nu][mu] = value; | |
3596 | 3665 | j++; |
3597 | 3666 | } |
3598 | 3667 | } |
@@ -3601,7 +3670,124 @@ void Mndo::CalcTwoElecTwoCore(double****** twoElecTwoCore, | ||
3601 | 3670 | } |
3602 | 3671 | } |
3603 | 3672 | } |
3673 | +} | |
3674 | + | |
3675 | +void Mndo::CalcTwoElecsAtomEpcCores(double****** twoElecsAtomEpcCores, | |
3676 | + const Molecule& molecule) const{ | |
3677 | + if(molecule.GetNumberEpcs()<=0){return;} | |
3678 | +#ifdef MOLDS_DBG | |
3679 | + if(twoElecsAtomEpcCores == NULL){ | |
3680 | + throw MolDSException(this->errorMessageCalcTwoElecsAtomEpcCoresNullMatrix); | |
3681 | + } | |
3682 | +#endif | |
3683 | + int totalNumberAtoms = molecule.GetNumberAtoms(); | |
3684 | + int totalNumberEpcs = molecule.GetNumberEpcs(); | |
3685 | + MallocerFreer::GetInstance()->Initialize<double>(twoElecsAtomEpcCores, | |
3686 | + totalNumberAtoms, | |
3687 | + totalNumberEpcs, | |
3688 | + dxy, dxy, dxy, dxy); | |
3689 | + | |
3690 | + // MPI setting of each rank | |
3691 | + int mpiRank = MolDS_mpi::MpiProcess::GetInstance()->GetRank(); | |
3692 | + int mpiSize = MolDS_mpi::MpiProcess::GetInstance()->GetSize(); | |
3693 | + int mpiHeadRank = MolDS_mpi::MpiProcess::GetInstance()->GetHeadRank(); | |
3694 | + stringstream errorStream; | |
3695 | + MolDS_mpi::AsyncCommunicator asyncCommunicator; | |
3696 | + boost::thread communicationThread( boost::bind(&MolDS_mpi::AsyncCommunicator::Run<double>, &asyncCommunicator) ); | |
3604 | 3697 | |
3698 | + for(int a=0; a<totalNumberAtoms; a++){ | |
3699 | + int calcRank = a%mpiSize; | |
3700 | + if(mpiRank == calcRank){ | |
3701 | +//#pragma omp parallel | |
3702 | + { | |
3703 | + double**** diatomicTwoElecsTwoCores = NULL; | |
3704 | + double* tmpDiatomicTwoElecsTwoCores = NULL; | |
3705 | + double** tmpRotMat = NULL; | |
3706 | + double** tmpMatrixBC = NULL; | |
3707 | + double* tmpVectorBC = NULL; | |
3708 | + const Atom& atom = *molecule.GetAtom(a); | |
3709 | + try{ | |
3710 | + MallocerFreer::GetInstance()->Malloc<double>(&diatomicTwoElecsTwoCores, dxy, dxy, dxy, dxy); | |
3711 | + MallocerFreer::GetInstance()->Malloc<double>(&tmpDiatomicTwoElecsTwoCores, dxy*dxy*dxy*dxy); | |
3712 | + MallocerFreer::GetInstance()->Malloc<double>(&tmpRotMat, OrbitalType_end, OrbitalType_end); | |
3713 | + MallocerFreer::GetInstance()->Malloc<double>(&tmpMatrixBC, dxy*dxy, dxy*dxy); | |
3714 | + MallocerFreer::GetInstance()->Malloc<double>(&tmpVectorBC, dxy*dxy*dxy*dxy); | |
3715 | + // note that terms with condition a==b are not needed to calculate. | |
3716 | +//#pragma omp for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE) | |
3717 | + for(int b=0; b<totalNumberEpcs; b++){ | |
3718 | + const Atom& epc = *molecule.GetEpc(b); | |
3719 | + this->CalcDiatomicTwoElecsTwoCores(diatomicTwoElecsTwoCores, | |
3720 | + tmpDiatomicTwoElecsTwoCores, | |
3721 | + tmpRotMat, | |
3722 | + tmpMatrixBC, | |
3723 | + tmpVectorBC, | |
3724 | + atom, | |
3725 | + epc); | |
3726 | + int i=0; | |
3727 | + for(int mu=0; mu<dxy; mu++){ | |
3728 | + for(int nu=mu; nu<dxy; nu++){ | |
3729 | + int j=0; | |
3730 | + for(int lambda=0; lambda<dxy; lambda++){ | |
3731 | + for(int sigma=lambda; sigma<dxy; sigma++){ | |
3732 | + this->twoElecsAtomEpcCoresMpiBuff[a][b][i][j] | |
3733 | + = diatomicTwoElecsTwoCores[mu][nu][lambda][sigma]; | |
3734 | + j++; | |
3735 | + } | |
3736 | + } | |
3737 | + i++; | |
3738 | + } | |
3739 | + } | |
3740 | + } | |
3741 | + } | |
3742 | + catch(MolDSException ex){ | |
3743 | +#pragma omp critical | |
3744 | + ex.Serialize(errorStream); | |
3745 | + } | |
3746 | + MallocerFreer::GetInstance()->Free<double>(&diatomicTwoElecsTwoCores, dxy, dxy, dxy, dxy); | |
3747 | + MallocerFreer::GetInstance()->Free<double>(&tmpDiatomicTwoElecsTwoCores, dxy*dxy*dxy*dxy); | |
3748 | + MallocerFreer::GetInstance()->Free<double>(&tmpRotMat, OrbitalType_end, OrbitalType_end); | |
3749 | + MallocerFreer::GetInstance()->Free<double>(&tmpMatrixBC, dxy*dxy, dxy*dxy); | |
3750 | + MallocerFreer::GetInstance()->Free<double>(&tmpVectorBC, dxy*dxy*dxy*dxy); | |
3751 | + } | |
3752 | + } | |
3753 | + if(errorStream.str().empty()){ | |
3754 | + if(a<totalNumberAtoms-1){ | |
3755 | + int b = 0; | |
3756 | + OrbitalType twoElecLimit = dxy; | |
3757 | + int numBuff = (twoElecLimit+1)*twoElecLimit/2; | |
3758 | + int num = totalNumberEpcs*numBuff*numBuff; | |
3759 | + asyncCommunicator.SetBroadcastedMessage(&this->twoElecsAtomEpcCoresMpiBuff[a][b][0][0], num, calcRank); | |
3760 | + } | |
3761 | + } | |
3762 | + } | |
3763 | + asyncCommunicator.Finalize(); | |
3764 | + communicationThread.join(); | |
3765 | + if(!errorStream.str().empty()){ | |
3766 | + throw MolDSException::Deserialize(errorStream); | |
3767 | + } | |
3768 | + | |
3769 | +#pragma omp parallel for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE) | |
3770 | + for(int a=0; a<totalNumberAtoms; a++){ | |
3771 | + for(int b=0; b<totalNumberEpcs; b++){ | |
3772 | + int i=0; | |
3773 | + for(int mu=0; mu<dxy; mu++){ | |
3774 | + for(int nu=mu; nu<dxy; nu++){ | |
3775 | + int j=0; | |
3776 | + for(int lambda=0; lambda<dxy; lambda++){ | |
3777 | + for(int sigma=lambda; sigma<dxy; sigma++){ | |
3778 | + double value = this->twoElecsAtomEpcCoresMpiBuff[a][b][i][j]; | |
3779 | + twoElecsAtomEpcCores[a][b][mu][nu][lambda][sigma] = value; | |
3780 | + twoElecsAtomEpcCores[a][b][mu][nu][sigma][lambda] = value; | |
3781 | + twoElecsAtomEpcCores[a][b][nu][mu][lambda][sigma] = value; | |
3782 | + twoElecsAtomEpcCores[a][b][nu][mu][sigma][lambda] = value; | |
3783 | + j++; | |
3784 | + } | |
3785 | + } | |
3786 | + i++; | |
3787 | + } | |
3788 | + } | |
3789 | + } | |
3790 | + } | |
3605 | 3791 | } |
3606 | 3792 | |
3607 | 3793 | // Calculation of two electrons two cores integral (mu, nu | lambda, sigma) in space fixed frame, |
@@ -3611,28 +3797,39 @@ void Mndo::CalcTwoElecTwoCore(double****** twoElecTwoCore, | ||
3611 | 3797 | // Note that atomA != atomB. |
3612 | 3798 | // Note taht d-orbital cannot be treated, |
3613 | 3799 | // that is, matrix[dxy][dxy][dxy][dxy] cannot be treatable. |
3614 | -void Mndo::CalcDiatomicTwoElecTwoCore(double**** matrix, | |
3615 | - double* tmpVec, | |
3616 | - double** tmpRotMat, | |
3617 | - double** tmpMatrixBC, | |
3618 | - double* tmpVectorBC, | |
3619 | - int indexAtomA, | |
3620 | - int indexAtomB) const{ | |
3621 | - const Atom& atomA = *this->molecule->GetAtom(indexAtomA); | |
3622 | - const Atom& atomB = *this->molecule->GetAtom(indexAtomB); | |
3623 | - if(indexAtomA == indexAtomB){ | |
3624 | - stringstream ss; | |
3625 | - ss << this->errorMessageCalcDiatomicTwoElecTwoCoreSameAtoms; | |
3626 | - ss << this->errorMessageAtomA << indexAtomA | |
3627 | - << AtomTypeStr(atomA.GetAtomType()) << endl; | |
3628 | - ss << this->errorMessageAtomB << indexAtomB | |
3629 | - << AtomTypeStr(atomB.GetAtomType()) << endl; | |
3630 | - throw MolDSException(ss.str()); | |
3800 | +void Mndo::CalcDiatomicTwoElecsTwoCores(double**** matrix, | |
3801 | + double* tmpVec, | |
3802 | + double** tmpRotMat, | |
3803 | + double** tmpMatrixBC, | |
3804 | + double* tmpVectorBC, | |
3805 | + const Atom& atomA, | |
3806 | + const Atom& atomB) const{ | |
3807 | + if(atomA.GetAtomType() != EPC && atomB.GetAtomType() != EPC){ | |
3808 | + if(atomA.GetIndex() == atomB.GetIndex()){ | |
3809 | + stringstream ss; | |
3810 | + ss << this->errorMessageCalcDiatomicTwoElecsTwoCoresSameAtoms; | |
3811 | + ss << this->errorMessageAtomA << atomA.GetIndex() | |
3812 | + << AtomTypeStr(atomA.GetAtomType()) << endl; | |
3813 | + ss << this->errorMessageAtomB << atomB.GetIndex() | |
3814 | + << AtomTypeStr(atomB.GetAtomType()) << endl; | |
3815 | + throw MolDSException(ss.str()); | |
3816 | + } | |
3817 | + } | |
3818 | + if(atomA.GetAtomType() == EPC && atomB.GetAtomType() == EPC){ | |
3819 | + if(atomA.GetIndex() == atomB.GetIndex()){ | |
3820 | + stringstream ss; | |
3821 | + ss << this->errorMessageCalcDiatomicTwoElecsTwoCoresSameEpcs; | |
3822 | + ss << this->errorMessageAtomA << atomA.GetIndex() | |
3823 | + << AtomTypeStr(atomA.GetAtomType()) << endl; | |
3824 | + ss << this->errorMessageAtomB << atomB.GetIndex() | |
3825 | + << AtomTypeStr(atomB.GetAtomType()) << endl; | |
3826 | + throw MolDSException(ss.str()); | |
3827 | + } | |
3631 | 3828 | } |
3632 | 3829 | |
3633 | 3830 | #ifdef MOLDS_DBG |
3634 | 3831 | if(matrix == NULL){ |
3635 | - throw MolDSException(this->errorMessageCalcDiatomicTwoElecTwoCoreNullMatrix); | |
3832 | + throw MolDSException(this->errorMessageCalcDiatomicTwoElecsTwoCoresNullMatrix); | |
3636 | 3833 | } |
3637 | 3834 | #endif |
3638 | 3835 | MallocerFreer::GetInstance()->Initialize<double>(matrix, dxy, dxy, dxy, dxy); |
@@ -3659,7 +3856,7 @@ void Mndo::CalcDiatomicTwoElecTwoCore(double**** matrix, | ||
3659 | 3856 | } |
3660 | 3857 | // rotate matirix into the space frame |
3661 | 3858 | this->CalcRotatingMatrix(tmpRotMat, atomA, atomB); |
3662 | - this->RotateDiatomicTwoElecTwoCoreToSpaceFrame(matrix, tmpVec, tmpRotMat, tmpMatrixBC, tmpVectorBC); | |
3859 | + this->RotateDiatomicTwoElecsTwoCoresToSpaceFrame(matrix, tmpVec, tmpRotMat, tmpMatrixBC, tmpVectorBC); | |
3663 | 3860 | |
3664 | 3861 | /* |
3665 | 3862 | this->OutputLog("(mu, nu | lambda, sigma) matrix\n"); |
@@ -3679,6 +3876,24 @@ void Mndo::CalcDiatomicTwoElecTwoCore(double**** matrix, | ||
3679 | 3876 | */ |
3680 | 3877 | } |
3681 | 3878 | |
3879 | +void Mndo::CalcDiatomicTwoElecsTwoCores(double**** matrix, | |
3880 | + double* tmpVec, | |
3881 | + double** tmpRotMat, | |
3882 | + double** tmpMatrixBC, | |
3883 | + double* tmpVectorBC, | |
3884 | + int indexAtomA, | |
3885 | + int indexAtomB) const{ | |
3886 | + const Atom& atomA = *this->molecule->GetAtom(indexAtomA); | |
3887 | + const Atom& atomB = *this->molecule->GetAtom(indexAtomB); | |
3888 | + this->CalcDiatomicTwoElecsTwoCores(matrix, | |
3889 | + tmpVec, | |
3890 | + tmpRotMat, | |
3891 | + tmpMatrixBC, | |
3892 | + tmpVectorBC, | |
3893 | + atomA, | |
3894 | + atomB); | |
3895 | +} | |
3896 | + | |
3682 | 3897 | // Calculation of first derivatives of the two electrons two cores integral in space fixed frame, |
3683 | 3898 | // (mu, nu | lambda, sigma), taht is, Eq. (9) in ref. [DT_1977-2]. |
3684 | 3899 | // mu and nu are included in atomA's AOs. |
@@ -3687,17 +3902,17 @@ void Mndo::CalcDiatomicTwoElecTwoCore(double**** matrix, | ||
3687 | 3902 | // Note that atomA != atomB. |
3688 | 3903 | // Note taht d-orbital cannot be treated, |
3689 | 3904 | // that is, matrix[dxy][dxy][dxy][dxy][CartesianType_end] cannot be treatable. |
3690 | -void Mndo::CalcDiatomicTwoElecTwoCore1stDerivatives(double***** matrix, | |
3691 | - double** tmpRotMat, | |
3692 | - double*** tmpRotMat1stDerivs, | |
3693 | - double**** tmpDiatomicTwoElecTwoCore, | |
3694 | - int indexAtomA, | |
3695 | - int indexAtomB) const{ | |
3905 | +void Mndo::CalcDiatomicTwoElecsTwoCores1stDerivatives(double***** matrix, | |
3906 | + double** tmpRotMat, | |
3907 | + double*** tmpRotMat1stDerivs, | |
3908 | + double**** tmpDiatomicTwoElecsTwoCores, | |
3909 | + int indexAtomA, | |
3910 | + int indexAtomB) const{ | |
3696 | 3911 | const Atom& atomA = *this->molecule->GetAtom(indexAtomA); |
3697 | 3912 | const Atom& atomB = *this->molecule->GetAtom(indexAtomB); |
3698 | 3913 | if(indexAtomA == indexAtomB){ |
3699 | 3914 | stringstream ss; |
3700 | - ss << this->errorMessageCalcDiatomicTwoElecTwoCore1stDerivativesSameAtoms; | |
3915 | + ss << this->errorMessageCalcDiatomicTwoElecsTwoCores1stDerivativesSameAtoms; | |
3701 | 3916 | ss << this->errorMessageAtomA << indexAtomA |
3702 | 3917 | << AtomTypeStr(atomA.GetAtomType()) << endl; |
3703 | 3918 | ss << this->errorMessageAtomB << indexAtomB |
@@ -3707,7 +3922,7 @@ void Mndo::CalcDiatomicTwoElecTwoCore1stDerivatives(double***** matrix, | ||
3707 | 3922 | |
3708 | 3923 | #ifdef MOLDS_DBG |
3709 | 3924 | if(matrix == NULL){ |
3710 | - throw MolDSException(this->errorMessageCalcDiatomicTwoElecTwoCore1stDerivativesNullMatrix); | |
3925 | + throw MolDSException(this->errorMessageCalcDiatomicTwoElecsTwoCores1stDerivativesNullMatrix); | |
3711 | 3926 | } |
3712 | 3927 | #endif |
3713 | 3928 | MallocerFreer::GetInstance()->Initialize<double>(matrix, |
@@ -3736,7 +3951,7 @@ void Mndo::CalcDiatomicTwoElecTwoCore1stDerivatives(double***** matrix, | ||
3736 | 3951 | matrix[nu][mu][sigma][lambda][dimA] = matrix[mu][nu][lambda][sigma][dimA]; |
3737 | 3952 | matrix[mu][nu][sigma][lambda][dimA] = matrix[mu][nu][lambda][sigma][dimA]; |
3738 | 3953 | } |
3739 | - tmpDiatomicTwoElecTwoCore[mu][nu][lambda][sigma] | |
3954 | + tmpDiatomicTwoElecsTwoCores[mu][nu][lambda][sigma] | |
3740 | 3955 | = this->GetNddoRepulsionIntegral( |
3741 | 3956 | atomA, |
3742 | 3957 | atomA.GetValence(mu), |
@@ -3744,9 +3959,9 @@ void Mndo::CalcDiatomicTwoElecTwoCore1stDerivatives(double***** matrix, | ||
3744 | 3959 | atomB, |
3745 | 3960 | atomB.GetValence(lambda), |
3746 | 3961 | atomB.GetValence(sigma)); |
3747 | - tmpDiatomicTwoElecTwoCore[nu][mu][lambda][sigma] = tmpDiatomicTwoElecTwoCore[mu][nu][lambda][sigma]; | |
3748 | - tmpDiatomicTwoElecTwoCore[nu][mu][sigma][lambda] = tmpDiatomicTwoElecTwoCore[mu][nu][lambda][sigma]; | |
3749 | - tmpDiatomicTwoElecTwoCore[mu][nu][sigma][lambda] = tmpDiatomicTwoElecTwoCore[mu][nu][lambda][sigma]; | |
3962 | + tmpDiatomicTwoElecsTwoCores[nu][mu][lambda][sigma] = tmpDiatomicTwoElecsTwoCores[mu][nu][lambda][sigma]; | |
3963 | + tmpDiatomicTwoElecsTwoCores[nu][mu][sigma][lambda] = tmpDiatomicTwoElecsTwoCores[mu][nu][lambda][sigma]; | |
3964 | + tmpDiatomicTwoElecsTwoCores[mu][nu][sigma][lambda] = tmpDiatomicTwoElecsTwoCores[mu][nu][lambda][sigma]; | |
3750 | 3965 | } |
3751 | 3966 | } |
3752 | 3967 | } |
@@ -3755,10 +3970,10 @@ void Mndo::CalcDiatomicTwoElecTwoCore1stDerivatives(double***** matrix, | ||
3755 | 3970 | // rotate matirix into the space frame |
3756 | 3971 | this->CalcRotatingMatrix(tmpRotMat, atomA, atomB); |
3757 | 3972 | this->CalcRotatingMatrix1stDerivatives(tmpRotMat1stDerivs, atomA, atomB); |
3758 | - this->RotateDiatomicTwoElecTwoCore1stDerivativesToSpaceFrame(matrix, | |
3759 | - tmpDiatomicTwoElecTwoCore, | |
3760 | - tmpRotMat, | |
3761 | - tmpRotMat1stDerivs); | |
3973 | + this->RotateDiatomicTwoElecsTwoCores1stDerivativesToSpaceFrame(matrix, | |
3974 | + tmpDiatomicTwoElecsTwoCores, | |
3975 | + tmpRotMat, | |
3976 | + tmpRotMat1stDerivs); | |
3762 | 3977 | } |
3763 | 3978 | |
3764 | 3979 | // Calculation of second derivatives of the two electrons two cores integral in space fixed frame, |
@@ -3769,19 +3984,19 @@ void Mndo::CalcDiatomicTwoElecTwoCore1stDerivatives(double***** matrix, | ||
3769 | 3984 | // Note that atomA != atomB. |
3770 | 3985 | // Note taht d-orbital cannot be treated, |
3771 | 3986 | // that is, matrix[dxy][dxy][dxy][dxy][CartesianType_end][CartesianType_end] cannot be treatable. |
3772 | -void Mndo::CalcDiatomicTwoElecTwoCore2ndDerivatives(double****** matrix, | |
3773 | - double** tmpRotMat, | |
3774 | - double*** tmpRotMat1stDerivs, | |
3775 | - double**** tmpRotMat2ndDerivs, | |
3776 | - double**** tmpDiatomicTwoElecTwoCore, | |
3777 | - double***** tmpDiatomicTwoElecTwoCore1stDerivs, | |
3778 | - int indexAtomA, | |
3779 | - int indexAtomB) const{ | |
3987 | +void Mndo::CalcDiatomicTwoElecsTwoCores2ndDerivatives(double****** matrix, | |
3988 | + double** tmpRotMat, | |
3989 | + double*** tmpRotMat1stDerivs, | |
3990 | + double**** tmpRotMat2ndDerivs, | |
3991 | + double**** tmpDiatomicTwoElecsTwoCores, | |
3992 | + double***** tmpDiatomicTwoElecsTwoCores1stDerivs, | |
3993 | + int indexAtomA, | |
3994 | + int indexAtomB) const{ | |
3780 | 3995 | const Atom& atomA = *this->molecule->GetAtom(indexAtomA); |
3781 | 3996 | const Atom& atomB = *this->molecule->GetAtom(indexAtomB); |
3782 | 3997 | if(indexAtomA == indexAtomB){ |
3783 | 3998 | stringstream ss; |
3784 | - ss << this->errorMessageCalcDiatomicTwoElecTwoCore2ndDerivativesSameAtoms; | |
3999 | + ss << this->errorMessageCalcDiatomicTwoElecsTwoCores2ndDerivativesSameAtoms; | |
3785 | 4000 | ss << this->errorMessageAtomA << indexAtomA |
3786 | 4001 | << AtomTypeStr(atomA.GetAtomType()) << endl; |
3787 | 4002 | ss << this->errorMessageAtomB << indexAtomB |
@@ -3791,7 +4006,7 @@ void Mndo::CalcDiatomicTwoElecTwoCore2ndDerivatives(double****** matrix, | ||
3791 | 4006 | |
3792 | 4007 | #ifdef MOLDS_DBG |
3793 | 4008 | if(matrix == NULL){ |
3794 | - throw MolDSException(this->errorMessageCalcDiatomicTwoElecTwoCore2ndDerivativesNullMatrix); | |
4009 | + throw MolDSException(this->errorMessageCalcDiatomicTwoElecsTwoCores2ndDerivativesNullMatrix); | |
3795 | 4010 | } |
3796 | 4011 | #endif |
3797 | 4012 | MallocerFreer::GetInstance()->Initialize<double>(matrix, |
@@ -3820,7 +4035,7 @@ void Mndo::CalcDiatomicTwoElecTwoCore2ndDerivatives(double****** matrix, | ||
3820 | 4035 | static_cast<CartesianType>(dimA1), |
3821 | 4036 | static_cast<CartesianType>(dimA2)); |
3822 | 4037 | } |
3823 | - tmpDiatomicTwoElecTwoCore1stDerivs[mu][nu][lambda][sigma][dimA1] | |
4038 | + tmpDiatomicTwoElecsTwoCores1stDerivs[mu][nu][lambda][sigma][dimA1] | |
3824 | 4039 | = this->GetNddoRepulsionIntegral1stDerivative( |
3825 | 4040 | atomA, |
3826 | 4041 | atomA.GetValence(mu), |
@@ -3830,7 +4045,7 @@ void Mndo::CalcDiatomicTwoElecTwoCore2ndDerivatives(double****** matrix, | ||
3830 | 4045 | atomB.GetValence(sigma), |
3831 | 4046 | static_cast<CartesianType>(dimA1)); |
3832 | 4047 | } |
3833 | - tmpDiatomicTwoElecTwoCore[mu][nu][lambda][sigma] | |
4048 | + tmpDiatomicTwoElecsTwoCores[mu][nu][lambda][sigma] | |
3834 | 4049 | = this->GetNddoRepulsionIntegral( |
3835 | 4050 | atomA, |
3836 | 4051 | atomA.GetValence(mu), |
@@ -3847,21 +4062,21 @@ void Mndo::CalcDiatomicTwoElecTwoCore2ndDerivatives(double****** matrix, | ||
3847 | 4062 | this->CalcRotatingMatrix(tmpRotMat, atomA, atomB); |
3848 | 4063 | this->CalcRotatingMatrix1stDerivatives(tmpRotMat1stDerivs, atomA, atomB); |
3849 | 4064 | this->CalcRotatingMatrix2ndDerivatives(tmpRotMat2ndDerivs, atomA, atomB); |
3850 | - this->RotateDiatomicTwoElecTwoCore2ndDerivativesToSpaceFrame(matrix, | |
3851 | - tmpDiatomicTwoElecTwoCore, | |
3852 | - tmpDiatomicTwoElecTwoCore1stDerivs, | |
3853 | - tmpRotMat, | |
3854 | - tmpRotMat1stDerivs, | |
3855 | - tmpRotMat2ndDerivs); | |
4065 | + this->RotateDiatomicTwoElecsTwoCores2ndDerivativesToSpaceFrame(matrix, | |
4066 | + tmpDiatomicTwoElecsTwoCores, | |
4067 | + tmpDiatomicTwoElecsTwoCores1stDerivs, | |
4068 | + tmpRotMat, | |
4069 | + tmpRotMat1stDerivs, | |
4070 | + tmpRotMat2ndDerivs); | |
3856 | 4071 | } |
3857 | 4072 | |
3858 | 4073 | // Rotate 4-dimensional matrix from diatomic frame to space frame |
3859 | 4074 | // Note tha in this method d-orbitals can not be treatable. |
3860 | -void Mndo::RotateDiatomicTwoElecTwoCoreToSpaceFrame(double**** matrix, | |
3861 | - double* tmpVec, | |
3862 | - double const* const* rotatingMatrix, | |
3863 | - double** tmpMatrixBC, | |
3864 | - double* tmpVectorBC) const{ | |
4075 | +void Mndo::RotateDiatomicTwoElecsTwoCoresToSpaceFrame(double**** matrix, | |
4076 | + double* tmpVec, | |
4077 | + double const* const* rotatingMatrix, | |
4078 | + double** tmpMatrixBC, | |
4079 | + double* tmpVectorBC) const{ | |
3865 | 4080 | double oldMatrix[dxy][dxy][dxy][dxy]; |
3866 | 4081 | MolDS_wrappers::Blas::GetInstance()->Dcopy(dxy*dxy*dxy*dxy, &matrix[0][0][0][0], &oldMatrix[0][0][0][0]); |
3867 | 4082 |
@@ -3931,9 +4146,9 @@ void Mndo::RotateDiatomicTwoElecTwoCoreToSpaceFrame(double**** matrix, | ||
3931 | 4146 | |
3932 | 4147 | // Rotate 5-dimensional matrix from diatomic frame to space frame |
3933 | 4148 | // Note tha in this method d-orbitals can not be treatable. |
3934 | -void Mndo::RotateDiatomicTwoElecTwoCore1stDerivativesToSpaceFrame( | |
4149 | +void Mndo::RotateDiatomicTwoElecsTwoCores1stDerivativesToSpaceFrame( | |
3935 | 4150 | double***** matrix, |
3936 | - double const* const*const* const* diatomicTwoElecTwoCore, | |
4151 | + double const* const*const* const* diatomicTwoElecsTwoCores, | |
3937 | 4152 | double const* const* rotatingMatrix, |
3938 | 4153 | double const* const* const* rotMat1stDerivatives) const{ |
3939 | 4154 |
@@ -3953,15 +4168,15 @@ void Mndo::RotateDiatomicTwoElecTwoCore1stDerivativesToSpaceFrame( | ||
3953 | 4168 | double* tmpVector = NULL; |
3954 | 4169 | double** ptrDiatomic = NULL; |
3955 | 4170 | try{ |
3956 | - this->MallocTempMatricesRotateDiatomicTwoElecTwoCore1stDerivs(&twiceRotatingMatrix, | |
3957 | - &twiceRotatingMatrixDerivA, | |
3958 | - &twiceRotatingMatrixDerivB, | |
3959 | - &oldMatrix, | |
3960 | - &rotatedMatrix, | |
3961 | - &tmpRotatedVec, | |
3962 | - &tmpMatrix, | |
3963 | - &tmpVector, | |
3964 | - &ptrDiatomic); | |
4171 | + this->MallocTempMatricesRotateDiatomicTwoElecsTwoCores1stDerivs(&twiceRotatingMatrix, | |
4172 | + &twiceRotatingMatrixDerivA, | |
4173 | + &twiceRotatingMatrixDerivB, | |
4174 | + &oldMatrix, | |
4175 | + &rotatedMatrix, | |
4176 | + &tmpRotatedVec, | |
4177 | + &tmpMatrix, | |
4178 | + &tmpVector, | |
4179 | + &ptrDiatomic); | |
3965 | 4180 | for(int mu=0; mu<dxy; mu++){ |
3966 | 4181 | for(int nu=0; nu<dxy; nu++){ |
3967 | 4182 | int i=mu*dxy+nu; |
@@ -3972,7 +4187,7 @@ void Mndo::RotateDiatomicTwoElecTwoCore1stDerivativesToSpaceFrame( | ||
3972 | 4187 | *rotatingMatrix[nu][sigma ]; |
3973 | 4188 | } |
3974 | 4189 | } |
3975 | - ptrDiatomic[i] = const_cast<double*>(&diatomicTwoElecTwoCore[mu][nu][0][0]); | |
4190 | + ptrDiatomic[i] = const_cast<double*>(&diatomicTwoElecsTwoCores[mu][nu][0][0]); | |
3976 | 4191 | } |
3977 | 4192 | } |
3978 | 4193 | for(int axis=0; axis<CartesianType_end; axis++){ |
@@ -4067,26 +4282,26 @@ void Mndo::RotateDiatomicTwoElecTwoCore1stDerivativesToSpaceFrame( | ||
4067 | 4282 | } |
4068 | 4283 | } |
4069 | 4284 | catch(MolDSException ex){ |
4070 | - this->FreeTempMatricesRotateDiatomicTwoElecTwoCore1stDerivs(&twiceRotatingMatrix, | |
4071 | - &twiceRotatingMatrixDerivA, | |
4072 | - &twiceRotatingMatrixDerivB, | |
4073 | - &oldMatrix, | |
4074 | - &rotatedMatrix, | |
4075 | - &tmpRotatedVec, | |
4076 | - &tmpMatrix, | |
4077 | - &tmpVector, | |
4078 | - &ptrDiatomic); | |
4285 | + this->FreeTempMatricesRotateDiatomicTwoElecsTwoCores1stDerivs(&twiceRotatingMatrix, | |
4286 | + &twiceRotatingMatrixDerivA, | |
4287 | + &twiceRotatingMatrixDerivB, | |
4288 | + &oldMatrix, | |
4289 | + &rotatedMatrix, | |
4290 | + &tmpRotatedVec, | |
4291 | + &tmpMatrix, | |
4292 | + &tmpVector, | |
4293 | + &ptrDiatomic); | |
4079 | 4294 | throw ex; |
4080 | 4295 | } |
4081 | - this->FreeTempMatricesRotateDiatomicTwoElecTwoCore1stDerivs(&twiceRotatingMatrix, | |
4082 | - &twiceRotatingMatrixDerivA, | |
4083 | - &twiceRotatingMatrixDerivB, | |
4084 | - &oldMatrix, | |
4085 | - &rotatedMatrix, | |
4086 | - &tmpRotatedVec, | |
4087 | - &tmpMatrix, | |
4088 | - &tmpVector, | |
4089 | - &ptrDiatomic); | |
4296 | + this->FreeTempMatricesRotateDiatomicTwoElecsTwoCores1stDerivs(&twiceRotatingMatrix, | |
4297 | + &twiceRotatingMatrixDerivA, | |
4298 | + &twiceRotatingMatrixDerivB, | |
4299 | + &oldMatrix, | |
4300 | + &rotatedMatrix, | |
4301 | + &tmpRotatedVec, | |
4302 | + &tmpMatrix, | |
4303 | + &tmpVector, | |
4304 | + &ptrDiatomic); | |
4090 | 4305 | |
4091 | 4306 | /* |
4092 | 4307 | // rotate (slow algorithm) |
@@ -4107,25 +4322,25 @@ void Mndo::RotateDiatomicTwoElecTwoCore1stDerivativesToSpaceFrame( | ||
4107 | 4322 | *rotatingMatrix[lambda][k] |
4108 | 4323 | *rotatingMatrix[sigma][l]; |
4109 | 4324 | matrix[mu][nu][lambda][sigma][c] |
4110 | - += diatomicTwoElecTwoCore[i][j][k][l] | |
4325 | + += diatomicTwoElecsTwoCores[i][j][k][l] | |
4111 | 4326 | *rotMat1stDerivatives[mu][i][c] |
4112 | 4327 | *rotatingMatrix[nu][j] |
4113 | 4328 | *rotatingMatrix[lambda][k] |
4114 | 4329 | *rotatingMatrix[sigma][l]; |
4115 | 4330 | matrix[mu][nu][lambda][sigma][c] |
4116 | - += diatomicTwoElecTwoCore[i][j][k][l] | |
4331 | + += diatomicTwoElecsTwoCores[i][j][k][l] | |
4117 | 4332 | *rotatingMatrix[mu][i] |
4118 | 4333 | *rotMat1stDerivatives[nu][j][c] |
4119 | 4334 | *rotatingMatrix[lambda][k] |
4120 | 4335 | *rotatingMatrix[sigma][l]; |
4121 | 4336 | matrix[mu][nu][lambda][sigma][c] |
4122 | - += diatomicTwoElecTwoCore[i][j][k][l] | |
4337 | + += diatomicTwoElecsTwoCores[i][j][k][l] | |
4123 | 4338 | *rotatingMatrix[mu][i] |
4124 | 4339 | *rotatingMatrix[nu][j] |
4125 | 4340 | *rotMat1stDerivatives[lambda][k][c] |
4126 | 4341 | *rotatingMatrix[sigma][l]; |
4127 | 4342 | matrix[mu][nu][lambda][sigma][c] |
4128 | - += diatomicTwoElecTwoCore[i][j][k][l] | |
4343 | + += diatomicTwoElecsTwoCores[i][j][k][l] | |
4129 | 4344 | *rotatingMatrix[mu][i] |
4130 | 4345 | *rotatingMatrix[nu][j] |
4131 | 4346 | *rotatingMatrix[lambda][k] |
@@ -4142,15 +4357,15 @@ void Mndo::RotateDiatomicTwoElecTwoCore1stDerivativesToSpaceFrame( | ||
4142 | 4357 | */ |
4143 | 4358 | } |
4144 | 4359 | |
4145 | -void Mndo::MallocTempMatricesRotateDiatomicTwoElecTwoCore1stDerivs(double*** twiceRotatingMatrix, | |
4146 | - double*** twiceRotatingMatrixDerivA, | |
4147 | - double*** twiceRotatingMatrixDerivB, | |
4148 | - double*** oldMatrix, | |
4149 | - double*** rotatedMatrix, | |
4150 | - double** tmpRotatedVec, | |
4151 | - double*** tmpMatrix, | |
4152 | - double** tmpVector, | |
4153 | - double*** ptrDiatomic) const{ | |
4360 | +void Mndo::MallocTempMatricesRotateDiatomicTwoElecsTwoCores1stDerivs(double*** twiceRotatingMatrix, | |
4361 | + double*** twiceRotatingMatrixDerivA, | |
4362 | + double*** twiceRotatingMatrixDerivB, | |
4363 | + double*** oldMatrix, | |
4364 | + double*** rotatedMatrix, | |
4365 | + double** tmpRotatedVec, | |
4366 | + double*** tmpMatrix, | |
4367 | + double** tmpVector, | |
4368 | + double*** ptrDiatomic) const{ | |
4154 | 4369 | MallocerFreer::GetInstance()->Malloc<double>(twiceRotatingMatrix, dxy*dxy, dxy*dxy); |
4155 | 4370 | MallocerFreer::GetInstance()->Malloc<double>(twiceRotatingMatrixDerivA, dxy*dxy, dxy*dxy); |
4156 | 4371 | MallocerFreer::GetInstance()->Malloc<double>(twiceRotatingMatrixDerivB, dxy*dxy, dxy*dxy); |
@@ -4162,15 +4377,15 @@ void Mndo::MallocTempMatricesRotateDiatomicTwoElecTwoCore1stDerivs(double*** twi | ||
4162 | 4377 | MallocerFreer::GetInstance()->Malloc<double*>(ptrDiatomic, dxy*dxy); |
4163 | 4378 | } |
4164 | 4379 | |
4165 | -void Mndo::FreeTempMatricesRotateDiatomicTwoElecTwoCore1stDerivs(double*** twiceRotatingMatrix, | |
4166 | - double*** twiceRotatingMatrixDerivA, | |
4167 | - double*** twiceRotatingMatrixDerivB, | |
4168 | - double*** oldMatrix, | |
4169 | - double*** rotatedMatrix, | |
4170 | - double** tmpRotatedVec, | |
4171 | - double*** tmpMatrix, | |
4172 | - double** tmpVector, | |
4173 | - double*** ptrDiatomic) const{ | |
4380 | +void Mndo::FreeTempMatricesRotateDiatomicTwoElecsTwoCores1stDerivs(double*** twiceRotatingMatrix, | |
4381 | + double*** twiceRotatingMatrixDerivA, | |
4382 | + double*** twiceRotatingMatrixDerivB, | |
4383 | + double*** oldMatrix, | |
4384 | + double*** rotatedMatrix, | |
4385 | + double** tmpRotatedVec, | |
4386 | + double*** tmpMatrix, | |
4387 | + double** tmpVector, | |
4388 | + double*** ptrDiatomic) const{ | |
4174 | 4389 | MallocerFreer::GetInstance()->Free<double>(twiceRotatingMatrix, dxy*dxy, dxy*dxy); |
4175 | 4390 | MallocerFreer::GetInstance()->Free<double>(twiceRotatingMatrixDerivA, dxy*dxy, dxy*dxy); |
4176 | 4391 | MallocerFreer::GetInstance()->Free<double>(twiceRotatingMatrixDerivB, dxy*dxy, dxy*dxy); |
@@ -4184,10 +4399,10 @@ void Mndo::FreeTempMatricesRotateDiatomicTwoElecTwoCore1stDerivs(double*** twice | ||
4184 | 4399 | |
4185 | 4400 | // Rotate 6-dimensional matrix from diatomic frame to space frame |
4186 | 4401 | // Note tha in this method d-orbitals can not be treatable. |
4187 | -void Mndo::RotateDiatomicTwoElecTwoCore2ndDerivativesToSpaceFrame( | |
4402 | +void Mndo::RotateDiatomicTwoElecsTwoCores2ndDerivativesToSpaceFrame( | |
4188 | 4403 | double****** matrix, |
4189 | - double const* const* const* const* diatomicTwoElecTwoCore, | |
4190 | - double const* const* const* const* const* diatomicTwoElecTwoCore1stDerivatives, | |
4404 | + double const* const* const* const* diatomicTwoElecsTwoCores, | |
4405 | + double const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivatives, | |
4191 | 4406 | double const* const* rotatingMatrix, |
4192 | 4407 | double const* const* const* rotMat1stDerivatives, |
4193 | 4408 | double const* const* const* const* rotMat2ndDerivatives) const{ |
@@ -4231,18 +4446,18 @@ void Mndo::RotateDiatomicTwoElecTwoCore2ndDerivativesToSpaceFrame( | ||
4231 | 4446 | MallocerFreer::GetInstance()->Initialize<double>(tempIJK, numberTerms); |
4232 | 4447 | for(int l=s; l<dxy; l++){ |
4233 | 4448 | |
4234 | - tempIJK[0] += oldMatrix [i][j][k][l][dimA1][dimA2]*rotatingMatrix [sigma][l]; | |
4235 | - tempIJK[1] += diatomicTwoElecTwoCore[i][j][k][l] *rotatingMatrix [sigma][l]; | |
4236 | - tempIJK[4] += diatomicTwoElecTwoCore[i][j][k][l] *rotMat2ndDerivatives[sigma][l][dimA1][dimA2]; | |
4449 | + tempIJK[0] += oldMatrix [i][j][k][l][dimA1][dimA2]*rotatingMatrix [sigma][l]; | |
4450 | + tempIJK[1] += diatomicTwoElecsTwoCores[i][j][k][l] *rotatingMatrix [sigma][l]; | |
4451 | + tempIJK[4] += diatomicTwoElecsTwoCores[i][j][k][l] *rotMat2ndDerivatives[sigma][l][dimA1][dimA2]; | |
4237 | 4452 | |
4238 | - tempIJK[5] += diatomicTwoElecTwoCore1stDerivatives[i][j][k][l][dimA1]*rotatingMatrix [sigma][l]; | |
4239 | - tempIJK[8] += diatomicTwoElecTwoCore1stDerivatives[i][j][k][l][dimA1]*rotMat1stDerivatives[sigma][l][dimA2]; | |
4453 | + tempIJK[5] += diatomicTwoElecsTwoCores1stDerivatives[i][j][k][l][dimA1]*rotatingMatrix [sigma][l]; | |
4454 | + tempIJK[8] += diatomicTwoElecsTwoCores1stDerivatives[i][j][k][l][dimA1]*rotMat1stDerivatives[sigma][l][dimA2]; | |
4240 | 4455 | |
4241 | - tempIJK[9] += diatomicTwoElecTwoCore1stDerivatives[i][j][k][l][dimA2]*rotatingMatrix [sigma][l]; | |
4242 | - tempIJK[12] += diatomicTwoElecTwoCore [i][j][k][l] *rotMat1stDerivatives[sigma][l][dimA2]; | |
4456 | + tempIJK[9] += diatomicTwoElecsTwoCores1stDerivatives[i][j][k][l][dimA2]*rotatingMatrix [sigma][l]; | |
4457 | + tempIJK[12] += diatomicTwoElecsTwoCores [i][j][k][l] *rotMat1stDerivatives[sigma][l][dimA2]; | |
4243 | 4458 | |
4244 | - tempIJK[21] += diatomicTwoElecTwoCore1stDerivatives[i][j][k][l][dimA2]*rotMat1stDerivatives[sigma][l][dimA1]; | |
4245 | - tempIJK[22] += diatomicTwoElecTwoCore [i][j][k][l] *rotMat1stDerivatives[sigma][l][dimA1]; | |
4459 | + tempIJK[21] += diatomicTwoElecsTwoCores1stDerivatives[i][j][k][l][dimA2]*rotMat1stDerivatives[sigma][l][dimA1]; | |
4460 | + tempIJK[22] += diatomicTwoElecsTwoCores [i][j][k][l] *rotMat1stDerivatives[sigma][l][dimA1]; | |
4246 | 4461 | } |
4247 | 4462 | tempIJ[0] += tempIJK[0] *rotatingMatrix [lambda][k]; |
4248 | 4463 | tempIJ[1] += tempIJK[1] *rotatingMatrix [lambda][k]; |
@@ -4353,154 +4568,154 @@ void Mndo::RotateDiatomicTwoElecTwoCore2ndDerivativesToSpaceFrame( | ||
4353 | 4568 | *rotatingMatrix [lambda][k] |
4354 | 4569 | *rotatingMatrix [sigma ][l]; |
4355 | 4570 | // term1 |
4356 | - value += diatomicTwoElecTwoCore[i][j][k][l] | |
4357 | - *rotMat2ndDerivatives[mu ][i][dimA1][dimA2] | |
4571 | + value += diatomicTwoElecsTwoCores[i][j][k][l] | |
4572 | + *rotMat2ndDerivatives [mu ][i][dimA1][dimA2] | |
4358 | 4573 | *rotatingMatrix [nu ][j] |
4359 | 4574 | *rotatingMatrix [lambda][k] |
4360 | 4575 | *rotatingMatrix [sigma ][l]; |
4361 | 4576 | // term2 |
4362 | - value += diatomicTwoElecTwoCore[i][j][k][l] | |
4577 | + value += diatomicTwoElecsTwoCores[i][j][k][l] | |
4363 | 4578 | *rotatingMatrix [mu ][i] |
4364 | - *rotMat2ndDerivatives[nu ][j][dimA1][dimA2] | |
4579 | + *rotMat2ndDerivatives [nu ][j][dimA1][dimA2] | |
4365 | 4580 | *rotatingMatrix [lambda][k] |
4366 | 4581 | *rotatingMatrix [sigma ][l]; |
4367 | 4582 | // term3 |
4368 | - value += diatomicTwoElecTwoCore[i][j][k][l] | |
4583 | + value += diatomicTwoElecsTwoCores[i][j][k][l] | |
4369 | 4584 | *rotatingMatrix [mu ][i] |
4370 | 4585 | *rotatingMatrix [nu ][j] |
4371 | - *rotMat2ndDerivatives[lambda][k][dimA1][dimA2] | |
4586 | + *rotMat2ndDerivatives [lambda][k][dimA1][dimA2] | |
4372 | 4587 | *rotatingMatrix [sigma ][l]; |
4373 | 4588 | // term4 |
4374 | - value += diatomicTwoElecTwoCore[i][j][k][l] | |
4589 | + value += diatomicTwoElecsTwoCores[i][j][k][l] | |
4375 | 4590 | *rotatingMatrix [mu ][i] |
4376 | 4591 | *rotatingMatrix [nu ][j] |
4377 | 4592 | *rotatingMatrix [lambda][k] |
4378 | - *rotMat2ndDerivatives[sigma ][l][dimA1][dimA2]; | |
4593 | + *rotMat2ndDerivatives [sigma ][l][dimA1][dimA2]; | |
4379 | 4594 | |
4380 | 4595 | // term5 |
4381 | - value += diatomicTwoElecTwoCore1stDerivatives[i][j][k][l][dimA1] | |
4382 | - *rotMat1stDerivatives[mu ][i][dimA2] | |
4383 | - *rotatingMatrix [nu ][j] | |
4384 | - *rotatingMatrix [lambda][k] | |
4385 | - *rotatingMatrix [sigma ][l]; | |
4596 | + value += diatomicTwoElecsTwoCores1stDerivatives[i][j][k][l][dimA1] | |
4597 | + *rotMat1stDerivatives [mu ][i][dimA2] | |
4598 | + *rotatingMatrix [nu ][j] | |
4599 | + *rotatingMatrix [lambda][k] | |
4600 | + *rotatingMatrix [sigma ][l]; | |
4386 | 4601 | // term6 |
4387 | - value += diatomicTwoElecTwoCore1stDerivatives[i][j][k][l][dimA1] | |
4388 | - *rotatingMatrix [mu ][i] | |
4389 | - *rotMat1stDerivatives[nu ][j][dimA2] | |
4390 | - *rotatingMatrix [lambda][k] | |
4391 | - *rotatingMatrix [sigma ][l]; | |
4602 | + value += diatomicTwoElecsTwoCores1stDerivatives[i][j][k][l][dimA1] | |
4603 | + *rotatingMatrix [mu ][i] | |
4604 | + *rotMat1stDerivatives [nu ][j][dimA2] | |
4605 | + *rotatingMatrix [lambda][k] | |
4606 | + *rotatingMatrix [sigma ][l]; | |
4392 | 4607 | // term7 |
4393 | - value += diatomicTwoElecTwoCore1stDerivatives[i][j][k][l][dimA1] | |
4394 | - *rotatingMatrix [mu ][i] | |
4395 | - *rotatingMatrix [nu ][j] | |
4396 | - *rotMat1stDerivatives[lambda][k][dimA2] | |
4397 | - *rotatingMatrix [sigma ][l]; | |
4608 | + value += diatomicTwoElecsTwoCores1stDerivatives[i][j][k][l][dimA1] | |
4609 | + *rotatingMatrix [mu ][i] | |
4610 | + *rotatingMatrix [nu ][j] | |
4611 | + *rotMat1stDerivatives [lambda][k][dimA2] | |
4612 | + *rotatingMatrix [sigma ][l]; | |
4398 | 4613 | // term8 |
4399 | - value += diatomicTwoElecTwoCore1stDerivatives[i][j][k][l][dimA1] | |
4400 | - *rotatingMatrix [mu ][i] | |
4401 | - *rotatingMatrix [nu ][j] | |
4402 | - *rotatingMatrix [lambda][k] | |
4403 | - *rotMat1stDerivatives[sigma ][l][dimA2]; | |
4614 | + value += diatomicTwoElecsTwoCores1stDerivatives[i][j][k][l][dimA1] | |
4615 | + *rotatingMatrix [mu ][i] | |
4616 | + *rotatingMatrix [nu ][j] | |
4617 | + *rotatingMatrix [lambda][k] | |
4618 | + *rotMat1stDerivatives [sigma ][l][dimA2]; | |
4404 | 4619 | |
4405 | 4620 | // term9 |
4406 | - value += diatomicTwoElecTwoCore1stDerivatives[i][j][k][l][dimA2] | |
4407 | - *rotMat1stDerivatives[mu ][i][dimA1] | |
4408 | - *rotatingMatrix [nu ][j] | |
4409 | - *rotatingMatrix [lambda][k] | |
4410 | - *rotatingMatrix [sigma ][l]; | |
4621 | + value += diatomicTwoElecsTwoCores1stDerivatives[i][j][k][l][dimA2] | |
4622 | + *rotMat1stDerivatives [mu ][i][dimA1] | |
4623 | + *rotatingMatrix [nu ][j] | |
4624 | + *rotatingMatrix [lambda][k] | |
4625 | + *rotatingMatrix [sigma ][l]; | |
4411 | 4626 | // term10 |
4412 | - value += diatomicTwoElecTwoCore[i][j][k][l] | |
4413 | - *rotMat1stDerivatives[mu ][i][dimA1] | |
4414 | - *rotMat1stDerivatives[nu ][j][dimA2] | |
4415 | - *rotatingMatrix [lambda][k] | |
4416 | - *rotatingMatrix [sigma ][l]; | |
4627 | + value += diatomicTwoElecsTwoCores[i][j][k][l] | |
4628 | + *rotMat1stDerivatives [mu ][i][dimA1] | |
4629 | + *rotMat1stDerivatives [nu ][j][dimA2] | |
4630 | + *rotatingMatrix [lambda][k] | |
4631 | + *rotatingMatrix [sigma ][l]; | |
4417 | 4632 | // term11 |
4418 | - value += diatomicTwoElecTwoCore[i][j][k][l] | |
4419 | - *rotMat1stDerivatives[mu ][i][dimA1] | |
4420 | - *rotatingMatrix [nu ][j] | |
4421 | - *rotMat1stDerivatives[lambda][k][dimA2] | |
4422 | - *rotatingMatrix [sigma ][l]; | |
4633 | + value += diatomicTwoElecsTwoCores[i][j][k][l] | |
4634 | + *rotMat1stDerivatives [mu ][i][dimA1] | |
4635 | + *rotatingMatrix [nu ][j] | |
4636 | + *rotMat1stDerivatives [lambda][k][dimA2] | |
4637 | + *rotatingMatrix [sigma ][l]; | |
4423 | 4638 | // term12 |
4424 | - value += diatomicTwoElecTwoCore[i][j][k][l] | |
4425 | - *rotMat1stDerivatives[mu ][i][dimA1] | |
4426 | - *rotatingMatrix [nu ][j] | |
4427 | - *rotatingMatrix [lambda][k] | |
4428 | - *rotMat1stDerivatives[sigma ][l][dimA2]; | |
4639 | + value += diatomicTwoElecsTwoCores[i][j][k][l] | |
4640 | + *rotMat1stDerivatives [mu ][i][dimA1] | |
4641 | + *rotatingMatrix [nu ][j] | |
4642 | + *rotatingMatrix [lambda][k] | |
4643 | + *rotMat1stDerivatives [sigma ][l][dimA2]; | |
4429 | 4644 | |
4430 | 4645 | // term13 |
4431 | - value += diatomicTwoElecTwoCore1stDerivatives[i][j][k][l][dimA2] | |
4432 | - *rotatingMatrix [mu ][i] | |
4433 | - *rotMat1stDerivatives[nu ][j][dimA1] | |
4434 | - *rotatingMatrix [lambda][k] | |
4435 | - *rotatingMatrix [sigma ][l]; | |
4646 | + value += diatomicTwoElecsTwoCores1stDerivatives[i][j][k][l][dimA2] | |
4647 | + *rotatingMatrix [mu ][i] | |
4648 | + *rotMat1stDerivatives [nu ][j][dimA1] | |
4649 | + *rotatingMatrix [lambda][k] | |
4650 | + *rotatingMatrix [sigma ][l]; | |
4436 | 4651 | // term14 |
4437 | - value += diatomicTwoElecTwoCore[i][j][k][l] | |
4438 | - *rotMat1stDerivatives[mu ][i][dimA2] | |
4439 | - *rotMat1stDerivatives[nu ][j][dimA1] | |
4440 | - *rotatingMatrix [lambda][k] | |
4441 | - *rotatingMatrix [sigma ][l]; | |
4652 | + value += diatomicTwoElecsTwoCores[i][j][k][l] | |
4653 | + *rotMat1stDerivatives [mu ][i][dimA2] | |
4654 | + *rotMat1stDerivatives [nu ][j][dimA1] | |
4655 | + *rotatingMatrix [lambda][k] | |
4656 | + *rotatingMatrix [sigma ][l]; | |
4442 | 4657 | // term15 |
4443 | - value += diatomicTwoElecTwoCore[i][j][k][l] | |
4444 | - *rotatingMatrix [mu ][i] | |
4445 | - *rotMat1stDerivatives[nu ][j][dimA1] | |
4446 | - *rotMat1stDerivatives[lambda][k][dimA2] | |
4447 | - *rotatingMatrix [sigma ][l]; | |
4658 | + value += diatomicTwoElecsTwoCores[i][j][k][l] | |
4659 | + *rotatingMatrix [mu ][i] | |
4660 | + *rotMat1stDerivatives [nu ][j][dimA1] | |
4661 | + *rotMat1stDerivatives [lambda][k][dimA2] | |
4662 | + *rotatingMatrix [sigma ][l]; | |
4448 | 4663 | // term16 |
4449 | - value += diatomicTwoElecTwoCore[i][j][k][l] | |
4450 | - *rotatingMatrix [mu ][i] | |
4451 | - *rotMat1stDerivatives[nu ][j][dimA1] | |
4452 | - *rotatingMatrix [lambda][k] | |
4453 | - *rotMat1stDerivatives[sigma ][l][dimA2]; | |
4664 | + value += diatomicTwoElecsTwoCores[i][j][k][l] | |
4665 | + *rotatingMatrix [mu ][i] | |
4666 | + *rotMat1stDerivatives [nu ][j][dimA1] | |
4667 | + *rotatingMatrix [lambda][k] | |
4668 | + *rotMat1stDerivatives [sigma ][l][dimA2]; | |
4454 | 4669 | |
4455 | 4670 | // term17 |
4456 | - value += diatomicTwoElecTwoCore1stDerivatives[i][j][k][l][dimA2] | |
4457 | - *rotatingMatrix [mu ][i] | |
4458 | - *rotatingMatrix [nu ][j] | |
4459 | - *rotMat1stDerivatives[lambda][k][dimA1] | |
4460 | - *rotatingMatrix [sigma ][l]; | |
4671 | + value += diatomicTwoElecsTwoCores1stDerivatives[i][j][k][l][dimA2] | |
4672 | + *rotatingMatrix [mu ][i] | |
4673 | + *rotatingMatrix [nu ][j] | |
4674 | + *rotMat1stDerivatives [lambda][k][dimA1] | |
4675 | + *rotatingMatrix [sigma ][l]; | |
4461 | 4676 | // term18 |
4462 | - value += diatomicTwoElecTwoCore[i][j][k][l] | |
4463 | - *rotMat1stDerivatives[mu ][i][dimA2] | |
4464 | - *rotatingMatrix [nu ][j] | |
4465 | - *rotMat1stDerivatives[lambda][k][dimA1] | |
4466 | - *rotatingMatrix [sigma ][l]; | |
4677 | + value += diatomicTwoElecsTwoCores[i][j][k][l] | |
4678 | + *rotMat1stDerivatives [mu ][i][dimA2] | |
4679 | + *rotatingMatrix [nu ][j] | |
4680 | + *rotMat1stDerivatives [lambda][k][dimA1] | |
4681 | + *rotatingMatrix [sigma ][l]; | |
4467 | 4682 | // term19 |
4468 | - value += diatomicTwoElecTwoCore[i][j][k][l] | |
4469 | - *rotatingMatrix [mu ][i] | |
4470 | - *rotMat1stDerivatives[nu ][j][dimA2] | |
4471 | - *rotMat1stDerivatives[lambda][k][dimA1] | |
4472 | - *rotatingMatrix [sigma ][l]; | |
4683 | + value += diatomicTwoElecsTwoCores[i][j][k][l] | |
4684 | + *rotatingMatrix [mu ][i] | |
4685 | + *rotMat1stDerivatives [nu ][j][dimA2] | |
4686 | + *rotMat1stDerivatives [lambda][k][dimA1] | |
4687 | + *rotatingMatrix [sigma ][l]; | |
4473 | 4688 | // term20 |
4474 | - value += diatomicTwoElecTwoCore[i][j][k][l] | |
4475 | - *rotatingMatrix [mu ][i] | |
4476 | - *rotatingMatrix [nu ][j] | |
4477 | - *rotMat1stDerivatives[lambda][k][dimA1] | |
4478 | - *rotMat1stDerivatives[sigma ][l][dimA2]; | |
4689 | + value += diatomicTwoElecsTwoCores[i][j][k][l] | |
4690 | + *rotatingMatrix [mu ][i] | |
4691 | + *rotatingMatrix [nu ][j] | |
4692 | + *rotMat1stDerivatives [lambda][k][dimA1] | |
4693 | + *rotMat1stDerivatives [sigma ][l][dimA2]; | |
4479 | 4694 | |
4480 | 4695 | // term21 |
4481 | - value += diatomicTwoElecTwoCore1stDerivatives[i][j][k][l][dimA2] | |
4482 | - *rotatingMatrix [mu ][i] | |
4483 | - *rotatingMatrix [nu ][j] | |
4484 | - *rotatingMatrix [lambda][k] | |
4485 | - *rotMat1stDerivatives[sigma ][l][dimA1]; | |
4696 | + value += diatomicTwoElecsTwoCores1stDerivatives[i][j][k][l][dimA2] | |
4697 | + *rotatingMatrix [mu ][i] | |
4698 | + *rotatingMatrix [nu ][j] | |
4699 | + *rotatingMatrix [lambda][k] | |
4700 | + *rotMat1stDerivatives [sigma ][l][dimA1]; | |
4486 | 4701 | // term22 |
4487 | - value += diatomicTwoElecTwoCore[i][j][k][l] | |
4488 | - *rotMat1stDerivatives[mu ][i][dimA2] | |
4489 | - *rotatingMatrix [nu ][j] | |
4490 | - *rotatingMatrix [lambda][k] | |
4491 | - *rotMat1stDerivatives[sigma ][l][dimA1]; | |
4702 | + value += diatomicTwoElecsTwoCores[i][j][k][l] | |
4703 | + *rotMat1stDerivatives [mu ][i][dimA2] | |
4704 | + *rotatingMatrix [nu ][j] | |
4705 | + *rotatingMatrix [lambda][k] | |
4706 | + *rotMat1stDerivatives [sigma ][l][dimA1]; | |
4492 | 4707 | // term23 |
4493 | - value += diatomicTwoElecTwoCore[i][j][k][l] | |
4494 | - *rotatingMatrix [mu ][i] | |
4495 | - *rotMat1stDerivatives[nu ][j][dimA2] | |
4496 | - *rotatingMatrix [lambda][k] | |
4497 | - *rotMat1stDerivatives[sigma ][l][dimA1]; | |
4708 | + value += diatomicTwoElecsTwoCores[i][j][k][l] | |
4709 | + *rotatingMatrix [mu ][i] | |
4710 | + *rotMat1stDerivatives [nu ][j][dimA2] | |
4711 | + *rotatingMatrix [lambda][k] | |
4712 | + *rotMat1stDerivatives [sigma ][l][dimA1]; | |
4498 | 4713 | // term24 |
4499 | - value += diatomicTwoElecTwoCore[i][j][k][l] | |
4500 | - *rotatingMatrix [mu ][i] | |
4501 | - *rotatingMatrix [nu ][j] | |
4502 | - *rotMat1stDerivatives[lambda][k][dimA2] | |
4503 | - *rotMat1stDerivatives[sigma ][l][dimA1]; | |
4714 | + value += diatomicTwoElecsTwoCores[i][j][k][l] | |
4715 | + *rotatingMatrix [mu ][i] | |
4716 | + *rotatingMatrix [nu ][j] | |
4717 | + *rotMat1stDerivatives [lambda][k][dimA2] | |
4718 | + *rotMat1stDerivatives [sigma ][l][dimA1]; | |
4504 | 4719 | } |
4505 | 4720 | } |
4506 | 4721 | } |
@@ -4526,14 +4741,24 @@ double Mndo::GetNddoRepulsionIntegral(const Atom& atomA, | ||
4526 | 4741 | OrbitalType lambda, |
4527 | 4742 | OrbitalType sigma) const{ |
4528 | 4743 | double value = 0.0; |
4529 | - double DA=0.0; | |
4530 | - double DB=0.0; | |
4531 | - double rhoA = 0.0; | |
4532 | - double rhoB = 0.0; | |
4533 | - double rAB = this->molecule->GetDistanceAtoms(atomA, atomB); | |
4534 | - int lA = 0; | |
4535 | - int lB = 0; | |
4536 | - // (28) in [DT_1977] | |
4744 | + double rAB = 0.0; | |
4745 | + if(atomA.GetAtomType() != EPC && atomB.GetAtomType() != EPC){ | |
4746 | + rAB = this->molecule->GetDistanceAtoms(atomA, atomB); | |
4747 | + } | |
4748 | + else if(atomA.GetAtomType() != EPC && atomB.GetAtomType() == EPC){ | |
4749 | + rAB = this->molecule->GetDistanceAtomEpc(atomA, atomB); | |
4750 | + } | |
4751 | + else if(atomA.GetAtomType() == EPC && atomB.GetAtomType() != EPC){ | |
4752 | + rAB = this->molecule->GetDistanceAtomEpc(atomB, atomA); | |
4753 | + } | |
4754 | + else{ | |
4755 | + stringstream ss; | |
4756 | + ss << this->errorMessageGetNddoRepulsionIntegralBadAtomTypes; | |
4757 | + ss << this->errorMessageAtomA << AtomTypeStr(atomA.GetAtomType()) << endl; | |
4758 | + ss << this->errorMessageAtomB << AtomTypeStr(atomB.GetAtomType()) << endl; | |
4759 | + throw MolDSException(ss.str()); | |
4760 | + } | |
4761 | + | |
4537 | 4762 | if(mu == s && nu == s && lambda == s && sigma == s){ |
4538 | 4763 | value = this->GetSemiEmpiricalMultipoleInteraction(atomA, atomB, sQ, sQ, rAB); |
4539 | 4764 | } |
@@ -4873,14 +5098,8 @@ double Mndo::GetNddoRepulsionIntegral1stDerivative( | ||
4873 | 5098 | const Atom& atomB, OrbitalType lambda, OrbitalType sigma, |
4874 | 5099 | CartesianType axisA) const{ |
4875 | 5100 | double value = 0.0; |
4876 | - double DA=0.0; | |
4877 | - double DB=0.0; | |
4878 | - double rhoA = 0.0; | |
4879 | - double rhoB = 0.0; | |
4880 | 5101 | double rAB = this->molecule->GetDistanceAtoms(atomA, atomB); |
4881 | 5102 | double drABDa = (atomA.GetXyz()[axisA] - atomB.GetXyz()[axisA])/rAB; |
4882 | - int lA = 0; | |
4883 | - int lB = 0; | |
4884 | 5103 | // (28) in [DT_1977] |
4885 | 5104 | if(mu == s && nu == s && lambda == s && sigma == s){ |
4886 | 5105 | value = this->GetSemiEmpiricalMultipoleInteraction1stDerivative(atomA, atomB, sQ, sQ, rAB); |
@@ -5297,18 +5516,12 @@ double Mndo::GetNddoRepulsionIntegral2ndDerivative( | ||
5297 | 5516 | CartesianType axisA1, |
5298 | 5517 | CartesianType axisA2) const{ |
5299 | 5518 | double value = 0.0; |
5300 | - double DA=0.0; | |
5301 | - double DB=0.0; | |
5302 | - double rhoA = 0.0; | |
5303 | - double rhoB = 0.0; | |
5304 | 5519 | double rAB = this->molecule->GetDistanceAtoms(atomA, atomB); |
5305 | 5520 | double cartesian[CartesianType_end] = {atomA.GetXyz()[XAxis] - atomB.GetXyz()[XAxis], |
5306 | 5521 | atomA.GetXyz()[YAxis] - atomB.GetXyz()[YAxis], |
5307 | 5522 | atomA.GetXyz()[ZAxis] - atomB.GetXyz()[ZAxis]}; |
5308 | 5523 | double deriv1st=0.0; // first derivative of semi empirical multipole interaction |
5309 | 5524 | double deriv2nd=0.0; // second derivative of semi empirical multipole interaction |
5310 | - int lA = 0; | |
5311 | - int lB = 0; | |
5312 | 5525 | // (28) in [DT_1977] |
5313 | 5526 | if(mu == s && nu == s && lambda == s && sigma == s){ |
5314 | 5527 | deriv1st = this->GetSemiEmpiricalMultipoleInteraction1stDerivative(atomA, atomB, sQ, sQ, rAB); |
@@ -6227,7 +6440,6 @@ double Mndo::GetNddoRepulsionIntegral2ndDerivative( | ||
6227 | 6440 | return value; |
6228 | 6441 | } |
6229 | 6442 | |
6230 | -// See Apendix in [DT_1977] | |
6231 | 6443 | double Mndo::GetSemiEmpiricalMultipoleInteraction(const Atom& atomA, |
6232 | 6444 | const Atom& atomB, |
6233 | 6445 | MultipoleType multipoleA, |
@@ -6236,8 +6448,27 @@ double Mndo::GetSemiEmpiricalMultipoleInteraction(const Atom& atomA, | ||
6236 | 6448 | double value = 0.0; |
6237 | 6449 | double DA = atomA.GetNddoDerivedParameterD(this->theory, multipoleA); |
6238 | 6450 | double DB = atomB.GetNddoDerivedParameterD(this->theory, multipoleB); |
6239 | - double rhoA = atomA.GetNddoDerivedParameterRho(this->theory, multipoleA); | |
6240 | - double rhoB = atomB.GetNddoDerivedParameterRho(this->theory, multipoleB); | |
6451 | + double rhoA = 0.0; | |
6452 | + double rhoB = 0.0; | |
6453 | + if(atomA.GetAtomType() != EPC && atomB.GetAtomType() != EPC){ | |
6454 | + rhoA = atomA.GetNddoDerivedParameterRho(this->theory, multipoleA); | |
6455 | + rhoB = atomB.GetNddoDerivedParameterRho(this->theory, multipoleB); | |
6456 | + } | |
6457 | + else if(atomA.GetAtomType() != EPC && atomB.GetAtomType() == EPC){ | |
6458 | + rhoA = 0.0; | |
6459 | + rhoB = 0.0; | |
6460 | + } | |
6461 | + else if(atomA.GetAtomType() == EPC && atomB.GetAtomType() != EPC){ | |
6462 | + rhoA = 0.0; | |
6463 | + rhoB = 0.0; | |
6464 | + } | |
6465 | + else{ | |
6466 | + stringstream ss; | |
6467 | + ss << this->errorMessageGetSemiEmpiricalMultipoleInteractionBadAtomTypes; | |
6468 | + ss << this->errorMessageAtomA << AtomTypeStr(atomA.GetAtomType()) << endl; | |
6469 | + ss << this->errorMessageAtomB << AtomTypeStr(atomB.GetAtomType()) << endl; | |
6470 | + throw MolDSException(ss.str()); | |
6471 | + } | |
6241 | 6472 | double a = rhoA + rhoB; |
6242 | 6473 | |
6243 | 6474 | // Eq. (52) in [DT_1977] |
@@ -30,25 +30,30 @@ public: | ||
30 | 30 | virtual void SetMolecule(MolDS_base::Molecule* molecule); |
31 | 31 | virtual void OutputSCFResults() const; |
32 | 32 | protected: |
33 | + std::string errorMessageGetSemiEmpiricalMultipoleInteractionBadAtomTypes; | |
33 | 34 | std::string errorMessageGetSemiEmpiricalMultipoleInteractionBadMultipoles; |
34 | 35 | std::string errorMessageGetSemiEmpiricalMultipoleInteraction1stDeriBadMultipoles; |
35 | 36 | std::string errorMessageGetSemiEmpiricalMultipoleInteraction2ndDeriBadMultipoles; |
36 | 37 | std::string errorMessageGetNddoRepulsionIntegral; |
38 | + std::string errorMessageGetNddoRepulsionIntegralBadAtomTypes; | |
37 | 39 | std::string errorMessageGetNddoRepulsionIntegral1stDerivative; |
38 | 40 | std::string errorMessageGetNddoRepulsionIntegral2ndDerivative; |
39 | - std::string errorMessageCalcDiatomicTwoElecTwoCoreNullMatrix; | |
40 | - std::string errorMessageCalcTwoElecTwoCoreNullMatrix; | |
41 | - std::string errorMessageCalcDiatomicTwoElecTwoCoreSameAtoms; | |
42 | - std::string errorMessageCalcDiatomicTwoElecTwoCore1stDerivativesSameAtoms; | |
43 | - std::string errorMessageCalcDiatomicTwoElecTwoCore2ndDerivativesSameAtoms; | |
44 | - std::string errorMessageCalcDiatomicTwoElecTwoCore1stDerivativesNullMatrix; | |
45 | - std::string errorMessageCalcDiatomicTwoElecTwoCore2ndDerivativesNullMatrix; | |
41 | + std::string errorMessageCalcDiatomicTwoElecsTwoCoresNullMatrix; | |
42 | + std::string errorMessageCalcTwoElecsTwoAtomCoresNullMatrix; | |
43 | + std::string errorMessageCalcTwoElecsAtomEpcCoresNullMatrix; | |
44 | + std::string errorMessageCalcDiatomicTwoElecsTwoCoresSameAtoms; | |
45 | + std::string errorMessageCalcDiatomicTwoElecsTwoCoresSameEpcs; | |
46 | + std::string errorMessageCalcDiatomicTwoElecsTwoCores1stDerivativesSameAtoms; | |
47 | + std::string errorMessageCalcDiatomicTwoElecsTwoCores2ndDerivativesSameAtoms; | |
48 | + std::string errorMessageCalcDiatomicTwoElecsTwoCores1stDerivativesNullMatrix; | |
49 | + std::string errorMessageCalcDiatomicTwoElecsTwoCores2ndDerivativesNullMatrix; | |
46 | 50 | virtual void SetMessages(); |
47 | 51 | virtual void SetEnableAtomTypes(); |
48 | 52 | virtual void CalcSCFProperties(); |
49 | 53 | virtual void CalcNormalModes(double** normalModes, double* normalForceConstants, const MolDS_base::Molecule& molecule) const; |
50 | 54 | virtual void CalcForce(const std::vector<int>& elecStates); |
51 | 55 | virtual double GetDiatomCoreRepulsionEnergy(int indexAtomA, int indexAtomB) const; |
56 | + virtual double GetAtomCoreEpcCoulombEnergy (int indexAtom, int indexEpc ) const; | |
52 | 57 | virtual double GetDiatomCoreRepulsion1stDerivative(int indexAtomA, |
53 | 58 | int indexAtomB, |
54 | 59 | MolDS_base::CartesianType axisA) const; |
@@ -63,7 +68,7 @@ protected: | ||
63 | 68 | double const* const* gammaAB, |
64 | 69 | double const* const* orbitalElectronPopulation, |
65 | 70 | double const* atomicElectronPopulation, |
66 | - double const* const* const* const* const* const* twoElecTwoCore, | |
71 | + double const* const* const* const* const* const* twoElecsTwoAtomCores, | |
67 | 72 | bool isGuess) const; |
68 | 73 | virtual double GetFockOffDiagElement(const MolDS_base_atoms::Atom& atomA, |
69 | 74 | const MolDS_base_atoms::Atom& atomB, |
@@ -74,7 +79,7 @@ protected: | ||
74 | 79 | double const* const* gammaAB, |
75 | 80 | double const* const* overelap, |
76 | 81 | double const* const* orbitalElectronPopulation, |
77 | - double const* const* const* const* const* const* twoElecTwoCore, | |
82 | + double const* const* const* const* const* const* twoElecsTwoAtomCores, | |
78 | 83 | bool isGuess) const; |
79 | 84 | virtual void CalcDiatomicOverlapAOsInDiatomicFrame(double** diatomicOverlapAOs, |
80 | 85 | const MolDS_base_atoms::Atom& atomA, |
@@ -91,8 +96,9 @@ protected: | ||
91 | 96 | virtual double GetExchangeInt(MolDS_base::OrbitalType orbital1, |
92 | 97 | MolDS_base::OrbitalType orbital2, |
93 | 98 | const MolDS_base_atoms::Atom& atom) const; |
94 | - virtual void CalcTwoElecTwoCore(double****** twoElecTwoCore, | |
95 | - const MolDS_base::Molecule& molecule) const; | |
99 | + virtual void CalcTwoElecsTwoCores(double****** twoElecsTwoAtomCores, | |
100 | + double****** twoElecsAtomEpcCores, | |
101 | + const MolDS_base::Molecule& molecule) const; | |
96 | 102 | virtual double GetMolecularIntegralElement(int moI, |
97 | 103 | int moJ, |
98 | 104 | int moK, |
@@ -112,8 +118,13 @@ private: | ||
112 | 118 | std::string errorMessageMultipoleB; |
113 | 119 | std::string messageHeatsFormation; |
114 | 120 | std::string messageHeatsFormationTitle; |
115 | - double**** twoElecTwoCoreMpiBuff; | |
121 | + double**** twoElecsTwoAtomCoresMpiBuff; | |
122 | + double**** twoElecsAtomEpcCoresMpiBuff; | |
116 | 123 | double heatsFormation; |
124 | + void CalcTwoElecsTwoAtomCores(double****** twoElecsTwoAtomCores, | |
125 | + const MolDS_base::Molecule& molecule) const; | |
126 | + void CalcTwoElecsAtomEpcCores(double****** twoElecsAtomEpcCores, | |
127 | + const MolDS_base::Molecule& molecule) const; | |
117 | 128 | double GetAuxiliaryDiatomCoreRepulsionEnergy(const MolDS_base_atoms::Atom& atomA, |
118 | 129 | const MolDS_base_atoms::Atom& atomB, |
119 | 130 | double distanceAB) const; |
@@ -136,8 +147,8 @@ private: | ||
136 | 147 | double const* const* const* const* orbitalElectronPopulation1stDerivs, |
137 | 148 | double const* const* const* const* diatomicOverlapAOs1stDerivs, |
138 | 149 | double const* const* const* const* const* diatomicOverlapAOs2ndDerivs, |
139 | - double const* const* const* const* const* const* diatomicTwoElecTwoCore1stDerivs, | |
140 | - double const* const* const* const* const* const* const* diatomicTwoElecTwoCore2ndDerivs) const; | |
150 | + double const* const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivs, | |
151 | + double const* const* const* const* const* const* const* diatomicTwoElecsTwoCores2ndDerivs) const; | |
141 | 152 | double GetHessianElementDifferentAtomsSCF(int indexAtomA, |
142 | 153 | int indexAtomB, |
143 | 154 | MolDS_base::CartesianType axisA, |
@@ -146,18 +157,18 @@ private: | ||
146 | 157 | double const* const* const* const* orbitalElectronPopulation1stDerivs, |
147 | 158 | double const* const* const* const* diatomicOverlapAOs1stDerivs, |
148 | 159 | double const* const* const* const* const* diatomicOverlapAOs2ndDerivs, |
149 | - double const* const* const* const* const* const* diatomicTwoElecTwoCore1stDerivs, | |
150 | - double const* const* const* const* const* const* const* diatomicTwoElecTwoCore2ndDerivs) const; | |
160 | + double const* const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivs, | |
161 | + double const* const* const* const* const* const* const* diatomicTwoElecsTwoCores2ndDerivs) const; | |
151 | 162 | void MallocTempMatricesEachThreadCalcHessianSCF(double***** diatomicOverlapAOs1stDerivs, |
152 | 163 | double****** diatomicOverlapAOs2ndDerivs, |
153 | - double******* diatomicTwoElecTwoCore1stDerivs, | |
154 | - double******** diatomicTwoElecTwoCore2ndDerivs, | |
164 | + double******* diatomicTwoElecsTwoCores1stDerivs, | |
165 | + double******** diatomicTwoElecsTwoCores2ndDerivs, | |
155 | 166 | double*** tmpRotMat, |
156 | 167 | double*** tmpRotMat1stDeriv, |
157 | 168 | double**** tmpRotMat1stDerivs, |
158 | 169 | double***** tmpRotMat2ndDerivs, |
159 | - double***** tmpDiatomicTwoElecTwoCore, | |
160 | - double****** tmpDiatomicTwoElecTwoCore1stDerivs, | |
170 | + double***** tmpDiatomicTwoElecsTwoCores, | |
171 | + double****** tmpDiatomicTwoElecsTwoCores1stDerivs, | |
161 | 172 | double*** tmpDiaOverlapAOsInDiaFrame, |
162 | 173 | double*** tmpDiaOverlapAOs1stDerivInDiaFrame, |
163 | 174 | double*** tmpDiaOverlapAOs2ndDerivInDiaFrame, |
@@ -169,14 +180,14 @@ private: | ||
169 | 180 | double** tmpVectorBC) const; |
170 | 181 | void FreeTempMatricesEachThreadCalcHessianSCF(double***** diatomicOverlapAOs1stDerivs, |
171 | 182 | double****** diatomicOverlapAOs2ndDerivs, |
172 | - double******* diatomicTwoElecTwoCore1stDerivs, | |
173 | - double******** diatomicTwoElecTwoCore2ndDerivs, | |
183 | + double******* diatomicTwoElecsTwoCores1stDerivs, | |
184 | + double******** diatomicTwoElecsTwoCores2ndDerivs, | |
174 | 185 | double*** tmpRotMat, |
175 | 186 | double*** tmpRotMat1stDeriv, |
176 | 187 | double**** tmpRotMat1stDerivs, |
177 | 188 | double***** tmpRotMat2ndDerivs, |
178 | - double***** tmpDiatomicTwoElecTwoCore, | |
179 | - double****** tmpDiatomicTwoElecTwoCore1stDerivs, | |
189 | + double***** tmpDiatomicTwoElecsTwoCores, | |
190 | + double****** tmpDiatomicTwoElecsTwoCores1stDerivs, | |
180 | 191 | double*** tmpDiaOverlapAOsInDiaFrame, |
181 | 192 | double*** tmpDiaOverlapAOs1stDerivInDiaFrame, |
182 | 193 | double*** tmpDiaOverlapAOs2ndDerivInDiaFrame, |
@@ -193,7 +204,7 @@ private: | ||
193 | 204 | MolDS_base::CartesianType axisA1, |
194 | 205 | MolDS_base::CartesianType axisA2, |
195 | 206 | double const* const* orbitalElectronPopulation, |
196 | - double const* const* const* const* const* const* diatomicTwoElecTwoCore2ndDerivs) const; | |
207 | + double const* const* const* const* const* const* diatomicTwoElecsTwoCores2ndDerivs) const; | |
197 | 208 | double GetAuxiliaryHessianElement2(int mu, |
198 | 209 | int nu, |
199 | 210 | int indexAtomA, |
@@ -202,7 +213,7 @@ private: | ||
202 | 213 | MolDS_base::CartesianType axisA, |
203 | 214 | MolDS_base::CartesianType axisB, |
204 | 215 | double const* const* const* const* orbitalElectronPopulation1stDerivs, |
205 | - double const* const* const* const* const* diatomicTwoElecTwoCore1stDerivs) const; | |
216 | + double const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivs) const; | |
206 | 217 | double GetAuxiliaryHessianElement3(int lambda, |
207 | 218 | int sigma, |
208 | 219 | int indexAtomA, |
@@ -210,7 +221,7 @@ private: | ||
210 | 221 | MolDS_base::CartesianType axisA1, |
211 | 222 | MolDS_base::CartesianType axisA2, |
212 | 223 | double const* const* orbitalElectronPopulation, |
213 | - double const* const* const* const* const* const* diatomicTwoElecTwoCore2ndDerivs) const; | |
224 | + double const* const* const* const* const* const* diatomicTwoElecsTwoCores2ndDerivs) const; | |
214 | 225 | double GetAuxiliaryHessianElement4(int lambda, |
215 | 226 | int sigma, |
216 | 227 | int indexAtomA, |
@@ -219,7 +230,7 @@ private: | ||
219 | 230 | MolDS_base::CartesianType axisA, |
220 | 231 | MolDS_base::CartesianType axisB, |
221 | 232 | double const* const* const* const* orbitalElectronPopulation1stDerivs, |
222 | - double const* const* const* const* const* diatomicTwoElecTwoCore1stDerivs) const; | |
233 | + double const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivs) const; | |
223 | 234 | double GetAuxiliaryHessianElement5(int mu, |
224 | 235 | int lambda, |
225 | 236 | int indexAtomA, |
@@ -246,7 +257,7 @@ private: | ||
246 | 257 | MolDS_base::CartesianType axisA1, |
247 | 258 | MolDS_base::CartesianType axisA2, |
248 | 259 | double const* const* orbitalElectronPopulation, |
249 | - double const* const* const* const* const* const* diatomicTwoElecTwoCore2ndDerivs) const; | |
260 | + double const* const* const* const* const* const* diatomicTwoElecsTwoCores2ndDerivs) const; | |
250 | 261 | double GetAuxiliaryHessianElement8(int mu, |
251 | 262 | int nu, |
252 | 263 | int lambda, |
@@ -258,7 +269,7 @@ private: | ||
258 | 269 | MolDS_base::CartesianType axisB, |
259 | 270 | double const* const* orbitalElectronPopulation, |
260 | 271 | double const* const* const* const* orbitalElectronPopulation1stDerivs, |
261 | - double const* const* const* const* const* diatomicTwoElecTwoCore1stDerivs) const; | |
272 | + double const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivs) const; | |
262 | 273 | void CalcOrbitalElectronPopulation1stDerivatives(double**** orbitalElectronPopulation1stDerivatives) const; |
263 | 274 | void SolveCPHF(double** solutionsCPHF, |
264 | 275 | const std::vector<MoIndexPair>& nonRedundantQIndeces, |
@@ -271,12 +282,12 @@ private: | ||
271 | 282 | const std::vector<MoIndexPair>& redundantQIndeces, |
272 | 283 | int indexAtomA, |
273 | 284 | MolDS_base::CartesianType axisA) const; |
274 | - void MallocTempMatricesStaticFirstOrderFock(double****** diatomicTwoElecTwoCore1stDeriv, | |
285 | + void MallocTempMatricesStaticFirstOrderFock(double****** diatomicTwoElecsTwoCores1stDeriv, | |
275 | 286 | double**** diatomicOverlapAOs1stDeriv, |
276 | 287 | double*** tmpRotMat, |
277 | 288 | double**** tmpRotMat1stDerivs, |
278 | 289 | double***** tmpDiatomicTwoElecTwo) const; |
279 | - void FreeTempMatricesStaticFirstOrderFock(double****** diatomicTwoElecTwoCore1stDeriv, | |
290 | + void FreeTempMatricesStaticFirstOrderFock(double****** diatomicTwoElecsTwoCores1stDeriv, | |
280 | 291 | double**** diatomicOverlapAOs1stDeriv, |
281 | 292 | double*** tmpRotMat, |
282 | 293 | double**** tmpRotMat1stDerivs, |
@@ -294,50 +305,66 @@ private: | ||
294 | 305 | int indexAtomB, |
295 | 306 | int mu, |
296 | 307 | int nu, |
297 | - double const* const* const* const* const* const* twoElecTwoCore) const; | |
308 | + double const* const* const* const* const* const* twoElecsTwoAtomCores) const; | |
298 | 309 | double GetElectronCoreAttraction1stDerivative(int indexAtomA, |
299 | 310 | int indexAtomB, |
300 | 311 | int mu, |
301 | 312 | int nu, |
302 | - double const* const* const* const* const* diatomicTwoElecTwoCore1stDerivatives, | |
313 | + double const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivatives, | |
303 | 314 | MolDS_base::CartesianType axisA) const; |
304 | - void CalcDiatomicTwoElecTwoCore(double**** matrix, | |
305 | - double* tmpVec, | |
306 | - double** tmpRotMat, | |
307 | - double** tmpMatrixBC, | |
308 | - double* tmpVectorBC, | |
309 | - int indexAtomA, | |
310 | - int indexAtomB) const; | |
311 | - void CalcDiatomicTwoElecTwoCore1stDerivatives(double***** matrix, | |
312 | - double** tmpRotMat, | |
313 | - double*** tmpRotMat1stDerivs, | |
314 | - double**** tmpDiatomicTwoElecTwoCore, | |
315 | - int indexAtomA, | |
316 | - int indexAtomB) const; | |
317 | - void CalcDiatomicTwoElecTwoCore2ndDerivatives(double****** matrix, | |
318 | - double** tmpRotMat, | |
319 | - double*** tmpRotMat1stDerivs, | |
320 | - double**** tmpRotMat2ndDerivs, | |
321 | - double**** tmpDiatomicTwoElecTwoCore, | |
322 | - double***** tmpDiatomicTwoElecTwoCore1stDerivs, | |
323 | - int indexAtomA, | |
324 | - int indexAtomB) const; | |
325 | - void RotateDiatomicTwoElecTwoCoreToSpaceFrame(double**** matrix, | |
326 | - double* tmpVec, | |
327 | - double const* const* rotatingMatrix, | |
328 | - double** tmpMatrixBC, | |
329 | - double* tmpVectorBC) const; | |
330 | - void RotateDiatomicTwoElecTwoCore1stDerivativesToSpaceFrame(double***** matrix, | |
331 | - double const* const* const* const* diatomicTwoElecTwoCore, | |
332 | - double const* const* rotatingMatrix, | |
333 | - double const* const* const* rotMat1stDerivatives) const; | |
334 | - void RotateDiatomicTwoElecTwoCore2ndDerivativesToSpaceFrame(double****** matrix, | |
335 | - double const* const* const* const* diatomicTwoElecTwoCore, | |
336 | - double const* const* const* const* const* diatomicTwoElecTwoCore1stDerivatives, | |
337 | - double const* const* rotatingMatrix, | |
338 | - double const* const* const* rotMat1stDerivatives, | |
339 | - double const* const* const* const* rotMat2ndDerivatives) const; | |
340 | - void MallocTempMatricesRotateDiatomicTwoElecTwoCore1stDerivs(double*** twiceRotatingMatrix, | |
315 | + void CalcDiatomicTwoElecsTwoCores(double**** matrix, | |
316 | + double* tmpVec, | |
317 | + double** tmpRotMat, | |
318 | + double** tmpMatrixBC, | |
319 | + double* tmpVectorBC, | |
320 | + const MolDS_base_atoms::Atom& atomA, | |
321 | + const MolDS_base_atoms::Atom& atomB) const; | |
322 | + void CalcDiatomicTwoElecsTwoCores(double**** matrix, | |
323 | + double* tmpVec, | |
324 | + double** tmpRotMat, | |
325 | + double** tmpMatrixBC, | |
326 | + double* tmpVectorBC, | |
327 | + int indexAtomA, | |
328 | + int indexAtomB) const; | |
329 | + void CalcDiatomicTwoElecsTwoCores1stDerivatives(double***** matrix, | |
330 | + double** tmpRotMat, | |
331 | + double*** tmpRotMat1stDerivs, | |
332 | + double**** tmpDiatomicTwoElecsTwoCores, | |
333 | + int indexAtomA, | |
334 | + int indexAtomB) const; | |
335 | + void CalcDiatomicTwoElecsTwoCores2ndDerivatives(double****** matrix, | |
336 | + double** tmpRotMat, | |
337 | + double*** tmpRotMat1stDerivs, | |
338 | + double**** tmpRotMat2ndDerivs, | |
339 | + double**** tmpDiatomicTwoElecsTwoCores, | |
340 | + double***** tmpDiatomicTwoElecsTwoCores1stDerivs, | |
341 | + int indexAtomA, | |
342 | + int indexAtomB) const; | |
343 | + void RotateDiatomicTwoElecsTwoCoresToSpaceFrame(double**** matrix, | |
344 | + double* tmpVec, | |
345 | + double const* const* rotatingMatrix, | |
346 | + double** tmpMatrixBC, | |
347 | + double* tmpVectorBC) const; | |
348 | + void RotateDiatomicTwoElecsTwoCores1stDerivativesToSpaceFrame(double***** matrix, | |
349 | + double const* const* const* const* diatomicTwoElecsTwoCores, | |
350 | + double const* const* rotatingMatrix, | |
351 | + double const* const* const* rotMat1stDerivatives) const; | |
352 | + void RotateDiatomicTwoElecsTwoCores2ndDerivativesToSpaceFrame(double****** matrix, | |
353 | + double const* const* const* const* diatomicTwoElecsTwoCores, | |
354 | + double const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivatives, | |
355 | + double const* const* rotatingMatrix, | |
356 | + double const* const* const* rotMat1stDerivatives, | |
357 | + double const* const* const* const* rotMat2ndDerivatives) const; | |
358 | + void MallocTempMatricesRotateDiatomicTwoElecsTwoCores1stDerivs(double*** twiceRotatingMatrix, | |
359 | + double*** twiceRotatingMatrixDerivA, | |
360 | + double*** twiceRotatingMatrixDerivB, | |
361 | + double*** oldMatrix, | |
362 | + double*** rotatedMatrix, | |
363 | + double** tmpRotatedVec, | |
364 | + double*** tmpMatrix, | |
365 | + double** tmpVector, | |
366 | + double*** ptrDiatomic) const; | |
367 | + void FreeTempMatricesRotateDiatomicTwoElecsTwoCores1stDerivs(double*** twiceRotatingMatrix, | |
341 | 368 | double*** twiceRotatingMatrixDerivA, |
342 | 369 | double*** twiceRotatingMatrixDerivB, |
343 | 370 | double*** oldMatrix, |
@@ -346,15 +373,6 @@ private: | ||
346 | 373 | double*** tmpMatrix, |
347 | 374 | double** tmpVector, |
348 | 375 | double*** ptrDiatomic) const; |
349 | - void FreeTempMatricesRotateDiatomicTwoElecTwoCore1stDerivs(double*** twiceRotatingMatrix, | |
350 | - double*** twiceRotatingMatrixDerivA, | |
351 | - double*** twiceRotatingMatrixDerivB, | |
352 | - double*** oldMatrix, | |
353 | - double*** rotatedMatrix, | |
354 | - double** tmpRotatedVec, | |
355 | - double*** tmpMatrix, | |
356 | - double** tmpVector, | |
357 | - double*** ptrDiatomic) const; | |
358 | 376 | double GetNddoRepulsionIntegral(const MolDS_base_atoms::Atom& atomA, |
359 | 377 | MolDS_base::OrbitalType mu, |
360 | 378 | MolDS_base::OrbitalType nu, |
@@ -392,7 +410,7 @@ private: | ||
392 | 410 | MolDS_base::MultipoleType multipoleB, |
393 | 411 | double rAB) const; |
394 | 412 | void MallocTempMatricesCalcForce(double**** diatomicOverlapAOs1stDerivs, |
395 | - double****** diatomicTwoElecTwoCore1stDerivs, | |
413 | + double****** diatomicTwoElecsTwoCores1stDerivs, | |
396 | 414 | double*** tmpDiaOverlapAOsInDiaFrame, |
397 | 415 | double*** tmpDiaOverlapAOs1stDerivInDiaFrame, |
398 | 416 | double*** tmpRotMat, |
@@ -402,9 +420,9 @@ private: | ||
402 | 420 | double** tmpRotatedDiatomicOverlapVec, |
403 | 421 | double*** tmpMatrixBC, |
404 | 422 | double** tmpVectorBC, |
405 | - double***** tmpDiatomicTwoElecTwoCore) const; | |
423 | + double***** tmpDiatomicTwoElecsTwoCores) const; | |
406 | 424 | void FreeTempMatricesCalcForce(double**** diatomicOverlapAOs1stDerivs, |
407 | - double****** diatomicTwoElecTwoCore1stDerivs, | |
425 | + double****** diatomicTwoElecsTwoCores1stDerivs, | |
408 | 426 | double*** tmpDiaOverlapAOsInDiaFrame, |
409 | 427 | double*** tmpDiaOverlapAOs1stDerivInDiaFrame, |
410 | 428 | double*** tmpRotMat, |
@@ -414,11 +432,11 @@ private: | ||
414 | 432 | double** tmpRotatedDiatomicOverlapVec, |
415 | 433 | double*** tmpMatrixBC, |
416 | 434 | double** tmpVectorBC, |
417 | - double***** tmpDiatomicTwoElecTwoCore) const; | |
435 | + double***** tmpDiatomicTwoElecsTwoCores) const; | |
418 | 436 | void CalcForceSCFElecCoreAttractionPart(double* force, |
419 | 437 | int indexAtomA, |
420 | 438 | int indexAtomB, |
421 | - double const* const* const* const* const* diatomicTwoElecTwoCore1stDerivs) const; | |
439 | + double const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivs) const; | |
422 | 440 | void CalcForceSCFOverlapAOsPart(double* force, |
423 | 441 | int indexAtomA, |
424 | 442 | int indexAtomB, |
@@ -426,22 +444,22 @@ private: | ||
426 | 444 | void CalcForceSCFTwoElecPart(double* force, |
427 | 445 | int indexAtomA, |
428 | 446 | int indexAtomB, |
429 | - double const* const* const* const* const* diatomicTwoElecTwoCore1stDerivs) const; | |
447 | + double const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivs) const; | |
430 | 448 | void CalcForceExcitedStaticPart(double* force, |
431 | 449 | int elecStateIndex, |
432 | 450 | int indexAtomA, |
433 | 451 | int indexAtomB, |
434 | - double const* const* const* const* const* diatomicTwoElecTwoCore1stDerivs) const; | |
452 | + double const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivs) const; | |
435 | 453 | void CalcForceExcitedElecCoreAttractionPart(double* force, |
436 | 454 | int elecStateIndex, |
437 | 455 | int indexAtomA, |
438 | 456 | int indexAtomB, |
439 | - double const* const* const* const* const* diatomicTwoElecTwoCore1stDerivs) const; | |
457 | + double const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivs) const; | |
440 | 458 | void CalcForceExcitedTwoElecPart(double* force, |
441 | 459 | int elecStateIndex, |
442 | 460 | int indexAtomA, |
443 | 461 | int indexAtomB, |
444 | - double const* const* const* const* const* diatomicTwoElecTwoCore1stDerivs) const; | |
462 | + double const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivs) const; | |
445 | 463 | |
446 | 464 | }; |
447 | 465 |
@@ -83,31 +83,39 @@ void Pm3::SetMessages(){ | ||
83 | 83 | = "Error in pm3::Pm3::CalcCISMatrix: Non available orbital is contained.\n"; |
84 | 84 | this->errorMessageDavidsonNotConverged = "Error in pm3::Pm3::DoCISDavidson: Davidson did not met convergence criterion. \n"; |
85 | 85 | this->errorMessageGetSemiEmpiricalMultipoleInteractionBadMultipoles |
86 | - = "Error in pm3:: Pm3::GetSemiEmpiricalMultipoleInteraction: Bad multipole combintaion is set\n"; | |
86 | + = "Error in pm3::Pm3::GetSemiEmpiricalMultipoleInteraction: Bad multipole combintaion is set\n"; | |
87 | + this->errorMessageGetSemiEmpiricalMultipoleInteractionBadAtomTypes | |
88 | + = "Error in pm3::Pm3::GetSemiEmpiricalMultipoleInteraction: Bad atom types are set\n"; | |
87 | 89 | this->errorMessageGetSemiEmpiricalMultipoleInteraction1stDeriBadMultipoles |
88 | - = "Error in pm3:: Pm3::GetSemiEmpiricalMultipoleInteraction1stDerivative: Bad multipole combintaion is set\n"; | |
90 | + = "Error in pm3::Pm3::GetSemiEmpiricalMultipoleInteraction1stDerivative: Bad multipole combintaion is set\n"; | |
89 | 91 | this->errorMessageGetSemiEmpiricalMultipoleInteraction2ndDeriBadMultipoles |
90 | - = "Error in pm3:: Pm3::GetSemiEmpiricalMultipoleInteraction2ndDerivative: Bad multipole combintaion is set\n"; | |
92 | + = "Error in pm3::Pm3::GetSemiEmpiricalMultipoleInteraction2ndDerivative: Bad multipole combintaion is set\n"; | |
91 | 93 | this->errorMessageGetNddoRepulsionIntegral |
92 | 94 | = "Error in pm3::Pm3::GetNddoRepulsionIntegral: Bad orbital is set.\n"; |
95 | + this->errorMessageGetNddoRepulsionIntegralBadAtomTypes | |
96 | + = "Error in pm3::Pm3::GetNddoRepulsionIntegral: Bad atom types are set.\n"; | |
93 | 97 | this->errorMessageGetNddoRepulsionIntegral1stDerivative |
94 | 98 | = "Error in pm3::Pm3::GetNddoRepulsionIntegral1stDerivative: Bad orbital is set.\n"; |
95 | 99 | this->errorMessageGetNddoRepulsionIntegral2ndDerivative |
96 | 100 | = "Error in pm3::Pm3::GetNddoRepulsionIntegral2ndDerivative: Bad orbital is set.\n"; |
97 | - this->errorMessageCalcTwoElecTwoCoreNullMatrix | |
98 | - = "Error in pm3::Pm3::CalcTwoElecTwoCore: The two elec two core matrix is NULL.\n"; | |
99 | - this->errorMessageCalcDiatomicTwoElecTwoCoreSameAtoms | |
100 | - = "Error in pm3::Pm3::CalcDiatomicTwoElecTwoCore: Atom A and B is same.\n"; | |
101 | - this->errorMessageCalcDiatomicTwoElecTwoCore1stDerivativesSameAtoms | |
102 | - = "Error in pm3::Pm3::CalcDiatomicTwoElecTwoCore1stDerivatives: Atom A and B is same.\n"; | |
103 | - this->errorMessageCalcDiatomicTwoElecTwoCore2ndDerivativesSameAtoms | |
104 | - = "Error in pm3::Pm3::CalcDiatomicTwoElecTwoCore2ndDerivatives: Atom A and B is same.\n"; | |
105 | - this->errorMessageCalcDiatomicTwoElecTwoCoreNullMatrix | |
106 | - = "Error in pm3::Pm3::CalcDiatomicTwoElecTwoCore: The two elec two core diatomic matrix is NULL.\n"; | |
107 | - this->errorMessageCalcDiatomicTwoElecTwoCore1stDerivativesNullMatrix | |
108 | - = "Error in pm3::Pm3::CalcDiatomicTwoElecTwoCore1stDerivatives: The two elec two core diatomic matrix is NULL.\n"; | |
109 | - this->errorMessageCalcDiatomicTwoElecTwoCore2ndDerivativesNullMatrix | |
110 | - = "Error in pm3::Pm3::CalcDiatomicTwoElecTwoCore2ndDerivatives: The two elec two core diatomic matrix is NULL.\n"; | |
101 | + this->errorMessageCalcTwoElecsTwoAtomCoresNullMatrix | |
102 | + = "Error in pm3::Pm3::CalcTwoElecsTwoAtomCores: The two elec two atom core matrix is NULL.\n"; | |
103 | + this->errorMessageCalcTwoElecsAtomEpcCoresNullMatrix | |
104 | + = "Error in pm3::Pm3::CalcTwoElecsAtomEpcCores: The two elec atom-epc core matrix is NULL.\n"; | |
105 | + this->errorMessageCalcDiatomicTwoElecsTwoCoresSameAtoms | |
106 | + = "Error in pm3::Pm3::CalcDiatomicTwoElecsTwoCores: Atom A and B is same atom (not EPC).\n"; | |
107 | + this->errorMessageCalcDiatomicTwoElecsTwoCoresSameEpcs | |
108 | + = "Error in pm3::Pm3::CalcDiatomicTwoElecsTwoCores: Atom A and B is same EPC.\n"; | |
109 | + this->errorMessageCalcDiatomicTwoElecsTwoCores1stDerivativesSameAtoms | |
110 | + = "Error in pm3::Pm3::CalcDiatomicTwoElecsTwoCores1stDerivatives: Atom A and B is same.\n"; | |
111 | + this->errorMessageCalcDiatomicTwoElecsTwoCores2ndDerivativesSameAtoms | |
112 | + = "Error in pm3::Pm3::CalcDiatomicTwoElecsTwoCores2ndDerivatives: Atom A and B is same.\n"; | |
113 | + this->errorMessageCalcDiatomicTwoElecsTwoCoresNullMatrix | |
114 | + = "Error in pm3::Pm3::CalcDiatomicTwoElecsTwoCores: The two elec two core diatomic matrix is NULL.\n"; | |
115 | + this->errorMessageCalcDiatomicTwoElecsTwoCores1stDerivativesNullMatrix | |
116 | + = "Error in pm3::Pm3::CalcDiatomicTwoElecsTwoCores1stDerivatives: The two elec two core diatomic matrix is NULL.\n"; | |
117 | + this->errorMessageCalcDiatomicTwoElecsTwoCores2ndDerivativesNullMatrix | |
118 | + = "Error in pm3::Pm3::CalcDiatomicTwoElecsTwoCores2ndDerivatives: The two elec two core diatomic matrix is NULL.\n"; | |
111 | 119 | this->errorMessageGetElectronicEnergyEnergyNotCalculated |
112 | 120 | = "Error in pm3::Pm3::GetElectronicEnergy: Set electronic state is not calculated by CIS.\n"; |
113 | 121 | this->errorMessageGetElectronicEnergyNULLCISEnergy |
@@ -85,30 +85,38 @@ void Pm3D::SetMessages(){ | ||
85 | 85 | this->errorMessageDavidsonNotConverged = "Error in pm3::Pm3D::DoCISDavidson: Davidson did not met convergence criterion. \n"; |
86 | 86 | this->errorMessageGetSemiEmpiricalMultipoleInteractionBadMultipoles |
87 | 87 | = "Error in pm3::Pm3D::GetSemiEmpiricalMultipoleInteraction: Bad multipole combintaion is set\n"; |
88 | + this->errorMessageGetSemiEmpiricalMultipoleInteractionBadAtomTypes | |
89 | + = "Error in pm3::Pm3D::GetSemiEmpiricalMultipoleInteraction: Bad atom types are set\n"; | |
88 | 90 | this->errorMessageGetSemiEmpiricalMultipoleInteraction1stDeriBadMultipoles |
89 | 91 | = "Error in pm3::Pm3D::GetSemiEmpiricalMultipoleInteraction1stDerivative: Bad multipole combintaion is set\n"; |
90 | 92 | this->errorMessageGetSemiEmpiricalMultipoleInteraction2ndDeriBadMultipoles |
91 | 93 | = "Error in pm3::Pm3D::GetSemiEmpiricalMultipoleInteraction2ndDerivative: Bad multipole combintaion is set\n"; |
92 | 94 | this->errorMessageGetNddoRepulsionIntegral |
93 | 95 | = "Error in pm3::Pm3D::GetNddoRepulsionIntegral: Bad orbital is set.\n"; |
96 | + this->errorMessageGetNddoRepulsionIntegralBadAtomTypes | |
97 | + = "Error in pm3::Pm3D::GetNddoRepulsionIntegral: Bad atom types are set.\n"; | |
94 | 98 | this->errorMessageGetNddoRepulsionIntegral1stDerivative |
95 | 99 | = "Error in pm3::Pm3D::GetNddoRepulsionIntegral1stDerivative: Bad orbital is set.\n"; |
96 | 100 | this->errorMessageGetNddoRepulsionIntegral2ndDerivative |
97 | 101 | = "Error in pm3::Pm3D::GetNddoRepulsionIntegral2ndDerivative: Bad orbital is set.\n"; |
98 | - this->errorMessageCalcTwoElecTwoCoreNullMatrix | |
99 | - = "Error in pm3::Pm3D::CalcTwoElecTwoCore: The two elec two core matrix is NULL.\n"; | |
100 | - this->errorMessageCalcDiatomicTwoElecTwoCoreSameAtoms | |
101 | - = "Error in pm3::Pm3D::CalcDiatomicTwoElecTwoCore: Atom A and B is same.\n"; | |
102 | - this->errorMessageCalcDiatomicTwoElecTwoCore1stDerivativesSameAtoms | |
103 | - = "Error in pm3::Pm3D::CalcDiatomicTwoElecTwoCore1stDerivatives: Atom A and B is same.\n"; | |
104 | - this->errorMessageCalcDiatomicTwoElecTwoCore2ndDerivativesSameAtoms | |
105 | - = "Error in pm3::Pm3D::CalcDiatomicTwoElecTwoCore2ndDerivatives: Atom A and B is same.\n"; | |
106 | - this->errorMessageCalcDiatomicTwoElecTwoCoreNullMatrix | |
107 | - = "Error in pm3::Pm3D::CalcDiatomicTwoElecTwoCore: The two elec two core diatomic matrix is NULL.\n"; | |
108 | - this->errorMessageCalcDiatomicTwoElecTwoCore1stDerivativesNullMatrix | |
109 | - = "Error in pm3::Pm3D::CalcDiatomicTwoElecTwoCore1stDerivatives: The two elec two core diatomic matrix is NULL.\n"; | |
110 | - this->errorMessageCalcDiatomicTwoElecTwoCore2ndDerivativesNullMatrix | |
111 | - = "Error in pm3::Pm3D::CalcDiatomicTwoElecTwoCore2ndDerivatives: The two elec two core diatomic matrix is NULL.\n"; | |
102 | + this->errorMessageCalcTwoElecsTwoAtomCoresNullMatrix | |
103 | + = "Error in pm3::Pm3D::CalcTwoElecsTwoAtomCores: The two elec two atom core matrix is NULL.\n"; | |
104 | + this->errorMessageCalcTwoElecsAtomEpcCoresNullMatrix | |
105 | + = "Error in pm3::Pm3D::CalcTwoElecsAtomEpcCores: The two elec atom-epc core matrix is NULL.\n"; | |
106 | + this->errorMessageCalcDiatomicTwoElecsTwoCoresSameAtoms | |
107 | + = "Error in pm3::Pm3D::CalcDiatomicTwoElecsTwoCores: Atom A and B is same atom (not EPC).\n"; | |
108 | + this->errorMessageCalcDiatomicTwoElecsTwoCoresSameEpcs | |
109 | + = "Error in pm3::Pm3D::CalcDiatomicTwoElecsTwoCores: Atom A and B is same EPC.\n"; | |
110 | + this->errorMessageCalcDiatomicTwoElecsTwoCores1stDerivativesSameAtoms | |
111 | + = "Error in pm3::Pm3D::CalcDiatomicTwoElecsTwoCores1stDerivatives: Atom A and B is same.\n"; | |
112 | + this->errorMessageCalcDiatomicTwoElecsTwoCores2ndDerivativesSameAtoms | |
113 | + = "Error in pm3::Pm3D::CalcDiatomicTwoElecsTwoCores2ndDerivatives: Atom A and B is same.\n"; | |
114 | + this->errorMessageCalcDiatomicTwoElecsTwoCoresNullMatrix | |
115 | + = "Error in pm3::Pm3D::CalcDiatomicTwoElecsTwoCores: The two elec two core diatomic matrix is NULL.\n"; | |
116 | + this->errorMessageCalcDiatomicTwoElecsTwoCores1stDerivativesNullMatrix | |
117 | + = "Error in pm3::Pm3D::CalcDiatomicTwoElecsTwoCores1stDerivatives: The two elec two core diatomic matrix is NULL.\n"; | |
118 | + this->errorMessageCalcDiatomicTwoElecsTwoCores2ndDerivativesNullMatrix | |
119 | + = "Error in pm3::Pm3D::CalcDiatomicTwoElecsTwoCores2ndDerivatives: The two elec two core diatomic matrix is NULL.\n"; | |
112 | 120 | this->errorMessageGetElectronicEnergyEnergyNotCalculated |
113 | 121 | = "Error in pm3::Pm3D::GetElectronicEnergy: Set electronic state is not calculated by CIS.\n"; |
114 | 122 | this->errorMessageGetElectronicEnergyNULLCISEnergy |
@@ -84,31 +84,39 @@ void Pm3Pddg::SetMessages(){ | ||
84 | 84 | = "Error in pm3::Pm3Pddg::CalcCISMatrix: Non available orbital is contained.\n"; |
85 | 85 | this->errorMessageDavidsonNotConverged = "Error in pm3::Pm3Pddg::DoCISDavidson: Davidson did not met convergence criterion. \n"; |
86 | 86 | this->errorMessageGetSemiEmpiricalMultipoleInteractionBadMultipoles |
87 | - = "Error in pm3:: Pm3Pddg::GetSemiEmpiricalMultipoleInteraction: Bad multipole combintaion is set\n"; | |
87 | + = "Error in pm3::Pm3Pddg::GetSemiEmpiricalMultipoleInteraction: Bad multipole combintaion is set\n"; | |
88 | + this->errorMessageGetSemiEmpiricalMultipoleInteractionBadAtomTypes | |
89 | + = "Error in pm3::Pm3Pddg::GetSemiEmpiricalMultipoleInteraction: Bad atom types are set\n"; | |
88 | 90 | this->errorMessageGetSemiEmpiricalMultipoleInteraction1stDeriBadMultipoles |
89 | - = "Error in pm3:: Pm3Pddg::GetSemiEmpiricalMultipoleInteraction1stDerivative: Bad multipole combintaion is set\n"; | |
91 | + = "Error in pm3::Pm3Pddg::GetSemiEmpiricalMultipoleInteraction1stDerivative: Bad multipole combintaion is set\n"; | |
90 | 92 | this->errorMessageGetSemiEmpiricalMultipoleInteraction2ndDeriBadMultipoles |
91 | - = "Error in pm3:: Pm3Pddg::GetSemiEmpiricalMultipoleInteraction2ndDerivative: Bad multipole combintaion is set\n"; | |
93 | + = "Error in pm3::Pm3Pddg::GetSemiEmpiricalMultipoleInteraction2ndDerivative: Bad multipole combintaion is set\n"; | |
92 | 94 | this->errorMessageGetNddoRepulsionIntegral |
93 | 95 | = "Error in pm3::Pm3Pddg::GetNddoRepulsionIntegral: Bad orbital is set.\n"; |
96 | + this->errorMessageGetNddoRepulsionIntegralBadAtomTypes | |
97 | + = "Error in pm3::Pm3Pddg::GetNddoRepulsionIntegral: Bad atom types are set.\n"; | |
94 | 98 | this->errorMessageGetNddoRepulsionIntegral1stDerivative |
95 | 99 | = "Error in pm3::Pm3Pddg::GetNddoRepulsionIntegral1stDerivative: Bad orbital is set.\n"; |
96 | 100 | this->errorMessageGetNddoRepulsionIntegral2ndDerivative |
97 | 101 | = "Error in pm3::Pm3Pddg::GetNddoRepulsionIntegral2ndDerivative: Bad orbital is set.\n"; |
98 | - this->errorMessageCalcTwoElecTwoCoreNullMatrix | |
99 | - = "Error in pm3::Pm3Pddg::CalcTwoElecTwoCore: The two elec two core matrix is NULL.\n"; | |
100 | - this->errorMessageCalcDiatomicTwoElecTwoCoreSameAtoms | |
101 | - = "Error in pm3::Pm3Pddg::CalcDiatomicTwoElecTwoCore: Atom A and B is same.\n"; | |
102 | - this->errorMessageCalcDiatomicTwoElecTwoCore1stDerivativesSameAtoms | |
103 | - = "Error in pm3::Pm3Pddg::CalcDiatomicTwoElecTwoCore1stDerivatives: Atom A and B is same.\n"; | |
104 | - this->errorMessageCalcDiatomicTwoElecTwoCore2ndDerivativesSameAtoms | |
105 | - = "Error in pm3::Pm3Pddg::CalcDiatomicTwoElecTwoCore2ndDerivatives: Atom A and B is same.\n"; | |
106 | - this->errorMessageCalcDiatomicTwoElecTwoCoreNullMatrix | |
107 | - = "Error in pm3::Pm3Pddg::CalcDiatomicTwoElecTwoCore: The two elec two core diatomic matrix is NULL.\n"; | |
108 | - this->errorMessageCalcDiatomicTwoElecTwoCore1stDerivativesNullMatrix | |
109 | - = "Error in pm3::Pm3Pddg::CalcDiatomicTwoElecTwoCore1stDerivatives: The two elec two core diatomic matrix is NULL.\n"; | |
110 | - this->errorMessageCalcDiatomicTwoElecTwoCore2ndDerivativesNullMatrix | |
111 | - = "Error in pm3::Pm3Pddg::CalcDiatomicTwoElecTwoCore2ndDerivatives: The two elec two core diatomic matrix is NULL.\n"; | |
102 | + this->errorMessageCalcTwoElecsTwoAtomCoresNullMatrix | |
103 | + = "Error in pm3::Pm3Pddg::CalcTwoElecsTwoAtomCores: The two elec two atom core matrix is NULL.\n"; | |
104 | + this->errorMessageCalcTwoElecsAtomEpcCoresNullMatrix | |
105 | + = "Error in pm3::Pm3Pddg::CalcTwoElecsAtomEpcCores: The two elec atom-epc core matrix is NULL.\n"; | |
106 | + this->errorMessageCalcDiatomicTwoElecsTwoCoresSameAtoms | |
107 | + = "Error in pm3::Pm3Pddg::CalcDiatomicTwoElecsTwoCores: Atom A and B is same atom (not EPC).\n"; | |
108 | + this->errorMessageCalcDiatomicTwoElecsTwoCoresSameEpcs | |
109 | + = "Error in pm3::Pm3Pddg::CalcDiatomicTwoElecsTwoCores: Atom A and B is same EPC.\n"; | |
110 | + this->errorMessageCalcDiatomicTwoElecsTwoCores1stDerivativesSameAtoms | |
111 | + = "Error in pm3::Pm3Pddg::CalcDiatomicTwoElecsTwoCores1stDerivatives: Atom A and B is same.\n"; | |
112 | + this->errorMessageCalcDiatomicTwoElecsTwoCores2ndDerivativesSameAtoms | |
113 | + = "Error in pm3::Pm3Pddg::CalcDiatomicTwoElecsTwoCores2ndDerivatives: Atom A and B is same.\n"; | |
114 | + this->errorMessageCalcDiatomicTwoElecsTwoCoresNullMatrix | |
115 | + = "Error in pm3::Pm3Pddg::CalcDiatomicTwoElecsTwoCores: The two elec two core diatomic matrix is NULL.\n"; | |
116 | + this->errorMessageCalcDiatomicTwoElecsTwoCores1stDerivativesNullMatrix | |
117 | + = "Error in pm3::Pm3Pddg::CalcDiatomicTwoElecsTwoCores1stDerivatives: The two elec two core diatomic matrix is NULL.\n"; | |
118 | + this->errorMessageCalcDiatomicTwoElecsTwoCores2ndDerivativesNullMatrix | |
119 | + = "Error in pm3::Pm3Pddg::CalcDiatomicTwoElecsTwoCores2ndDerivatives: The two elec two core diatomic matrix is NULL.\n"; | |
112 | 120 | this->errorMessageGetElectronicEnergyEnergyNotCalculated |
113 | 121 | = "Error in pm3::Pm3Pddg::GetElectronicEnergy: Set electronic state is not calculated by CIS.\n"; |
114 | 122 | this->errorMessageGetElectronicEnergyNULLCISEnergy |
@@ -224,7 +224,7 @@ double ZindoS::GetFockDiagElement(const Atom& atomA, | ||
224 | 224 | double const* const* gammaAB, |
225 | 225 | double const* const* orbitalElectronPopulation, |
226 | 226 | double const* atomicElectronPopulation, |
227 | - double const* const* const* const* const* const* twoElecTwoCore, | |
227 | + double const* const* const* const* const* const* twoElecsTwoAtomCores, | |
228 | 228 | bool isGuess) const{ |
229 | 229 | double value=0.0; |
230 | 230 | int firstAOIndexA = atomA.GetFirstAOIndex(); |
@@ -289,7 +289,7 @@ double ZindoS::GetFockOffDiagElement(const Atom& atomA, | ||
289 | 289 | double const* const* gammaAB, |
290 | 290 | double const* const* overlapAOs, |
291 | 291 | double const* const* orbitalElectronPopulation, |
292 | - double const* const* const* const* const* const* twoElecTwoCore, | |
292 | + double const* const* const* const* const* const* twoElecsTwoAtomCores, | |
293 | 293 | bool isGuess) const{ |
294 | 294 | double value = 0.0; |
295 | 295 | OrbitalType orbitalMu = atomA.GetValence(mu-atomA.GetFirstAOIndex()); |
@@ -585,8 +585,9 @@ double ZindoS::GetExchangeInt(OrbitalType orbital1, OrbitalType orbital2, const | ||
585 | 585 | return value; |
586 | 586 | } |
587 | 587 | |
588 | -void ZindoS::CalcTwoElecTwoCore(double****** twoElecTwoCore, | |
589 | - const Molecule& molecule) const{ | |
588 | +void ZindoS::CalcTwoElecsTwoCores(double****** twoElecsTwoAtomCores, | |
589 | + double****** twoElecsAtomEpcCores, | |
590 | + const Molecule& molecule) const{ | |
590 | 591 | this->CalcNishimotoMatagaMatrix(this->nishimotoMatagaMatrix, molecule); |
591 | 592 | } |
592 | 593 |
@@ -3635,9 +3636,9 @@ double ZindoS::GetAuxiliaryKNRKRElement(int moI, int moJ, int moK, int moL) cons | ||
3635 | 3636 | return value; |
3636 | 3637 | } |
3637 | 3638 | |
3638 | -void ZindoS::CalcDiatomicTwoElecTwoCore1stDerivatives(double*** matrix, | |
3639 | - int indexAtomA, | |
3640 | - int indexAtomB) const{ | |
3639 | +void ZindoS::CalcDiatomicTwoElecsTwoCores1stDerivatives(double*** matrix, | |
3640 | + int indexAtomA, | |
3641 | + int indexAtomB) const{ | |
3641 | 3642 | const Atom& atomA = *molecule->GetAtom(indexAtomA); |
3642 | 3643 | const int firstAOIndexA = atomA.GetFirstAOIndex(); |
3643 | 3644 | const int lastAOIndexA = atomA.GetLastAOIndex(); |
@@ -3680,7 +3681,7 @@ void ZindoS::CalcForce(const vector<int>& elecStates){ | ||
3680 | 3681 | #pragma omp parallel |
3681 | 3682 | { |
3682 | 3683 | double*** diatomicOverlapAOs1stDerivs = NULL; |
3683 | - double*** diatomicTwoElecTwoCore1stDerivs = NULL; | |
3684 | + double*** diatomicTwoElecsTwoCores1stDerivs = NULL; | |
3684 | 3685 | double** tmpDiaOverlapAOsInDiaFrame = NULL; // diatomic overlapAOs in diatomic frame |
3685 | 3686 | double** tmpDiaOverlapAOs1stDerivInDiaFrame = NULL; // first derivative of the diaOverlapAOs. This derivative is related to the distance between two atoms. |
3686 | 3687 | double** tmpRotMat = NULL; // rotating Matrix from the diatomic frame to space fixed frame. |
@@ -3692,7 +3693,7 @@ void ZindoS::CalcForce(const vector<int>& elecStates){ | ||
3692 | 3693 | double* tmpVectorBC = NULL; // used in dgemmm |
3693 | 3694 | try{ |
3694 | 3695 | MallocTempMatricesCalcForce(&diatomicOverlapAOs1stDerivs, |
3695 | - &diatomicTwoElecTwoCore1stDerivs, | |
3696 | + &diatomicTwoElecsTwoCores1stDerivs, | |
3696 | 3697 | &tmpDiaOverlapAOsInDiaFrame, |
3697 | 3698 | &tmpDiaOverlapAOs1stDerivInDiaFrame, |
3698 | 3699 | &tmpRotMat, |
@@ -3725,7 +3726,7 @@ void ZindoS::CalcForce(const vector<int>& elecStates){ | ||
3725 | 3726 | atomB); |
3726 | 3727 | |
3727 | 3728 | // calc. first derivative of two elec two core interaction by Nishimoto-Mataga |
3728 | - this->CalcDiatomicTwoElecTwoCore1stDerivatives(diatomicTwoElecTwoCore1stDerivs, a, b); | |
3729 | + this->CalcDiatomicTwoElecsTwoCores1stDerivatives(diatomicTwoElecsTwoCores1stDerivs, a, b); | |
3729 | 3730 | |
3730 | 3731 | double coreRepulsion [CartesianType_end] = {0.0,0.0,0.0}; |
3731 | 3732 | double forceElecCoreAttPart[CartesianType_end] = {0.0,0.0,0.0}; |
@@ -3738,7 +3739,7 @@ void ZindoS::CalcForce(const vector<int>& elecStates){ | ||
3738 | 3739 | // electron core attraction part (ground state) |
3739 | 3740 | forceElecCoreAttPart[i] = ( atomA.GetCoreCharge()*atomicElectronPopulation[b] |
3740 | 3741 | +atomB.GetCoreCharge()*atomicElectronPopulation[a]) |
3741 | - *diatomicTwoElecTwoCore1stDerivs[s][s][i]; | |
3742 | + *diatomicTwoElecsTwoCores1stDerivs[s][s][i]; | |
3742 | 3743 | } |
3743 | 3744 | double forceOverlapAOsPart [CartesianType_end] = {0.0,0.0,0.0}; |
3744 | 3745 | double forceTwoElecPart [CartesianType_end] = {0.0,0.0,0.0}; |
@@ -3757,7 +3758,7 @@ void ZindoS::CalcForce(const vector<int>& elecStates){ | ||
3757 | 3758 | forceTwoElecPart[i] += (this->orbitalElectronPopulation[mu][mu] |
3758 | 3759 | *this->orbitalElectronPopulation[nu][nu] |
3759 | 3760 | -0.5*pow(this->orbitalElectronPopulation[mu][nu],2.0)) |
3760 | - *diatomicTwoElecTwoCore1stDerivs[mu-firstAOIndexA][nu-firstAOIndexB][i]; | |
3761 | + *diatomicTwoElecsTwoCores1stDerivs[mu-firstAOIndexA][nu-firstAOIndexB][i]; | |
3761 | 3762 | } |
3762 | 3763 | } |
3763 | 3764 | } |
@@ -3782,7 +3783,7 @@ void ZindoS::CalcForce(const vector<int>& elecStates){ | ||
3782 | 3783 | n, |
3783 | 3784 | a, |
3784 | 3785 | b, |
3785 | - diatomicTwoElecTwoCore1stDerivs); | |
3786 | + diatomicTwoElecsTwoCores1stDerivs); | |
3786 | 3787 | // sum up contributions from static part (excited state) |
3787 | 3788 | #pragma omp critical |
3788 | 3789 | { |
@@ -3800,7 +3801,7 @@ void ZindoS::CalcForce(const vector<int>& elecStates){ | ||
3800 | 3801 | n, |
3801 | 3802 | a, |
3802 | 3803 | b, |
3803 | - diatomicTwoElecTwoCore1stDerivs); | |
3804 | + diatomicTwoElecsTwoCores1stDerivs); | |
3804 | 3805 | // overlapAOs part (excited states) |
3805 | 3806 | double forceExcitedOverlapAOsPart[CartesianType_end] = {0.0,0.0,0.0}; |
3806 | 3807 | this->CalcForceExcitedOverlapAOsPart(forceExcitedOverlapAOsPart, |
@@ -3814,7 +3815,7 @@ void ZindoS::CalcForce(const vector<int>& elecStates){ | ||
3814 | 3815 | n, |
3815 | 3816 | a, |
3816 | 3817 | b, |
3817 | - diatomicTwoElecTwoCore1stDerivs); | |
3818 | + diatomicTwoElecsTwoCores1stDerivs); | |
3818 | 3819 | // sum up contributions from response part (excited state) |
3819 | 3820 | #pragma omp critical |
3820 | 3821 | { |
@@ -3835,7 +3836,7 @@ void ZindoS::CalcForce(const vector<int>& elecStates){ | ||
3835 | 3836 | ex.Serialize(ompErrors); |
3836 | 3837 | } |
3837 | 3838 | FreeTempMatricesCalcForce(&diatomicOverlapAOs1stDerivs, |
3838 | - &diatomicTwoElecTwoCore1stDerivs, | |
3839 | + &diatomicTwoElecsTwoCores1stDerivs, | |
3839 | 3840 | &tmpDiaOverlapAOsInDiaFrame, |
3840 | 3841 | &tmpDiaOverlapAOs1stDerivInDiaFrame, |
3841 | 3842 | &tmpRotMat, |
@@ -3940,7 +3941,7 @@ void ZindoS::CalcForce(const vector<int>& elecStates){ | ||
3940 | 3941 | } |
3941 | 3942 | |
3942 | 3943 | void ZindoS::MallocTempMatricesCalcForce(double**** diatomicOverlapAOs1stDerivs, |
3943 | - double**** diatomicTwoElecTwoCore1stDerivs, | |
3944 | + double**** diatomicTwoElecsTwoCores1stDerivs, | |
3944 | 3945 | double*** tmpDiaOverlapAOsInDiaFrame, |
3945 | 3946 | double*** tmpDiaOverlapAOs1stDerivInDiaFrame, |
3946 | 3947 | double*** tmpRotMat, |
@@ -3951,7 +3952,7 @@ void ZindoS::MallocTempMatricesCalcForce(double**** diatomicOverlapAOs1stDerivs, | ||
3951 | 3952 | double*** tmpMatrixBC, |
3952 | 3953 | double** tmpVectorBC) const{ |
3953 | 3954 | MallocerFreer::GetInstance()->Malloc<double>(diatomicOverlapAOs1stDerivs, OrbitalType_end, OrbitalType_end, CartesianType_end); |
3954 | - MallocerFreer::GetInstance()->Malloc<double>(diatomicTwoElecTwoCore1stDerivs, OrbitalType_end, OrbitalType_end, CartesianType_end); | |
3955 | + MallocerFreer::GetInstance()->Malloc<double>(diatomicTwoElecsTwoCores1stDerivs, OrbitalType_end, OrbitalType_end, CartesianType_end); | |
3955 | 3956 | MallocerFreer::GetInstance()->Malloc<double>(tmpDiaOverlapAOsInDiaFrame, OrbitalType_end, OrbitalType_end); |
3956 | 3957 | MallocerFreer::GetInstance()->Malloc<double>(tmpDiaOverlapAOs1stDerivInDiaFrame, OrbitalType_end, OrbitalType_end); |
3957 | 3958 | MallocerFreer::GetInstance()->Malloc<double>(tmpRotMat, OrbitalType_end, OrbitalType_end); |
@@ -3964,7 +3965,7 @@ void ZindoS::MallocTempMatricesCalcForce(double**** diatomicOverlapAOs1stDerivs, | ||
3964 | 3965 | } |
3965 | 3966 | |
3966 | 3967 | void ZindoS::FreeTempMatricesCalcForce(double**** diatomicOverlapAOs1stDerivs, |
3967 | - double**** diatomicTwoElecTwoCore1stDerivs, | |
3968 | + double**** diatomicTwoElecsTwoCores1stDerivs, | |
3968 | 3969 | double*** tmpDiaOverlapAOsInDiaFrame, |
3969 | 3970 | double*** tmpDiaOverlapAOs1stDerivInDiaFrame, |
3970 | 3971 | double*** tmpRotMat, |
@@ -3975,7 +3976,7 @@ void ZindoS::FreeTempMatricesCalcForce(double**** diatomicOverlapAOs1stDerivs, | ||
3975 | 3976 | double*** tmpMatrixBC, |
3976 | 3977 | double** tmpVectorBC) const{ |
3977 | 3978 | MallocerFreer::GetInstance()->Free<double>(diatomicOverlapAOs1stDerivs, OrbitalType_end, OrbitalType_end, CartesianType_end); |
3978 | - MallocerFreer::GetInstance()->Free<double>(diatomicTwoElecTwoCore1stDerivs, OrbitalType_end, OrbitalType_end, CartesianType_end); | |
3979 | + MallocerFreer::GetInstance()->Free<double>(diatomicTwoElecsTwoCores1stDerivs, OrbitalType_end, OrbitalType_end, CartesianType_end); | |
3979 | 3980 | MallocerFreer::GetInstance()->Free<double>(tmpDiaOverlapAOsInDiaFrame, OrbitalType_end, OrbitalType_end); |
3980 | 3981 | MallocerFreer::GetInstance()->Free<double>(tmpDiaOverlapAOs1stDerivInDiaFrame, OrbitalType_end, OrbitalType_end); |
3981 | 3982 | MallocerFreer::GetInstance()->Free<double>(tmpRotMat, OrbitalType_end, OrbitalType_end); |
@@ -3991,7 +3992,7 @@ void ZindoS::CalcForceExcitedStaticPart(double* force, | ||
3991 | 3992 | int elecStateIndex, |
3992 | 3993 | int indexAtomA, |
3993 | 3994 | int indexAtomB, |
3994 | - double const* const* const* diatomicTwoElecTwoCore1stDerivs) const{ | |
3995 | + double const* const* const* diatomicTwoElecsTwoCores1stDerivs) const{ | |
3995 | 3996 | const Atom& atomA = *this->molecule->GetAtom(indexAtomA); |
3996 | 3997 | const Atom& atomB = *this->molecule->GetAtom(indexAtomB); |
3997 | 3998 | int firstAOIndexA = atomA.GetFirstAOIndex(); |
@@ -4006,9 +4007,9 @@ void ZindoS::CalcForceExcitedStaticPart(double* force, | ||
4006 | 4007 | -1.0*this->etaMatrixForce[elecStateIndex][mu][lambda] |
4007 | 4008 | *this->etaMatrixForce[elecStateIndex][mu][lambda]; |
4008 | 4009 | force[i] += temp |
4009 | - *diatomicTwoElecTwoCore1stDerivs[mu-firstAOIndexA] | |
4010 | - [lambda-firstAOIndexB] | |
4011 | - [i]; | |
4010 | + *diatomicTwoElecsTwoCores1stDerivs[mu-firstAOIndexA] | |
4011 | + [lambda-firstAOIndexB] | |
4012 | + [i]; | |
4012 | 4013 | } |
4013 | 4014 | } |
4014 | 4015 | } |
@@ -4018,7 +4019,7 @@ void ZindoS::CalcForceExcitedElecCoreAttractionPart(double* force, | ||
4018 | 4019 | int elecStateIndex, |
4019 | 4020 | int indexAtomA, |
4020 | 4021 | int indexAtomB, |
4021 | - double const* const* const* diatomicTwoElecTwoCore1stDerivs) const{ | |
4022 | + double const* const* const* diatomicTwoElecsTwoCores1stDerivs) const{ | |
4022 | 4023 | const Atom& atomA = *this->molecule->GetAtom(indexAtomA); |
4023 | 4024 | const Atom& atomB = *this->molecule->GetAtom(indexAtomB); |
4024 | 4025 | int firstAOIndexA = atomA.GetFirstAOIndex(); |
@@ -4027,7 +4028,7 @@ void ZindoS::CalcForceExcitedElecCoreAttractionPart(double* force, | ||
4027 | 4028 | for(int i=0; i<CartesianType_end; i++){ |
4028 | 4029 | force[i] += this->zMatrixForce[elecStateIndex][mu][mu] |
4029 | 4030 | *atomB.GetCoreCharge() |
4030 | - *diatomicTwoElecTwoCore1stDerivs[mu-firstAOIndexA][s][i]; | |
4031 | + *diatomicTwoElecsTwoCores1stDerivs[mu-firstAOIndexA][s][i]; | |
4031 | 4032 | } |
4032 | 4033 | } |
4033 | 4034 | } |
@@ -4066,7 +4067,7 @@ void ZindoS::CalcForceExcitedTwoElecPart(double* force, | ||
4066 | 4067 | int elecStateIndex, |
4067 | 4068 | int indexAtomA, |
4068 | 4069 | int indexAtomB, |
4069 | - double const* const* const* diatomicTwoElecTwoCore1stDerivs) const{ | |
4070 | + double const* const* const* diatomicTwoElecsTwoCores1stDerivs) const{ | |
4070 | 4071 | const Atom& atomA = *this->molecule->GetAtom(indexAtomA); |
4071 | 4072 | const Atom& atomB = *this->molecule->GetAtom(indexAtomB); |
4072 | 4073 | int firstAOIndexA = atomA.GetFirstAOIndex(); |
@@ -4078,15 +4079,15 @@ void ZindoS::CalcForceExcitedTwoElecPart(double* force, | ||
4078 | 4079 | for(int i=0; i<CartesianType_end; i++){ |
4079 | 4080 | force[i] -= this->zMatrixForce[elecStateIndex][mu][mu] |
4080 | 4081 | *this->orbitalElectronPopulation[lambda][lambda] |
4081 | - *diatomicTwoElecTwoCore1stDerivs[mu-firstAOIndexA] | |
4082 | - [lambda-firstAOIndexB] | |
4083 | - [i]; | |
4082 | + *diatomicTwoElecsTwoCores1stDerivs[mu-firstAOIndexA] | |
4083 | + [lambda-firstAOIndexB] | |
4084 | + [i]; | |
4084 | 4085 | force[i] += 0.50 |
4085 | 4086 | *this->zMatrixForce[elecStateIndex][mu][lambda] |
4086 | 4087 | *this->orbitalElectronPopulation[mu][lambda] |
4087 | - *diatomicTwoElecTwoCore1stDerivs[mu-firstAOIndexA] | |
4088 | - [lambda-firstAOIndexB] | |
4089 | - [i]; | |
4088 | + *diatomicTwoElecsTwoCores1stDerivs[mu-firstAOIndexA] | |
4089 | + [lambda-firstAOIndexB] | |
4090 | + [i]; | |
4090 | 4091 | } |
4091 | 4092 | } |
4092 | 4093 | } |
@@ -70,7 +70,7 @@ protected: | ||
70 | 70 | double const* const* gammaAB, |
71 | 71 | double const* const* orbitalElectronPopulation, |
72 | 72 | double const* atomicElectronPopulation, |
73 | - double const* const* const* const* const* const* twoElecTwoCore, | |
73 | + double const* const* const* const* const* const* twoElecsTwoAtomCores, | |
74 | 74 | bool isGuess) const; |
75 | 75 | virtual double GetFockOffDiagElement(const MolDS_base_atoms::Atom& atomA, |
76 | 76 | const MolDS_base_atoms::Atom& atomB, |
@@ -81,7 +81,7 @@ protected: | ||
81 | 81 | double const* const* gammaAB, |
82 | 82 | double const* const* overelap, |
83 | 83 | double const* const* orbitalElectronPopulation, |
84 | - double const* const* const* const* const* const* twoElecTwoCore, | |
84 | + double const* const* const* const* const* const* twoElecsTwoAtomCores, | |
85 | 85 | bool isGuess) const; |
86 | 86 | virtual void CalcDiatomicOverlapAOsInDiatomicFrame(double** diatomicOverlapAOs, |
87 | 87 | const MolDS_base_atoms::Atom& atomA, |
@@ -98,8 +98,9 @@ protected: | ||
98 | 98 | virtual double GetExchangeInt(MolDS_base::OrbitalType orbital1, |
99 | 99 | MolDS_base::OrbitalType orbital2, |
100 | 100 | const MolDS_base_atoms::Atom& atom) const; // Apendix in [BZ_1979] |
101 | - virtual void CalcTwoElecTwoCore(double****** twoElecTwoCore, | |
102 | - const MolDS_base::Molecule& molecule) const; | |
101 | + virtual void CalcTwoElecsTwoCores(double****** twoElecsTwoAtomCores, | |
102 | + double****** twoElecsAtomEpcCores, | |
103 | + const MolDS_base::Molecule& molecule) const; | |
103 | 104 | virtual double GetMolecularIntegralElement(int moI, |
104 | 105 | int moJ, |
105 | 106 | int moK, |
@@ -268,11 +269,11 @@ private: | ||
268 | 269 | void FreeDavidsonRoopCISTemporaryMtrices(double*** interactionMatrix, |
269 | 270 | int interactionMatrixDimension, |
270 | 271 | double** interactionEigenEnergies) const; |
271 | - void CalcDiatomicTwoElecTwoCore1stDerivatives(double*** matrix, | |
272 | - int indexAtomA, | |
273 | - int indexAtomB) const; | |
272 | + void CalcDiatomicTwoElecsTwoCores1stDerivatives(double*** matrix, | |
273 | + int indexAtomA, | |
274 | + int indexAtomB) const; | |
274 | 275 | void MallocTempMatricesCalcForce(double**** diatomicOverlapAOs1stDerivs, |
275 | - double**** diatomicTwoElecTwoCore1stDerivs, | |
276 | + double**** diatomicTwoElecsTwoCores1stDerivs, | |
276 | 277 | double*** tmpDiaOverlapAOsInDiaFrame, |
277 | 278 | double*** tmpDiaOverlapAOs1stDerivInDiaFrame, |
278 | 279 | double*** tmpRotMat, |
@@ -283,7 +284,7 @@ private: | ||
283 | 284 | double*** tmpMatrixBC, |
284 | 285 | double** tmpVectorBC) const; |
285 | 286 | void FreeTempMatricesCalcForce(double**** diatomicOverlapAOs1stDerivs, |
286 | - double**** diatomicTwoElecTwoCore1stDerivs, | |
287 | + double**** diatomicTwoElecsTwoCores1stDerivs, | |
287 | 288 | double*** tmpDiaOverlapAOsInDiaFrame, |
288 | 289 | double*** tmpDiaOverlapAOs1stDerivInDiaFrame, |
289 | 290 | double*** tmpRotMat, |
@@ -297,17 +298,17 @@ private: | ||
297 | 298 | int elecStateIndex, |
298 | 299 | int indexAtomA, |
299 | 300 | int indexAtomB, |
300 | - double const* const* const* diatomicTwoElecTwoCore1stDerivs) const; | |
301 | + double const* const* const* diatomicTwoElecsTwoCores1stDerivs) const; | |
301 | 302 | void CalcForceExcitedElecCoreAttractionPart(double* force, |
302 | 303 | int elecStateIndex, |
303 | 304 | int indexAtomA, |
304 | 305 | int indexAtomB, |
305 | - double const* const* const* diatomicTwoElecTwoCore1stDerivs) const; | |
306 | + double const* const* const* diatomicTwoElecsTwoCores1stDerivs) const; | |
306 | 307 | void CalcForceExcitedTwoElecPart(double* force, |
307 | 308 | int elecStateIndex, |
308 | 309 | int indexAtomA, |
309 | 310 | int indexAtomB, |
310 | - double const* const* const* diatomicTwoElecTwoCore1stDerivs) const; | |
311 | + double const* const* const* diatomicTwoElecsTwoCores1stDerivs) const; | |
311 | 312 | void CheckZMatrixForce(const std::vector<int>& elecStates); |
312 | 313 | void CheckEtaMatrixForce(const std::vector<int>& elecStates); |
313 | 314 | double GetZMatrixForceElement(double const* y, |