• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

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

Commit MetaInfo

Revision5226ceb691d257aead87c2462639849b4c3b5251 (tree)
Time2013-12-19 11:21:10
AuthorMikiya Fujii <mikiya.fujii@gmai...>
CommiterMikiya Fujii

Log Message

trunk.r1577 is merged to fx10. This merge is related to #32299, #31850, #32309, #32319, #32235, #32380, #32381, and #32469. #32094

git-svn-id: https://svn.sourceforge.jp/svnroot/molds/branches/fx10@1578 1136aad2-a195-0410-b898-f5ea1d11b9d8

Change Summary

Incremental Difference

--- a/doc/README.txt
+++ b/doc/README.txt
@@ -51,13 +51,17 @@ REQUIREMENTS:
5151 To get and install the OpenBLAS-libraries, see the HP:<http://xianyi.github.com/OpenBLAS/>.
5252 The version of the OpenBLAS would be no problem if 0.2.5 or later is used.
5353 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
5558
5659 ==============================================================================
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.
5963
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)
6165 Change the "BOOST_TOP_DIR" in Makefile to the top directory of the
6266 Boost C++ Libraries in your systems.
6367
@@ -67,7 +71,7 @@ COMPILE(using GNUmake):
6771 To compile MolDS on 64 bits machine,
6872 $ make INTEL=64
6973
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)
7175 Change the "BOOST_TOP_DIR" in Makefile to the top directory of the
7276 Boost C++ Libraries in your systems.
7377
@@ -77,8 +81,7 @@ COMPILE(using GNUmake):
7781 To compile MolDS on 64 bits machine,
7882 $ make INTEL=64 CC=mpicxx
7983
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++):
8285 Change the "BOOST_TOP_DIR" in "Makefile_GNU" to the top directory of the
8386 Boost C++ Libraries in your systems.
8487 Change the "OPENBLAS_TOP_DIR" in "Makefile_GNU" to the top directory of the
@@ -193,27 +196,39 @@ CAPABILITIES:
193196 ==============================================================================
194197 HOW TO WRITE INPUT:
195198
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+
196203 <Comment Out>
197204 Lines starting with "//" or "#" in input-files are treated as comments.
198205
199- <SCF>
206+ <Theory>
200207 Write "cndo/2", "indo", "zindo/s", "mndo", "am1", "am1-d",
201208 "pm3", "pm3-d", or "pm3/pddg" in theory-directive.
202209 This theory-directive indicate a electronic structure theory used in your simulations.
203210 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.
206211
207212 E.g.
208213 THEORY
209214 indo
210215 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
211224
212225 -options
213226 Write below options in SCF-directive.
214227 "max_iter", "rms_density", "damping_thresh", "damping_weight",
215228 "diis_num_error_vect", "diis_start_error", "diis_end_error",
216229 "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.
217232
218233 The default value of the "max_iter" is 100.
219234 The default value of the "rms_density" is 10**(-8.0).
@@ -256,7 +271,25 @@ HOW TO WRITE INPUT:
256271 vdW_s6 0.75
257272 vdW_d 30
258273 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+
260293 <MEMORY>
261294 For settings of memory usage, write options in memory-directive.
262295
@@ -276,26 +309,6 @@ HOW TO WRITE INPUT:
276309 limit_heap 512
277310 MEMORY_END
278311
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-
299312 <MO Plot>
300313 write MO plot directive.
301314
@@ -328,6 +341,66 @@ HOW TO WRITE INPUT:
328341 file_prefix MOPlot_
329342 MOPLOT_END
330343
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+
331404 <CIS>
332405 Write CIS-directive.
333406
@@ -481,15 +554,15 @@ HOW TO WRITE INPUT:
481554 PARTICLEPLOT_END
482555
483556 <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.
485558 In the early stage the line search algorythm is used,
486559 then the algorythm used in this module is switched to steepest descent algorythm.
487560 Note that ZINDO/S is not suitable for geometry optimizations.
488561
489562 E.g.
490- OPTIMIZE
563+ OPTIMIZATION
491564 (options)
492- OPTIMIZE_END
565+ OPTIMIZATION_END
493566
494567 -options
495568 "method", "total_steps", "electronic_state", "max_gradient", "rms_gradient",
@@ -528,16 +601,14 @@ HOW TO WRITE INPUT:
528601 This parameter have no effect if method is "steepest_descent" or "conjugate_gradient".
529602
530603 E.g.
531- OPTIMIZE
604+ OPTIMIZATION
532605 method steepest_descent
533606 total_steps 50
534607 electronic_state 0
535608 max_gradient 0.00045
536609 rms_gradient 0.00030
537610 dt 50
538- OPTIMIZE_END
539-
540-
611+ OPTIMIZATION_END
541612
542613 <MD (Molecular dynamics)>
543614 Write MD-directive. Note that ZINDO/S is not suitable for molcular dynamics simulations.
@@ -708,7 +779,6 @@ HOW TO WRITE INPUT:
708779 "angles" indicates Euler angles for the rotation in degree unit.
709780 The default values of "angles" are 0, 0, and 0.
710781 This option is valid only for "type" set as Euler angles.
711-
712782
713783 E.g. for "type" set as axis
714784 ROTATE
@@ -724,7 +794,6 @@ HOW TO WRITE INPUT:
724794 angles 15 25 35
725795 ROTATE_END
726796
727-
728797 <Translate Molecule>
729798 Write translate-directive.
730799
--- a/doc/refferences.txt
+++ b/doc/refferences.txt
@@ -50,6 +50,7 @@
5050 [BFB_1997] M. A. Blanco, M. Fl{\'o}rez, and M. Bermejo, J. Mol. Struct. 419, 19 (1997)
5151 [BB_1998] E. Besalu, J. M. Bofill, Theor. Chem. Acc. 100, 265 (1998)
5252 [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)
5354 [RCJ_2002] M. P. Repasky, J. Chandrasekhar, and W. L. Jorgensen, J. Comp. Chem. 23, 1601 (2002)
5455 [BGRJ_2003] I. T.-Brohman, C. R. W. Guimar\~{a}es, M. P. Repasky, and W. L. Jorgensen, J. Comp. Chem. 25, 138 (2003)
5556 [S_2004] J. J. P. Stewart, J. Mol. Model. 10, 155 (2004)
--- a/src/Makefile
+++ b/src/Makefile
@@ -37,9 +37,9 @@ EXENAME = molds
3737 DEPFILE = obj/objfile.dep
3838 LDFLAGS =
3939
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
4343
4444 $(EXENAME): $(ALL_OBJ_FILES)
4545 $(CC) -o $@ -Wl,-rpath=$(BOOST_LIB_DIR) -L$(BOOST_LIB_DIR) $(LDFLAGS) $(ALL_OBJ_FILES) $(LIBS)
--- a/src/Makefile_FX10
+++ b/src/Makefile_FX10
@@ -28,9 +28,9 @@ EXENAME = molds
2828 DEPFILE = obj/objfile.dep
2929 LDFLAGS = -Kfast,openmp -SSL2BLAMP -Xg
3030
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
3434
3535 $(EXENAME): $(ALL_OBJ_FILES)
3636 $(CC) -o $@ $(LDFLAGS) -Wl,-rpath=$(BOOST_LIB_DIR) $(LDFLAGS) $(ALL_OBJ_FILES) -L$(BOOST_LIB_DIR) $(LIBS)
--- a/src/Makefile_GNU
+++ b/src/Makefile_GNU
@@ -34,9 +34,9 @@ EXENAME = molds
3434 DEPFILE = obj/objfile.dep
3535 LDFLAGS =
3636
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
4040
4141 $(EXENAME): $(ALL_OBJ_FILES)
4242 $(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)
--- a/src/am1/Am1.cpp
+++ b/src/am1/Am1.cpp
@@ -81,31 +81,39 @@ void Am1::SetMessages(){
8181 = "Error in am1::Am1::CalcCISMatrix: Non available orbital is contained.\n";
8282 this->errorMessageDavidsonNotConverged = "Error in am1::Am1::DoCISDavidson: Davidson did not met convergence criterion. \n";
8383 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";
8587 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";
8789 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";
8991 this->errorMessageGetNddoRepulsionIntegral
9092 = "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";
9195 this->errorMessageGetNddoRepulsionIntegral1stDerivative
9296 = "Error in am1::Am1::GetNddoRepulsionIntegral1stDerivative: Bad orbital is set.\n";
9397 this->errorMessageGetNddoRepulsionIntegral2ndDerivative
9498 = "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";
109117 this->errorMessageGetElectronicEnergyEnergyNotCalculated
110118 = "Error in am1::Am1::GetElectronicEnergy: Set electronic state is not calculated by CIS.\n";
111119 this->errorMessageGetElectronicEnergyNULLCISEnergy
--- a/src/am1/Am1D.cpp
+++ b/src/am1/Am1D.cpp
@@ -84,30 +84,38 @@ void Am1D::SetMessages(){
8484 this->errorMessageDavidsonNotConverged = "Error in am1::Am1D::DoCISDavidson: Davidson did not met convergence criterion. \n";
8585 this->errorMessageGetSemiEmpiricalMultipoleInteractionBadMultipoles
8686 = "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";
8789 this->errorMessageGetSemiEmpiricalMultipoleInteraction1stDeriBadMultipoles
8890 = "Error in am1::Am1D::GetSemiEmpiricalMultipoleInteraction1stDerivative: Bad multipole combintaion is set\n";
8991 this->errorMessageGetSemiEmpiricalMultipoleInteraction2ndDeriBadMultipoles
9092 = "Error in am1::Am1D::GetSemiEmpiricalMultipoleInteraction2ndDerivative: Bad multipole combintaion is set\n";
9193 this->errorMessageGetNddoRepulsionIntegral
9294 = "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";
9397 this->errorMessageGetNddoRepulsionIntegral1stDerivative
9498 = "Error in am1::Am1D::GetNddoRepulsionIntegral1stDerivative: Bad orbital is set.\n";
9599 this->errorMessageGetNddoRepulsionIntegral2ndDerivative
96100 = "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";
111119 this->errorMessageGetElectronicEnergyEnergyNotCalculated
112120 = "Error in am1::Am1D::GetElectronicEnergy: Set electronic state is not calculated by CIS.\n";
113121 this->errorMessageGetElectronicEnergyNULLCISEnergy
--- a/src/base/Enums.h
+++ b/src/base/Enums.h
@@ -125,6 +125,7 @@ RENUMSTR_BEGIN( AtomType, AtomTypeStr )
125125 RENUMSTR( S, "S" )
126126 RENUMSTR( Cl, "Cl" )
127127 RENUMSTR( Ar, "Ar" )
128+ RENUMSTR( EPC, "Environmental Point Charge" )
128129 RENUMSTR( AtomType_end, "AtomType_end" )
129130 RENUMSTR_END()
130131
--- a/src/base/GTOExpansionSTO.cpp
+++ b/src/base/GTOExpansionSTO.cpp
@@ -111,235 +111,235 @@ void GTOExpansionSTO::SetCoefficientsExponents(){
111111 //STO-1G, k-shell
112112 {
113113 // 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;
115115 }
116116
117117 //STO-1G, l-shell
118118 {
119119 // 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;
121121 // 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;
123123 }
124124
125125 //STO-1G, m-shell
126126 {
127127 // 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;
129129 // 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;
131131 // 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;
133133 }
134134
135135 //STO-2G, k-shell
136136 {
137137 // 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;
140140 }
141141
142142 //STO-2G, l-shell
143143 {
144144 // 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;
147147 // 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;
150150 }
151151
152152 //STO-2G, m-shell
153153 {
154154 // 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;
157157 // 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;
160160 // 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;
163163 }
164164
165165 //STO-3G, k-shell
166166 {
167167 // 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;
171171 }
172172
173173 //STO-3G, l-shell
174174 {
175175 // 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;
179179 // 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;
183183 }
184184
185185 //STO-3G, m-shell
186186 {
187187 // 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;
191191 // 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;
195195 // 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;
199199 }
200200
201201 //STO-4G, k-shell
202202 {
203203 // 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;
208208 }
209209
210210 //STO-4G, l-shell
211211 {
212212 // 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;
217217 // 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;
222222 }
223223
224224 //STO-4G, m-shell
225225 {
226226 // 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;
231231 // 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;
236236 // 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;
241241 }
242242
243243 //STO-5G, k-shell
244244 {
245245 // 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;
251251 }
252252
253253 //STO-5G, l-shell
254254 {
255255 // 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;
261261 // 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;
267267 }
268268
269269 //STO-5G, m-shell
270270 {
271271 // 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;
277277 // 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;
283283 // 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;
289289 }
290290
291291 //STO-6G, k-shell
292292 {
293293 // 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;
300300 }
301301
302302 //STO-6G, l-shell
303303 {
304304 // 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;
311311 // 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;
318318 }
319319
320320 //STO-6G, m-shell
321321 {
322322 // 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;
329329 // 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;
336336 // 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;
343343 }
344344
345345 }
--- a/src/base/InputParser.cpp
+++ b/src/base/InputParser.cpp
@@ -82,6 +82,8 @@ void InputParser::SetMessages(){
8282 = "Error in base::InputParser::GetInputTerms: Input file is empty.\n";
8383 this->errorMessageNotFoundInputFile
8484 = "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";
8587 this->errorMessageNonValidTheoriesMD
8688 = "Error in base::InputParser::ValidateMdConditions: Theory you set is not supported for MD.\n";
8789 this->errorMessageNonValidExcitedStatesMD
@@ -248,6 +250,11 @@ void InputParser::SetMessages(){
248250 this->stringGeometry = "geometry";
249251 this->stringGeometryEnd = "geometry_end";
250252
253+ // Environmental Point Charge
254+ this->stringEpc = "epc";
255+ this->stringEpcEnd = "epc_end";
256+ this->stringEpcCharge = "charge";
257+
251258 // SCF
252259 this->stringScf = "scf";
253260 this->stringScfEnd = "scf_end";
@@ -488,6 +495,26 @@ int InputParser::ParseMolecularGeometry(Molecule* molecule, vector<string>* inpu
488495 return parseIndex;
489496 }
490497
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+
491518 int InputParser::ParseConditionsSCF(vector<string>* inputTerms, int parseIndex) const{
492519 parseIndex++;
493520 while((*inputTerms)[parseIndex].compare(this->stringScfEnd) != 0){
@@ -1169,6 +1196,11 @@ void InputParser::Parse(Molecule* molecule, int argc, char *argv[]) const{
11691196 i = this->ParseMolecularGeometry(molecule, &inputTerms, i);
11701197 }
11711198
1199+ // Environmental Point Charges Configuration(EPC)
1200+ if(inputTerms[i].compare(this->stringEpc) == 0){
1201+ i = this->ParseEpcsConfiguration(molecule, &inputTerms, i);
1202+ }
1203+
11721204 // scf condition
11731205 if(inputTerms[i].compare(this->stringScf) == 0){
11741206 i = this->ParseConditionsSCF(&inputTerms, i);
@@ -1249,6 +1281,7 @@ void InputParser::Parse(Molecule* molecule, int argc, char *argv[]) const{
12491281 // calculate basics and validate conditions
12501282 this->CalcMolecularBasics(molecule);
12511283 this->ValidateVdWConditions();
1284+ this->ValidateEpcConditions(*molecule);
12521285 if(Parameters::GetInstance()->RequiresCIS()){
12531286 this->ValidateCisConditions(*molecule);
12541287 }
@@ -1326,6 +1359,25 @@ void InputParser::ValidateVdWConditions() const{
13261359 }
13271360 }
13281361
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+
13291381 void InputParser::ValidateCisConditions(const Molecule& molecule) const{
13301382
13311383 // direct CIS
@@ -1550,6 +1602,7 @@ void InputParser::OutputMolecularBasics(Molecule* molecule) const{
15501602 molecule->OutputConfiguration();
15511603 molecule->OutputXyzCOM();
15521604 molecule->OutputXyzCOC();
1605+ molecule->OutputEpcs();
15531606 }
15541607
15551608 void InputParser::OutputScfConditions() const{
--- a/src/base/InputParser.h
+++ b/src/base/InputParser.h
@@ -35,6 +35,7 @@ private:
3535 void SetMessages();
3636 std::string errorMessageInputFileEmpty;
3737 std::string errorMessageNotFoundInputFile;
38+ std::string errorMessageNonValidTheoriesEpc;
3839 std::string errorMessageNonValidTheoriesMD;
3940 std::string errorMessageNonValidExcitedStatesMD;
4041 std::string errorMessageNonValidExcitedStatesMC;
@@ -173,6 +174,10 @@ private:
173174 // geometry
174175 std::string stringGeometry;
175176 std::string stringGeometryEnd;
177+ // EPC
178+ std::string stringEpc;
179+ std::string stringEpcEnd;
180+ std::string stringEpcCharge;
176181 // SCF
177182 std::string stringScf;
178183 std::string stringScfEnd;
@@ -297,6 +302,7 @@ private:
297302 std::string stringFrequenciesElecState;
298303 void CalcMolecularBasics(Molecule* molecule) const;
299304 void ValidateVdWConditions() const;
305+ void ValidateEpcConditions(const Molecule& molecule) const;
300306 void ValidateCisConditions(const Molecule& molecule) const;
301307 void ValidateMdConditions(const Molecule& molecule) const;
302308 void ValidateMcConditions(const Molecule& molecule) const;
@@ -324,6 +330,7 @@ private:
324330 void StoreInputTermsFromFile(std::vector<std::string>& inputTerms, char* fileName) const;
325331 void AddInputTermsFromString(std::vector<std::string>& inputTerms, std::string str) const;
326332 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;
327334 int ParseTheory(std::vector<std::string>* inputTerms, int parseIndex) const;
328335 int ParseConditionsSCF(std::vector<std::string>* inputTerms, int parseIndex) const;
329336 int ParseConditionsPrincipalAxes(std::vector<std::string>* inputTerms, int parseIndex) const;
--- a/src/base/MallocerFreer.h
+++ b/src/base/MallocerFreer.h
@@ -30,6 +30,7 @@ public:
3030 //1d
3131 template<typename T> void Malloc(T** matrix, size_t size1) const{
3232 if(*matrix!=NULL) return;
33+ if(size1<=0) return;
3334 double requiredMalloc = this->GetMemoryAmount<T>(size1);
3435 this->CheckLimitHeap(requiredMalloc);
3536 *matrix = new T[size1]();
@@ -58,6 +59,7 @@ public:
5859 // 2d
5960 template<typename T> void Malloc(T*** matrix, size_t size1, size_t size2) const{
6061 if(*matrix!=NULL) return;
62+ if(size1*size2<=0) return;
6163 double requiredMalloc = this->GetMemoryAmount<T*>(size1);
6264 this->CheckLimitHeap(requiredMalloc);
6365
@@ -100,6 +102,7 @@ public:
100102 // 3d
101103 template<typename T> void Malloc(T**** matrix, size_t size1, size_t size2, size_t size3) const{
102104 if(*matrix!=NULL) return;
105+ if(size1*size2*size3<=0) return;
103106 double requiredMalloc = this->GetMemoryAmount<T**>(size1);
104107 this->CheckLimitHeap(requiredMalloc);
105108
@@ -144,6 +147,7 @@ public:
144147 //4d
145148 template<typename T> void Malloc(T***** matrix, size_t size1, size_t size2, size_t size3, size_t size4) const{
146149 if(*matrix!=NULL) return;
150+ if(size1*size2*size3*size4<=0) return;
147151 double requiredMalloc = this->GetMemoryAmount<T***>(size1);
148152 this->CheckLimitHeap(requiredMalloc);
149153
@@ -189,6 +193,7 @@ public:
189193 //5d
190194 template<typename T> void Malloc(T****** matrix, size_t size1, size_t size2, size_t size3, size_t size4, size_t size5) const{
191195 if(*matrix!=NULL) return;
196+ if(size1*size2*size3*size4*size5<=0) return;
192197 double requiredMalloc = this->GetMemoryAmount<T****>(size1);
193198 this->CheckLimitHeap(requiredMalloc);
194199
@@ -235,6 +240,7 @@ public:
235240 //6d
236241 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{
237242 if(*matrix!=NULL) return;
243+ if(size1*size2*size3*size4*size5*size6<=0) return;
238244 double requiredMalloc = this->GetMemoryAmount<T*****>(size1);
239245 this->CheckLimitHeap(requiredMalloc);
240246
@@ -282,6 +288,7 @@ public:
282288 //7d
283289 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{
284290 if(*matrix!=NULL) return;
291+ if(size1*size2*size3*size4*size5*size6*size7<=0) return;
285292 double requiredMalloc = this->GetMemoryAmount<T******>(size1);
286293 this->CheckLimitHeap(requiredMalloc);
287294
--- a/src/base/Molecule.cpp
+++ b/src/base/Molecule.cpp
@@ -57,15 +57,30 @@ Molecule::Molecule(const Molecule& rhs){
5757 Molecule& Molecule::operator=(const Molecule& rhs){
5858 double* oldXyzCOM = this->xyzCOM;
5959 double* oldXyzCOC = this->xyzCOC;
60- double** oldDistanceMatrix = this->distanceMatrix;
60+ double** oldDistanceAtoms = this->distanceAtoms;
61+ double** oldDistanceEpcs = this->distanceEpcs;
62+ double** oldDistanceAtomsEpcs = this->distanceAtomsEpcs;
6163 vector<Atom*>* oldAtomVect = this->atomVect;
64+ vector<Atom*>* oldEpcVect = this->epcVect;
6265 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);
6473 return *this;
6574 }
6675
6776 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);
6984 //this->OutputLog("molecule deleted\n");
7085 }
7186
@@ -78,48 +93,107 @@ void Molecule::CopyInitialize(const Molecule& rhs){
7893 this->totalNumberAOs = rhs.totalNumberAOs;
7994 this->totalNumberValenceElectrons = rhs.totalNumberValenceElectrons;
8095 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+ }
98148 }
99149 }
100-
101150 }
102151
103152 void Molecule::Initialize(){
104153 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;
109161 try{
110162 this->atomVect = new vector<Atom*>;
163+ this->epcVect = new vector<Atom*>;
111164 MallocerFreer::GetInstance()->Malloc<double>(&this->xyzCOM, CartesianType_end);
112165 MallocerFreer::GetInstance()->Malloc<double>(&this->xyzCOC, CartesianType_end);
113166 }
114167 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);
116175 throw MolDSException(ex.what());
117176 }
118177 }
119178
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+ }
122195 if(*atomVect != NULL){
196+ atomNum = (*atomVect)->size();
123197 for(int i=0; i<atomNum; i++){
124198 if((**atomVect)[i] != NULL){
125199 delete (**atomVect)[i];
@@ -130,16 +204,31 @@ void Molecule::Finalize(vector<Atom*>** atomVect, double** xyzCOM, double** xyzC
130204 delete *atomVect;
131205 *atomVect = NULL;
132206 //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);
133222 }
134- MallocerFreer::GetInstance()->Free<double>(xyzCOM, CartesianType_end);
135- MallocerFreer::GetInstance()->Free<double>(xyzCOC, CartesianType_end);
136- MallocerFreer::GetInstance()->Free<double>(distanceMatrix, atomNum, atomNum);
137223 }
138224
139225 void Molecule::SetMessages(){
140226 this->errorMessageGetAtomNull = "Error in base::Molecule::GetAtom: atomVect is NULL.\n";
227+ this->errorMessageGetEPCNull = "Error in base::Molecule::GetEnviromentalPointCharge: enviromentalPointChargeVect is NULL.\n";
141228 this->errorMessageAddAtomNull = "Error in base::Molecule::AddAtom: atomVect is NULL.\n";
229+ this->errorMessageAddEPCNull = "Error in base::Molecule::AddEnviromentalPointCharge: enviromentalPointChargeVect is NULL.\n";
142230 this->errorMessageGetNumberAtomsNull = "Error in base::Molecule::GetNumberAtoms: atomVect is NULL.\n";
231+ this->errorMessageGetNumberEPCsNull = "Error in base::Molecule::GetNumberEnviromentalPointChargess: epcVect is NULL.\n";
143232 this->errorMessageGetXyzCOMNull = "Error in base::Molecule::GetXyzCOM: xyzCOM is NULL.\n";
144233 this->errorMessageGetXyzCOCNull = "Error in base::Molecule::GetXyzCOC: xyzCOC is NULL.\n";
145234 this->errorMessageCalcXyzCOMNull = "Error in base::Molecule::CalcXyzCOM: xyzCOM is NULL.\n";
@@ -151,6 +240,9 @@ void Molecule::SetMessages(){
151240 this->messageAtomCoordinates = "\tAtom coordinates:";
152241 this->messageAtomMomenta = "\tAtom momenta:";
153242 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";
154246 this->messageCOM = "\tCenter of Mass:";
155247 this->messageCOC = "\tCenter of Core:";
156248 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){
182274 if(this->atomVect==NULL) throw MolDSException(this->errorMessageAddAtomNull);
183275 #endif
184276 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);
186284 }
187285
188286 double const* Molecule::GetXyzCOM() const{
@@ -251,9 +349,9 @@ void Molecule::CalcXyzCOC(){
251349 }
252350 }
253351
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());
257355 }
258356 for(int a=0; a<this->atomVect->size(); a++){
259357 const Atom& atomA = *(*this->atomVect)[a];
@@ -263,8 +361,45 @@ void Molecule::CalcDistanceMatrix(){
263361 distance = sqrt( pow(atomA.GetXyz()[0] - atomB.GetXyz()[0], 2.0)
264362 +pow(atomA.GetXyz()[1] - atomB.GetXyz()[1], 2.0)
265363 +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;
268403 }
269404 }
270405 }
@@ -279,7 +414,9 @@ void Molecule::CalcBasics(){
279414 void Molecule::CalcBasicsConfiguration(){
280415 this->CalcXyzCOM();
281416 this->CalcXyzCOC();
282- this->CalcDistanceMatrix();
417+ this->CalcDistanceAtoms();
418+ this->CalcDistanceEpcs();
419+ this->CalcDistanceAtomsEpcs();
283420 }
284421
285422 void Molecule::CalcTotalNumberAOs(){
@@ -347,6 +484,27 @@ void Molecule::OutputMomenta() const{
347484 this->OutputLog("\n");
348485 }
349486
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+
350508 void Molecule::OutputXyzCOM() const{
351509 double ang2AU = Parameters::GetInstance()->GetAngstrom2AU();
352510 this->OutputLog(this->messageCOMTitle);
@@ -673,14 +831,6 @@ void Molecule::OutputTranslatingConditions(double const* translatingDifference)
673831 % (translatingDifference[2]/angst2AU));
674832 }
675833
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-
684834 void Molecule::SynchronizeConfigurationTo(const Molecule& ref){
685835 for(int a=0; a<this->GetNumberAtoms(); a++){
686836 Atom& atom = *this->GetAtom(a);
--- a/src/base/Molecule.h
+++ b/src/base/Molecule.h
@@ -38,7 +38,20 @@ public:
3838 #endif
3939 return (*this->atomVect)[atomIndex];
4040 }
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+ }
4153 void AddAtom(MolDS_base_atoms::Atom* atom);
54+ void AddEpc(MolDS_base_atoms::Atom* epc);
4255 double const* GetXyzCOM() const;
4356 double const* GetXyzCOC() const;
4457 void CalcBasics();
@@ -51,12 +64,19 @@ public:
5164 void OutputTotalNumberAtomsAOsValenceelectrons() const;
5265 void OutputConfiguration() const;
5366 void OutputMomenta() const;
67+ void OutputEpcs() const;
5468 void CalcPrincipalAxes();
5569 void Rotate();
5670 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];};
5872 double GetDistanceAtoms(const MolDS_base_atoms::Atom& atomA,
5973 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());};
6080 void SynchronizeConfigurationTo (const Molecule& ref);
6181 void SynchronizeMomentaTo (const Molecule& ref);
6282 void SynchronizePhaseSpacePointTo(const Molecule& ref);
@@ -65,22 +85,33 @@ public:
6585 void BroadcastPhaseSpacePointToAllProcesses(int root) const;
6686 private:
6787 std::vector<MolDS_base_atoms::Atom*>* atomVect;
88+ std::vector<MolDS_base_atoms::Atom*>* epcVect; // Vector of Environmental Point Charges
6889 double* xyzCOM; // x, y, z coordinates of Center of Mass;
6990 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;
7194 int totalNumberAOs;
7295 int totalNumberValenceElectrons;
7396 double totalCoreMass;
7497 void Initialize();
7598 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);
77106 void SetMessages();
78107 void CalcTotalNumberValenceElectrons();
79108 void CalcTotalNumberAOs();
80109 void CalcTotalCoreMass();
81110 void CalcXyzCOM();
82111 void CalcXyzCOC();
83- void CalcDistanceMatrix();
112+ void CalcDistanceAtoms();
113+ void CalcDistanceEpcs();
114+ void CalcDistanceAtomsEpcs();
84115 void CalcInertiaTensor(double** inertiaTensor,
85116 double const* inertiaTensorOrigin);
86117 void FreeInertiaTensorMoments(double*** inertiaTensor,
@@ -98,8 +129,11 @@ private:
98129 MolDS_base::EularAngle rotatingEularAngles)const;
99130 void OutputTranslatingConditions(double const* translatingDifference) const;
100131 std::string errorMessageGetAtomNull;
132+ std::string errorMessageGetEPCNull;
101133 std::string errorMessageAddAtomNull;
134+ std::string errorMessageAddEPCNull;
102135 std::string errorMessageGetNumberAtomsNull;
136+ std::string errorMessageGetNumberEPCsNull;
103137 std::string errorMessageGetXyzCOMNull;
104138 std::string errorMessageGetXyzCOCNull;
105139 std::string errorMessageCalcXyzCOMNull;
@@ -111,6 +145,9 @@ private:
111145 std::string messageAtomCoordinatesTitle;
112146 std::string messageAtomMomenta;
113147 std::string messageAtomMomentaTitle;
148+ std::string messageEpcConfiguration;
149+ std::string messageEpcCoordinates;
150+ std::string messageEpcCoordinatesTitle;
114151 std::string messageCOM;
115152 std::string messageCOC;
116153 std::string messageCOMTitle;
--- a/src/base/Parameters.cpp
+++ b/src/base/Parameters.cpp
@@ -43,16 +43,16 @@ namespace MolDS_base{
4343 Parameters* Parameters::parameters = NULL;
4444 // Physical constsnts
4545 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;
4747 const double Parameters::kcalMolin2AU = 0.00159360175;
4848 const double Parameters::angstrom2AU = 1.0/0.5291772;
4949 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);
5353 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;
5656 const double Parameters::debye2AU = 0.393430191;
5757
5858 // constant
@@ -114,13 +114,13 @@ void Parameters::SetDefaultValues(){
114114 this->currentSimulation = Once;
115115 this->currentTheory = CNDO2;
116116 // SCF
117- this->thresholdSCF = pow(10.0, -8.0);
117+ this->thresholdSCF = 1.0e-8;
118118 this->maxIterationsSCF = 100;
119119 this->dampingThreshSCF = 1.0;
120120 this->dampingWeightSCF = 0.8;
121121 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;
124124 this->requiresVdWSCF = false;
125125 this->vdWScalingFactorSCF = 1.40;
126126 this->vdWDampingFactorSCF = 23.0;
@@ -171,7 +171,7 @@ void Parameters::SetDefaultValues(){
171171 this->isDavidsonCIS = true;
172172 this->maxIterationsCIS = 100;
173173 this->maxDimensionsCIS = 100;
174- this->normToleranceCIS = pow(10.0, -6.0);
174+ this->normToleranceCIS = 1.0e-6;
175175 this->numberPrintCoefficientsCIS = 1;
176176 this->requiresExcitonEnergiesCIS = false;
177177 this->requiresAllTransitionDipoleMomentsCIS = false;
--- a/src/base/atoms/Atom.h
+++ b/src/base/atoms/Atom.h
@@ -47,6 +47,7 @@ public:
4747 double GetBondingParameter(MolDS_base::TheoryType theory,
4848 MolDS_base::OrbitalType orbital) const;
4949 inline double GetCoreCharge() const{return this->coreCharge;}
50+ inline void SetCoreCharge(double charge) {this->coreCharge=charge;}
5051 inline int GetFirstAOIndex() const{return this->firstAOIndex;}
5152 inline void SetFirstAOIndex(int firstAOIndex){this->firstAOIndex = firstAOIndex;}
5253 inline int GetLastAOIndex() const{return this->firstAOIndex + this->valence.size()-1;}
--- /dev/null
+++ b/src/base/atoms/mm/EnvironmentalPointCharge.cpp
@@ -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+}
--- /dev/null
+++ b/src/base/atoms/mm/EnvironmentalPointCharge.h
@@ -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
--- a/src/base/factories/AtomFactory.cpp
+++ b/src/base/factories/AtomFactory.cpp
@@ -38,14 +38,17 @@
3838 #include"../atoms/Natom.h"
3939 #include"../atoms/Oatom.h"
4040 #include"../atoms/Satom.h"
41+#include"../atoms/mm/EnvironmentalPointCharge.h"
4142 #include"AtomFactory.h"
4243 using namespace std;
4344 using namespace MolDS_base;
4445 using namespace MolDS_base_atoms;
46+using namespace MolDS_base_atoms_mm;
4547 namespace MolDS_base_factories{
4648
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 = ";
4952
5053 Atom* AtomFactory::Create(AtomType atomType, int index, double x, double y, double z, double px, double py, double pz){
5154 Atom* atom=NULL;
@@ -78,12 +81,36 @@ Atom* AtomFactory::Create(AtomType atomType, int index, double x, double y, doub
7881 return atom;
7982 }
8083
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+
81101 Atom* AtomFactory::Create(AtomType atomType, int index, double x, double y, double z){
82102 double px=0.0;
83103 double py=0.0;
84104 double pz=0.0;
85105 return AtomFactory::Create(atomType, index, x, y, z, px, py, pz);
86106 }
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+}
87114 }
88115
89116
--- a/src/base/factories/AtomFactory.h
+++ b/src/base/factories/AtomFactory.h
@@ -35,11 +35,27 @@ public:
3535 int index,
3636 double x,
3737 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,
3847 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);
3954 private:
4055 AtomFactory();
4156 ~AtomFactory();
4257 static std::string errorMessageNotEnableAtom;
58+ static std::string errorMessageNotEnvironmentalPointCharge;
4359 static std::string errorMessageAtomType;
4460 };
4561
--- a/src/cndo/Cndo2.cpp
+++ b/src/cndo/Cndo2.cpp
@@ -71,9 +71,10 @@ Cndo2::Cndo2(){
7171 //protected variables
7272 this->molecule = NULL;
7373 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;
7778 this->fockMatrix = NULL;
7879 this->energiesMO = NULL;
7980 this->orbitalElectronPopulation = NULL;
@@ -81,17 +82,18 @@ Cndo2::Cndo2(){
8182 this->atomicElectronPopulation = NULL;
8283 this->atomicElectronPopulationCIS = NULL;
8384 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;
8789 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;
9597
9698 //protected methods
9799 this->SetMessages();
@@ -227,12 +229,16 @@ void Cndo2::SetMessages(){
227229 this->messageUnpairedAtoms = "\tUnpaired electron population:";
228230 this->messageUnpairedAtomsTitle = "\t\t\t\t| k-th eigenstate | i-th atom | atom type | Unpaired electron population[a.u.]| \n";
229231 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";
232236 this->messageElecEnergyTitle = "\t\t\t\t| [a.u.] | [eV] |\n";
233237 this->messageUnitSec = "[s].";
234238 this->messageCoreRepulsionTitle = "\t\t\t\t| [a.u.] | [eV] |\n";
235239 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:";
236242 this->messageVdWCorrectionTitle = "\t\t\t\t\t\t| [a.u.] | [eV] |\n";
237243 this->messageVdWCorrection = "\tEmpirical van der Waals correction:";
238244 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{
340346 }
341347
342348 void Cndo2::CalcCoreRepulsionEnergy(){
349+ // interaction between atoms
343350 double energy = 0.0;
344351 for(int i=0; i<this->molecule->GetNumberAtoms(); i++){
345352 for(int j=i+1; j<this->molecule->GetNumberAtoms(); j++){
@@ -347,6 +354,17 @@ void Cndo2::CalcCoreRepulsionEnergy(){
347354 }
348355 }
349356 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+
350368 }
351369
352370 double Cndo2::GetDiatomCoreRepulsionEnergy(int indexAtomA, int indexAtomB) const{
@@ -356,6 +374,11 @@ double Cndo2::GetDiatomCoreRepulsionEnergy(int indexAtomA, int indexAtomB) const
356374 return atomA.GetCoreCharge()*atomB.GetCoreCharge()/distance;
357375 }
358376
377+double Cndo2::GetAtomCoreEpcCoulombEnergy(int indexAtom, int indexEpc) const{
378+ // do nothiing
379+ return 0.0;
380+}
381+
359382 // First derivative of diatomic core repulsion energy.
360383 // This derivative is related to the coordinate of atomA.
361384 double Cndo2::GetDiatomCoreRepulsion1stDerivative(int indexAtomA, int indexAtomB,
@@ -516,11 +539,11 @@ void Cndo2::DoSCF(bool requiresGuess){
516539
517540 // temporary matrices for scf
518541 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;
524547
525548 try{
526549 this->MallocSCFTemporaryMatrices(&oldOrbitalElectronPopulation,
@@ -533,7 +556,9 @@ void Cndo2::DoSCF(bool requiresGuess){
533556 this->CalcGammaAB(this->gammaAB, *this->molecule);
534557 this->CalcOverlapAOs(this->overlapAOs, *this->molecule);
535558 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);
537562
538563 // SCF
539564 double rmsDensity=0.0;
@@ -556,7 +581,7 @@ void Cndo2::DoSCF(bool requiresGuess){
556581 this->gammaAB,
557582 this->orbitalElectronPopulation,
558583 this->atomicElectronPopulation,
559- this->twoElecTwoCore,
584+ this->twoElecsTwoAtomCores,
560585 isGuess);
561586
562587 // diagonalization of the Fock matrix
@@ -649,12 +674,13 @@ void Cndo2::CalcSCFProperties(){
649674 this->CalcVdWCorrectionEnergy();
650675 }
651676 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);
658684 this->CalcCoreDipoleMoment(this->coreDipoleMoment, *this->molecule);
659685 this->CalcElectronicDipoleMomentGroundState(this->electronicTransitionDipoleMoments,
660686 this->cartesianMatrix,
@@ -744,8 +770,9 @@ double const* const* Cndo2::GetForce(int elecState){
744770 return this->matrixForce[0];
745771 }
746772
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{
749776 // do nothing for CNDO, INDO, and ZINDO/S.
750777 // two electron two core integrals are not needed for CNDO, INDO, and ZINDO/S.
751778 }
@@ -986,9 +1013,15 @@ void Cndo2::OutputSCFEnergies() const{
9861013 this->OutputLog(boost::format("%s\t%e\t%e\n") % this->messageElecEnergy
9871014 % this->elecSCFEnergy
9881015 % (this->elecSCFEnergy/eV2AU));
989- if(Parameters::GetInstance()->RequiresVdWSCF()){
1016+ if(Parameters::GetInstance()->RequiresVdWSCF() && this->molecule->GetNumberEpcs()<=0){
9901017 this->OutputLog(this->messageNoteElecEnergyVdW);
9911018 }
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+ }
9921025 else{
9931026 this->OutputLog(this->messageNoteElecEnergy);
9941027 }
@@ -999,6 +1032,14 @@ void Cndo2::OutputSCFEnergies() const{
9991032 % this->coreRepulsionEnergy
10001033 % (this->coreRepulsionEnergy/eV2AU));
10011034
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+
10021043 // output van der Waals correction
10031044 if(Parameters::GetInstance()->RequiresVdWSCF()){
10041045 this->OutputLog(this->messageVdWCorrectionTitle);
@@ -1190,6 +1231,7 @@ void Cndo2::CalcElecSCFEnergy(double* elecSCFEnergy,
11901231 double const* const* fockMatrix,
11911232 double const* const* gammaAB,
11921233 double coreRepulsionEnergy,
1234+ double coreEpcCoulombEnergy,
11931235 double vdWCorrectionEnergy) const{
11941236 double electronicEnergy = 0.0;
11951237 // use density matrix for electronic energy
@@ -1214,7 +1256,7 @@ void Cndo2::CalcElecSCFEnergy(double* elecSCFEnergy,
12141256 this->gammaAB,
12151257 this->orbitalElectronPopulation,
12161258 this->atomicElectronPopulation,
1217- this->twoElecTwoCore,
1259+ this->twoElecsTwoAtomCores,
12181260 isGuess);
12191261 this->CalcFockMatrix(hMatrix,
12201262 molecule,
@@ -1222,7 +1264,7 @@ void Cndo2::CalcElecSCFEnergy(double* elecSCFEnergy,
12221264 this->gammaAB,
12231265 dammyOrbitalElectronPopulation,
12241266 dammyAtomicElectronPopulation,
1225- this->twoElecTwoCore,
1267+ this->twoElecsTwoAtomCores,
12261268 isGuess);
12271269
12281270 for(int i=0; i<totalNumberAOs; i++){
@@ -1269,7 +1311,10 @@ void Cndo2::CalcElecSCFEnergy(double* elecSCFEnergy,
12691311 }
12701312 */
12711313
1272- *elecSCFEnergy = electronicEnergy + coreRepulsionEnergy + vdWCorrectionEnergy;
1314+ *elecSCFEnergy = electronicEnergy
1315+ +coreRepulsionEnergy
1316+ +coreEpcCoulombEnergy
1317+ +vdWCorrectionEnergy;
12731318 }
12741319
12751320 void Cndo2::FreeElecEnergyMatrices(double*** fMatrix,
@@ -1386,7 +1431,7 @@ void Cndo2::CalcFockMatrix(double** fockMatrix,
13861431 double const* const* gammaAB,
13871432 double const* const* orbitalElectronPopulation,
13881433 double const* atomicElectronPopulation,
1389- double const* const* const* const* const* const* twoElecTwoCore,
1434+ double const* const* const* const* const* const* twoElecsTwoAtomCores,
13901435 bool isGuess) const{
13911436 int totalNumberAOs = molecule.GetTotalNumberAOs();
13921437 int totalNumberAtoms = molecule.GetNumberAtoms();
@@ -1423,7 +1468,7 @@ void Cndo2::CalcFockMatrix(double** fockMatrix,
14231468 gammaAB,
14241469 orbitalElectronPopulation,
14251470 atomicElectronPopulation,
1426- twoElecTwoCore,
1471+ twoElecsTwoAtomCores,
14271472 isGuess);
14281473 }
14291474 else if(mu < nu){
@@ -1438,7 +1483,7 @@ void Cndo2::CalcFockMatrix(double** fockMatrix,
14381483 gammaAB,
14391484 overlapAOs,
14401485 orbitalElectronPopulation,
1441- twoElecTwoCore,
1486+ twoElecsTwoAtomCores,
14421487 isGuess);
14431488 }
14441489 else{
@@ -1495,7 +1540,7 @@ double Cndo2::GetFockDiagElement(const Atom& atomA,
14951540 double const* const* gammaAB,
14961541 double const* const* orbitalElectronPopulation,
14971542 double const* atomicElectronPopulation,
1498- double const* const* const* const* const* const* twoElecTwoCore,
1543+ double const* const* const* const* const* const* twoElecsTwoAtomCores,
14991544 bool isGuess) const{
15001545 double value;
15011546 int firstAOIndexA = atomA.GetFirstAOIndex();
@@ -1531,7 +1576,7 @@ double Cndo2::GetFockOffDiagElement(const Atom& atomA,
15311576 double const* const* gammaAB,
15321577 double const* const* overlapAOs,
15331578 double const* const* orbitalElectronPopulation,
1534- double const* const* const* const* const* const* twoElecTwoCore,
1579+ double const* const* const* const* const* const* twoElecsTwoAtomCores,
15351580 bool isGuess) const{
15361581 double value;
15371582 double K = this->GetBondingAdjustParameterK(atomA.GetValenceShellType(), atomB.GetValenceShellType());
--- a/src/cndo/Cndo2.h
+++ b/src/cndo/Cndo2.h
@@ -94,6 +94,7 @@ protected:
9494 MolDS_base::Molecule* molecule;
9595 MolDS_base::TheoryType theory;
9696 double coreRepulsionEnergy;
97+ double coreEpcCoulombEnergy;
9798 double vdWCorrectionEnergy;
9899 int matrixCISdimension;
99100 double** fockMatrix;
@@ -104,7 +105,8 @@ protected:
104105 double** atomicElectronPopulationCIS;
105106 double** atomicUnpairedPopulationCIS;
106107 double** overlapAOs; // overlap integral between AOs
107- double****** twoElecTwoCore;
108+ double****** twoElecsTwoAtomCores;
109+ double****** twoElecsAtomEpcCores;
108110 double*** cartesianMatrix; // cartesian matrix represented by AOs
109111 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.).
110112 double* coreDipoleMoment; // dipole moment of configuration.
@@ -131,6 +133,7 @@ protected:
131133 double GetBondingAdjustParameterK(MolDS_base::ShellType shellA,
132134 MolDS_base::ShellType shellB) const;
133135 virtual double GetDiatomCoreRepulsionEnergy(int indexAtomA, int indexAtomB) const;
136+ virtual double GetAtomCoreEpcCoulombEnergy (int indexAtom, int indexEpc) const;
134137 virtual double GetDiatomCoreRepulsion1stDerivative(int indexAtomA,
135138 int indexAtomB,
136139 MolDS_base::CartesianType axisA) const;
@@ -170,7 +173,7 @@ protected:
170173 double const* const* gammaAB,
171174 double const* const* orbitalElectronPopulation,
172175 double const* atomicElectronPopulation,
173- double const* const* const* const* const* const* twoElecTwoCore,
176+ double const* const* const* const* const* const* twoElecsTwoAtomCores,
174177 bool isGuess) const;
175178 virtual double GetFockOffDiagElement(const MolDS_base_atoms::Atom& atomA,
176179 const MolDS_base_atoms::Atom& atomB,
@@ -182,7 +185,7 @@ protected:
182185 double const* const* gammaAB,
183186 double const* const* overlapAOs,
184187 double const* const* orbitalElectronPopulation,
185- double const* const* const* const* const* const* twoElecTwoCore,
188+ double const* const* const* const* const* const* twoElecsTwoAtomCores,
186189 bool isGuess) const;
187190 void TransposeFockMatrixMatrix(double** transposedFockMatrix) const;
188191 virtual void CalcDiatomicOverlapAOsInDiatomicFrame(double** diatomicOverlapAOs,
@@ -250,8 +253,9 @@ protected:
250253 const MolDS_base::Molecule& molecule,
251254 double const* const* fockMatrix,
252255 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;
255259 virtual void CalcForce(const std::vector<int>& elecStates);
256260 void CalcRotatingMatrix1stDerivatives(double*** rotMat1stDerivatives,
257261 const MolDS_base_atoms::Atom& atomA,
@@ -303,11 +307,15 @@ private:
303307 std::string messageElecEnergy;
304308 std::string messageNoteElecEnergy;
305309 std::string messageNoteElecEnergyVdW;
310+ std::string messageNoteElecEnergyEpcVdW;
311+ std::string messageNoteElecEnergyEpc;
306312 std::string messageElecEnergyTitle;
307313 std::string messageOcc;
308314 std::string messageUnOcc;
309315 std::string messageCoreRepulsionTitle;
310316 std::string messageCoreRepulsion;
317+ std::string messageCoreEpcCoulombTitle;
318+ std::string messageCoreEpcCoulomb;
311319 std::string messageVdWCorrectionTitle;
312320 std::string messageVdWCorrection;
313321 std::string messageElectronicDipoleMomentTitle;
@@ -463,7 +471,7 @@ private:
463471 double const* const* gammaAB,
464472 double const* const* orbitalElectronPopulation,
465473 double const* atomicElectronPopulation,
466- double const* const* const* const* const* const* twoElecTwoCore,
474+ double const* const* const* const* const* const* twoElecsTwoAtomCores,
467475 bool isGuess) const;
468476 void RotateDiatmicOverlapAOsToSpaceFrame(double** diatomicOverlapAOs,
469477 double const* const* rotatingMatrix,
@@ -510,6 +518,7 @@ private:
510518 double const* const* fockMatrix,
511519 double const* const* gammaAB,
512520 double coreRepulsionEnergy,
521+ double coreEpcCoulombEnergy,
513522 double vdWCorrectionEnergy) const;
514523 void FreeElecEnergyMatrices(double*** fMatrix,
515524 double*** hMatrix,
--- a/src/indo/Indo.cpp
+++ b/src/indo/Indo.cpp
@@ -113,7 +113,7 @@ double Indo::GetFockDiagElement(const Atom& atomA,
113113 double const* const* gammaAB,
114114 double const* const* orbitalElectronPopulation,
115115 double const* atomicElectronPopulation,
116- double const* const* const* const* const* const* twoElecTwoCore,
116+ double const* const* const* const* const* const* twoElecsTwoAtomCores,
117117 bool isGuess) const{
118118 double value;
119119 int firstAOIndexA = atomA.GetFirstAOIndex();
@@ -160,7 +160,7 @@ double Indo::GetFockOffDiagElement(const Atom& atomA,
160160 double const* const* gammaAB,
161161 double const* const* overlapAOs,
162162 double const* const* orbitalElectronPopulation,
163- double const* const* const* const* const* const* twoElecTwoCore,
163+ double const* const* const* const* const* const* twoElecsTwoAtomCores,
164164 bool isGuess) const{
165165 double value;
166166 double K = this->GetBondingAdjustParameterK(atomA.GetValenceShellType(), atomB.GetValenceShellType());
--- a/src/indo/Indo.h
+++ b/src/indo/Indo.h
@@ -37,7 +37,7 @@ protected:
3737 double const* const* gammaAB,
3838 double const* const* orbitalElectronPopulation,
3939 double const* atomicElectronPopulation,
40- double const* const* const* const* const* const* twoElecTwoCore,
40+ double const* const* const* const* const* const* twoElecsTwoAtomCores,
4141 bool isGuess) const;
4242 virtual double GetFockOffDiagElement(const MolDS_base_atoms::Atom& atomA,
4343 const MolDS_base_atoms::Atom& atomB,
@@ -49,7 +49,7 @@ protected:
4949 double const* const* gammaAB,
5050 double const* const* overelap,
5151 double const* const* orbitalElectronPopulation,
52- double const* const* const* const* const* const* twoElecTwoCore,
52+ double const* const* const* const* const* const* twoElecsTwoAtomCores,
5353 bool isGuess) const;
5454 virtual double GetMolecularIntegralElement(int moI, int moJ, int moK, int moL,
5555 const MolDS_base::Molecule& molecule,
--- a/src/mndo/Mndo.cpp
+++ b/src/mndo/Mndo.cpp
@@ -49,6 +49,7 @@
4949 #include"../base/atoms/Natom.h"
5050 #include"../base/atoms/Oatom.h"
5151 #include"../base/atoms/Satom.h"
52+#include"../base/atoms/mm/EnvironmentalPointCharge.h"
5253 #include"../base/Molecule.h"
5354 #include"../base/ElectronicStructure.h"
5455 #include"../cndo/Cndo2.h"
@@ -68,24 +69,37 @@ Mndo::Mndo() : MolDS_zindo::ZindoS(){
6869 this->SetMessages();
6970 this->SetEnableAtomTypes();
7071 // private variables
71- this->twoElecTwoCoreMpiBuff = NULL;
72+ this->twoElecsTwoAtomCoresMpiBuff = NULL;
73+ this->twoElecsAtomEpcCoresMpiBuff = NULL;
7274 this->heatsFormation = 0.0;
7375 //this->OutputLog("Mndo created\n");
7476 }
7577
7678 Mndo::~Mndo(){
7779 OrbitalType twoElecLimit = dxy;
78- MallocerFreer::GetInstance()->Free<double>(&this->twoElecTwoCore,
80+ MallocerFreer::GetInstance()->Free<double>(&this->twoElecsTwoAtomCores,
7981 this->molecule->GetNumberAtoms(),
8082 this->molecule->GetNumberAtoms(),
8183 twoElecLimit,
8284 twoElecLimit,
8385 twoElecLimit,
8486 twoElecLimit);
87+ MallocerFreer::GetInstance()->Free<double>(&this->twoElecsAtomEpcCores,
88+ this->molecule->GetNumberAtoms(),
89+ this->molecule->GetNumberEpcs(),
90+ twoElecLimit,
91+ twoElecLimit,
92+ twoElecLimit,
93+ twoElecLimit);
8594 int numBuff = (twoElecLimit+1)*twoElecLimit/2;
86- MallocerFreer::GetInstance()->Free<double>(&this->twoElecTwoCoreMpiBuff,
95+ MallocerFreer::GetInstance()->Free<double>(&this->twoElecsTwoAtomCoresMpiBuff,
96+ this->molecule->GetNumberAtoms(),
8797 this->molecule->GetNumberAtoms(),
98+ numBuff,
99+ numBuff);
100+ MallocerFreer::GetInstance()->Free<double>(&this->twoElecsAtomEpcCoresMpiBuff,
88101 this->molecule->GetNumberAtoms(),
102+ this->molecule->GetNumberEpcs(),
89103 numBuff,
90104 numBuff);
91105 MallocerFreer::GetInstance()->Free<double>(&this->normalForceConstants,
@@ -98,19 +112,31 @@ Mndo::~Mndo(){
98112 void Mndo::SetMolecule(Molecule* molecule){
99113 ZindoS::SetMolecule(molecule);
100114 OrbitalType twoElecLimit = dxy;
101- MallocerFreer::GetInstance()->Malloc<double>(&this->twoElecTwoCore,
115+ MallocerFreer::GetInstance()->Malloc<double>(&this->twoElecsTwoAtomCores,
102116 molecule->GetNumberAtoms(),
103117 molecule->GetNumberAtoms(),
104118 twoElecLimit,
105119 twoElecLimit,
106120 twoElecLimit,
107121 twoElecLimit);
122+ MallocerFreer::GetInstance()->Malloc<double>(&this->twoElecsAtomEpcCores,
123+ molecule->GetNumberAtoms(),
124+ molecule->GetNumberEpcs(),
125+ twoElecLimit,
126+ twoElecLimit,
127+ twoElecLimit,
128+ twoElecLimit);
108129 int numBuff = (twoElecLimit+1)*twoElecLimit/2;
109- MallocerFreer::GetInstance()->Malloc<double>(&this->twoElecTwoCoreMpiBuff,
130+ MallocerFreer::GetInstance()->Malloc<double>(&this->twoElecsTwoAtomCoresMpiBuff,
110131 this->molecule->GetNumberAtoms(),
111132 this->molecule->GetNumberAtoms(),
112133 numBuff,
113134 numBuff);
135+ MallocerFreer::GetInstance()->Malloc<double>(&this->twoElecsAtomEpcCoresMpiBuff,
136+ this->molecule->GetNumberAtoms(),
137+ this->molecule->GetNumberEpcs(),
138+ numBuff,
139+ numBuff);
114140 MallocerFreer::GetInstance()->Malloc<double>(&this->normalForceConstants,
115141 CartesianType_end*molecule->GetNumberAtoms());
116142 MallocerFreer::GetInstance()->Malloc<double>(&this->normalModes,
@@ -131,34 +157,42 @@ void Mndo::SetMessages(){
131157 this->errorMessageCalcCISMatrix
132158 = "Error in mndo::Mndo::CalcCISMatrix: Non available orbital is contained.\n";
133159 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";
134162 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";
136164 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";
138166 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";
140168 this->errorMessageMultipoleA = "Multipole A is: ";
141169 this->errorMessageMultipoleB = "Multipole B is: ";
142170 this->errorMessageGetNddoRepulsionIntegral
143171 = "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";
144174 this->errorMessageGetNddoRepulsionIntegral1stDerivative
145175 = "Error in mndo::Mndo::GetNddoRepulsionIntegral1stDerivative: Bad orbital is set.\n";
146176 this->errorMessageGetNddoRepulsionIntegral2ndDerivative
147177 = "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";
162196 this->errorMessageGetElectronicEnergyEnergyNotCalculated
163197 = "Error in mndo::Mndo::GetElectronicEnergy: Set electronic state is not calculated by CIS.\n";
164198 this->errorMessageGetElectronicEnergyNULLCISEnergy
@@ -283,11 +317,20 @@ double Mndo::GetAuxiliaryDiatomCoreRepulsionEnergy2ndDerivative(const Atom& atom
283317 double Mndo::GetDiatomCoreRepulsionEnergy(int indexAtomA, int indexAtomB) const{
284318 const Atom& atomA = *this->molecule->GetAtom(indexAtomA);
285319 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;
291334 }
292335
293336 // First derivative of diatomic core repulsion energy.
@@ -299,13 +342,13 @@ double Mndo::GetDiatomCoreRepulsion1stDerivative(int indexAtomA,
299342 const Atom& atomA = *this->molecule->GetAtom(indexAtomA);
300343 const Atom& atomB = *this->molecule->GetAtom(indexAtomB);
301344 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];
303346 double twoElecInt1stDeriv = this->GetNddoRepulsionIntegral1stDerivative(
304347 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);
307350 value = atomA.GetCoreCharge()*atomB.GetCoreCharge()
308- *(twoElecInt1stDeriv*temp + twoElecInt*tempDeriv);
351+ *(twoElecInt1stDeriv*tmp + twoElecInt*tmpDeriv);
309352 return value;
310353 }
311354
@@ -319,8 +362,7 @@ double Mndo::GetDiatomCoreRepulsion2ndDerivative(int indexAtomA,
319362 const Atom& atomA = *this->molecule->GetAtom(indexAtomA);
320363 const Atom& atomB = *this->molecule->GetAtom(indexAtomB);
321364 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];
324366 double twoElecInt1stDeriv1 = this->GetNddoRepulsionIntegral1stDerivative(atomA, s, s,
325367 atomB, s, s,
326368 axisA1);
@@ -332,28 +374,28 @@ double Mndo::GetDiatomCoreRepulsion2ndDerivative(int indexAtomA,
332374 axisA1,
333375 axisA2);
334376
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,
347385 atomB,
348386 distanceAB,
349- axisA1,
350387 axisA2);
388+ double tmp2ndDeriv = this->GetAuxiliaryDiatomCoreRepulsionEnergy2ndDerivative(atomA,
389+ atomB,
390+ distanceAB,
391+ axisA1,
392+ axisA2);
351393
352394 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;
357399 return value;
358400 }
359401
@@ -402,7 +444,7 @@ double Mndo::GetFockDiagElement(const Atom& atomA,
402444 double const* const* gammaAB,
403445 double const* const* orbitalElectronPopulation,
404446 double const* atomicElectronPopulation,
405- double const* const* const* const* const* const* twoElecTwoCore,
447+ double const* const* const* const* const* const* twoElecsTwoAtomCores,
406448 bool isGuess) const{
407449 double value=0.0;
408450 int firstAOIndexA = atomA.GetFirstAOIndex();
@@ -432,22 +474,33 @@ double Mndo::GetFockDiagElement(const Atom& atomA,
432474 for(int sigma=0; sigma<valenceSizeB; sigma++){
433475 temp += orbitalElectronPopulation[lambda+firstAOIndexB]
434476 [sigma+firstAOIndexB]
435- *twoElecTwoCore[indexAtomA][B][mu][mu][lambda][sigma];
477+ *twoElecsTwoAtomCores[indexAtomA][B][mu][mu][lambda][sigma];
436478 }
437479 /*
438480 temp += MolDS_wrappers::Blas::GetInstance()->Ddot(valenceSizeB,
439481 &orbitalElectronPopulation[lambda+firstAOIndexB][firstAOIndexB],
440- &twoElecTwoCore[indexAtomA][B][mu][mu][lambda][0]);
482+ &twoElecsTwoAtomCores[indexAtomA][B][mu][mu][lambda][0]);
441483 */
442484 }
443485 temp += this->GetElectronCoreAttraction(indexAtomA,
444486 B,
445487 mu,
446488 mu,
447- twoElecTwoCore);
489+ twoElecsTwoAtomCores);
448490 }
449491 }
450492 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+
451504 }
452505 return value;
453506 }
@@ -462,7 +515,7 @@ double Mndo::GetFockOffDiagElement(const Atom& atomA,
462515 double const* const* gammaAB,
463516 double const* const* overlapAOs,
464517 double const* const* orbitalElectronPopulation,
465- double const* const* const* const* const* const* twoElecTwoCore,
518+ double const* const* const* const* const* const* twoElecsTwoAtomCores,
466519 bool isGuess) const{
467520 double value = 0.0;
468521 int firstAOIndexA = atomA.GetFirstAOIndex();
@@ -495,19 +548,28 @@ double Mndo::GetFockOffDiagElement(const Atom& atomA,
495548 for(int sigma=0; sigma<valenceSizeBB; sigma++){
496549 temp += orbitalElectronPopulation[lambda+firstAOIndexBB]
497550 [sigma+firstAOIndexBB]
498- *twoElecTwoCore[indexAtomA][BB][mu][nu][lambda][sigma];
551+ *twoElecsTwoAtomCores[indexAtomA][BB][mu][nu][lambda][sigma];
499552 }
500553 /*
501554 temp += MolDS_wrappers::Blas::GetInstance()->Ddot(valenceSizeBB,
502555 &orbitalElectronPopulation[lambda+firstAOIndexBB][firstAOIndexBB],
503- &twoElecTwoCore[indexAtomA][BB][mu][nu][lambda][0]);
556+ &twoElecsTwoAtomCores[indexAtomA][BB][mu][nu][lambda][0]);
504557 */
505558 }
506559 temp += this->GetElectronCoreAttraction(indexAtomA,
507560 BB,
508561 mu,
509562 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];
511573 }
512574 }
513575 }
@@ -518,15 +580,15 @@ double Mndo::GetFockOffDiagElement(const Atom& atomA,
518580 for(int lambda=0; lambda<valenceSizeB; lambda++){
519581 //temp -= 0.5*orbitalElectronPopulation[lambda+firstAOIndexB]
520582 // [sigma+firstAOIndexA]
521- // *twoElecTwoCore[indexAtomA][indexAtomB][mu][sigma][nu][lambda];
583+ // *twoElecsTwoAtomCores[indexAtomA][indexAtomB][mu][sigma][nu][lambda];
522584 temp -= 0.5*orbitalElectronPopulation[sigma+firstAOIndexA]
523585 [lambda+firstAOIndexB]
524- *twoElecTwoCore[indexAtomA][indexAtomB][mu][sigma][nu][lambda];
586+ *twoElecsTwoAtomCores[indexAtomA][indexAtomB][mu][sigma][nu][lambda];
525587 }
526588 /*
527589 temp -= 0.5*MolDS_wrappers::Blas::GetInstance()->Ddot(valenceSizeB,
528590 &orbitalElectronPopulation[sigma+firstAOIndexA][firstAOIndexB],
529- &twoElecTwoCore[indexAtomA][indexAtomB][mu][sigma][nu][0]);
591+ &twoElecsTwoAtomCores[indexAtomA][indexAtomB][mu][sigma][nu][0]);
530592 */
531593 }
532594 }
@@ -600,24 +662,24 @@ double Mndo::GetElectronCoreAttraction(int indexAtomA,
600662 int indexAtomB,
601663 int mu,
602664 int nu,
603- double const* const* const* const* const* const* twoElecTwoCore) const{
665+ double const* const* const* const* const* const* twoElecsTwoAtomCores) const{
604666 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];
606668 }
607669
608670 // First derivative of electron in atom A (mu and nu) and core (atom B) attraction.
609671 // This derivative is related to the coordinate of atomA.
610-// Note that diatomicTwoElecTwoCore1stDerivative is dioatomic one.
672+// Note that diatomicTwoElecsTwoCores1stDerivative is dioatomic one.
611673 // see Eq. (16) in [DT_1977-2] with f_2 = 0.
612674 double Mndo::GetElectronCoreAttraction1stDerivative(int indexAtomA,
613675 int indexAtomB,
614676 int mu,
615677 int nu,
616- double const* const* const* const* const* diatomicTwoElecTwoCore1stDerivatives,
678+ double const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivatives,
617679 CartesianType axisA) const{
618680 const Atom& atomB = *this->molecule->GetAtom(indexAtomB);
619681 double value = -1.0*atomB.GetCoreCharge()
620- *diatomicTwoElecTwoCore1stDerivatives[mu][nu][s][s][axisA];
682+ *diatomicTwoElecsTwoCores1stDerivatives[mu][nu][s][s][axisA];
621683 return value;
622684 }
623685
@@ -666,12 +728,12 @@ double Mndo::GetMolecularIntegralElement(int moI, int moJ, int moK, int moL,
666728 for(int lambda=firstAOIndexB; lambda<=lastAOIndexB; lambda++){
667729 for(int sigma=lambda; sigma<=lastAOIndexB; sigma++){
668730 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];
675737
676738 value += gamma*fockMatrix[moI][mu]
677739 *fockMatrix[moJ][nu]
@@ -821,12 +883,12 @@ void Mndo::CalcCISMatrix(double** matrixCIS) const{
821883 double tmpMuNuLamda16 = tmpMuNu12*fockMatrix[moB][lambda];
822884 for(int sigma=lambda; sigma<=lastAOIndexB; sigma++){
823885 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];
830892
831893 value += gamma*tmpMuNuLamda01*fockMatrix[moB][sigma];
832894 value += gamma*tmpMuNuLamda02*fockMatrix[moI][sigma];
@@ -993,14 +1055,14 @@ double Mndo::GetCISCoefficientTwoElecIntegral(int k,
9931055
9941056 void Mndo::MallocTempMatricesEachThreadCalcHessianSCF(double***** diatomicOverlapAOs1stDerivs,
9951057 double****** diatomicOverlapAOs2ndDerivs,
996- double******* diatomicTwoElecTwoCore1stDerivs,
997- double******** diatomicTwoElecTwoCore2ndDerivs,
1058+ double******* diatomicTwoElecsTwoCores1stDerivs,
1059+ double******** diatomicTwoElecsTwoCores2ndDerivs,
9981060 double*** tmpRotMat,
9991061 double*** tmpRotMat1stDeriv,
10001062 double**** tmpRotMat1stDerivs,
10011063 double***** tmpRotMat2ndDerivs,
1002- double***** tmpDiatomicTwoElecTwoCore,
1003- double****** tmpDiatomicTwoElecTwoCore1stDerivs,
1064+ double***** tmpDiatomicTwoElecsTwoCores,
1065+ double****** tmpDiatomicTwoElecsTwoCores1stDerivs,
10041066 double*** tmpDiaOverlapAOsInDiaFrame,
10051067 double*** tmpDiaOverlapAOs1stDerivInDiaFrame,
10061068 double*** tmpDiaOverlapAOs2ndDerivInDiaFrame,
@@ -1021,14 +1083,14 @@ void Mndo::MallocTempMatricesEachThreadCalcHessianSCF(double***** diatomicOve
10211083 OrbitalType_end,
10221084 CartesianType_end,
10231085 CartesianType_end);
1024- MallocerFreer::GetInstance()->Malloc<double>(diatomicTwoElecTwoCore1stDerivs,
1086+ MallocerFreer::GetInstance()->Malloc<double>(diatomicTwoElecsTwoCores1stDerivs,
10251087 this->molecule->GetNumberAtoms(),
10261088 dxy,
10271089 dxy,
10281090 dxy,
10291091 dxy,
10301092 CartesianType_end);
1031- MallocerFreer::GetInstance()->Malloc<double>(diatomicTwoElecTwoCore2ndDerivs,
1093+ MallocerFreer::GetInstance()->Malloc<double>(diatomicTwoElecsTwoCores2ndDerivs,
10321094 this->molecule->GetNumberAtoms(),
10331095 dxy,
10341096 dxy,
@@ -1051,12 +1113,12 @@ void Mndo::MallocTempMatricesEachThreadCalcHessianSCF(double***** diatomicOve
10511113 OrbitalType_end,
10521114 CartesianType_end,
10531115 CartesianType_end);
1054- MallocerFreer::GetInstance()->Malloc<double>(tmpDiatomicTwoElecTwoCore,
1116+ MallocerFreer::GetInstance()->Malloc<double>(tmpDiatomicTwoElecsTwoCores,
10551117 dxy,
10561118 dxy,
10571119 dxy,
10581120 dxy);
1059- MallocerFreer::GetInstance()->Malloc<double>(tmpDiatomicTwoElecTwoCore1stDerivs,
1121+ MallocerFreer::GetInstance()->Malloc<double>(tmpDiatomicTwoElecsTwoCores1stDerivs,
10601122 dxy,
10611123 dxy,
10621124 dxy,
@@ -1093,14 +1155,14 @@ void Mndo::MallocTempMatricesEachThreadCalcHessianSCF(double***** diatomicOve
10931155
10941156 void Mndo::FreeTempMatricesEachThreadCalcHessianSCF(double***** diatomicOverlapAOs1stDerivs,
10951157 double****** diatomicOverlapAOs2ndDerivs,
1096- double******* diatomicTwoElecTwoCore1stDerivs,
1097- double******** diatomicTwoElecTwoCore2ndDerivs,
1158+ double******* diatomicTwoElecsTwoCores1stDerivs,
1159+ double******** diatomicTwoElecsTwoCores2ndDerivs,
10981160 double*** tmpRotMat,
10991161 double*** tmpRotMat1stDeriv,
11001162 double**** tmpRotMat1stDerivs,
11011163 double***** tmpRotMat2ndDerivs,
1102- double***** tmpDiatomicTwoElecTwoCore,
1103- double****** tmpDiatomicTwoElecTwoCore1stDerivs,
1164+ double***** tmpDiatomicTwoElecsTwoCores,
1165+ double****** tmpDiatomicTwoElecsTwoCores1stDerivs,
11041166 double*** tmpDiaOverlapAOsInDiaFrame,
11051167 double*** tmpDiaOverlapAOs1stDerivInDiaFrame,
11061168 double*** tmpDiaOverlapAOs2ndDerivInDiaFrame,
@@ -1121,14 +1183,14 @@ void Mndo::FreeTempMatricesEachThreadCalcHessianSCF(double***** diatomicOverl
11211183 OrbitalType_end,
11221184 CartesianType_end,
11231185 CartesianType_end);
1124- MallocerFreer::GetInstance()->Free<double>(diatomicTwoElecTwoCore1stDerivs,
1186+ MallocerFreer::GetInstance()->Free<double>(diatomicTwoElecsTwoCores1stDerivs,
11251187 this->molecule->GetNumberAtoms(),
11261188 dxy,
11271189 dxy,
11281190 dxy,
11291191 dxy,
11301192 CartesianType_end);
1131- MallocerFreer::GetInstance()->Free<double>(diatomicTwoElecTwoCore2ndDerivs,
1193+ MallocerFreer::GetInstance()->Free<double>(diatomicTwoElecsTwoCores2ndDerivs,
11321194 this->molecule->GetNumberAtoms(),
11331195 dxy,
11341196 dxy,
@@ -1151,12 +1213,12 @@ void Mndo::FreeTempMatricesEachThreadCalcHessianSCF(double***** diatomicOverl
11511213 OrbitalType_end,
11521214 CartesianType_end,
11531215 CartesianType_end);
1154- MallocerFreer::GetInstance()->Free<double>(tmpDiatomicTwoElecTwoCore,
1216+ MallocerFreer::GetInstance()->Free<double>(tmpDiatomicTwoElecsTwoCores,
11551217 dxy,
11561218 dxy,
11571219 dxy,
11581220 dxy);
1159- MallocerFreer::GetInstance()->Free<double>(tmpDiatomicTwoElecTwoCore1stDerivs,
1221+ MallocerFreer::GetInstance()->Free<double>(tmpDiatomicTwoElecsTwoCores1stDerivs,
11601222 dxy,
11611223 dxy,
11621224 dxy,
@@ -1202,18 +1264,18 @@ double Mndo::GetAuxiliaryHessianElement1(int mu,
12021264 CartesianType axisA1,
12031265 CartesianType axisA2,
12041266 double const* const* orbitalElectronPopulation,
1205- double const* const* const* const* const* const* diatomicTwoElecTwoCore2ndDerivs) const{
1267+ double const* const* const* const* const* const* diatomicTwoElecsTwoCores2ndDerivs) const{
12061268 const Atom& atomA = *this->molecule->GetAtom(indexAtomA);
12071269 const Atom& atomC = *this->molecule->GetAtom(indexAtomC);
12081270 int firstAOIndexA = atomA.GetFirstAOIndex();
12091271 double value = orbitalElectronPopulation[mu]
12101272 [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];
12171279 return value*atomC.GetCoreCharge();
12181280 }
12191281
@@ -1228,7 +1290,7 @@ double Mndo::GetAuxiliaryHessianElement2(int mu,
12281290 CartesianType axisA,
12291291 CartesianType axisB,
12301292 double const* const* const* const* orbitalElectronPopulation1stDerivs,
1231- double const* const* const* const* const* diatomicTwoElecTwoCore1stDerivs) const{
1293+ double const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivs) const{
12321294 const Atom& atomA = *this->molecule->GetAtom(indexAtomA);
12331295 const Atom& atomC = *this->molecule->GetAtom(indexAtomC);
12341296 int firstAOIndexA = atomA.GetFirstAOIndex();
@@ -1236,11 +1298,11 @@ double Mndo::GetAuxiliaryHessianElement2(int mu,
12361298 [nu]
12371299 [indexAtomB]
12381300 [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];
12441306 return value*atomC.GetCoreCharge();
12451307 }
12461308
@@ -1254,18 +1316,18 @@ double Mndo::GetAuxiliaryHessianElement3(int lambda,
12541316 CartesianType axisA1,
12551317 CartesianType axisA2,
12561318 double const* const* orbitalElectronPopulation,
1257- double const* const* const* const* const* const* diatomicTwoElecTwoCore2ndDerivs) const{
1319+ double const* const* const* const* const* const* diatomicTwoElecsTwoCores2ndDerivs) const{
12581320 const Atom& atomA = *this->molecule->GetAtom(indexAtomA);
12591321 const Atom& atomC = *this->molecule->GetAtom(indexAtomC);
12601322 int firstAOIndexC = atomC.GetFirstAOIndex();
12611323 double value = orbitalElectronPopulation[lambda]
12621324 [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];
12691331 return value*atomA.GetCoreCharge();
12701332 }
12711333
@@ -1280,7 +1342,7 @@ double Mndo::GetAuxiliaryHessianElement4(int lambda,
12801342 CartesianType axisA,
12811343 CartesianType axisB,
12821344 double const* const* const* const* orbitalElectronPopulation1stDerivs,
1283- double const* const* const* const* const* diatomicTwoElecTwoCore1stDerivs) const{
1345+ double const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivs) const{
12841346 const Atom& atomA = *this->molecule->GetAtom(indexAtomA);
12851347 const Atom& atomC = *this->molecule->GetAtom(indexAtomC);
12861348 int firstAOIndexC = atomC.GetFirstAOIndex();
@@ -1288,11 +1350,11 @@ double Mndo::GetAuxiliaryHessianElement4(int lambda,
12881350 [sigma]
12891351 [indexAtomB]
12901352 [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];
12961358 return value*atomA.GetCoreCharge();
12971359 }
12981360
@@ -1365,7 +1427,7 @@ double Mndo::GetAuxiliaryHessianElement7(int mu,
13651427 CartesianType axisA1,
13661428 CartesianType axisA2,
13671429 double const* const* orbitalElectronPopulation,
1368- double const* const* const* const* const* const* diatomicTwoElecTwoCore2ndDerivs) const{
1430+ double const* const* const* const* const* const* diatomicTwoElecsTwoCores2ndDerivs) const{
13691431 const Atom& atomA = *molecule->GetAtom(indexAtomA);
13701432 const Atom& atomC = *molecule->GetAtom(indexAtomC);
13711433 int firstAOIndexA = atomA.GetFirstAOIndex();
@@ -1373,12 +1435,12 @@ double Mndo::GetAuxiliaryHessianElement7(int mu,
13731435 double temp1 = orbitalElectronPopulation[mu][nu]*orbitalElectronPopulation[lambda][sigma];
13741436 double temp2 = orbitalElectronPopulation[mu][lambda]*orbitalElectronPopulation[nu][sigma];
13751437 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];
13821444 return value;
13831445 }
13841446
@@ -1396,7 +1458,7 @@ double Mndo::GetAuxiliaryHessianElement8(int mu,
13961458 CartesianType axisB,
13971459 double const* const* orbitalElectronPopulation,
13981460 double const* const* const* const* orbitalElectronPopulation1stDerivs,
1399- double const* const* const* const* const* diatomicTwoElecTwoCore1stDerivs) const{
1461+ double const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivs) const{
14001462 const Atom& atomA = *molecule->GetAtom(indexAtomA);
14011463 const Atom& atomC = *molecule->GetAtom(indexAtomC);
14021464 int firstAOIndexA = atomA.GetFirstAOIndex();
@@ -1410,11 +1472,11 @@ double Mndo::GetAuxiliaryHessianElement8(int mu,
14101472 double temp4 = orbitalElectronPopulation [mu][lambda]
14111473 *orbitalElectronPopulation1stDerivs[nu][sigma] [indexAtomB][axisB];
14121474 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];
14181480 return value;
14191481 }
14201482
@@ -1428,8 +1490,8 @@ double Mndo::GetHessianElementSameAtomsSCF(int indexAtomA,
14281490 double const* const* const* const* orbitalElectronPopulation1stDerivs,
14291491 double const* const* const* const* diatomicOverlapAOs1stDerivs,
14301492 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{
14331495 double value=0.0;
14341496 int indexAtomB = indexAtomA;
14351497 const Atom& atomA = *this->molecule->GetAtom(indexAtomA);
@@ -1451,7 +1513,7 @@ double Mndo::GetHessianElementSameAtomsSCF(int indexAtomA,
14511513 static_cast<CartesianType>(axisA1),
14521514 static_cast<CartesianType>(axisA2),
14531515 orbitalElectronPopulation,
1454- diatomicTwoElecTwoCore2ndDerivs[indexAtomC]);
1516+ diatomicTwoElecsTwoCores2ndDerivs[indexAtomC]);
14551517 value -= this->GetAuxiliaryHessianElement2(mu,
14561518 nu,
14571519 indexAtomA,
@@ -1460,7 +1522,7 @@ double Mndo::GetHessianElementSameAtomsSCF(int indexAtomA,
14601522 static_cast<CartesianType>(axisA1),
14611523 static_cast<CartesianType>(axisA2),
14621524 orbitalElectronPopulation1stDerivs,
1463- diatomicTwoElecTwoCore1stDerivs[indexAtomC]);
1525+ diatomicTwoElecsTwoCores1stDerivs[indexAtomC]);
14641526 }
14651527 }
14661528 for(int lambda=firstAOIndexC; lambda<firstAOIndexC+numberAOsC; lambda++){
@@ -1472,7 +1534,7 @@ double Mndo::GetHessianElementSameAtomsSCF(int indexAtomA,
14721534 static_cast<CartesianType>(axisA1),
14731535 static_cast<CartesianType>(axisA2),
14741536 orbitalElectronPopulation,
1475- diatomicTwoElecTwoCore2ndDerivs[indexAtomC]);
1537+ diatomicTwoElecsTwoCores2ndDerivs[indexAtomC]);
14761538 value -= this->GetAuxiliaryHessianElement4(lambda,
14771539 sigma,
14781540 indexAtomA,
@@ -1481,7 +1543,7 @@ double Mndo::GetHessianElementSameAtomsSCF(int indexAtomA,
14811543 static_cast<CartesianType>(axisA1),
14821544 static_cast<CartesianType>(axisA2),
14831545 orbitalElectronPopulation1stDerivs,
1484- diatomicTwoElecTwoCore1stDerivs[indexAtomC]);
1546+ diatomicTwoElecsTwoCores1stDerivs[indexAtomC]);
14851547 }
14861548 }
14871549 for(int mu=firstAOIndexA; mu<=lastAOIndexA; mu++){
@@ -1518,7 +1580,7 @@ double Mndo::GetHessianElementSameAtomsSCF(int indexAtomA,
15181580 static_cast<CartesianType>(axisA1),
15191581 static_cast<CartesianType>(axisA2),
15201582 orbitalElectronPopulation,
1521- diatomicTwoElecTwoCore2ndDerivs[indexAtomC]);
1583+ diatomicTwoElecsTwoCores2ndDerivs[indexAtomC]);
15221584 value += this->GetAuxiliaryHessianElement8(mu,
15231585 nu,
15241586 lambda,
@@ -1530,7 +1592,7 @@ double Mndo::GetHessianElementSameAtomsSCF(int indexAtomA,
15301592 static_cast<CartesianType>(axisA2),
15311593 orbitalElectronPopulation,
15321594 orbitalElectronPopulation1stDerivs,
1533- diatomicTwoElecTwoCore1stDerivs[indexAtomC]);
1595+ diatomicTwoElecsTwoCores1stDerivs[indexAtomC]);
15341596 }
15351597 }
15361598 }
@@ -1565,8 +1627,8 @@ double Mndo::GetHessianElementDifferentAtomsSCF(int indexAtomA,
15651627 double const* const* const* const* orbitalElectronPopulation1stDerivs,
15661628 double const* const* const* const* diatomicOverlapAOs1stDerivs,
15671629 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{
15701632 double value=0.0;
15711633 const Atom& atomA = *this->molecule->GetAtom(indexAtomA);
15721634 const Atom& atomB = *this->molecule->GetAtom(indexAtomB);
@@ -1585,7 +1647,7 @@ double Mndo::GetHessianElementDifferentAtomsSCF(int indexAtomA,
15851647 static_cast<CartesianType>(axisA),
15861648 static_cast<CartesianType>(axisB),
15871649 orbitalElectronPopulation,
1588- diatomicTwoElecTwoCore2ndDerivs[indexAtomB]);
1650+ diatomicTwoElecsTwoCores2ndDerivs[indexAtomB]);
15891651 }
15901652 }
15911653 for(int lambda=firstAOIndexB; lambda<=lastAOIndexB; lambda++){
@@ -1597,7 +1659,7 @@ double Mndo::GetHessianElementDifferentAtomsSCF(int indexAtomA,
15971659 static_cast<CartesianType>(axisA),
15981660 static_cast<CartesianType>(axisB),
15991661 orbitalElectronPopulation,
1600- diatomicTwoElecTwoCore2ndDerivs[indexAtomB]);
1662+ diatomicTwoElecsTwoCores2ndDerivs[indexAtomB]);
16011663 }
16021664 }
16031665 for(int mu=firstAOIndexA; mu<=lastAOIndexA; mu++){
@@ -1625,7 +1687,7 @@ double Mndo::GetHessianElementDifferentAtomsSCF(int indexAtomA,
16251687 static_cast<CartesianType>(axisA),
16261688 static_cast<CartesianType>(axisB),
16271689 orbitalElectronPopulation,
1628- diatomicTwoElecTwoCore2ndDerivs[indexAtomB]);
1690+ diatomicTwoElecsTwoCores2ndDerivs[indexAtomB]);
16291691 }
16301692 }
16311693 }
@@ -1648,7 +1710,7 @@ double Mndo::GetHessianElementDifferentAtomsSCF(int indexAtomA,
16481710 static_cast<CartesianType>(axisA),
16491711 static_cast<CartesianType>(axisB),
16501712 orbitalElectronPopulation1stDerivs,
1651- diatomicTwoElecTwoCore1stDerivs[indexAtomC]);
1713+ diatomicTwoElecsTwoCores1stDerivs[indexAtomC]);
16521714 }
16531715 }
16541716 for(int lambda=firstAOIndexC; lambda<firstAOIndexC+numberAOsC; lambda++){
@@ -1661,7 +1723,7 @@ double Mndo::GetHessianElementDifferentAtomsSCF(int indexAtomA,
16611723 static_cast<CartesianType>(axisA),
16621724 static_cast<CartesianType>(axisB),
16631725 orbitalElectronPopulation1stDerivs,
1664- diatomicTwoElecTwoCore1stDerivs[indexAtomC]);
1726+ diatomicTwoElecsTwoCores1stDerivs[indexAtomC]);
16651727 }
16661728 }
16671729 for(int mu=firstAOIndexA; mu<=lastAOIndexA; mu++){
@@ -1692,7 +1754,7 @@ double Mndo::GetHessianElementDifferentAtomsSCF(int indexAtomA,
16921754 static_cast<CartesianType>(axisB),
16931755 orbitalElectronPopulation,
16941756 orbitalElectronPopulation1stDerivs,
1695- diatomicTwoElecTwoCore1stDerivs[indexAtomC]);
1757+ diatomicTwoElecsTwoCores1stDerivs[indexAtomC]);
16961758 }
16971759 }
16981760 }
@@ -1731,37 +1793,37 @@ void Mndo::CalcHessianSCF(double** hessianSCF, bool isMassWeighted) const{
17311793 stringstream ompErrors;
17321794 #pragma omp parallel
17331795 {
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
17531815
17541816 try{
17551817 this->MallocTempMatricesEachThreadCalcHessianSCF(&diatomicOverlapAOs1stDerivs,
17561818 &diatomicOverlapAOs2ndDerivs,
1757- &diatomicTwoElecTwoCore1stDerivs,
1758- &diatomicTwoElecTwoCore2ndDerivs,
1819+ &diatomicTwoElecsTwoCores1stDerivs,
1820+ &diatomicTwoElecsTwoCores2ndDerivs,
17591821 &tmpRotMat,
17601822 &tmpRotMat1stDeriv,
17611823 &tmpRotMat1stDerivs,
17621824 &tmpRotMat2ndDerivs,
1763- &tmpDiatomicTwoElecTwoCore,
1764- &tmpDiatomicTwoElecTwoCore1stDerivs,
1825+ &tmpDiatomicTwoElecsTwoCores,
1826+ &tmpDiatomicTwoElecsTwoCores1stDerivs,
17651827 &tmpDiaOverlapAOsInDiaFrame,
17661828 &tmpDiaOverlapAOs1stDerivInDiaFrame,
17671829 &tmpDiaOverlapAOs2ndDerivInDiaFrame,
@@ -1804,20 +1866,20 @@ void Mndo::CalcHessianSCF(double** hessianSCF, bool isMassWeighted) const{
18041866 tmpRotMat2ndDerivs,
18051867 indexAtomA,
18061868 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);
18211883 }
18221884 }
18231885
@@ -1837,8 +1899,8 @@ void Mndo::CalcHessianSCF(double** hessianSCF, bool isMassWeighted) const{
18371899 orbitalElectronPopulation1stDerivs,
18381900 diatomicOverlapAOs1stDerivs,
18391901 diatomicOverlapAOs2ndDerivs,
1840- diatomicTwoElecTwoCore1stDerivs,
1841- diatomicTwoElecTwoCore2ndDerivs);
1902+ diatomicTwoElecsTwoCores1stDerivs,
1903+ diatomicTwoElecsTwoCores2ndDerivs);
18421904 if(isMassWeighted){
18431905 hessianSCF[k][l] /= sqrt(atomA.GetCoreMass()*atomB.GetCoreMass());
18441906 }
@@ -1855,8 +1917,8 @@ void Mndo::CalcHessianSCF(double** hessianSCF, bool isMassWeighted) const{
18551917 orbitalElectronPopulation1stDerivs,
18561918 diatomicOverlapAOs1stDerivs,
18571919 diatomicOverlapAOs2ndDerivs,
1858- diatomicTwoElecTwoCore1stDerivs,
1859- diatomicTwoElecTwoCore2ndDerivs);
1920+ diatomicTwoElecsTwoCores1stDerivs,
1921+ diatomicTwoElecsTwoCores2ndDerivs);
18601922 if(isMassWeighted){
18611923 hessianSCF[k][l] /= atomA.GetCoreMass();
18621924 }
@@ -1873,14 +1935,14 @@ void Mndo::CalcHessianSCF(double** hessianSCF, bool isMassWeighted) const{
18731935 }
18741936 this->FreeTempMatricesEachThreadCalcHessianSCF(&diatomicOverlapAOs1stDerivs,
18751937 &diatomicOverlapAOs2ndDerivs,
1876- &diatomicTwoElecTwoCore1stDerivs,
1877- &diatomicTwoElecTwoCore2ndDerivs,
1938+ &diatomicTwoElecsTwoCores1stDerivs,
1939+ &diatomicTwoElecsTwoCores2ndDerivs,
18781940 &tmpRotMat,
18791941 &tmpRotMat1stDeriv,
18801942 &tmpRotMat1stDerivs,
18811943 &tmpRotMat2ndDerivs,
1882- &tmpDiatomicTwoElecTwoCore,
1883- &tmpDiatomicTwoElecTwoCore1stDerivs,
1944+ &tmpDiatomicTwoElecsTwoCores,
1945+ &tmpDiatomicTwoElecsTwoCores1stDerivs,
18841946 &tmpDiaOverlapAOsInDiaFrame,
18851947 &tmpDiaOverlapAOs1stDerivInDiaFrame,
18861948 &tmpDiaOverlapAOs2ndDerivInDiaFrame,
@@ -1988,12 +2050,12 @@ void Mndo::CalcOrbitalElectronPopulation1stDerivatives(double**** orbitalElectro
19882050 for(int indexAtomA=0; indexAtomA<this->molecule->GetNumberAtoms(); indexAtomA++){
19892051 for(int axis=XAxis; axis<CartesianType_end; axis++){
19902052 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));
19922054 for(int mu=0; mu<totalNumberAOs; mu++){
19932055 temp += orbitalElectronPopulation1stDerivs[mu][mu][indexAtomA][axis];
19942056 printf("%e\n",orbitalElectronPopulation1stDerivs[mu][mu][indexAtomA][axis]);
19952057 }
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);
19972059 }
19982060 }
19992061 */
@@ -2070,11 +2132,11 @@ void Mndo::CalcStaticFirstOrderFock(double* staticFirstOrderFock,
20702132 CartesianType axisA) const{
20712133 MallocerFreer::GetInstance()->Initialize<double>(staticFirstOrderFock,
20722134 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;
20782140
20792141 double** tmpDiaOverlapAOsInDiaFrame = NULL; // diatomic overlapAOs in diatomic frame
20802142 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,
20842146 double** tmpMatrixBC = NULL;
20852147 double* tmpVectorBC = NULL;
20862148 try{
2087- this->MallocTempMatricesStaticFirstOrderFock(&diatomicTwoElecTwoCore1stDerivs,
2149+ this->MallocTempMatricesStaticFirstOrderFock(&diatomicTwoElecsTwoCores1stDerivs,
20882150 &diatomicOverlapAOs1stDerivs,
20892151 &tmpRotMat,
20902152 &tmpRotMat1stDerivs,
2091- &tmpDiatomicTwoElecTwoCore);
2153+ &tmpDiatomicTwoElecsTwoCores);
20922154 MallocerFreer::GetInstance()->Malloc<double>(&tmpDiaOverlapAOsInDiaFrame, OrbitalType_end, OrbitalType_end);
20932155 MallocerFreer::GetInstance()->Malloc<double>(&tmpDiaOverlapAOs1stDerivInDiaFrame, OrbitalType_end, OrbitalType_end);
20942156 MallocerFreer::GetInstance()->Malloc<double>(&tmpRotMat1stDeriv, OrbitalType_end, OrbitalType_end);
@@ -2108,11 +2170,11 @@ void Mndo::CalcStaticFirstOrderFock(double* staticFirstOrderFock,
21082170 int coreChargeB = atomB.GetCoreCharge();
21092171
21102172 // 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);
21162178 // calc. first derivative of overlapAOs.
21172179 this->CalcDiatomicOverlapAOs1stDerivatives(diatomicOverlapAOs1stDerivs,
21182180 tmpDiaOverlapAOsInDiaFrame,
@@ -2157,22 +2219,22 @@ void Mndo::CalcStaticFirstOrderFock(double* staticFirstOrderFock,
21572219 *this->fockMatrix[moI][lambda]
21582220 *this->fockMatrix[moJ][mu]
21592221 *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];
21652227 } //sigma-loop
21662228 } // lambda-loop
21672229
21682230 double temp2 = this->fockMatrix[moI][mu]
21692231 *this->fockMatrix[moJ][nu]
21702232 *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];
21762238 staticFirstOrderFock[i] -= temp2;
21772239
21782240 } // nu-loop
@@ -2184,11 +2246,11 @@ void Mndo::CalcStaticFirstOrderFock(double* staticFirstOrderFock,
21842246 double temp3 = this->fockMatrix[moI][lambda]
21852247 *this->fockMatrix[moJ][sigma]
21862248 *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];
21922254 staticFirstOrderFock[i] -= temp3;
21932255
21942256 } //sigma-loop
@@ -2216,11 +2278,11 @@ void Mndo::CalcStaticFirstOrderFock(double* staticFirstOrderFock,
22162278 }
22172279 }
22182280 catch(MolDSException ex){
2219- this->FreeTempMatricesStaticFirstOrderFock(&diatomicTwoElecTwoCore1stDerivs,
2281+ this->FreeTempMatricesStaticFirstOrderFock(&diatomicTwoElecsTwoCores1stDerivs,
22202282 &diatomicOverlapAOs1stDerivs,
22212283 &tmpRotMat,
22222284 &tmpRotMat1stDerivs,
2223- &tmpDiatomicTwoElecTwoCore);
2285+ &tmpDiatomicTwoElecsTwoCores);
22242286 MallocerFreer::GetInstance()->Free<double>(&tmpDiaOverlapAOsInDiaFrame, OrbitalType_end, OrbitalType_end);
22252287 MallocerFreer::GetInstance()->Free<double>(&tmpDiaOverlapAOs1stDerivInDiaFrame, OrbitalType_end, OrbitalType_end);
22262288 //MallocerFreer::GetInstance()->Free<double>(&tmpRotMat, OrbitalType_end, OrbitalType_end);
@@ -2232,11 +2294,11 @@ void Mndo::CalcStaticFirstOrderFock(double* staticFirstOrderFock,
22322294 MallocerFreer::GetInstance()->Free<double>(&tmpVectorBC, OrbitalType_end*OrbitalType_end);
22332295 throw ex;
22342296 }
2235- this->FreeTempMatricesStaticFirstOrderFock(&diatomicTwoElecTwoCore1stDerivs,
2297+ this->FreeTempMatricesStaticFirstOrderFock(&diatomicTwoElecsTwoCores1stDerivs,
22362298 &diatomicOverlapAOs1stDerivs,
22372299 &tmpRotMat,
22382300 &tmpRotMat1stDerivs,
2239- &tmpDiatomicTwoElecTwoCore);
2301+ &tmpDiatomicTwoElecsTwoCores);
22402302 MallocerFreer::GetInstance()->Free<double>(&tmpDiaOverlapAOsInDiaFrame, OrbitalType_end, OrbitalType_end);
22412303 MallocerFreer::GetInstance()->Free<double>(&tmpDiaOverlapAOs1stDerivInDiaFrame, OrbitalType_end, OrbitalType_end);
22422304 //MallocerFreer::GetInstance()->Free<double>(&tmpRotMat, OrbitalType_end, OrbitalType_end);
@@ -2255,12 +2317,12 @@ void Mndo::CalcStaticFirstOrderFock(double* staticFirstOrderFock,
22552317 */
22562318 }
22572319
2258-void Mndo::MallocTempMatricesStaticFirstOrderFock(double****** diatomicTwoElecTwoCore1stDeriv,
2320+void Mndo::MallocTempMatricesStaticFirstOrderFock(double****** diatomicTwoElecsTwoCores1stDeriv,
22592321 double**** diatomicOverlapAOs1stDeriv,
22602322 double*** tmpRotMat,
22612323 double**** tmpRotMat1stDerivs,
2262- double***** tmpDiatomicTwoElecTwoCore)const{
2263- MallocerFreer::GetInstance()->Malloc<double>(diatomicTwoElecTwoCore1stDeriv,
2324+ double***** tmpDiatomicTwoElecsTwoCores)const{
2325+ MallocerFreer::GetInstance()->Malloc<double>(diatomicTwoElecsTwoCores1stDeriv,
22642326 dxy,
22652327 dxy,
22662328 dxy,
@@ -2277,19 +2339,19 @@ void Mndo::MallocTempMatricesStaticFirstOrderFock(double****** diatomicTwoElecTw
22772339 OrbitalType_end,
22782340 OrbitalType_end,
22792341 CartesianType_end);
2280- MallocerFreer::GetInstance()->Malloc<double>(tmpDiatomicTwoElecTwoCore,
2342+ MallocerFreer::GetInstance()->Malloc<double>(tmpDiatomicTwoElecsTwoCores,
22812343 dxy,
22822344 dxy,
22832345 dxy,
22842346 dxy);
22852347 }
22862348
2287-void Mndo::FreeTempMatricesStaticFirstOrderFock(double****** diatomicTwoElecTwoCore1stDeriv,
2349+void Mndo::FreeTempMatricesStaticFirstOrderFock(double****** diatomicTwoElecsTwoCores1stDeriv,
22882350 double**** diatomicOverlapAOs1stDeriv,
22892351 double*** tmpRotMat,
22902352 double**** tmpRotMat1stDerivs,
2291- double***** tmpDiatomicTwoElecTwoCore)const{
2292- MallocerFreer::GetInstance()->Free<double>(diatomicTwoElecTwoCore1stDeriv,
2353+ double***** tmpDiatomicTwoElecsTwoCores)const{
2354+ MallocerFreer::GetInstance()->Free<double>(diatomicTwoElecsTwoCores1stDeriv,
22932355 dxy,
22942356 dxy,
22952357 dxy,
@@ -2306,7 +2368,7 @@ void Mndo::FreeTempMatricesStaticFirstOrderFock(double****** diatomicTwoElecTwoC
23062368 OrbitalType_end,
23072369 OrbitalType_end,
23082370 CartesianType_end);
2309- MallocerFreer::GetInstance()->Free<double>(tmpDiatomicTwoElecTwoCore,
2371+ MallocerFreer::GetInstance()->Free<double>(tmpDiatomicTwoElecsTwoCores,
23102372 dxy,
23112373 dxy,
23122374 dxy,
@@ -2405,7 +2467,7 @@ void Mndo::FreeTempMatricesSolveCPHF(double*** matrixCPHF,
24052467 void Mndo::CalcForceSCFElecCoreAttractionPart(double* force,
24062468 int indexAtomA,
24072469 int indexAtomB,
2408- double const* const* const* const* const* diatomicTwoElecTwoCore1stDerivs) const{
2470+ double const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivs) const{
24092471 const Atom& atomA = *this->molecule->GetAtom(indexAtomA);
24102472 int firstAOIndexA = atomA.GetFirstAOIndex();
24112473 int lastAOIndexA = atomA.GetLastAOIndex();
@@ -2418,7 +2480,7 @@ void Mndo::CalcForceSCFElecCoreAttractionPart(double* force,
24182480 indexAtomB,
24192481 mu-firstAOIndexA,
24202482 nu-firstAOIndexA,
2421- diatomicTwoElecTwoCore1stDerivs,
2483+ diatomicTwoElecsTwoCores1stDerivs,
24222484 (CartesianType)i);
24232485 }
24242486 }
@@ -2457,7 +2519,7 @@ void Mndo::CalcForceSCFOverlapAOsPart(double* force,
24572519 void Mndo::CalcForceSCFTwoElecPart(double* force,
24582520 int indexAtomA,
24592521 int indexAtomB,
2460- double const* const* const* const* const* diatomicTwoElecTwoCore1stDerivs) const{
2522+ double const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivs) const{
24612523 const Atom& atomA = *this->molecule->GetAtom(indexAtomA);
24622524 const Atom& atomB = *this->molecule->GetAtom(indexAtomB);
24632525 int firstAOIndexA = atomA.GetFirstAOIndex();
@@ -2472,19 +2534,19 @@ void Mndo::CalcForceSCFTwoElecPart(double* force,
24722534 force[i] -= 0.5
24732535 *this->orbitalElectronPopulation[mu][nu]
24742536 *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];
24802542 force[i] += 0.25
24812543 *this->orbitalElectronPopulation[mu][lambda]
24822544 *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];
24882550 }
24892551 }
24902552 }
@@ -2496,7 +2558,7 @@ void Mndo::CalcForceExcitedStaticPart(double* force,
24962558 int elecStateIndex,
24972559 int indexAtomA,
24982560 int indexAtomB,
2499- double const* const* const* const* const* diatomicTwoElecTwoCore1stDerivs) const{
2561+ double const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivs) const{
25002562 const Atom& atomA = *this->molecule->GetAtom(indexAtomA);
25012563 const Atom& atomB = *this->molecule->GetAtom(indexAtomB);
25022564 int firstAOIndexA = atomA.GetFirstAOIndex();
@@ -2513,11 +2575,11 @@ void Mndo::CalcForceExcitedStaticPart(double* force,
25132575 -1.0*this->etaMatrixForce[elecStateIndex][mu][lambda]
25142576 *this->etaMatrixForce[elecStateIndex][nu][sigma];
25152577 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];
25212583 }
25222584 }
25232585 }
@@ -2529,7 +2591,7 @@ void Mndo::CalcForceExcitedElecCoreAttractionPart(double* force,
25292591 int elecStateIndex,
25302592 int indexAtomA,
25312593 int indexAtomB,
2532- double const* const* const* const* const* diatomicTwoElecTwoCore1stDerivs) const{
2594+ double const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivs) const{
25332595 const Atom& atomA = *this->molecule->GetAtom(indexAtomA);
25342596 int firstAOIndexA = atomA.GetFirstAOIndex();
25352597 int lastAOIndexA = atomA.GetLastAOIndex();
@@ -2542,7 +2604,7 @@ void Mndo::CalcForceExcitedElecCoreAttractionPart(double* force,
25422604 indexAtomB,
25432605 mu-firstAOIndexA,
25442606 nu-firstAOIndexA,
2545- diatomicTwoElecTwoCore1stDerivs,
2607+ diatomicTwoElecsTwoCores1stDerivs,
25462608 (CartesianType)i);
25472609 }
25482610 }
@@ -2553,7 +2615,7 @@ void Mndo::CalcForceExcitedTwoElecPart(double* force,
25532615 int elecStateIndex,
25542616 int indexAtomA,
25552617 int indexAtomB,
2556- double const* const* const* const* const* diatomicTwoElecTwoCore1stDerivs) const{
2618+ double const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivs) const{
25572619 const Atom& atomA = *this->molecule->GetAtom(indexAtomA);
25582620 const Atom& atomB = *this->molecule->GetAtom(indexAtomB);
25592621 int firstAOIndexA = atomA.GetFirstAOIndex();
@@ -2567,19 +2629,19 @@ void Mndo::CalcForceExcitedTwoElecPart(double* force,
25672629 for(int i=0; i<CartesianType_end; i++){
25682630 force[i] -= this->zMatrixForce[elecStateIndex][mu][nu]
25692631 *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];
25752637 force[i] += 0.50
25762638 *this->zMatrixForce[elecStateIndex][mu][lambda]
25772639 *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];
25832645 }
25842646 }
25852647 }
@@ -2608,10 +2670,10 @@ void Mndo::CalcForce(const vector<int>& elecStates){
26082670 #pragma omp parallel
26092671 {
26102672 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;
26152677
26162678 double** tmpDiaOverlapAOsInDiaFrame = NULL; // diatomic overlapAOs in diatomic frame
26172679 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){
26222684 double* tmpVectorBC = NULL; // used in dgemmm
26232685 try{
26242686 this->MallocTempMatricesCalcForce(&diatomicOverlapAOs1stDerivs,
2625- &diatomicTwoElecTwoCore1stDerivs,
2687+ &diatomicTwoElecsTwoCores1stDerivs,
26262688 &tmpDiaOverlapAOsInDiaFrame,
26272689 &tmpDiaOverlapAOs1stDerivInDiaFrame,
26282690 &tmpRotMat,
@@ -2632,7 +2694,7 @@ void Mndo::CalcForce(const vector<int>& elecStates){
26322694 &tmpRotatedDiatomicOverlapVec,
26332695 &tmpMatrixBC,
26342696 &tmpVectorBC,
2635- &tmpDiatomicTwoElecTwoCore);
2697+ &tmpDiatomicTwoElecsTwoCores);
26362698
26372699 #pragma omp for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
26382700 for(int b=0; b<this->molecule->GetNumberAtoms(); b++){
@@ -2655,11 +2717,11 @@ void Mndo::CalcForce(const vector<int>& elecStates){
26552717 atomA,
26562718 atomB);
26572719 // 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);
26632725
26642726 // core repulsion part
26652727 double coreRepulsion[CartesianType_end] = {0.0,0.0,0.0};
@@ -2676,7 +2738,7 @@ void Mndo::CalcForce(const vector<int>& elecStates){
26762738 this->CalcForceSCFElecCoreAttractionPart(forceElecCoreAttPart,
26772739 a,
26782740 b,
2679- diatomicTwoElecTwoCore1stDerivs);
2741+ diatomicTwoElecsTwoCores1stDerivs);
26802742 // overlapAOs part (ground state)
26812743 double forceOverlapAOsPart[CartesianType_end] = {0.0,0.0,0.0};
26822744 this->CalcForceSCFOverlapAOsPart(forceOverlapAOsPart,
@@ -2688,7 +2750,7 @@ void Mndo::CalcForce(const vector<int>& elecStates){
26882750 this->CalcForceSCFTwoElecPart(forceTwoElecPart,
26892751 a,
26902752 b,
2691- diatomicTwoElecTwoCore1stDerivs);
2753+ diatomicTwoElecsTwoCores1stDerivs);
26922754 // sum up contributions from each part (ground state)
26932755 #pragma omp critical
26942756 {
@@ -2713,7 +2775,7 @@ void Mndo::CalcForce(const vector<int>& elecStates){
27132775 n,
27142776 a,
27152777 b,
2716- diatomicTwoElecTwoCore1stDerivs);
2778+ diatomicTwoElecsTwoCores1stDerivs);
27172779 // sum up contributions from static part (excited state)
27182780 #pragma omp critical
27192781 {
@@ -2731,7 +2793,7 @@ void Mndo::CalcForce(const vector<int>& elecStates){
27312793 n,
27322794 a,
27332795 b,
2734- diatomicTwoElecTwoCore1stDerivs);
2796+ diatomicTwoElecsTwoCores1stDerivs);
27352797 // overlapAOs part (excited states)
27362798 double forceExcitedOverlapAOsPart[CartesianType_end] = {0.0,0.0,0.0};
27372799 this->CalcForceExcitedOverlapAOsPart(forceExcitedOverlapAOsPart,
@@ -2745,7 +2807,7 @@ void Mndo::CalcForce(const vector<int>& elecStates){
27452807 n,
27462808 a,
27472809 b,
2748- diatomicTwoElecTwoCore1stDerivs);
2810+ diatomicTwoElecsTwoCores1stDerivs);
27492811 // sum up contributions from response part (excited state)
27502812 #pragma omp critical
27512813 {
@@ -2767,7 +2829,7 @@ void Mndo::CalcForce(const vector<int>& elecStates){
27672829 ex.Serialize(ompErrors);
27682830 }
27692831 this->FreeTempMatricesCalcForce(&diatomicOverlapAOs1stDerivs,
2770- &diatomicTwoElecTwoCore1stDerivs,
2832+ &diatomicTwoElecsTwoCores1stDerivs,
27712833 &tmpDiaOverlapAOsInDiaFrame,
27722834 &tmpDiaOverlapAOs1stDerivInDiaFrame,
27732835 &tmpRotMat,
@@ -2777,7 +2839,7 @@ void Mndo::CalcForce(const vector<int>& elecStates){
27772839 &tmpRotatedDiatomicOverlapVec,
27782840 &tmpMatrixBC,
27792841 &tmpVectorBC,
2780- &tmpDiatomicTwoElecTwoCore);
2842+ &tmpDiatomicTwoElecsTwoCores);
27812843 } // end of omp-parallelized region
27822844 // Exception throwing for omp-region
27832845 if(!ompErrors.str().empty()){
@@ -2791,7 +2853,7 @@ void Mndo::CalcForce(const vector<int>& elecStates){
27912853 }
27922854
27932855 void Mndo::MallocTempMatricesCalcForce(double**** diatomicOverlapAOs1stDerivs,
2794- double****** diatomicTwoElecTwoCore1stDerivs,
2856+ double****** diatomicTwoElecsTwoCores1stDerivs,
27952857 double*** tmpDiaOverlapAOsInDiaFrame,
27962858 double*** tmpDiaOverlapAOs1stDerivInDiaFrame,
27972859 double*** tmpRotMat,
@@ -2801,12 +2863,12 @@ void Mndo::MallocTempMatricesCalcForce(double**** diatomicOverlapAOs1stDerivs,
28012863 double** tmpRotatedDiatomicOverlapVec,
28022864 double*** tmpMatrixBC,
28032865 double** tmpVectorBC,
2804- double***** tmpDiatomicTwoElecTwoCore) const{
2866+ double***** tmpDiatomicTwoElecsTwoCores) const{
28052867 MallocerFreer::GetInstance()->Malloc<double>(diatomicOverlapAOs1stDerivs,
28062868 OrbitalType_end,
28072869 OrbitalType_end,
28082870 CartesianType_end);
2809- MallocerFreer::GetInstance()->Malloc<double>(diatomicTwoElecTwoCore1stDerivs,
2871+ MallocerFreer::GetInstance()->Malloc<double>(diatomicTwoElecsTwoCores1stDerivs,
28102872 dxy,
28112873 dxy,
28122874 dxy,
@@ -2838,7 +2900,7 @@ void Mndo::MallocTempMatricesCalcForce(double**** diatomicOverlapAOs1stDerivs,
28382900 OrbitalType_end);
28392901 MallocerFreer::GetInstance()->Malloc<double>(tmpVectorBC,
28402902 OrbitalType_end*OrbitalType_end);
2841- MallocerFreer::GetInstance()->Malloc<double>(tmpDiatomicTwoElecTwoCore,
2903+ MallocerFreer::GetInstance()->Malloc<double>(tmpDiatomicTwoElecsTwoCores,
28422904 dxy,
28432905 dxy,
28442906 dxy,
@@ -2846,7 +2908,7 @@ void Mndo::MallocTempMatricesCalcForce(double**** diatomicOverlapAOs1stDerivs,
28462908 }
28472909
28482910 void Mndo::FreeTempMatricesCalcForce(double**** diatomicOverlapAOs1stDerivs,
2849- double****** diatomicTwoElecTwoCore1stDerivs,
2911+ double****** diatomicTwoElecsTwoCores1stDerivs,
28502912 double*** tmpDiaOverlapAOsInDiaFrame,
28512913 double*** tmpDiaOverlapAOs1stDerivInDiaFrame,
28522914 double*** tmpRotMat,
@@ -2856,12 +2918,12 @@ void Mndo::FreeTempMatricesCalcForce(double**** diatomicOverlapAOs1stDerivs,
28562918 double** tmpRotatedDiatomicOverlapVec,
28572919 double*** tmpMatrixBC,
28582920 double** tmpVectorBC,
2859- double***** tmpDiatomicTwoElecTwoCore) const{
2921+ double***** tmpDiatomicTwoElecsTwoCores) const{
28602922 MallocerFreer::GetInstance()->Free<double>(diatomicOverlapAOs1stDerivs,
28612923 OrbitalType_end,
28622924 OrbitalType_end,
28632925 CartesianType_end);
2864- MallocerFreer::GetInstance()->Free<double>(diatomicTwoElecTwoCore1stDerivs,
2926+ MallocerFreer::GetInstance()->Free<double>(diatomicTwoElecsTwoCores1stDerivs,
28652927 dxy,
28662928 dxy,
28672929 dxy,
@@ -2893,7 +2955,7 @@ void Mndo::FreeTempMatricesCalcForce(double**** diatomicOverlapAOs1stDerivs,
28932955 OrbitalType_end);
28942956 MallocerFreer::GetInstance()->Free<double>(tmpVectorBC,
28952957 OrbitalType_end*OrbitalType_end);
2896- MallocerFreer::GetInstance()->Free<double>(tmpDiatomicTwoElecTwoCore,
2958+ MallocerFreer::GetInstance()->Free<double>(tmpDiatomicTwoElecsTwoCores,
28972959 dxy,
28982960 dxy,
28992961 dxy,
@@ -2926,12 +2988,12 @@ double Mndo::GetSmallQElement(int moI,
29262988 for(int lambda=firstAOIndexB; lambda<=lastAOIndexB; lambda++){
29272989 for(int sigma=lambda; sigma<=lastAOIndexB; sigma++){
29282990 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];
29352997 double temp = 0.0;
29362998 if(isMoPOcc){
29372999 int p = numberOcc - (moP+1);
@@ -3201,7 +3263,7 @@ double Mndo::GetAuxiliaryKNRKRElement(int moI, int moJ, int moK, int moL) const{
32013263 }
32023264 double gamma = 0.0;
32033265 if(A!=B){
3204- gamma = this->twoElecTwoCore[A][B][muOffSet][nuOffSet][lambdaOffSet][sigmaOffSet];
3266+ gamma = this->twoElecsTwoAtomCores[A][B][muOffSet][nuOffSet][lambdaOffSet][sigmaOffSet];
32053267 }
32063268 else{
32073269 if(mu==nu && lambda==sigma){
@@ -3289,12 +3351,12 @@ double Mndo::GetAuxiliaryKNRKRElement(int moI, int moJ, int moK, int moL) const{
32893351 for(int sigma=firstAOIndexB; sigma<=lastAOIndexB; sigma++){
32903352 twoElec[A*dxy*dxy+(mu-firstAOIndexA)*dxy+(nu-firstAOIndexA)]
32913353 [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];
32983360 }
32993361 }
33003362 }
@@ -3411,12 +3473,12 @@ double Mndo::GetAuxiliaryKNRKRElement(int moI, int moJ, int moK, int moL) const{
34113473 for(int sigma=firstAOIndexB; sigma<=lastAOIndexB; sigma++){
34123474 twoElec[A*dxy*dxy+(mu-firstAOIndexA)*dxy+(nu-firstAOIndexA)]
34133475 [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];
34203482 }
34213483 }
34223484 }
@@ -3486,15 +3548,22 @@ double Mndo::GetAuxiliaryKNRKRElement(int moI, int moJ, int moK, int moL) const{
34863548 return value;
34873549 }
34883550
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{
34913560 #ifdef MOLDS_DBG
3492- if(twoElecTwoCore == NULL){
3493- throw MolDSException(this->errorMessageCalcTwoElecTwoCoreNullMatrix);
3561+ if(twoElecsTwoAtomCores == NULL){
3562+ throw MolDSException(this->errorMessageCalcTwoElecsTwoAtomCoresNullMatrix);
34943563 }
34953564 #endif
34963565 int totalNumberAtoms = molecule.GetNumberAtoms();
3497- MallocerFreer::GetInstance()->Initialize<double>(twoElecTwoCore,
3566+ MallocerFreer::GetInstance()->Initialize<double>(twoElecsTwoAtomCores,
34983567 totalNumberAtoms,
34993568 totalNumberAtoms,
35003569 dxy, dxy, dxy, dxy);
@@ -3512,34 +3581,34 @@ void Mndo::CalcTwoElecTwoCore(double****** twoElecTwoCore,
35123581 if(mpiRank == calcRank){
35133582 #pragma omp parallel
35143583 {
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;
35203589 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);
35263595 // note that terms with condition a==b are not needed to calculate.
35273596 #pragma omp for schedule(dynamic, MOLDS_OMP_DYNAMIC_CHUNK_SIZE)
35283597 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);
35353604 int i=0;
35363605 for(int mu=0; mu<dxy; mu++){
35373606 for(int nu=mu; nu<dxy; nu++){
35383607 int j=0;
35393608 for(int lambda=0; lambda<dxy; lambda++){
35403609 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];
35433612 j++;
35443613 }
35453614 }
@@ -3552,11 +3621,11 @@ void Mndo::CalcTwoElecTwoCore(double****** twoElecTwoCore,
35523621 #pragma omp critical
35533622 ex.Serialize(errorStream);
35543623 }
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);
35603629 }
35613630 }
35623631 if(errorStream.str().empty()){
@@ -3565,7 +3634,7 @@ void Mndo::CalcTwoElecTwoCore(double****** twoElecTwoCore,
35653634 OrbitalType twoElecLimit = dxy;
35663635 int numBuff = (twoElecLimit+1)*twoElecLimit/2;
35673636 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);
35693638 }
35703639 }
35713640 }
@@ -3584,15 +3653,15 @@ void Mndo::CalcTwoElecTwoCore(double****** twoElecTwoCore,
35843653 int j=0;
35853654 for(int lambda=0; lambda<dxy; lambda++){
35863655 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;
35963665 j++;
35973666 }
35983667 }
@@ -3601,7 +3670,124 @@ void Mndo::CalcTwoElecTwoCore(double****** twoElecTwoCore,
36013670 }
36023671 }
36033672 }
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) );
36043697
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+ }
36053791 }
36063792
36073793 // Calculation of two electrons two cores integral (mu, nu | lambda, sigma) in space fixed frame,
@@ -3611,28 +3797,39 @@ void Mndo::CalcTwoElecTwoCore(double****** twoElecTwoCore,
36113797 // Note that atomA != atomB.
36123798 // Note taht d-orbital cannot be treated,
36133799 // 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+ }
36313828 }
36323829
36333830 #ifdef MOLDS_DBG
36343831 if(matrix == NULL){
3635- throw MolDSException(this->errorMessageCalcDiatomicTwoElecTwoCoreNullMatrix);
3832+ throw MolDSException(this->errorMessageCalcDiatomicTwoElecsTwoCoresNullMatrix);
36363833 }
36373834 #endif
36383835 MallocerFreer::GetInstance()->Initialize<double>(matrix, dxy, dxy, dxy, dxy);
@@ -3659,7 +3856,7 @@ void Mndo::CalcDiatomicTwoElecTwoCore(double**** matrix,
36593856 }
36603857 // rotate matirix into the space frame
36613858 this->CalcRotatingMatrix(tmpRotMat, atomA, atomB);
3662- this->RotateDiatomicTwoElecTwoCoreToSpaceFrame(matrix, tmpVec, tmpRotMat, tmpMatrixBC, tmpVectorBC);
3859+ this->RotateDiatomicTwoElecsTwoCoresToSpaceFrame(matrix, tmpVec, tmpRotMat, tmpMatrixBC, tmpVectorBC);
36633860
36643861 /*
36653862 this->OutputLog("(mu, nu | lambda, sigma) matrix\n");
@@ -3679,6 +3876,24 @@ void Mndo::CalcDiatomicTwoElecTwoCore(double**** matrix,
36793876 */
36803877 }
36813878
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+
36823897 // Calculation of first derivatives of the two electrons two cores integral in space fixed frame,
36833898 // (mu, nu | lambda, sigma), taht is, Eq. (9) in ref. [DT_1977-2].
36843899 // mu and nu are included in atomA's AOs.
@@ -3687,17 +3902,17 @@ void Mndo::CalcDiatomicTwoElecTwoCore(double**** matrix,
36873902 // Note that atomA != atomB.
36883903 // Note taht d-orbital cannot be treated,
36893904 // 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{
36963911 const Atom& atomA = *this->molecule->GetAtom(indexAtomA);
36973912 const Atom& atomB = *this->molecule->GetAtom(indexAtomB);
36983913 if(indexAtomA == indexAtomB){
36993914 stringstream ss;
3700- ss << this->errorMessageCalcDiatomicTwoElecTwoCore1stDerivativesSameAtoms;
3915+ ss << this->errorMessageCalcDiatomicTwoElecsTwoCores1stDerivativesSameAtoms;
37013916 ss << this->errorMessageAtomA << indexAtomA
37023917 << AtomTypeStr(atomA.GetAtomType()) << endl;
37033918 ss << this->errorMessageAtomB << indexAtomB
@@ -3707,7 +3922,7 @@ void Mndo::CalcDiatomicTwoElecTwoCore1stDerivatives(double***** matrix,
37073922
37083923 #ifdef MOLDS_DBG
37093924 if(matrix == NULL){
3710- throw MolDSException(this->errorMessageCalcDiatomicTwoElecTwoCore1stDerivativesNullMatrix);
3925+ throw MolDSException(this->errorMessageCalcDiatomicTwoElecsTwoCores1stDerivativesNullMatrix);
37113926 }
37123927 #endif
37133928 MallocerFreer::GetInstance()->Initialize<double>(matrix,
@@ -3736,7 +3951,7 @@ void Mndo::CalcDiatomicTwoElecTwoCore1stDerivatives(double***** matrix,
37363951 matrix[nu][mu][sigma][lambda][dimA] = matrix[mu][nu][lambda][sigma][dimA];
37373952 matrix[mu][nu][sigma][lambda][dimA] = matrix[mu][nu][lambda][sigma][dimA];
37383953 }
3739- tmpDiatomicTwoElecTwoCore[mu][nu][lambda][sigma]
3954+ tmpDiatomicTwoElecsTwoCores[mu][nu][lambda][sigma]
37403955 = this->GetNddoRepulsionIntegral(
37413956 atomA,
37423957 atomA.GetValence(mu),
@@ -3744,9 +3959,9 @@ void Mndo::CalcDiatomicTwoElecTwoCore1stDerivatives(double***** matrix,
37443959 atomB,
37453960 atomB.GetValence(lambda),
37463961 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];
37503965 }
37513966 }
37523967 }
@@ -3755,10 +3970,10 @@ void Mndo::CalcDiatomicTwoElecTwoCore1stDerivatives(double***** matrix,
37553970 // rotate matirix into the space frame
37563971 this->CalcRotatingMatrix(tmpRotMat, atomA, atomB);
37573972 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);
37623977 }
37633978
37643979 // Calculation of second derivatives of the two electrons two cores integral in space fixed frame,
@@ -3769,19 +3984,19 @@ void Mndo::CalcDiatomicTwoElecTwoCore1stDerivatives(double***** matrix,
37693984 // Note that atomA != atomB.
37703985 // Note taht d-orbital cannot be treated,
37713986 // 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{
37803995 const Atom& atomA = *this->molecule->GetAtom(indexAtomA);
37813996 const Atom& atomB = *this->molecule->GetAtom(indexAtomB);
37823997 if(indexAtomA == indexAtomB){
37833998 stringstream ss;
3784- ss << this->errorMessageCalcDiatomicTwoElecTwoCore2ndDerivativesSameAtoms;
3999+ ss << this->errorMessageCalcDiatomicTwoElecsTwoCores2ndDerivativesSameAtoms;
37854000 ss << this->errorMessageAtomA << indexAtomA
37864001 << AtomTypeStr(atomA.GetAtomType()) << endl;
37874002 ss << this->errorMessageAtomB << indexAtomB
@@ -3791,7 +4006,7 @@ void Mndo::CalcDiatomicTwoElecTwoCore2ndDerivatives(double****** matrix,
37914006
37924007 #ifdef MOLDS_DBG
37934008 if(matrix == NULL){
3794- throw MolDSException(this->errorMessageCalcDiatomicTwoElecTwoCore2ndDerivativesNullMatrix);
4009+ throw MolDSException(this->errorMessageCalcDiatomicTwoElecsTwoCores2ndDerivativesNullMatrix);
37954010 }
37964011 #endif
37974012 MallocerFreer::GetInstance()->Initialize<double>(matrix,
@@ -3820,7 +4035,7 @@ void Mndo::CalcDiatomicTwoElecTwoCore2ndDerivatives(double****** matrix,
38204035 static_cast<CartesianType>(dimA1),
38214036 static_cast<CartesianType>(dimA2));
38224037 }
3823- tmpDiatomicTwoElecTwoCore1stDerivs[mu][nu][lambda][sigma][dimA1]
4038+ tmpDiatomicTwoElecsTwoCores1stDerivs[mu][nu][lambda][sigma][dimA1]
38244039 = this->GetNddoRepulsionIntegral1stDerivative(
38254040 atomA,
38264041 atomA.GetValence(mu),
@@ -3830,7 +4045,7 @@ void Mndo::CalcDiatomicTwoElecTwoCore2ndDerivatives(double****** matrix,
38304045 atomB.GetValence(sigma),
38314046 static_cast<CartesianType>(dimA1));
38324047 }
3833- tmpDiatomicTwoElecTwoCore[mu][nu][lambda][sigma]
4048+ tmpDiatomicTwoElecsTwoCores[mu][nu][lambda][sigma]
38344049 = this->GetNddoRepulsionIntegral(
38354050 atomA,
38364051 atomA.GetValence(mu),
@@ -3847,21 +4062,21 @@ void Mndo::CalcDiatomicTwoElecTwoCore2ndDerivatives(double****** matrix,
38474062 this->CalcRotatingMatrix(tmpRotMat, atomA, atomB);
38484063 this->CalcRotatingMatrix1stDerivatives(tmpRotMat1stDerivs, atomA, atomB);
38494064 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);
38564071 }
38574072
38584073 // Rotate 4-dimensional matrix from diatomic frame to space frame
38594074 // 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{
38654080 double oldMatrix[dxy][dxy][dxy][dxy];
38664081 MolDS_wrappers::Blas::GetInstance()->Dcopy(dxy*dxy*dxy*dxy, &matrix[0][0][0][0], &oldMatrix[0][0][0][0]);
38674082
@@ -3931,9 +4146,9 @@ void Mndo::RotateDiatomicTwoElecTwoCoreToSpaceFrame(double**** matrix,
39314146
39324147 // Rotate 5-dimensional matrix from diatomic frame to space frame
39334148 // Note tha in this method d-orbitals can not be treatable.
3934-void Mndo::RotateDiatomicTwoElecTwoCore1stDerivativesToSpaceFrame(
4149+void Mndo::RotateDiatomicTwoElecsTwoCores1stDerivativesToSpaceFrame(
39354150 double***** matrix,
3936- double const* const*const* const* diatomicTwoElecTwoCore,
4151+ double const* const*const* const* diatomicTwoElecsTwoCores,
39374152 double const* const* rotatingMatrix,
39384153 double const* const* const* rotMat1stDerivatives) const{
39394154
@@ -3953,15 +4168,15 @@ void Mndo::RotateDiatomicTwoElecTwoCore1stDerivativesToSpaceFrame(
39534168 double* tmpVector = NULL;
39544169 double** ptrDiatomic = NULL;
39554170 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);
39654180 for(int mu=0; mu<dxy; mu++){
39664181 for(int nu=0; nu<dxy; nu++){
39674182 int i=mu*dxy+nu;
@@ -3972,7 +4187,7 @@ void Mndo::RotateDiatomicTwoElecTwoCore1stDerivativesToSpaceFrame(
39724187 *rotatingMatrix[nu][sigma ];
39734188 }
39744189 }
3975- ptrDiatomic[i] = const_cast<double*>(&diatomicTwoElecTwoCore[mu][nu][0][0]);
4190+ ptrDiatomic[i] = const_cast<double*>(&diatomicTwoElecsTwoCores[mu][nu][0][0]);
39764191 }
39774192 }
39784193 for(int axis=0; axis<CartesianType_end; axis++){
@@ -4067,26 +4282,26 @@ void Mndo::RotateDiatomicTwoElecTwoCore1stDerivativesToSpaceFrame(
40674282 }
40684283 }
40694284 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);
40794294 throw ex;
40804295 }
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);
40904305
40914306 /*
40924307 // rotate (slow algorithm)
@@ -4107,25 +4322,25 @@ void Mndo::RotateDiatomicTwoElecTwoCore1stDerivativesToSpaceFrame(
41074322 *rotatingMatrix[lambda][k]
41084323 *rotatingMatrix[sigma][l];
41094324 matrix[mu][nu][lambda][sigma][c]
4110- += diatomicTwoElecTwoCore[i][j][k][l]
4325+ += diatomicTwoElecsTwoCores[i][j][k][l]
41114326 *rotMat1stDerivatives[mu][i][c]
41124327 *rotatingMatrix[nu][j]
41134328 *rotatingMatrix[lambda][k]
41144329 *rotatingMatrix[sigma][l];
41154330 matrix[mu][nu][lambda][sigma][c]
4116- += diatomicTwoElecTwoCore[i][j][k][l]
4331+ += diatomicTwoElecsTwoCores[i][j][k][l]
41174332 *rotatingMatrix[mu][i]
41184333 *rotMat1stDerivatives[nu][j][c]
41194334 *rotatingMatrix[lambda][k]
41204335 *rotatingMatrix[sigma][l];
41214336 matrix[mu][nu][lambda][sigma][c]
4122- += diatomicTwoElecTwoCore[i][j][k][l]
4337+ += diatomicTwoElecsTwoCores[i][j][k][l]
41234338 *rotatingMatrix[mu][i]
41244339 *rotatingMatrix[nu][j]
41254340 *rotMat1stDerivatives[lambda][k][c]
41264341 *rotatingMatrix[sigma][l];
41274342 matrix[mu][nu][lambda][sigma][c]
4128- += diatomicTwoElecTwoCore[i][j][k][l]
4343+ += diatomicTwoElecsTwoCores[i][j][k][l]
41294344 *rotatingMatrix[mu][i]
41304345 *rotatingMatrix[nu][j]
41314346 *rotatingMatrix[lambda][k]
@@ -4142,15 +4357,15 @@ void Mndo::RotateDiatomicTwoElecTwoCore1stDerivativesToSpaceFrame(
41424357 */
41434358 }
41444359
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{
41544369 MallocerFreer::GetInstance()->Malloc<double>(twiceRotatingMatrix, dxy*dxy, dxy*dxy);
41554370 MallocerFreer::GetInstance()->Malloc<double>(twiceRotatingMatrixDerivA, dxy*dxy, dxy*dxy);
41564371 MallocerFreer::GetInstance()->Malloc<double>(twiceRotatingMatrixDerivB, dxy*dxy, dxy*dxy);
@@ -4162,15 +4377,15 @@ void Mndo::MallocTempMatricesRotateDiatomicTwoElecTwoCore1stDerivs(double*** twi
41624377 MallocerFreer::GetInstance()->Malloc<double*>(ptrDiatomic, dxy*dxy);
41634378 }
41644379
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{
41744389 MallocerFreer::GetInstance()->Free<double>(twiceRotatingMatrix, dxy*dxy, dxy*dxy);
41754390 MallocerFreer::GetInstance()->Free<double>(twiceRotatingMatrixDerivA, dxy*dxy, dxy*dxy);
41764391 MallocerFreer::GetInstance()->Free<double>(twiceRotatingMatrixDerivB, dxy*dxy, dxy*dxy);
@@ -4184,10 +4399,10 @@ void Mndo::FreeTempMatricesRotateDiatomicTwoElecTwoCore1stDerivs(double*** twice
41844399
41854400 // Rotate 6-dimensional matrix from diatomic frame to space frame
41864401 // Note tha in this method d-orbitals can not be treatable.
4187-void Mndo::RotateDiatomicTwoElecTwoCore2ndDerivativesToSpaceFrame(
4402+void Mndo::RotateDiatomicTwoElecsTwoCores2ndDerivativesToSpaceFrame(
41884403 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,
41914406 double const* const* rotatingMatrix,
41924407 double const* const* const* rotMat1stDerivatives,
41934408 double const* const* const* const* rotMat2ndDerivatives) const{
@@ -4231,18 +4446,18 @@ void Mndo::RotateDiatomicTwoElecTwoCore2ndDerivativesToSpaceFrame(
42314446 MallocerFreer::GetInstance()->Initialize<double>(tempIJK, numberTerms);
42324447 for(int l=s; l<dxy; l++){
42334448
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];
42374452
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];
42404455
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];
42434458
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];
42464461 }
42474462 tempIJ[0] += tempIJK[0] *rotatingMatrix [lambda][k];
42484463 tempIJ[1] += tempIJK[1] *rotatingMatrix [lambda][k];
@@ -4353,154 +4568,154 @@ void Mndo::RotateDiatomicTwoElecTwoCore2ndDerivativesToSpaceFrame(
43534568 *rotatingMatrix [lambda][k]
43544569 *rotatingMatrix [sigma ][l];
43554570 // 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]
43584573 *rotatingMatrix [nu ][j]
43594574 *rotatingMatrix [lambda][k]
43604575 *rotatingMatrix [sigma ][l];
43614576 // term2
4362- value += diatomicTwoElecTwoCore[i][j][k][l]
4577+ value += diatomicTwoElecsTwoCores[i][j][k][l]
43634578 *rotatingMatrix [mu ][i]
4364- *rotMat2ndDerivatives[nu ][j][dimA1][dimA2]
4579+ *rotMat2ndDerivatives [nu ][j][dimA1][dimA2]
43654580 *rotatingMatrix [lambda][k]
43664581 *rotatingMatrix [sigma ][l];
43674582 // term3
4368- value += diatomicTwoElecTwoCore[i][j][k][l]
4583+ value += diatomicTwoElecsTwoCores[i][j][k][l]
43694584 *rotatingMatrix [mu ][i]
43704585 *rotatingMatrix [nu ][j]
4371- *rotMat2ndDerivatives[lambda][k][dimA1][dimA2]
4586+ *rotMat2ndDerivatives [lambda][k][dimA1][dimA2]
43724587 *rotatingMatrix [sigma ][l];
43734588 // term4
4374- value += diatomicTwoElecTwoCore[i][j][k][l]
4589+ value += diatomicTwoElecsTwoCores[i][j][k][l]
43754590 *rotatingMatrix [mu ][i]
43764591 *rotatingMatrix [nu ][j]
43774592 *rotatingMatrix [lambda][k]
4378- *rotMat2ndDerivatives[sigma ][l][dimA1][dimA2];
4593+ *rotMat2ndDerivatives [sigma ][l][dimA1][dimA2];
43794594
43804595 // 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];
43864601 // 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];
43924607 // 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];
43984613 // 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];
44044619
44054620 // 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];
44114626 // 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];
44174632 // 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];
44234638 // 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];
44294644
44304645 // 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];
44364651 // 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];
44424657 // 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];
44484663 // 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];
44544669
44554670 // 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];
44614676 // 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];
44674682 // 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];
44734688 // 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];
44794694
44804695 // 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];
44864701 // 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];
44924707 // 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];
44984713 // 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];
45044719 }
45054720 }
45064721 }
@@ -4526,14 +4741,24 @@ double Mndo::GetNddoRepulsionIntegral(const Atom& atomA,
45264741 OrbitalType lambda,
45274742 OrbitalType sigma) const{
45284743 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+
45374762 if(mu == s && nu == s && lambda == s && sigma == s){
45384763 value = this->GetSemiEmpiricalMultipoleInteraction(atomA, atomB, sQ, sQ, rAB);
45394764 }
@@ -4873,14 +5098,8 @@ double Mndo::GetNddoRepulsionIntegral1stDerivative(
48735098 const Atom& atomB, OrbitalType lambda, OrbitalType sigma,
48745099 CartesianType axisA) const{
48755100 double value = 0.0;
4876- double DA=0.0;
4877- double DB=0.0;
4878- double rhoA = 0.0;
4879- double rhoB = 0.0;
48805101 double rAB = this->molecule->GetDistanceAtoms(atomA, atomB);
48815102 double drABDa = (atomA.GetXyz()[axisA] - atomB.GetXyz()[axisA])/rAB;
4882- int lA = 0;
4883- int lB = 0;
48845103 // (28) in [DT_1977]
48855104 if(mu == s && nu == s && lambda == s && sigma == s){
48865105 value = this->GetSemiEmpiricalMultipoleInteraction1stDerivative(atomA, atomB, sQ, sQ, rAB);
@@ -5297,18 +5516,12 @@ double Mndo::GetNddoRepulsionIntegral2ndDerivative(
52975516 CartesianType axisA1,
52985517 CartesianType axisA2) const{
52995518 double value = 0.0;
5300- double DA=0.0;
5301- double DB=0.0;
5302- double rhoA = 0.0;
5303- double rhoB = 0.0;
53045519 double rAB = this->molecule->GetDistanceAtoms(atomA, atomB);
53055520 double cartesian[CartesianType_end] = {atomA.GetXyz()[XAxis] - atomB.GetXyz()[XAxis],
53065521 atomA.GetXyz()[YAxis] - atomB.GetXyz()[YAxis],
53075522 atomA.GetXyz()[ZAxis] - atomB.GetXyz()[ZAxis]};
53085523 double deriv1st=0.0; // first derivative of semi empirical multipole interaction
53095524 double deriv2nd=0.0; // second derivative of semi empirical multipole interaction
5310- int lA = 0;
5311- int lB = 0;
53125525 // (28) in [DT_1977]
53135526 if(mu == s && nu == s && lambda == s && sigma == s){
53145527 deriv1st = this->GetSemiEmpiricalMultipoleInteraction1stDerivative(atomA, atomB, sQ, sQ, rAB);
@@ -6227,7 +6440,6 @@ double Mndo::GetNddoRepulsionIntegral2ndDerivative(
62276440 return value;
62286441 }
62296442
6230-// See Apendix in [DT_1977]
62316443 double Mndo::GetSemiEmpiricalMultipoleInteraction(const Atom& atomA,
62326444 const Atom& atomB,
62336445 MultipoleType multipoleA,
@@ -6236,8 +6448,27 @@ double Mndo::GetSemiEmpiricalMultipoleInteraction(const Atom& atomA,
62366448 double value = 0.0;
62376449 double DA = atomA.GetNddoDerivedParameterD(this->theory, multipoleA);
62386450 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+ }
62416472 double a = rhoA + rhoB;
62426473
62436474 // Eq. (52) in [DT_1977]
--- a/src/mndo/Mndo.h
+++ b/src/mndo/Mndo.h
@@ -30,25 +30,30 @@ public:
3030 virtual void SetMolecule(MolDS_base::Molecule* molecule);
3131 virtual void OutputSCFResults() const;
3232 protected:
33+ std::string errorMessageGetSemiEmpiricalMultipoleInteractionBadAtomTypes;
3334 std::string errorMessageGetSemiEmpiricalMultipoleInteractionBadMultipoles;
3435 std::string errorMessageGetSemiEmpiricalMultipoleInteraction1stDeriBadMultipoles;
3536 std::string errorMessageGetSemiEmpiricalMultipoleInteraction2ndDeriBadMultipoles;
3637 std::string errorMessageGetNddoRepulsionIntegral;
38+ std::string errorMessageGetNddoRepulsionIntegralBadAtomTypes;
3739 std::string errorMessageGetNddoRepulsionIntegral1stDerivative;
3840 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;
4650 virtual void SetMessages();
4751 virtual void SetEnableAtomTypes();
4852 virtual void CalcSCFProperties();
4953 virtual void CalcNormalModes(double** normalModes, double* normalForceConstants, const MolDS_base::Molecule& molecule) const;
5054 virtual void CalcForce(const std::vector<int>& elecStates);
5155 virtual double GetDiatomCoreRepulsionEnergy(int indexAtomA, int indexAtomB) const;
56+ virtual double GetAtomCoreEpcCoulombEnergy (int indexAtom, int indexEpc ) const;
5257 virtual double GetDiatomCoreRepulsion1stDerivative(int indexAtomA,
5358 int indexAtomB,
5459 MolDS_base::CartesianType axisA) const;
@@ -63,7 +68,7 @@ protected:
6368 double const* const* gammaAB,
6469 double const* const* orbitalElectronPopulation,
6570 double const* atomicElectronPopulation,
66- double const* const* const* const* const* const* twoElecTwoCore,
71+ double const* const* const* const* const* const* twoElecsTwoAtomCores,
6772 bool isGuess) const;
6873 virtual double GetFockOffDiagElement(const MolDS_base_atoms::Atom& atomA,
6974 const MolDS_base_atoms::Atom& atomB,
@@ -74,7 +79,7 @@ protected:
7479 double const* const* gammaAB,
7580 double const* const* overelap,
7681 double const* const* orbitalElectronPopulation,
77- double const* const* const* const* const* const* twoElecTwoCore,
82+ double const* const* const* const* const* const* twoElecsTwoAtomCores,
7883 bool isGuess) const;
7984 virtual void CalcDiatomicOverlapAOsInDiatomicFrame(double** diatomicOverlapAOs,
8085 const MolDS_base_atoms::Atom& atomA,
@@ -91,8 +96,9 @@ protected:
9196 virtual double GetExchangeInt(MolDS_base::OrbitalType orbital1,
9297 MolDS_base::OrbitalType orbital2,
9398 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;
96102 virtual double GetMolecularIntegralElement(int moI,
97103 int moJ,
98104 int moK,
@@ -112,8 +118,13 @@ private:
112118 std::string errorMessageMultipoleB;
113119 std::string messageHeatsFormation;
114120 std::string messageHeatsFormationTitle;
115- double**** twoElecTwoCoreMpiBuff;
121+ double**** twoElecsTwoAtomCoresMpiBuff;
122+ double**** twoElecsAtomEpcCoresMpiBuff;
116123 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;
117128 double GetAuxiliaryDiatomCoreRepulsionEnergy(const MolDS_base_atoms::Atom& atomA,
118129 const MolDS_base_atoms::Atom& atomB,
119130 double distanceAB) const;
@@ -136,8 +147,8 @@ private:
136147 double const* const* const* const* orbitalElectronPopulation1stDerivs,
137148 double const* const* const* const* diatomicOverlapAOs1stDerivs,
138149 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;
141152 double GetHessianElementDifferentAtomsSCF(int indexAtomA,
142153 int indexAtomB,
143154 MolDS_base::CartesianType axisA,
@@ -146,18 +157,18 @@ private:
146157 double const* const* const* const* orbitalElectronPopulation1stDerivs,
147158 double const* const* const* const* diatomicOverlapAOs1stDerivs,
148159 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;
151162 void MallocTempMatricesEachThreadCalcHessianSCF(double***** diatomicOverlapAOs1stDerivs,
152163 double****** diatomicOverlapAOs2ndDerivs,
153- double******* diatomicTwoElecTwoCore1stDerivs,
154- double******** diatomicTwoElecTwoCore2ndDerivs,
164+ double******* diatomicTwoElecsTwoCores1stDerivs,
165+ double******** diatomicTwoElecsTwoCores2ndDerivs,
155166 double*** tmpRotMat,
156167 double*** tmpRotMat1stDeriv,
157168 double**** tmpRotMat1stDerivs,
158169 double***** tmpRotMat2ndDerivs,
159- double***** tmpDiatomicTwoElecTwoCore,
160- double****** tmpDiatomicTwoElecTwoCore1stDerivs,
170+ double***** tmpDiatomicTwoElecsTwoCores,
171+ double****** tmpDiatomicTwoElecsTwoCores1stDerivs,
161172 double*** tmpDiaOverlapAOsInDiaFrame,
162173 double*** tmpDiaOverlapAOs1stDerivInDiaFrame,
163174 double*** tmpDiaOverlapAOs2ndDerivInDiaFrame,
@@ -169,14 +180,14 @@ private:
169180 double** tmpVectorBC) const;
170181 void FreeTempMatricesEachThreadCalcHessianSCF(double***** diatomicOverlapAOs1stDerivs,
171182 double****** diatomicOverlapAOs2ndDerivs,
172- double******* diatomicTwoElecTwoCore1stDerivs,
173- double******** diatomicTwoElecTwoCore2ndDerivs,
183+ double******* diatomicTwoElecsTwoCores1stDerivs,
184+ double******** diatomicTwoElecsTwoCores2ndDerivs,
174185 double*** tmpRotMat,
175186 double*** tmpRotMat1stDeriv,
176187 double**** tmpRotMat1stDerivs,
177188 double***** tmpRotMat2ndDerivs,
178- double***** tmpDiatomicTwoElecTwoCore,
179- double****** tmpDiatomicTwoElecTwoCore1stDerivs,
189+ double***** tmpDiatomicTwoElecsTwoCores,
190+ double****** tmpDiatomicTwoElecsTwoCores1stDerivs,
180191 double*** tmpDiaOverlapAOsInDiaFrame,
181192 double*** tmpDiaOverlapAOs1stDerivInDiaFrame,
182193 double*** tmpDiaOverlapAOs2ndDerivInDiaFrame,
@@ -193,7 +204,7 @@ private:
193204 MolDS_base::CartesianType axisA1,
194205 MolDS_base::CartesianType axisA2,
195206 double const* const* orbitalElectronPopulation,
196- double const* const* const* const* const* const* diatomicTwoElecTwoCore2ndDerivs) const;
207+ double const* const* const* const* const* const* diatomicTwoElecsTwoCores2ndDerivs) const;
197208 double GetAuxiliaryHessianElement2(int mu,
198209 int nu,
199210 int indexAtomA,
@@ -202,7 +213,7 @@ private:
202213 MolDS_base::CartesianType axisA,
203214 MolDS_base::CartesianType axisB,
204215 double const* const* const* const* orbitalElectronPopulation1stDerivs,
205- double const* const* const* const* const* diatomicTwoElecTwoCore1stDerivs) const;
216+ double const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivs) const;
206217 double GetAuxiliaryHessianElement3(int lambda,
207218 int sigma,
208219 int indexAtomA,
@@ -210,7 +221,7 @@ private:
210221 MolDS_base::CartesianType axisA1,
211222 MolDS_base::CartesianType axisA2,
212223 double const* const* orbitalElectronPopulation,
213- double const* const* const* const* const* const* diatomicTwoElecTwoCore2ndDerivs) const;
224+ double const* const* const* const* const* const* diatomicTwoElecsTwoCores2ndDerivs) const;
214225 double GetAuxiliaryHessianElement4(int lambda,
215226 int sigma,
216227 int indexAtomA,
@@ -219,7 +230,7 @@ private:
219230 MolDS_base::CartesianType axisA,
220231 MolDS_base::CartesianType axisB,
221232 double const* const* const* const* orbitalElectronPopulation1stDerivs,
222- double const* const* const* const* const* diatomicTwoElecTwoCore1stDerivs) const;
233+ double const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivs) const;
223234 double GetAuxiliaryHessianElement5(int mu,
224235 int lambda,
225236 int indexAtomA,
@@ -246,7 +257,7 @@ private:
246257 MolDS_base::CartesianType axisA1,
247258 MolDS_base::CartesianType axisA2,
248259 double const* const* orbitalElectronPopulation,
249- double const* const* const* const* const* const* diatomicTwoElecTwoCore2ndDerivs) const;
260+ double const* const* const* const* const* const* diatomicTwoElecsTwoCores2ndDerivs) const;
250261 double GetAuxiliaryHessianElement8(int mu,
251262 int nu,
252263 int lambda,
@@ -258,7 +269,7 @@ private:
258269 MolDS_base::CartesianType axisB,
259270 double const* const* orbitalElectronPopulation,
260271 double const* const* const* const* orbitalElectronPopulation1stDerivs,
261- double const* const* const* const* const* diatomicTwoElecTwoCore1stDerivs) const;
272+ double const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivs) const;
262273 void CalcOrbitalElectronPopulation1stDerivatives(double**** orbitalElectronPopulation1stDerivatives) const;
263274 void SolveCPHF(double** solutionsCPHF,
264275 const std::vector<MoIndexPair>& nonRedundantQIndeces,
@@ -271,12 +282,12 @@ private:
271282 const std::vector<MoIndexPair>& redundantQIndeces,
272283 int indexAtomA,
273284 MolDS_base::CartesianType axisA) const;
274- void MallocTempMatricesStaticFirstOrderFock(double****** diatomicTwoElecTwoCore1stDeriv,
285+ void MallocTempMatricesStaticFirstOrderFock(double****** diatomicTwoElecsTwoCores1stDeriv,
275286 double**** diatomicOverlapAOs1stDeriv,
276287 double*** tmpRotMat,
277288 double**** tmpRotMat1stDerivs,
278289 double***** tmpDiatomicTwoElecTwo) const;
279- void FreeTempMatricesStaticFirstOrderFock(double****** diatomicTwoElecTwoCore1stDeriv,
290+ void FreeTempMatricesStaticFirstOrderFock(double****** diatomicTwoElecsTwoCores1stDeriv,
280291 double**** diatomicOverlapAOs1stDeriv,
281292 double*** tmpRotMat,
282293 double**** tmpRotMat1stDerivs,
@@ -294,50 +305,66 @@ private:
294305 int indexAtomB,
295306 int mu,
296307 int nu,
297- double const* const* const* const* const* const* twoElecTwoCore) const;
308+ double const* const* const* const* const* const* twoElecsTwoAtomCores) const;
298309 double GetElectronCoreAttraction1stDerivative(int indexAtomA,
299310 int indexAtomB,
300311 int mu,
301312 int nu,
302- double const* const* const* const* const* diatomicTwoElecTwoCore1stDerivatives,
313+ double const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivatives,
303314 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,
341368 double*** twiceRotatingMatrixDerivA,
342369 double*** twiceRotatingMatrixDerivB,
343370 double*** oldMatrix,
@@ -346,15 +373,6 @@ private:
346373 double*** tmpMatrix,
347374 double** tmpVector,
348375 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;
358376 double GetNddoRepulsionIntegral(const MolDS_base_atoms::Atom& atomA,
359377 MolDS_base::OrbitalType mu,
360378 MolDS_base::OrbitalType nu,
@@ -392,7 +410,7 @@ private:
392410 MolDS_base::MultipoleType multipoleB,
393411 double rAB) const;
394412 void MallocTempMatricesCalcForce(double**** diatomicOverlapAOs1stDerivs,
395- double****** diatomicTwoElecTwoCore1stDerivs,
413+ double****** diatomicTwoElecsTwoCores1stDerivs,
396414 double*** tmpDiaOverlapAOsInDiaFrame,
397415 double*** tmpDiaOverlapAOs1stDerivInDiaFrame,
398416 double*** tmpRotMat,
@@ -402,9 +420,9 @@ private:
402420 double** tmpRotatedDiatomicOverlapVec,
403421 double*** tmpMatrixBC,
404422 double** tmpVectorBC,
405- double***** tmpDiatomicTwoElecTwoCore) const;
423+ double***** tmpDiatomicTwoElecsTwoCores) const;
406424 void FreeTempMatricesCalcForce(double**** diatomicOverlapAOs1stDerivs,
407- double****** diatomicTwoElecTwoCore1stDerivs,
425+ double****** diatomicTwoElecsTwoCores1stDerivs,
408426 double*** tmpDiaOverlapAOsInDiaFrame,
409427 double*** tmpDiaOverlapAOs1stDerivInDiaFrame,
410428 double*** tmpRotMat,
@@ -414,11 +432,11 @@ private:
414432 double** tmpRotatedDiatomicOverlapVec,
415433 double*** tmpMatrixBC,
416434 double** tmpVectorBC,
417- double***** tmpDiatomicTwoElecTwoCore) const;
435+ double***** tmpDiatomicTwoElecsTwoCores) const;
418436 void CalcForceSCFElecCoreAttractionPart(double* force,
419437 int indexAtomA,
420438 int indexAtomB,
421- double const* const* const* const* const* diatomicTwoElecTwoCore1stDerivs) const;
439+ double const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivs) const;
422440 void CalcForceSCFOverlapAOsPart(double* force,
423441 int indexAtomA,
424442 int indexAtomB,
@@ -426,22 +444,22 @@ private:
426444 void CalcForceSCFTwoElecPart(double* force,
427445 int indexAtomA,
428446 int indexAtomB,
429- double const* const* const* const* const* diatomicTwoElecTwoCore1stDerivs) const;
447+ double const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivs) const;
430448 void CalcForceExcitedStaticPart(double* force,
431449 int elecStateIndex,
432450 int indexAtomA,
433451 int indexAtomB,
434- double const* const* const* const* const* diatomicTwoElecTwoCore1stDerivs) const;
452+ double const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivs) const;
435453 void CalcForceExcitedElecCoreAttractionPart(double* force,
436454 int elecStateIndex,
437455 int indexAtomA,
438456 int indexAtomB,
439- double const* const* const* const* const* diatomicTwoElecTwoCore1stDerivs) const;
457+ double const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivs) const;
440458 void CalcForceExcitedTwoElecPart(double* force,
441459 int elecStateIndex,
442460 int indexAtomA,
443461 int indexAtomB,
444- double const* const* const* const* const* diatomicTwoElecTwoCore1stDerivs) const;
462+ double const* const* const* const* const* diatomicTwoElecsTwoCores1stDerivs) const;
445463
446464 };
447465
--- a/src/pm3/Pm3.cpp
+++ b/src/pm3/Pm3.cpp
@@ -83,31 +83,39 @@ void Pm3::SetMessages(){
8383 = "Error in pm3::Pm3::CalcCISMatrix: Non available orbital is contained.\n";
8484 this->errorMessageDavidsonNotConverged = "Error in pm3::Pm3::DoCISDavidson: Davidson did not met convergence criterion. \n";
8585 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";
8789 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";
8991 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";
9193 this->errorMessageGetNddoRepulsionIntegral
9294 = "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";
9397 this->errorMessageGetNddoRepulsionIntegral1stDerivative
9498 = "Error in pm3::Pm3::GetNddoRepulsionIntegral1stDerivative: Bad orbital is set.\n";
9599 this->errorMessageGetNddoRepulsionIntegral2ndDerivative
96100 = "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";
111119 this->errorMessageGetElectronicEnergyEnergyNotCalculated
112120 = "Error in pm3::Pm3::GetElectronicEnergy: Set electronic state is not calculated by CIS.\n";
113121 this->errorMessageGetElectronicEnergyNULLCISEnergy
--- a/src/pm3/Pm3D.cpp
+++ b/src/pm3/Pm3D.cpp
@@ -85,30 +85,38 @@ void Pm3D::SetMessages(){
8585 this->errorMessageDavidsonNotConverged = "Error in pm3::Pm3D::DoCISDavidson: Davidson did not met convergence criterion. \n";
8686 this->errorMessageGetSemiEmpiricalMultipoleInteractionBadMultipoles
8787 = "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";
8890 this->errorMessageGetSemiEmpiricalMultipoleInteraction1stDeriBadMultipoles
8991 = "Error in pm3::Pm3D::GetSemiEmpiricalMultipoleInteraction1stDerivative: Bad multipole combintaion is set\n";
9092 this->errorMessageGetSemiEmpiricalMultipoleInteraction2ndDeriBadMultipoles
9193 = "Error in pm3::Pm3D::GetSemiEmpiricalMultipoleInteraction2ndDerivative: Bad multipole combintaion is set\n";
9294 this->errorMessageGetNddoRepulsionIntegral
9395 = "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";
9498 this->errorMessageGetNddoRepulsionIntegral1stDerivative
9599 = "Error in pm3::Pm3D::GetNddoRepulsionIntegral1stDerivative: Bad orbital is set.\n";
96100 this->errorMessageGetNddoRepulsionIntegral2ndDerivative
97101 = "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";
112120 this->errorMessageGetElectronicEnergyEnergyNotCalculated
113121 = "Error in pm3::Pm3D::GetElectronicEnergy: Set electronic state is not calculated by CIS.\n";
114122 this->errorMessageGetElectronicEnergyNULLCISEnergy
--- a/src/pm3/Pm3Pddg.cpp
+++ b/src/pm3/Pm3Pddg.cpp
@@ -84,31 +84,39 @@ void Pm3Pddg::SetMessages(){
8484 = "Error in pm3::Pm3Pddg::CalcCISMatrix: Non available orbital is contained.\n";
8585 this->errorMessageDavidsonNotConverged = "Error in pm3::Pm3Pddg::DoCISDavidson: Davidson did not met convergence criterion. \n";
8686 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";
8890 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";
9092 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";
9294 this->errorMessageGetNddoRepulsionIntegral
9395 = "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";
9498 this->errorMessageGetNddoRepulsionIntegral1stDerivative
9599 = "Error in pm3::Pm3Pddg::GetNddoRepulsionIntegral1stDerivative: Bad orbital is set.\n";
96100 this->errorMessageGetNddoRepulsionIntegral2ndDerivative
97101 = "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";
112120 this->errorMessageGetElectronicEnergyEnergyNotCalculated
113121 = "Error in pm3::Pm3Pddg::GetElectronicEnergy: Set electronic state is not calculated by CIS.\n";
114122 this->errorMessageGetElectronicEnergyNULLCISEnergy
--- a/src/zindo/ZindoS.cpp
+++ b/src/zindo/ZindoS.cpp
@@ -224,7 +224,7 @@ double ZindoS::GetFockDiagElement(const Atom& atomA,
224224 double const* const* gammaAB,
225225 double const* const* orbitalElectronPopulation,
226226 double const* atomicElectronPopulation,
227- double const* const* const* const* const* const* twoElecTwoCore,
227+ double const* const* const* const* const* const* twoElecsTwoAtomCores,
228228 bool isGuess) const{
229229 double value=0.0;
230230 int firstAOIndexA = atomA.GetFirstAOIndex();
@@ -289,7 +289,7 @@ double ZindoS::GetFockOffDiagElement(const Atom& atomA,
289289 double const* const* gammaAB,
290290 double const* const* overlapAOs,
291291 double const* const* orbitalElectronPopulation,
292- double const* const* const* const* const* const* twoElecTwoCore,
292+ double const* const* const* const* const* const* twoElecsTwoAtomCores,
293293 bool isGuess) const{
294294 double value = 0.0;
295295 OrbitalType orbitalMu = atomA.GetValence(mu-atomA.GetFirstAOIndex());
@@ -585,8 +585,9 @@ double ZindoS::GetExchangeInt(OrbitalType orbital1, OrbitalType orbital2, const
585585 return value;
586586 }
587587
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{
590591 this->CalcNishimotoMatagaMatrix(this->nishimotoMatagaMatrix, molecule);
591592 }
592593
@@ -3635,9 +3636,9 @@ double ZindoS::GetAuxiliaryKNRKRElement(int moI, int moJ, int moK, int moL) cons
36353636 return value;
36363637 }
36373638
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{
36413642 const Atom& atomA = *molecule->GetAtom(indexAtomA);
36423643 const int firstAOIndexA = atomA.GetFirstAOIndex();
36433644 const int lastAOIndexA = atomA.GetLastAOIndex();
@@ -3680,7 +3681,7 @@ void ZindoS::CalcForce(const vector<int>& elecStates){
36803681 #pragma omp parallel
36813682 {
36823683 double*** diatomicOverlapAOs1stDerivs = NULL;
3683- double*** diatomicTwoElecTwoCore1stDerivs = NULL;
3684+ double*** diatomicTwoElecsTwoCores1stDerivs = NULL;
36843685 double** tmpDiaOverlapAOsInDiaFrame = NULL; // diatomic overlapAOs in diatomic frame
36853686 double** tmpDiaOverlapAOs1stDerivInDiaFrame = NULL; // first derivative of the diaOverlapAOs. This derivative is related to the distance between two atoms.
36863687 double** tmpRotMat = NULL; // rotating Matrix from the diatomic frame to space fixed frame.
@@ -3692,7 +3693,7 @@ void ZindoS::CalcForce(const vector<int>& elecStates){
36923693 double* tmpVectorBC = NULL; // used in dgemmm
36933694 try{
36943695 MallocTempMatricesCalcForce(&diatomicOverlapAOs1stDerivs,
3695- &diatomicTwoElecTwoCore1stDerivs,
3696+ &diatomicTwoElecsTwoCores1stDerivs,
36963697 &tmpDiaOverlapAOsInDiaFrame,
36973698 &tmpDiaOverlapAOs1stDerivInDiaFrame,
36983699 &tmpRotMat,
@@ -3725,7 +3726,7 @@ void ZindoS::CalcForce(const vector<int>& elecStates){
37253726 atomB);
37263727
37273728 // calc. first derivative of two elec two core interaction by Nishimoto-Mataga
3728- this->CalcDiatomicTwoElecTwoCore1stDerivatives(diatomicTwoElecTwoCore1stDerivs, a, b);
3729+ this->CalcDiatomicTwoElecsTwoCores1stDerivatives(diatomicTwoElecsTwoCores1stDerivs, a, b);
37293730
37303731 double coreRepulsion [CartesianType_end] = {0.0,0.0,0.0};
37313732 double forceElecCoreAttPart[CartesianType_end] = {0.0,0.0,0.0};
@@ -3738,7 +3739,7 @@ void ZindoS::CalcForce(const vector<int>& elecStates){
37383739 // electron core attraction part (ground state)
37393740 forceElecCoreAttPart[i] = ( atomA.GetCoreCharge()*atomicElectronPopulation[b]
37403741 +atomB.GetCoreCharge()*atomicElectronPopulation[a])
3741- *diatomicTwoElecTwoCore1stDerivs[s][s][i];
3742+ *diatomicTwoElecsTwoCores1stDerivs[s][s][i];
37423743 }
37433744 double forceOverlapAOsPart [CartesianType_end] = {0.0,0.0,0.0};
37443745 double forceTwoElecPart [CartesianType_end] = {0.0,0.0,0.0};
@@ -3757,7 +3758,7 @@ void ZindoS::CalcForce(const vector<int>& elecStates){
37573758 forceTwoElecPart[i] += (this->orbitalElectronPopulation[mu][mu]
37583759 *this->orbitalElectronPopulation[nu][nu]
37593760 -0.5*pow(this->orbitalElectronPopulation[mu][nu],2.0))
3760- *diatomicTwoElecTwoCore1stDerivs[mu-firstAOIndexA][nu-firstAOIndexB][i];
3761+ *diatomicTwoElecsTwoCores1stDerivs[mu-firstAOIndexA][nu-firstAOIndexB][i];
37613762 }
37623763 }
37633764 }
@@ -3782,7 +3783,7 @@ void ZindoS::CalcForce(const vector<int>& elecStates){
37823783 n,
37833784 a,
37843785 b,
3785- diatomicTwoElecTwoCore1stDerivs);
3786+ diatomicTwoElecsTwoCores1stDerivs);
37863787 // sum up contributions from static part (excited state)
37873788 #pragma omp critical
37883789 {
@@ -3800,7 +3801,7 @@ void ZindoS::CalcForce(const vector<int>& elecStates){
38003801 n,
38013802 a,
38023803 b,
3803- diatomicTwoElecTwoCore1stDerivs);
3804+ diatomicTwoElecsTwoCores1stDerivs);
38043805 // overlapAOs part (excited states)
38053806 double forceExcitedOverlapAOsPart[CartesianType_end] = {0.0,0.0,0.0};
38063807 this->CalcForceExcitedOverlapAOsPart(forceExcitedOverlapAOsPart,
@@ -3814,7 +3815,7 @@ void ZindoS::CalcForce(const vector<int>& elecStates){
38143815 n,
38153816 a,
38163817 b,
3817- diatomicTwoElecTwoCore1stDerivs);
3818+ diatomicTwoElecsTwoCores1stDerivs);
38183819 // sum up contributions from response part (excited state)
38193820 #pragma omp critical
38203821 {
@@ -3835,7 +3836,7 @@ void ZindoS::CalcForce(const vector<int>& elecStates){
38353836 ex.Serialize(ompErrors);
38363837 }
38373838 FreeTempMatricesCalcForce(&diatomicOverlapAOs1stDerivs,
3838- &diatomicTwoElecTwoCore1stDerivs,
3839+ &diatomicTwoElecsTwoCores1stDerivs,
38393840 &tmpDiaOverlapAOsInDiaFrame,
38403841 &tmpDiaOverlapAOs1stDerivInDiaFrame,
38413842 &tmpRotMat,
@@ -3940,7 +3941,7 @@ void ZindoS::CalcForce(const vector<int>& elecStates){
39403941 }
39413942
39423943 void ZindoS::MallocTempMatricesCalcForce(double**** diatomicOverlapAOs1stDerivs,
3943- double**** diatomicTwoElecTwoCore1stDerivs,
3944+ double**** diatomicTwoElecsTwoCores1stDerivs,
39443945 double*** tmpDiaOverlapAOsInDiaFrame,
39453946 double*** tmpDiaOverlapAOs1stDerivInDiaFrame,
39463947 double*** tmpRotMat,
@@ -3951,7 +3952,7 @@ void ZindoS::MallocTempMatricesCalcForce(double**** diatomicOverlapAOs1stDerivs,
39513952 double*** tmpMatrixBC,
39523953 double** tmpVectorBC) const{
39533954 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);
39553956 MallocerFreer::GetInstance()->Malloc<double>(tmpDiaOverlapAOsInDiaFrame, OrbitalType_end, OrbitalType_end);
39563957 MallocerFreer::GetInstance()->Malloc<double>(tmpDiaOverlapAOs1stDerivInDiaFrame, OrbitalType_end, OrbitalType_end);
39573958 MallocerFreer::GetInstance()->Malloc<double>(tmpRotMat, OrbitalType_end, OrbitalType_end);
@@ -3964,7 +3965,7 @@ void ZindoS::MallocTempMatricesCalcForce(double**** diatomicOverlapAOs1stDerivs,
39643965 }
39653966
39663967 void ZindoS::FreeTempMatricesCalcForce(double**** diatomicOverlapAOs1stDerivs,
3967- double**** diatomicTwoElecTwoCore1stDerivs,
3968+ double**** diatomicTwoElecsTwoCores1stDerivs,
39683969 double*** tmpDiaOverlapAOsInDiaFrame,
39693970 double*** tmpDiaOverlapAOs1stDerivInDiaFrame,
39703971 double*** tmpRotMat,
@@ -3975,7 +3976,7 @@ void ZindoS::FreeTempMatricesCalcForce(double**** diatomicOverlapAOs1stDerivs,
39753976 double*** tmpMatrixBC,
39763977 double** tmpVectorBC) const{
39773978 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);
39793980 MallocerFreer::GetInstance()->Free<double>(tmpDiaOverlapAOsInDiaFrame, OrbitalType_end, OrbitalType_end);
39803981 MallocerFreer::GetInstance()->Free<double>(tmpDiaOverlapAOs1stDerivInDiaFrame, OrbitalType_end, OrbitalType_end);
39813982 MallocerFreer::GetInstance()->Free<double>(tmpRotMat, OrbitalType_end, OrbitalType_end);
@@ -3991,7 +3992,7 @@ void ZindoS::CalcForceExcitedStaticPart(double* force,
39913992 int elecStateIndex,
39923993 int indexAtomA,
39933994 int indexAtomB,
3994- double const* const* const* diatomicTwoElecTwoCore1stDerivs) const{
3995+ double const* const* const* diatomicTwoElecsTwoCores1stDerivs) const{
39953996 const Atom& atomA = *this->molecule->GetAtom(indexAtomA);
39963997 const Atom& atomB = *this->molecule->GetAtom(indexAtomB);
39973998 int firstAOIndexA = atomA.GetFirstAOIndex();
@@ -4006,9 +4007,9 @@ void ZindoS::CalcForceExcitedStaticPart(double* force,
40064007 -1.0*this->etaMatrixForce[elecStateIndex][mu][lambda]
40074008 *this->etaMatrixForce[elecStateIndex][mu][lambda];
40084009 force[i] += temp
4009- *diatomicTwoElecTwoCore1stDerivs[mu-firstAOIndexA]
4010- [lambda-firstAOIndexB]
4011- [i];
4010+ *diatomicTwoElecsTwoCores1stDerivs[mu-firstAOIndexA]
4011+ [lambda-firstAOIndexB]
4012+ [i];
40124013 }
40134014 }
40144015 }
@@ -4018,7 +4019,7 @@ void ZindoS::CalcForceExcitedElecCoreAttractionPart(double* force,
40184019 int elecStateIndex,
40194020 int indexAtomA,
40204021 int indexAtomB,
4021- double const* const* const* diatomicTwoElecTwoCore1stDerivs) const{
4022+ double const* const* const* diatomicTwoElecsTwoCores1stDerivs) const{
40224023 const Atom& atomA = *this->molecule->GetAtom(indexAtomA);
40234024 const Atom& atomB = *this->molecule->GetAtom(indexAtomB);
40244025 int firstAOIndexA = atomA.GetFirstAOIndex();
@@ -4027,7 +4028,7 @@ void ZindoS::CalcForceExcitedElecCoreAttractionPart(double* force,
40274028 for(int i=0; i<CartesianType_end; i++){
40284029 force[i] += this->zMatrixForce[elecStateIndex][mu][mu]
40294030 *atomB.GetCoreCharge()
4030- *diatomicTwoElecTwoCore1stDerivs[mu-firstAOIndexA][s][i];
4031+ *diatomicTwoElecsTwoCores1stDerivs[mu-firstAOIndexA][s][i];
40314032 }
40324033 }
40334034 }
@@ -4066,7 +4067,7 @@ void ZindoS::CalcForceExcitedTwoElecPart(double* force,
40664067 int elecStateIndex,
40674068 int indexAtomA,
40684069 int indexAtomB,
4069- double const* const* const* diatomicTwoElecTwoCore1stDerivs) const{
4070+ double const* const* const* diatomicTwoElecsTwoCores1stDerivs) const{
40704071 const Atom& atomA = *this->molecule->GetAtom(indexAtomA);
40714072 const Atom& atomB = *this->molecule->GetAtom(indexAtomB);
40724073 int firstAOIndexA = atomA.GetFirstAOIndex();
@@ -4078,15 +4079,15 @@ void ZindoS::CalcForceExcitedTwoElecPart(double* force,
40784079 for(int i=0; i<CartesianType_end; i++){
40794080 force[i] -= this->zMatrixForce[elecStateIndex][mu][mu]
40804081 *this->orbitalElectronPopulation[lambda][lambda]
4081- *diatomicTwoElecTwoCore1stDerivs[mu-firstAOIndexA]
4082- [lambda-firstAOIndexB]
4083- [i];
4082+ *diatomicTwoElecsTwoCores1stDerivs[mu-firstAOIndexA]
4083+ [lambda-firstAOIndexB]
4084+ [i];
40844085 force[i] += 0.50
40854086 *this->zMatrixForce[elecStateIndex][mu][lambda]
40864087 *this->orbitalElectronPopulation[mu][lambda]
4087- *diatomicTwoElecTwoCore1stDerivs[mu-firstAOIndexA]
4088- [lambda-firstAOIndexB]
4089- [i];
4088+ *diatomicTwoElecsTwoCores1stDerivs[mu-firstAOIndexA]
4089+ [lambda-firstAOIndexB]
4090+ [i];
40904091 }
40914092 }
40924093 }
--- a/src/zindo/ZindoS.h
+++ b/src/zindo/ZindoS.h
@@ -70,7 +70,7 @@ protected:
7070 double const* const* gammaAB,
7171 double const* const* orbitalElectronPopulation,
7272 double const* atomicElectronPopulation,
73- double const* const* const* const* const* const* twoElecTwoCore,
73+ double const* const* const* const* const* const* twoElecsTwoAtomCores,
7474 bool isGuess) const;
7575 virtual double GetFockOffDiagElement(const MolDS_base_atoms::Atom& atomA,
7676 const MolDS_base_atoms::Atom& atomB,
@@ -81,7 +81,7 @@ protected:
8181 double const* const* gammaAB,
8282 double const* const* overelap,
8383 double const* const* orbitalElectronPopulation,
84- double const* const* const* const* const* const* twoElecTwoCore,
84+ double const* const* const* const* const* const* twoElecsTwoAtomCores,
8585 bool isGuess) const;
8686 virtual void CalcDiatomicOverlapAOsInDiatomicFrame(double** diatomicOverlapAOs,
8787 const MolDS_base_atoms::Atom& atomA,
@@ -98,8 +98,9 @@ protected:
9898 virtual double GetExchangeInt(MolDS_base::OrbitalType orbital1,
9999 MolDS_base::OrbitalType orbital2,
100100 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;
103104 virtual double GetMolecularIntegralElement(int moI,
104105 int moJ,
105106 int moK,
@@ -268,11 +269,11 @@ private:
268269 void FreeDavidsonRoopCISTemporaryMtrices(double*** interactionMatrix,
269270 int interactionMatrixDimension,
270271 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;
274275 void MallocTempMatricesCalcForce(double**** diatomicOverlapAOs1stDerivs,
275- double**** diatomicTwoElecTwoCore1stDerivs,
276+ double**** diatomicTwoElecsTwoCores1stDerivs,
276277 double*** tmpDiaOverlapAOsInDiaFrame,
277278 double*** tmpDiaOverlapAOs1stDerivInDiaFrame,
278279 double*** tmpRotMat,
@@ -283,7 +284,7 @@ private:
283284 double*** tmpMatrixBC,
284285 double** tmpVectorBC) const;
285286 void FreeTempMatricesCalcForce(double**** diatomicOverlapAOs1stDerivs,
286- double**** diatomicTwoElecTwoCore1stDerivs,
287+ double**** diatomicTwoElecsTwoCores1stDerivs,
287288 double*** tmpDiaOverlapAOsInDiaFrame,
288289 double*** tmpDiaOverlapAOs1stDerivInDiaFrame,
289290 double*** tmpRotMat,
@@ -297,17 +298,17 @@ private:
297298 int elecStateIndex,
298299 int indexAtomA,
299300 int indexAtomB,
300- double const* const* const* diatomicTwoElecTwoCore1stDerivs) const;
301+ double const* const* const* diatomicTwoElecsTwoCores1stDerivs) const;
301302 void CalcForceExcitedElecCoreAttractionPart(double* force,
302303 int elecStateIndex,
303304 int indexAtomA,
304305 int indexAtomB,
305- double const* const* const* diatomicTwoElecTwoCore1stDerivs) const;
306+ double const* const* const* diatomicTwoElecsTwoCores1stDerivs) const;
306307 void CalcForceExcitedTwoElecPart(double* force,
307308 int elecStateIndex,
308309 int indexAtomA,
309310 int indexAtomB,
310- double const* const* const* diatomicTwoElecTwoCore1stDerivs) const;
311+ double const* const* const* diatomicTwoElecsTwoCores1stDerivs) const;
311312 void CheckZMatrixForce(const std::vector<int>& elecStates);
312313 void CheckEtaMatrixForce(const std::vector<int>& elecStates);
313314 double GetZMatrixForceElement(double const* y,