From 721ddefac54b2119fa7cc9eccaab2ca86f9f3f8d Mon Sep 17 00:00:00 2001 From: Huub Van Dam Date: Sat, 8 Oct 2011 05:49:59 +0000 Subject: [PATCH] HvD: Added the ROKS analytical gradients capability. This capability essentially exploits the fact that ROKS can be considered a variant of UKS with additional constraints that the alpha and beta orbitals be the same. Therefore at the top layer the implementation imposes the constraints of ROKS. Hence we have a single set of orbitals and a single Fock matrix, etc. When it comes, however, to evaluating the Fock matrix the implementation switches to using a UKS approach. Hence we have alpha and beta densities (or closed shell and spin densities depending on how UKS is implemented), and we construct alpha and beta Fock matrices. The main difference between the UKS and ROKS gradient is the Lagrangian. For the ROKS formalism the Lagrangian can be copied from the ROHF formalism. The implementation requires nothing more than carefully threading the appropriate arrangements through the code. The main issue being that in ROKS ipol=2 whereas in ROHF it is ipol=1. This is related to ROKS being based on UKS whereas in the ROHF this is handled differently. Maybe this can ultimately be addressed by handling ROKS and ROHF in a unified way. Obviously in such a situation the ROKS implementation imposes the most stringent constraints. This is due to the non-linearity of the density functionals which means that ROKS cannot be cast in terms of closed shell and open shell densities, but only in terms of alpha and beta densities. This distinction does not exist at the ROHF level (because in ROHF the Fock matrices are linear in terms of the density matrix). --- QA/doqmtests.mpi | 2 +- .../h2o_cg_opt_rob3lyp/h2o_cg_opt_rob3lyp.nw | 28 + .../h2o_cg_opt_rob3lyp/h2o_cg_opt_rob3lyp.out | 2346 +++++++++++++++++ src/ddscf/fock_xc.F | 4 +- src/gradients/grad2.F | 8 +- src/gradients/grad_dens.F | 502 ++-- src/gradients/grad_force.F | 37 +- src/hessian/analytic/hess_init.F | 6 +- src/nwdft/dftgrad/dft_gradients.F | 86 +- src/nwdft/dftgrad/dftg_getxc.F | 24 +- src/nwdft/dftgrad/dftg_quadv0b.F | 2 +- src/nwdft/input_dft/dft_inpana.F | 11 +- src/nwdft/scf_dft_cg/dft_cg_info.F | 2 +- src/nwdft/scf_dft_cg/dft_roks_fock.F | 7 +- src/task/task_gradient.F | 5 - src/util/bgj.F | 10 +- 16 files changed, 2773 insertions(+), 307 deletions(-) create mode 100644 QA/tests/h2o_cg_opt_rob3lyp/h2o_cg_opt_rob3lyp.nw create mode 100644 QA/tests/h2o_cg_opt_rob3lyp/h2o_cg_opt_rob3lyp.out diff --git a/QA/doqmtests.mpi b/QA/doqmtests.mpi index 1fbdb1db28..a160d547c6 100755 --- a/QA/doqmtests.mpi +++ b/QA/doqmtests.mpi @@ -31,7 +31,7 @@ endif ./runtests.mpi.unix procs $np dplot dft_meta dft_mpwb1khf dft_m05nh2ch3 prop_uhf_h2o ./runtests.mpi.unix procs $np et_zn_dimer vectors_rotate sad_ch3hf ./runtests.mpi.unix procs $np h2o_diag_to_cg h2o_cg_to_diag -./runtests.mpi.unix procs $np h2o_diag_opt h2o_cg_opt h2o_diag_opt_ub3lyp h2o_cg_opt_ub3lyp +./runtests.mpi.unix procs $np h2o_diag_opt h2o_cg_opt h2o_diag_opt_ub3lyp h2o_cg_opt_ub3lyp h2o_cg_opt_rob3lyp ./runtests.mpi.unix procs $np h2o_diag_to_cg_ub3lyp h2o_cg_to_diag_ub3lyp # #--- small tests that should fail! diff --git a/QA/tests/h2o_cg_opt_rob3lyp/h2o_cg_opt_rob3lyp.nw b/QA/tests/h2o_cg_opt_rob3lyp/h2o_cg_opt_rob3lyp.nw new file mode 100644 index 0000000000..87bda51c15 --- /dev/null +++ b/QA/tests/h2o_cg_opt_rob3lyp/h2o_cg_opt_rob3lyp.nw @@ -0,0 +1,28 @@ +echo +start h2o_cg_opt_rob3lyp_dat + +memory global 40 mb stack 23 mb heap 5 mb + +geometry units au + O 0 0 0 + H 0 1.430 -1.107 + H 0 -1.430 -1.107 +end +charge 1 + + +basis + O library 6-31g* + H library 6-31g* +end + +dft + cgmin + mult 2 + rodft + xc slater + print "forces" "force components" + convergence nr 0.0 +end + +task dft optimize diff --git a/QA/tests/h2o_cg_opt_rob3lyp/h2o_cg_opt_rob3lyp.out b/QA/tests/h2o_cg_opt_rob3lyp/h2o_cg_opt_rob3lyp.out new file mode 100644 index 0000000000..64978d93f4 --- /dev/null +++ b/QA/tests/h2o_cg_opt_rob3lyp/h2o_cg_opt_rob3lyp.out @@ -0,0 +1,2346 @@ + argument 1 = h2o_cg_opt_rob3lyp.nw + + + +============================== echo of input deck ============================== +echo +start h2o_cg_opt_ub3lyp_dat + +memory global 40 mb stack 23 mb heap 5 mb + +geometry units au + symmetry c1 + O 0 0 0 + H 0 1.430 -1.107 + H 0 -1.430 -1.107 +end +charge 1 + + +basis + O library 6-31g* + H library 6-31g* +end + +dft + cgmin + mult 2 + rodft + xc slater + print "forces" "force components" + convergence nr 0.0 +end +set "dft:weight derivatives" F + +task dft optimize +================================================================================ + + + + + + + Northwest Computational Chemistry Package (NWChem) 6.0 + ------------------------------------------------------ + + + Environmental Molecular Sciences Laboratory + Pacific Northwest National Laboratory + Richland, WA 99352 + + Copyright (c) 1994-2010 + Pacific Northwest National Laboratory + Battelle Memorial Institute + + NWChem is an open-source computational chemistry package + distributed under the terms of the + Educational Community License (ECL) 2.0 + A copy of the license is included with this distribution + in the LICENSE.TXT file + + ACKNOWLEDGMENT + -------------- + + This software and its documentation were developed at the + EMSL at Pacific Northwest National Laboratory, a multiprogram + national laboratory, operated for the U.S. Department of Energy + by Battelle under Contract Number DE-AC05-76RL01830. Support + for this work was provided by the Department of Energy Office + of Biological and Environmental Research, Office of Basic + Energy Sciences, and the Office of Advanced Scientific Computing. + + + Job information + --------------- + + hostname = arcen + program = ../../../bin/LINUX64/nwchem + date = Thu Oct 6 23:56:16 2011 + + compiled = Thu_Oct_06_23:55:51_2011 + source = /home/d3y133/nwchem-dev/nwchem-dev-2011-Sep-19 + nwchem branch = Development + input = h2o_cg_opt_rob3lyp.nw + prefix = h2o_cg_opt_ub3lyp_dat. + data base = ./h2o_cg_opt_ub3lyp_dat.db + status = startup + nproc = 1 + time left = -1s + + + + Memory information + ------------------ + + heap = 655361 doubles = 5.0 Mbytes + stack = 3014657 doubles = 23.0 Mbytes + global = 5242880 doubles = 40.0 Mbytes (distinct from heap & stack) + total = 8912898 doubles = 68.0 Mbytes + verify = yes + hardfail = no + + + Directory information + --------------------- + + 0 permanent = . + 0 scratch = . + + + + + NWChem Input Module + ------------------- + + + ncenter= 3 + Turning off AUTOSYM since + SYMMETRY directive was detected! + + + ------ + auto-z + ------ + + + Geometry "geometry" -> "" + ------------------------- + + Output coordinates in a.u. (scale by 1.000000000 to convert to a.u.) + + No. Tag Charge X Y Z + ---- ---------------- ---------- -------------- -------------- -------------- + 1 O 8.0000 0.00000000 0.00000000 0.22140000 + 2 H 1.0000 0.00000000 1.43000000 -0.88560000 + 3 H 1.0000 0.00000000 -1.43000000 -0.88560000 + + Atomic Mass + ----------- + + O 15.994910 + H 1.007825 + + + Effective nuclear repulsion energy (a.u.) 9.1971984402 + + Nuclear Dipole moment (a.u.) + ---------------------------- + X Y Z + ---------------- ---------------- ---------------- + 0.0000000000 0.0000000000 0.0000000000 + + + + Z-matrix (autoz) + -------- + + Units are Angstrom for bonds and degrees for angles + + Type Name I J K L M Value + ----------- -------- ----- ----- ----- ----- ----- ---------- + 1 Stretch 1 2 0.95697 + 2 Stretch 1 3 0.95697 + 3 Bend 2 1 3 104.51124 + + + XYZ format geometry + ------------------- + 3 + geometry + O 0.00000000 0.00000000 0.11715984 + H 0.00000000 0.75672347 -0.46863937 + H 0.00000000 -0.75672347 -0.46863937 + + ============================================================================== + internuclear distances + ------------------------------------------------------------------------------ + center one | center two | atomic units | a.u. + ------------------------------------------------------------------------------ + 2 H | 1 O | 1.80841 | 1.80841 + 3 H | 1 O | 1.80841 | 1.80841 + ------------------------------------------------------------------------------ + number of included internuclear distances: 2 + ============================================================================== + + + + ============================================================================== + internuclear angles + ------------------------------------------------------------------------------ + center 1 | center 2 | center 3 | degrees + ------------------------------------------------------------------------------ + 2 H | 1 O | 3 H | 104.51 + ------------------------------------------------------------------------------ + number of included internuclear angles: 1 + ============================================================================== + + + + Basis "ao basis" -> "" (cartesian) + ----- + O (Oxygen) + ---------- + Exponent Coefficients + -------------- --------------------------------------------------------- + 1 S 5.48467170E+03 0.001831 + 1 S 8.25234950E+02 0.013950 + 1 S 1.88046960E+02 0.068445 + 1 S 5.29645000E+01 0.232714 + 1 S 1.68975700E+01 0.470193 + 1 S 5.79963530E+00 0.358521 + + 2 S 1.55396160E+01 -0.110778 + 2 S 3.59993360E+00 -0.148026 + 2 S 1.01376180E+00 1.130767 + + 3 P 1.55396160E+01 0.070874 + 3 P 3.59993360E+00 0.339753 + 3 P 1.01376180E+00 0.727159 + + 4 S 2.70005800E-01 1.000000 + + 5 P 2.70005800E-01 1.000000 + + 6 D 8.00000000E-01 1.000000 + + H (Hydrogen) + ------------ + Exponent Coefficients + -------------- --------------------------------------------------------- + 1 S 1.87311370E+01 0.033495 + 1 S 2.82539370E+00 0.234727 + 1 S 6.40121700E-01 0.813757 + + 2 S 1.61277800E-01 1.000000 + + + + Summary of "ao basis" -> "" (cartesian) + ------------------------------------------------------------------------------ + Tag Description Shells Functions and Types + ---------------- ------------------------------ ------ --------------------- + O 6-31g* 6 15 3s2p1d + H 6-31g* 2 2 2s + + + + + NWChem Geometry Optimization + ---------------------------- + + + maximum gradient threshold (gmax) = 0.000450 + rms gradient threshold (grms) = 0.000300 + maximum cartesian step threshold (xmax) = 0.001800 + rms cartesian step threshold (xrms) = 0.001200 + fixed trust radius (trust) = 0.300000 + maximum step size to saddle (sadstp) = 0.100000 + energy precision (eprec) = 5.0D-06 + maximum number of steps (nptopt) = 20 + initial hessian option (inhess) = 0 + line search option (linopt) = 1 + hessian update option (modupd) = 1 + saddle point option (modsad) = 0 + initial eigen-mode to follow (moddir) = 0 + initial variable to follow (vardir) = 0 + follow first negative mode (firstneg) = T + apply conjugacy (opcg) = F + source of zmatrix = autoz + + + ------------------- + Energy Minimization + ------------------- + + + Names of Z-matrix variables + 1 2 3 + + Variables with the same non-blank name are constrained to be equal + + + Using old Hessian from previous optimization + + -------- + Step 0 + -------- + + + Geometry "geometry" -> "geometry" + --------------------------------- + + Output coordinates in a.u. (scale by 1.000000000 to convert to a.u.) + + No. Tag Charge X Y Z + ---- ---------------- ---------- -------------- -------------- -------------- + 1 O 8.0000 0.00000000 0.00000000 0.22140000 + 2 H 1.0000 0.00000000 1.43000000 -0.88560000 + 3 H 1.0000 0.00000000 -1.43000000 -0.88560000 + + Atomic Mass + ----------- + + O 15.994910 + H 1.007825 + + + Effective nuclear repulsion energy (a.u.) 9.1971984402 + + Nuclear Dipole moment (a.u.) + ---------------------------- + X Y Z + ---------------- ---------------- ---------------- + 0.0000000000 0.0000000000 0.0000000000 + + + NWChem DFT Module + ----------------- + + + Caching 1-el integrals + + General Information + ------------------- + SCF calculation type: DFT + Wavefunction type: restricted open shell. + No. of atoms : 3 + No. of electrons : 9 + Alpha electrons : 5 + Beta electrons : 4 + Charge : 1 + Spin multiplicity: 2 + Use of symmetry is: off; symmetry adaption is: off + Maximum number of iterations: 30 + AO basis - number of functions: 19 + number of shells: 10 + Convergence on energy requested: 1.00D-06 + Convergence on density requested: 1.00D-05 + Convergence on gradient requested: 5.00D-04 + + XC Information + -------------- + Slater Exchange Functional 1.000 local + + Grid Information + ---------------- + Grid used for XC integration: medium + Radial quadrature: Mura-Knowles + Angular quadrature: Lebedev. + Tag B.-S. Rad. Rad. Pts. Rad. Cut. Ang. Pts. + --- ---------- --------- --------- --------- + O 0.60 49 5.0 434 + H 0.35 45 6.0 434 + Grid pruning is: on + Number of quadrature shells: 139 + Spatial weights used: Erf1 + + Convergence Information + ----------------------- + Convergence aids based upon iterative change in + total energy or number of iterations. + Levelshifting, if invoked, occurs when the + HOMO/LUMO gap drops below (HL_TOL): 1.00D-02 + DIIS, if invoked, will attempt to extrapolate + using up to (NFOCK): 10 stored Fock matrices. + + Damping( 0%) Levelshifting(0.5) DIIS + --------------- ------------------- --------------- + dE on: start ASAP start + dE off: 2 iters 30 iters 30 iters + + + Screening Tolerance Information + ------------------------------- + Density screening/tol_rho: 1.00D-10 + AO Gaussian exp screening on grid/accAOfunc: 14 + CD Gaussian exp screening on grid/accCDfunc: 20 + XC Gaussian exp screening on grid/accXCfunc: 20 + Schwarz screening/accCoul: 1.00D-08 + + + Superposition of Atomic Density Guess + ------------------------------------- + + Sum of atomic energies: -75.75081731 + + Renormalizing density from 10.00 to 9 + + Non-variational initial energy + ------------------------------ + + Total energy = -70.704093 + 1-e energy = -109.563990 + 2-e energy = 29.662699 + HOMO = -1.167537 + LUMO = -0.290539 + + + + ---------------------------------------------- + Quadratically convergent ROKS + + Convergence threshold : 5.000E-04 + Maximum no. of iterations : 30 + Final Fock-matrix accuracy: 1.000E-07 + + PCG initial level shift : 5.000 + PCG change shift at maxg : 0.500 + PCG final level shift : 0.000 + NR initial level shift : 0.000 + NR change shift at maxg : 0.000 + NR final level shift : 0.000 + NR enabled at maxg : 0.000 + ---------------------------------------------- + + + #quartets = 1.540D+03 #integrals = 8.874D+03 #direct = 0.0% #cached =100.0% + + + Integral file = ./h2o_cg_opt_ub3lyp_dat.aoints.0 + Record size in doubles = 65536 No. of integs per rec = 43688 + Max. records in memory = 2 Max. records in file = 12459 + No. of bits per label = 8 No. of bits per value = 64 + + + Grid_pts file = ./h2o_cg_opt_ub3lyp_dat.gridpts.0 + Record size in doubles = 12289 No. of grid_pts per rec = 3070 + Max. records in memory = 23 Max. recs in file = 66449 + + + iter energy gnorm gmax time + ----- ------------------- --------- --------- -------- + 1 -74.6105170855 2.08D+00 8.95D-01 0.6 + 2 -74.7678795362 3.00D-01 1.57D-01 1.0 + 3 -74.7717854231 1.24D-01 7.89D-02 1.4 + 4 -74.7721300473 4.02D-02 3.02D-02 2.1 + 5 -74.7721730342 7.59D-03 5.30D-03 2.8 + 6 -74.7721744444 1.71D-03 1.28D-03 3.2 + 7 -74.7721744471 1.66D-03 1.25D-03 3.9 + 8 -74.7721744996 2.66D-04 1.54D-04 4.3 + + + Total DFT energy = -74.772174499561 + One electron energy = -117.854686880198 + Coulomb energy = 41.633915063422 + Exchange-Corr. energy = -7.748601122983 + Nuclear repulsion energy = 9.197198440198 + + Numeric. integr. density = 9.000001178643 + + Total iterative time = 4.1s + + + + DFT Final Molecular Orbital Analysis + ------------------------------------ + + Vector 2 Occ=2.000000D+00 E=-1.353866D+00 + MO Center= -1.6D-14, -6.7D-11, -8.9D-02, r^2= 4.7D-01 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 2 0.496811 1 O s 6 0.429444 1 O s + 1 -0.214622 1 O s 5 -0.151370 1 O pz + + Vector 3 Occ=2.000000D+00 E=-8.873648D-01 + MO Center= -3.1D-14, 7.7D-11, -6.5D-02, r^2= 6.6D-01 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 4 0.584192 1 O py 8 0.286909 1 O py + 16 0.220328 2 H s 18 -0.220328 3 H s + + Vector 4 Occ=2.000000D+00 E=-7.385720D-01 + MO Center= 3.9D-14, 2.1D-12, 2.3D-01, r^2= 5.8D-01 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 5 0.614785 1 O pz 9 0.357871 1 O pz + 6 0.288179 1 O s 2 0.197284 1 O s + + Vector 5 Occ=1.000000D+00 E=-6.999732D-01 + MO Center= -7.8D-14, -6.3D-13, 9.5D-02, r^2= 5.0D-01 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 3 0.720907 1 O px 7 0.419083 1 O px + + Vector 6 Occ=0.000000D+00 E=-2.547547D-01 + MO Center= 1.6D-13, 1.2D-10, -6.1D-01, r^2= 2.2D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 6 1.016546 1 O s 17 -0.866624 2 H s + 19 -0.866624 3 H s 9 -0.356113 1 O pz + 5 -0.309755 1 O pz 2 0.235112 1 O s + 16 -0.169736 2 H s 18 -0.169736 3 H s + + Vector 7 Occ=0.000000D+00 E=-1.776685D-01 + MO Center= 1.1D-14, -1.4D-10, -5.3D-01, r^2= 2.2D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 17 -1.129919 2 H s 19 1.129919 3 H s + 8 0.618048 1 O py 4 0.475263 1 O py + 16 -0.218055 2 H s 18 0.218055 3 H s + + Vector 8 Occ=0.000000D+00 E= 3.994460D-01 + MO Center= 1.3D-13, -2.0D-10, -1.5D-01, r^2= 1.8D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 16 -0.800071 2 H s 18 0.800071 3 H s + 17 0.742804 2 H s 19 -0.742804 3 H s + 14 0.398644 1 O dyz 8 0.391912 1 O py + + Vector 9 Occ=0.000000D+00 E= 4.295902D-01 + MO Center= 5.2D-12, -8.5D-14, 1.1D-01, r^2= 1.2D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 7 1.076183 1 O px 3 -0.903508 1 O px + + Vector 10 Occ=0.000000D+00 E= 4.351229D-01 + MO Center= -5.8D-12, 1.6D-10, 2.1D-01, r^2= 1.3D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 5 0.825757 1 O pz 9 -0.747176 1 O pz + 16 0.459851 2 H s 18 0.459851 3 H s + 17 -0.455762 2 H s 19 -0.455762 3 H s + 6 -0.233062 1 O s 13 0.190353 1 O dyy + 2 0.170153 1 O s + + Vector 11 Occ=0.000000D+00 E= 5.006244D-01 + MO Center= 3.6D-14, 1.4D-11, -1.2D-01, r^2= 1.6D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 6 0.993011 1 O s 9 0.713132 1 O pz + 16 0.708659 2 H s 18 0.708659 3 H s + 2 -0.653635 1 O s 17 -0.510308 2 H s + 19 -0.510308 3 H s 10 -0.321301 1 O dxx + 5 -0.291309 1 O pz 15 -0.195034 1 O dzz + + Vector 12 Occ=0.000000D+00 E= 6.358112D-01 + MO Center= -6.4D-14, -3.0D-12, 3.6D-02, r^2= 1.8D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 8 1.708475 1 O py 17 -1.083494 2 H s + 19 1.083494 3 H s 4 -0.933381 1 O py + + Vector 13 Occ=0.000000D+00 E= 7.753140D-01 + MO Center= 2.7D-13, 3.2D-11, -3.6D-01, r^2= 1.6D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 6 3.701307 1 O s 2 -1.527987 1 O s + 9 -1.009405 1 O pz 17 -0.880640 2 H s + 19 -0.880640 3 H s 13 -0.651581 1 O dyy + 15 -0.363812 1 O dzz 5 0.331920 1 O pz + 16 -0.260753 2 H s 18 -0.260753 3 H s + + Vector 14 Occ=0.000000D+00 E= 1.230152D+00 + MO Center= -2.3D-16, -4.0D-13, 1.2D-01, r^2= 6.1D-01 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 11 1.732051 1 O dxy + + Vector 15 Occ=0.000000D+00 E= 1.239024D+00 + MO Center= -7.3D-14, 2.6D-13, 1.7D-01, r^2= 6.2D-01 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 15 1.005503 1 O dzz 13 -0.564686 1 O dyy + 10 -0.391936 1 O dxx 6 -0.240847 1 O s + 9 0.151312 1 O pz + + + Parallel integral file used 1 records with 0 large values + + + + NWChem DFT Gradient Module + -------------------------- + + + + charge = 1.00 + wavefunction = open shell + +XC gradient + 0.000000 0.000000 0.306460 + 0.000000 0.209366 -0.153233 + 0.000000 -0.209366 -0.153233 + +CD gradient + 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 + + 1 0.000000 0.000000 0.306460 + 2 0.000000 0.209366 -0.153233 + 3 0.000000 -0.209366 -0.153233 +nuclear repulsion gradient + 0.000000 0.000000 -2.994859 + 0.000000 -2.056605 1.497430 + 0.000000 2.056605 1.497430 + +weighted density gradient + 0.000000 0.000000 -0.386199 + 0.000000 -0.249403 0.193100 + 0.000000 0.249403 0.193100 + +kinetic energy gradient + 0.000000 0.000000 6.122286 + 0.000000 4.179609 -3.061143 + 0.000000 -4.179609 -3.061143 + +2-electron gradient + 0.000000 0.000000 -3.122182 + 0.000000 -2.146947 1.561091 + 0.000000 2.146947 1.561091 + +DFT CD+XC gradient + 0.000000 0.000000 0.306460 + 0.000000 0.209366 -0.153233 + 0.000000 -0.209366 -0.153233 + +total DFT gradient + 0.000000 0.000000 -0.074494 + 0.000000 -0.063980 0.037244 + 0.000000 0.063980 0.037244 + + + + DFT ENERGY GRADIENTS + + atom coordinates gradient + x y z x y z + 1 O 0.000000 0.000000 0.221400 0.000000 0.000000 -0.074494 + 2 H 0.000000 1.430000 -0.885600 0.000000 -0.063980 0.037244 + 3 H 0.000000 -1.430000 -0.885600 0.000000 0.063980 0.037244 + + ---------------------------------------- + | Time | 1-e(secs) | 2-e(secs) | + ---------------------------------------- + | CPU | 0.00 | 0.16 | + ---------------------------------------- + | WALL | 0.00 | 0.16 | + ---------------------------------------- + +@ Step Energy Delta E Gmax Grms Xrms Xmax Walltime +@ ---- ---------------- -------- -------- -------- -------- -------- -------- +@ 0 -74.77217450 0.0D+00 0.07339 0.06016 0.00000 0.00000 5.3 + + + + + Z-matrix (autoz) + -------- + + Units are Angstrom for bonds and degrees for angles + + Type Name I J K L M Value Gradient + ----------- -------- ----- ----- ----- ----- ----- ---------- ---------- + 1 Stretch 1 2 0.95697 -0.07339 + 2 Stretch 1 3 0.95697 -0.07339 + 3 Bend 2 1 3 104.51124 -0.00929 + + + NWChem DFT Module + ----------------- + + + Caching 1-el integrals + + General Information + ------------------- + SCF calculation type: DFT + Wavefunction type: restricted open shell. + No. of atoms : 3 + No. of electrons : 9 + Alpha electrons : 5 + Beta electrons : 4 + Charge : 1 + Spin multiplicity: 2 + Use of symmetry is: off; symmetry adaption is: off + Maximum number of iterations: 30 + AO basis - number of functions: 19 + number of shells: 10 + Convergence on energy requested: 1.00D-06 + Convergence on density requested: 1.00D-05 + Convergence on gradient requested: 5.00D-04 + + XC Information + -------------- + Slater Exchange Functional 1.000 local + + Grid Information + ---------------- + Grid used for XC integration: medium + Radial quadrature: Mura-Knowles + Angular quadrature: Lebedev. + Tag B.-S. Rad. Rad. Pts. Rad. Cut. Ang. Pts. + --- ---------- --------- --------- --------- + O 0.60 49 5.0 434 + H 0.35 45 6.0 434 + Grid pruning is: on + Number of quadrature shells: 139 + Spatial weights used: Erf1 + + Convergence Information + ----------------------- + Convergence aids based upon iterative change in + total energy or number of iterations. + Levelshifting, if invoked, occurs when the + HOMO/LUMO gap drops below (HL_TOL): 1.00D-02 + DIIS, if invoked, will attempt to extrapolate + using up to (NFOCK): 10 stored Fock matrices. + + Damping( 0%) Levelshifting(0.5) DIIS + --------------- ------------------- --------------- + dE on: start ASAP start + dE off: 2 iters 30 iters 30 iters + + + Screening Tolerance Information + ------------------------------- + Density screening/tol_rho: 1.00D-10 + AO Gaussian exp screening on grid/accAOfunc: 14 + CD Gaussian exp screening on grid/accCDfunc: 20 + XC Gaussian exp screening on grid/accXCfunc: 20 + Schwarz screening/accCoul: 1.00D-08 + + + Loading old vectors from job with title : + + + + + + ---------------------------------------------- + Quadratically convergent ROKS + + Convergence threshold : 5.000E-04 + Maximum no. of iterations : 30 + Final Fock-matrix accuracy: 1.000E-07 + + PCG initial level shift : 5.000 + PCG change shift at maxg : 0.500 + PCG final level shift : 0.000 + NR initial level shift : 0.000 + NR change shift at maxg : 0.000 + NR final level shift : 0.000 + NR enabled at maxg : 0.000 + ---------------------------------------------- + + + #quartets = 1.540D+03 #integrals = 8.874D+03 #direct = 0.0% #cached =100.0% + + + Integral file = ./h2o_cg_opt_ub3lyp_dat.aoints.0 + Record size in doubles = 65536 No. of integs per rec = 43688 + Max. records in memory = 2 Max. records in file = 12459 + No. of bits per label = 8 No. of bits per value = 64 + + + Grid_pts file = ./h2o_cg_opt_ub3lyp_dat.gridpts.0 + Record size in doubles = 12289 No. of grid_pts per rec = 3070 + Max. records in memory = 23 Max. recs in file = 66449 + + + iter energy gnorm gmax time + ----- ------------------- --------- --------- -------- + 1 -74.7761895571 3.03D-01 1.22D-01 5.7 + 2 -74.7812262310 1.29D-01 5.79D-02 6.4 + 3 -74.7822066417 1.92D-02 9.20D-03 7.2 + 4 -74.7822278396 2.10D-03 1.03D-03 7.9 + 5 -74.7822280784 8.46D-04 3.55D-04 8.6 + 6 -74.7822281190 1.25D-04 7.68D-05 9.3 + + + Total DFT energy = -74.782228119019 + One electron energy = -116.333648332394 + Coulomb energy = 40.991782382406 + Exchange-Corr. energy = -7.671367131748 + Nuclear repulsion energy = 8.231004962717 + + Numeric. integr. density = 9.000001515008 + + Total iterative time = 4.2s + + + + DFT Final Molecular Orbital Analysis + ------------------------------------ + + Vector 2 Occ=2.000000D+00 E=-1.291498D+00 + MO Center= 3.3D-12, 4.2D-08, -3.5D-02, r^2= 4.9D-01 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 2 0.501623 1 O s 6 0.473116 1 O s + 1 -0.219091 1 O s + + Vector 3 Occ=2.000000D+00 E=-8.371088D-01 + MO Center= -4.7D-14, -4.5D-09, -4.9D-02, r^2= 7.5D-01 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 4 0.571752 1 O py 8 0.307433 1 O py + 16 0.211417 2 H s 18 -0.211417 3 H s + + Vector 4 Occ=2.000000D+00 E=-7.055367D-01 + MO Center= 7.3D-13, 1.7D-08, 2.1D-01, r^2= 6.3D-01 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 5 0.613344 1 O pz 9 0.372426 1 O pz + 6 0.253201 1 O s 2 0.179958 1 O s + + Vector 5 Occ=1.000000D+00 E=-6.731733D-01 + MO Center= -3.8D-12, 2.4D-08, 1.2D-01, r^2= 5.1D-01 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 3 0.718615 1 O px 7 0.422131 1 O px + + Vector 6 Occ=0.000000D+00 E=-2.945336D-01 + MO Center= -5.8D-13, -4.1D-07, -5.4D-01, r^2= 2.1D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 6 0.829697 1 O s 17 -0.759873 2 H s + 19 -0.759873 3 H s 9 -0.343464 1 O pz + 5 -0.333354 1 O pz 2 0.227927 1 O s + 16 -0.219287 2 H s 18 -0.219287 3 H s + + Vector 7 Occ=0.000000D+00 E=-2.242600D-01 + MO Center= -1.0D-13, 4.5D-07, -4.8D-01, r^2= 2.1D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 17 0.920460 2 H s 19 -0.920459 3 H s + 8 -0.560308 1 O py 4 -0.490936 1 O py + 16 0.242262 2 H s 18 -0.242262 3 H s + + Vector 8 Occ=0.000000D+00 E= 3.814058D-01 + MO Center= -4.7D-12, -1.1D-06, -3.1D-01, r^2= 1.8D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 16 -0.725592 2 H s 17 0.726809 2 H s + 18 -0.725593 3 H s 19 0.726810 3 H s + 5 -0.513433 1 O pz 9 0.376907 1 O pz + 6 -0.277478 1 O s 13 -0.178445 1 O dyy + + Vector 9 Occ=0.000000D+00 E= 3.989127D-01 + MO Center= -4.5D-13, 1.0D-06, -3.6D-01, r^2= 2.2D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 17 0.975107 2 H s 19 -0.975106 3 H s + 16 -0.787580 2 H s 18 0.787580 3 H s + 14 0.393242 1 O dyz 4 0.216048 1 O py + + Vector 10 Occ=0.000000D+00 E= 4.439597D-01 + MO Center= 5.5D-12, 2.3D-08, 1.3D-01, r^2= 1.2D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 7 1.075223 1 O px 3 -0.905339 1 O px + + Vector 11 Occ=0.000000D+00 E= 4.936935D-01 + MO Center= 3.8D-13, -1.6D-08, 3.7D-01, r^2= 1.4D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 6 1.183339 1 O s 9 0.892001 1 O pz + 2 -0.688315 1 O s 5 -0.669465 1 O pz + 16 0.371550 2 H s 18 0.371550 3 H s + 17 -0.313908 2 H s 19 -0.313908 3 H s + 10 -0.267620 1 O dxx 15 -0.227941 1 O dzz + + Vector 12 Occ=0.000000D+00 E= 6.346449D-01 + MO Center= -1.8D-14, 2.2D-08, 2.2D-01, r^2= 1.5D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 8 1.646708 1 O py 4 -0.899791 1 O py + 17 -0.743682 2 H s 19 0.743682 3 H s + 14 0.186097 1 O dyz + + Vector 13 Occ=0.000000D+00 E= 7.438593D-01 + MO Center= 1.6D-13, 8.3D-08, -3.5D-01, r^2= 1.5D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 6 3.339441 1 O s 2 -1.467079 1 O s + 9 -0.950084 1 O pz 17 -0.732315 2 H s + 19 -0.732315 3 H s 13 -0.633908 1 O dyy + 5 0.387475 1 O pz 15 -0.363083 1 O dzz + 16 -0.254396 2 H s 18 -0.254396 3 H s + + Vector 14 Occ=0.000000D+00 E= 1.266086D+00 + MO Center= 5.5D-13, 2.0D-08, 1.4D-01, r^2= 6.1D-01 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 11 1.732051 1 O dxy + + Vector 15 Occ=0.000000D+00 E= 1.287760D+00 + MO Center= -4.9D-14, 2.2D-08, 1.9D-01, r^2= 6.2D-01 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 15 1.007312 1 O dzz 13 -0.509479 1 O dyy + 10 -0.464192 1 O dxx 6 -0.158148 1 O s + + + Parallel integral file used 1 records with 0 large values + + Line search: + step= 1.00 grad=-3.2D-02 hess= 2.2D-02 energy= -74.782228 mode=downhill + new step= 0.73 predicted energy= -74.783872 + + -------- + Step 1 + -------- + + + Geometry "geometry" -> "geometry" + --------------------------------- + + Output coordinates in a.u. (scale by 1.000000000 to convert to a.u.) + + No. Tag Charge X Y Z + ---- ---------------- ---------- -------------- -------------- -------------- + 1 O 8.0000 0.00000000 0.00000003 0.25532267 + 2 H 1.0000 0.00000000 1.58300360 -0.90256132 + 3 H 1.0000 0.00000000 -1.58300363 -0.90256135 + + Atomic Mass + ----------- + + O 15.994910 + H 1.007825 + + + Effective nuclear repulsion energy (a.u.) 8.4738177558 + + Nuclear Dipole moment (a.u.) + ---------------------------- + X Y Z + ---------------- ---------------- ---------------- + 0.0000000000 0.0000002221 0.2374586812 + + + NWChem DFT Module + ----------------- + + + Caching 1-el integrals + + General Information + ------------------- + SCF calculation type: DFT + Wavefunction type: restricted open shell. + No. of atoms : 3 + No. of electrons : 9 + Alpha electrons : 5 + Beta electrons : 4 + Charge : 1 + Spin multiplicity: 2 + Use of symmetry is: off; symmetry adaption is: off + Maximum number of iterations: 30 + AO basis - number of functions: 19 + number of shells: 10 + Convergence on energy requested: 1.00D-06 + Convergence on density requested: 1.00D-05 + Convergence on gradient requested: 5.00D-04 + + XC Information + -------------- + Slater Exchange Functional 1.000 local + + Grid Information + ---------------- + Grid used for XC integration: medium + Radial quadrature: Mura-Knowles + Angular quadrature: Lebedev. + Tag B.-S. Rad. Rad. Pts. Rad. Cut. Ang. Pts. + --- ---------- --------- --------- --------- + O 0.60 49 5.0 434 + H 0.35 45 6.0 434 + Grid pruning is: on + Number of quadrature shells: 139 + Spatial weights used: Erf1 + + Convergence Information + ----------------------- + Convergence aids based upon iterative change in + total energy or number of iterations. + Levelshifting, if invoked, occurs when the + HOMO/LUMO gap drops below (HL_TOL): 1.00D-02 + DIIS, if invoked, will attempt to extrapolate + using up to (NFOCK): 10 stored Fock matrices. + + Damping( 0%) Levelshifting(0.5) DIIS + --------------- ------------------- --------------- + dE on: start ASAP start + dE off: 2 iters 30 iters 30 iters + + + Screening Tolerance Information + ------------------------------- + Density screening/tol_rho: 1.00D-10 + AO Gaussian exp screening on grid/accAOfunc: 14 + CD Gaussian exp screening on grid/accCDfunc: 20 + XC Gaussian exp screening on grid/accXCfunc: 20 + Schwarz screening/accCoul: 1.00D-08 + + + Loading old vectors from job with title : + + + + + + ---------------------------------------------- + Quadratically convergent ROKS + + Convergence threshold : 5.000E-04 + Maximum no. of iterations : 30 + Final Fock-matrix accuracy: 1.000E-07 + + PCG initial level shift : 5.000 + PCG change shift at maxg : 0.500 + PCG final level shift : 0.000 + NR initial level shift : 0.000 + NR change shift at maxg : 0.000 + NR final level shift : 0.000 + NR enabled at maxg : 0.000 + ---------------------------------------------- + + + #quartets = 1.540D+03 #integrals = 8.874D+03 #direct = 0.0% #cached =100.0% + + + Integral file = ./h2o_cg_opt_ub3lyp_dat.aoints.0 + Record size in doubles = 65536 No. of integs per rec = 43688 + Max. records in memory = 2 Max. records in file = 12459 + No. of bits per label = 8 No. of bits per value = 64 + + + Grid_pts file = ./h2o_cg_opt_ub3lyp_dat.gridpts.0 + Record size in doubles = 12289 No. of grid_pts per rec = 3070 + Max. records in memory = 23 Max. recs in file = 66449 + + + iter energy gnorm gmax time + ----- ------------------- --------- --------- -------- + 1 -74.7827637856 7.65D-02 3.49D-02 9.9 + 2 -74.7830961699 3.24D-02 1.42D-02 10.6 + 3 -74.7831559449 5.03D-03 2.48D-03 11.3 + 4 -74.7831573614 3.54D-04 2.51D-04 12.1 + + + Total DFT energy = -74.783157361357 + One electron energy = -116.719279556831 + Coulomb energy = 41.152898726692 + Exchange-Corr. energy = -7.690594287046 + Nuclear repulsion energy = 8.473817755828 + + Numeric. integr. density = 9.000000105147 + + Total iterative time = 2.7s + + + + DFT Final Molecular Orbital Analysis + ------------------------------------ + + Vector 2 Occ=2.000000D+00 E=-1.307166D+00 + MO Center= -7.5D-14, 3.1D-08, -4.9D-02, r^2= 4.8D-01 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 2 0.500162 1 O s 6 0.463005 1 O s + 1 -0.217862 1 O s + + Vector 3 Occ=2.000000D+00 E=-8.503361D-01 + MO Center= -4.6D-14, -4.2D-09, -5.3D-02, r^2= 7.2D-01 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 4 0.574864 1 O py 8 0.302271 1 O py + 16 0.213937 2 H s 18 -0.213937 3 H s + + Vector 4 Occ=2.000000D+00 E=-7.143834D-01 + MO Center= 7.8D-13, 1.3D-08, 2.2D-01, r^2= 6.2D-01 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 5 0.613710 1 O pz 9 0.368953 1 O pz + 6 0.262494 1 O s 2 0.184624 1 O s + + Vector 5 Occ=1.000000D+00 E=-6.802893D-01 + MO Center= -7.0D-13, 1.8D-08, 1.2D-01, r^2= 5.1D-01 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 3 0.719133 1 O px 7 0.421441 1 O px + + Vector 6 Occ=0.000000D+00 E=-2.834085D-01 + MO Center= -8.2D-15, -2.9D-07, -5.6D-01, r^2= 2.1D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 6 0.879567 1 O s 17 -0.788378 2 H s + 19 -0.788379 3 H s 9 -0.348659 1 O pz + 5 -0.328435 1 O pz 2 0.230684 1 O s + 16 -0.207214 2 H s 18 -0.207214 3 H s + + Vector 7 Occ=0.000000D+00 E=-2.119287D-01 + MO Center= -6.0D-15, 3.2D-07, -4.9D-01, r^2= 2.1D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 17 0.970611 2 H s 19 -0.970611 3 H s + 8 -0.575969 1 O py 4 -0.487745 1 O py + 16 0.236907 2 H s 18 -0.236907 3 H s + + Vector 8 Occ=0.000000D+00 E= 3.952657D-01 + MO Center= -3.6D-13, -4.6D-06, -2.5D-01, r^2= 1.7D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 16 0.704689 2 H s 18 0.704694 3 H s + 17 -0.686557 2 H s 19 -0.686562 3 H s + 5 0.572498 1 O pz 9 -0.417036 1 O pz + 6 0.203417 1 O s 13 0.183101 1 O dyy + + Vector 9 Occ=0.000000D+00 E= 3.985679D-01 + MO Center= -1.4D-14, 4.5D-06, -3.0D-01, r^2= 2.1D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 17 0.927264 2 H s 19 -0.927260 3 H s + 16 -0.792314 2 H s 18 0.792310 3 H s + 14 0.398543 1 O dyz 4 0.188944 1 O py + + Vector 10 Occ=0.000000D+00 E= 4.398751D-01 + MO Center= -2.3D-13, 1.7D-08, 1.3D-01, r^2= 1.2D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 7 1.075428 1 O px 3 -0.904927 1 O px + + Vector 11 Occ=0.000000D+00 E= 4.916855D-01 + MO Center= 4.7D-13, -1.6D-08, 3.1D-01, r^2= 1.5D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 6 1.149608 1 O s 9 0.890369 1 O pz + 2 -0.683255 1 O s 5 -0.630704 1 O pz + 16 0.423892 2 H s 18 0.423892 3 H s + 17 -0.337384 2 H s 19 -0.337384 3 H s + 10 -0.275376 1 O dxx 15 -0.224712 1 O dzz + + Vector 12 Occ=0.000000D+00 E= 6.323733D-01 + MO Center= -7.6D-15, 2.2D-08, 1.7D-01, r^2= 1.6D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 8 1.671418 1 O py 4 -0.909282 1 O py + 17 -0.834133 2 H s 19 0.834133 3 H s + + Vector 13 Occ=0.000000D+00 E= 7.525974D-01 + MO Center= 1.4D-13, 6.1D-08, -3.6D-01, r^2= 1.5D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 6 3.434575 1 O s 2 -1.483831 1 O s + 9 -0.966915 1 O pz 17 -0.771104 2 H s + 19 -0.771104 3 H s 13 -0.640574 1 O dyy + 5 0.373379 1 O pz 15 -0.363718 1 O dzz + 16 -0.256581 2 H s 18 -0.256581 3 H s + + Vector 14 Occ=0.000000D+00 E= 1.256388D+00 + MO Center= 9.1D-14, 1.4D-08, 1.4D-01, r^2= 6.1D-01 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 11 1.732051 1 O dxy + + Vector 15 Occ=0.000000D+00 E= 1.275159D+00 + MO Center= -1.0D-13, 1.6D-08, 1.9D-01, r^2= 6.2D-01 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 15 1.007595 1 O dzz 13 -0.524273 1 O dyy + 10 -0.445133 1 O dxx 6 -0.179024 1 O s + + + Parallel integral file used 1 records with 0 large values + + + + NWChem DFT Gradient Module + -------------------------- + + + + charge = 1.00 + wavefunction = open shell + +XC gradient + 0.000000 0.000000 0.253950 + 0.000000 0.190193 -0.126975 + 0.000000 -0.190193 -0.126975 + +CD gradient + 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 + + 1 0.000000 0.000000 0.253950 + 2 0.000000 0.190193 -0.126975 + 3 0.000000 -0.190193 -0.126975 +nuclear repulsion gradient + 0.000000 0.000000 -2.455671 + 0.000000 -1.778403 1.227836 + 0.000000 1.778403 1.227835 + +weighted density gradient + 0.000000 0.000000 -0.317478 + 0.000000 -0.225076 0.158739 + 0.000000 0.225076 0.158739 + +kinetic energy gradient + 0.000000 0.000000 5.140581 + 0.000000 3.791714 -2.570290 + 0.000000 -3.791713 -2.570290 + +2-electron gradient + 0.000000 0.000000 -2.620372 + 0.000000 -1.980396 1.310186 + 0.000000 1.980396 1.310186 + +DFT CD+XC gradient + 0.000000 0.000000 0.253950 + 0.000000 0.190193 -0.126975 + 0.000000 -0.190193 -0.126975 + +total DFT gradient + 0.000000 0.000000 0.001010 + 0.000000 -0.001968 -0.000505 + 0.000000 0.001968 -0.000505 + + + + DFT ENERGY GRADIENTS + + atom coordinates gradient + x y z x y z + 1 O 0.000000 0.000000 0.255323 0.000000 0.000000 0.001010 + 2 H 0.000000 1.583004 -0.902561 0.000000 -0.001968 -0.000505 + 3 H 0.000000 -1.583004 -0.902561 0.000000 0.001968 -0.000505 + + ---------------------------------------- + | Time | 1-e(secs) | 2-e(secs) | + ---------------------------------------- + | CPU | 0.00 | 0.15 | + ---------------------------------------- + | WALL | 0.00 | 0.15 | + ---------------------------------------- + + Step Energy Delta E Gmax Grms Xrms Xmax Walltime + ---- ---------------- -------- -------- -------- -------- -------- -------- +@ 1 -74.78315736 -1.1D-02 0.00163 0.00141 0.07466 0.15631 13.2 + + + + + Z-matrix (autoz) + -------- + + Units are Angstrom for bonds and degrees for angles + + Type Name I J K L M Value Gradient + ----------- -------- ----- ----- ----- ----- ----- ---------- ---------- + 1 Stretch 1 2 1.03786 -0.00129 + 2 Stretch 1 3 1.03786 -0.00129 + 3 Bend 2 1 3 107.63298 -0.00163 + + + NWChem DFT Module + ----------------- + + + Caching 1-el integrals + + General Information + ------------------- + SCF calculation type: DFT + Wavefunction type: restricted open shell. + No. of atoms : 3 + No. of electrons : 9 + Alpha electrons : 5 + Beta electrons : 4 + Charge : 1 + Spin multiplicity: 2 + Use of symmetry is: off; symmetry adaption is: off + Maximum number of iterations: 30 + AO basis - number of functions: 19 + number of shells: 10 + Convergence on energy requested: 1.00D-06 + Convergence on density requested: 1.00D-05 + Convergence on gradient requested: 5.00D-04 + + XC Information + -------------- + Slater Exchange Functional 1.000 local + + Grid Information + ---------------- + Grid used for XC integration: medium + Radial quadrature: Mura-Knowles + Angular quadrature: Lebedev. + Tag B.-S. Rad. Rad. Pts. Rad. Cut. Ang. Pts. + --- ---------- --------- --------- --------- + O 0.60 49 5.0 434 + H 0.35 45 6.0 434 + Grid pruning is: on + Number of quadrature shells: 139 + Spatial weights used: Erf1 + + Convergence Information + ----------------------- + Convergence aids based upon iterative change in + total energy or number of iterations. + Levelshifting, if invoked, occurs when the + HOMO/LUMO gap drops below (HL_TOL): 1.00D-02 + DIIS, if invoked, will attempt to extrapolate + using up to (NFOCK): 10 stored Fock matrices. + + Damping( 0%) Levelshifting(0.5) DIIS + --------------- ------------------- --------------- + dE on: start ASAP start + dE off: 2 iters 30 iters 30 iters + + + Screening Tolerance Information + ------------------------------- + Density screening/tol_rho: 1.00D-10 + AO Gaussian exp screening on grid/accAOfunc: 14 + CD Gaussian exp screening on grid/accCDfunc: 20 + XC Gaussian exp screening on grid/accXCfunc: 20 + Schwarz screening/accCoul: 1.00D-08 + + + Loading old vectors from job with title : + + + + + + ---------------------------------------------- + Quadratically convergent ROKS + + Convergence threshold : 5.000E-04 + Maximum no. of iterations : 30 + Final Fock-matrix accuracy: 1.000E-07 + + PCG initial level shift : 5.000 + PCG change shift at maxg : 0.500 + PCG final level shift : 0.000 + NR initial level shift : 0.000 + NR change shift at maxg : 0.000 + NR final level shift : 0.000 + NR enabled at maxg : 0.000 + ---------------------------------------------- + + + #quartets = 1.540D+03 #integrals = 8.874D+03 #direct = 0.0% #cached =100.0% + + + Integral file = ./h2o_cg_opt_ub3lyp_dat.aoints.0 + Record size in doubles = 65536 No. of integs per rec = 43688 + Max. records in memory = 2 Max. records in file = 12459 + No. of bits per label = 8 No. of bits per value = 64 + + + Grid_pts file = ./h2o_cg_opt_ub3lyp_dat.gridpts.0 + Record size in doubles = 12289 No. of grid_pts per rec = 3070 + Max. records in memory = 23 Max. recs in file = 66449 + + + iter energy gnorm gmax time + ----- ------------------- --------- --------- -------- + 1 -74.7831840721 9.96D-03 4.75D-03 13.5 + 2 -74.7831907939 2.09D-03 1.25D-03 13.8 + 3 -74.7831909268 1.23D-03 6.99D-04 14.6 + 4 -74.7831910231 3.05D-04 1.58D-04 15.3 + + + Total DFT energy = -74.783191023138 + One electron energy = -116.703256996498 + Coulomb energy = 41.148016782875 + Exchange-Corr. energy = -7.689858713014 + Nuclear repulsion energy = 8.461907903500 + + Numeric. integr. density = 9.000000073436 + + Total iterative time = 2.3s + + + + DFT Final Molecular Orbital Analysis + ------------------------------------ + + Vector 2 Occ=2.000000D+00 E=-1.305819D+00 + MO Center= -6.9D-14, -1.1D-08, -5.1D-02, r^2= 4.8D-01 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 2 0.500485 1 O s 6 0.463729 1 O s + 1 -0.218030 1 O s + + Vector 3 Occ=2.000000D+00 E=-8.508911D-01 + MO Center= -4.6D-14, 2.6D-09, -5.5D-02, r^2= 7.2D-01 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 4 0.574208 1 O py 8 0.302156 1 O py + 16 0.214145 2 H s 18 -0.214145 3 H s + + Vector 4 Occ=2.000000D+00 E=-7.124539D-01 + MO Center= 7.7D-13, -4.7D-09, 2.1D-01, r^2= 6.2D-01 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 5 0.614849 1 O pz 9 0.370555 1 O pz + 6 0.260248 1 O s 2 0.182904 1 O s + + Vector 5 Occ=1.000000D+00 E=-6.797039D-01 + MO Center= -6.8D-13, -6.1D-09, 1.1D-01, r^2= 5.1D-01 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 3 0.718984 1 O px 7 0.421631 1 O px + + Vector 6 Occ=0.000000D+00 E=-2.838659D-01 + MO Center= -1.0D-14, 9.8D-08, -5.5D-01, r^2= 2.1D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 6 0.879131 1 O s 17 -0.787228 2 H s + 19 -0.787227 3 H s 9 -0.346124 1 O pz + 5 -0.326268 1 O pz 2 0.231236 1 O s + 16 -0.209198 2 H s 18 -0.209198 3 H s + + Vector 7 Occ=0.000000D+00 E=-2.117463D-01 + MO Center= -5.6D-15, -1.1D-07, -4.9D-01, r^2= 2.2D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 17 -0.968681 2 H s 19 0.968681 3 H s + 8 0.576949 1 O py 4 0.488404 1 O py + 16 -0.235730 2 H s 18 0.235730 3 H s + + Vector 8 Occ=0.000000D+00 E= 3.929847D-01 + MO Center= -5.2D-13, 6.5D-07, -2.6D-01, r^2= 1.7D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 16 0.713379 2 H s 18 0.713378 3 H s + 17 -0.690720 2 H s 19 -0.690719 3 H s + 5 0.554972 1 O pz 9 -0.395631 1 O pz + 6 0.206890 1 O s 13 0.186746 1 O dyy + + Vector 9 Occ=0.000000D+00 E= 4.008785D-01 + MO Center= -1.5D-14, -6.3D-07, -3.1D-01, r^2= 2.1D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 17 -0.928925 2 H s 19 0.928926 3 H s + 16 0.792510 2 H s 18 -0.792511 3 H s + 14 -0.399471 1 O dyz 4 -0.198085 1 O py + + Vector 10 Occ=0.000000D+00 E= 4.402311D-01 + MO Center= -1.3D-13, -5.9D-09, 1.2D-01, r^2= 1.2D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 7 1.075372 1 O px 3 -0.905045 1 O px + + Vector 11 Occ=0.000000D+00 E= 4.906148D-01 + MO Center= 4.6D-13, 4.2D-09, 3.2D-01, r^2= 1.4D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 6 1.115244 1 O s 9 0.905014 1 O pz + 2 -0.666572 1 O s 5 -0.647757 1 O pz + 16 0.410496 2 H s 18 0.410496 3 H s + 17 -0.320242 2 H s 19 -0.320242 3 H s + 10 -0.268089 1 O dxx 15 -0.222481 1 O dzz + + Vector 12 Occ=0.000000D+00 E= 6.337187D-01 + MO Center= -1.8D-14, -6.8D-09, 1.8D-01, r^2= 1.6D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 8 1.675897 1 O py 4 -0.907562 1 O py + 17 -0.825671 2 H s 19 0.825671 3 H s + 14 0.153478 1 O dyz + + Vector 13 Occ=0.000000D+00 E= 7.499088D-01 + MO Center= 2.0D-13, -2.1D-08, -3.6D-01, r^2= 1.5D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 6 3.443174 1 O s 2 -1.491176 1 O s + 9 -0.951660 1 O pz 17 -0.777033 2 H s + 19 -0.777033 3 H s 13 -0.638611 1 O dyy + 5 0.370400 1 O pz 15 -0.363369 1 O dzz + 10 -0.254471 1 O dxx 16 -0.244877 2 H s + + Vector 14 Occ=0.000000D+00 E= 1.256200D+00 + MO Center= 1.0D-13, -5.1D-09, 1.3D-01, r^2= 6.1D-01 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 11 1.732051 1 O dxy + + Vector 15 Occ=0.000000D+00 E= 1.277695D+00 + MO Center= -1.1D-13, -5.7D-09, 1.8D-01, r^2= 6.2D-01 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 15 1.008004 1 O dzz 13 -0.510539 1 O dyy + 10 -0.460336 1 O dxx 6 -0.175946 1 O s + + + Parallel integral file used 1 records with 0 large values + + Line search: + step= 1.00 grad=-5.3D-05 hess= 2.0D-05 energy= -74.783191 mode=downhill + new step= 1.35 predicted energy= -74.783193 + + -------- + Step 2 + -------- + + + Geometry "geometry" -> "geometry" + --------------------------------- + + Output coordinates in a.u. (scale by 1.000000000 to convert to a.u.) + + No. Tag Charge X Y Z + ---- ---------------- ---------- -------------- -------------- -------------- + 1 O 8.0000 0.00000000 -0.00000003 0.24554936 + 2 H 1.0000 0.00000000 1.59752840 -0.89767469 + 3 H 1.0000 0.00000000 -1.59752837 -0.89767467 + + Atomic Mass + ----------- + + O 15.994910 + H 1.007825 + + + Effective nuclear repulsion energy (a.u.) 8.4577627817 + + Nuclear Dipole moment (a.u.) + ---------------------------- + X Y Z + ---------------- ---------------- ---------------- + 0.0000000000 -0.0000001826 0.1690455516 + + + NWChem DFT Module + ----------------- + + + Caching 1-el integrals + + General Information + ------------------- + SCF calculation type: DFT + Wavefunction type: restricted open shell. + No. of atoms : 3 + No. of electrons : 9 + Alpha electrons : 5 + Beta electrons : 4 + Charge : 1 + Spin multiplicity: 2 + Use of symmetry is: off; symmetry adaption is: off + Maximum number of iterations: 30 + AO basis - number of functions: 19 + number of shells: 10 + Convergence on energy requested: 1.00D-06 + Convergence on density requested: 1.00D-05 + Convergence on gradient requested: 5.00D-04 + + XC Information + -------------- + Slater Exchange Functional 1.000 local + + Grid Information + ---------------- + Grid used for XC integration: medium + Radial quadrature: Mura-Knowles + Angular quadrature: Lebedev. + Tag B.-S. Rad. Rad. Pts. Rad. Cut. Ang. Pts. + --- ---------- --------- --------- --------- + O 0.60 49 5.0 434 + H 0.35 45 6.0 434 + Grid pruning is: on + Number of quadrature shells: 139 + Spatial weights used: Erf1 + + Convergence Information + ----------------------- + Convergence aids based upon iterative change in + total energy or number of iterations. + Levelshifting, if invoked, occurs when the + HOMO/LUMO gap drops below (HL_TOL): 1.00D-02 + DIIS, if invoked, will attempt to extrapolate + using up to (NFOCK): 10 stored Fock matrices. + + Damping( 0%) Levelshifting(0.5) DIIS + --------------- ------------------- --------------- + dE on: start ASAP start + dE off: 2 iters 30 iters 30 iters + + + Screening Tolerance Information + ------------------------------- + Density screening/tol_rho: 1.00D-10 + AO Gaussian exp screening on grid/accAOfunc: 14 + CD Gaussian exp screening on grid/accCDfunc: 20 + XC Gaussian exp screening on grid/accXCfunc: 20 + Schwarz screening/accCoul: 1.00D-08 + + + Loading old vectors from job with title : + + + + + + ---------------------------------------------- + Quadratically convergent ROKS + + Convergence threshold : 5.000E-04 + Maximum no. of iterations : 30 + Final Fock-matrix accuracy: 1.000E-07 + + PCG initial level shift : 5.000 + PCG change shift at maxg : 0.500 + PCG final level shift : 0.000 + NR initial level shift : 0.000 + NR change shift at maxg : 0.000 + NR final level shift : 0.000 + NR enabled at maxg : 0.000 + ---------------------------------------------- + + + #quartets = 1.540D+03 #integrals = 8.874D+03 #direct = 0.0% #cached =100.0% + + + Integral file = ./h2o_cg_opt_ub3lyp_dat.aoints.0 + Record size in doubles = 65536 No. of integs per rec = 43688 + Max. records in memory = 2 Max. records in file = 12459 + No. of bits per label = 8 No. of bits per value = 64 + + + Grid_pts file = ./h2o_cg_opt_ub3lyp_dat.gridpts.0 + Record size in doubles = 12289 No. of grid_pts per rec = 3070 + Max. records in memory = 23 Max. recs in file = 66449 + + + iter energy gnorm gmax time + ----- ------------------- --------- --------- -------- + 1 -74.7831927550 3.38D-03 1.58D-03 15.8 + 2 -74.7831935125 7.15D-04 4.75D-04 16.2 + 3 -74.7831935286 4.67D-04 2.48D-04 16.9 + + + Total DFT energy = -74.783193528550 + One electron energy = -116.697939789334 + Coulomb energy = 41.146614852065 + Exchange-Corr. energy = -7.689631372936 + Nuclear repulsion energy = 8.457762781654 + + Numeric. integr. density = 9.000000055319 + + Total iterative time = 1.6s + + + + DFT Final Molecular Orbital Analysis + ------------------------------------ + + Vector 2 Occ=2.000000D+00 E=-1.305336D+00 + MO Center= -6.8D-14, -2.6D-08, -5.1D-02, r^2= 4.8D-01 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 2 0.500587 1 O s 6 0.463949 1 O s + 1 -0.218083 1 O s + + Vector 3 Occ=2.000000D+00 E=-8.510653D-01 + MO Center= -4.6D-14, 4.7D-09, -5.6D-02, r^2= 7.3D-01 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 4 0.573992 1 O py 8 0.302145 1 O py + 16 0.214197 2 H s 18 -0.214197 3 H s + + Vector 4 Occ=2.000000D+00 E=-7.117451D-01 + MO Center= 7.7D-13, -1.1D-08, 2.1D-01, r^2= 6.2D-01 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 5 0.615253 1 O pz 9 0.371113 1 O pz + 6 0.259458 1 O s 2 0.182323 1 O s + + Vector 5 Occ=1.000000D+00 E=-6.794719D-01 + MO Center= -6.8D-13, -1.4D-08, 1.1D-01, r^2= 5.1D-01 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 3 0.718942 1 O px 7 0.421687 1 O px + + Vector 6 Occ=0.000000D+00 E=-2.840391D-01 + MO Center= -1.0D-14, 2.4D-07, -5.5D-01, r^2= 2.1D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 6 0.878989 1 O s 17 -0.786810 2 H s + 19 -0.786810 3 H s 9 -0.345223 1 O pz + 5 -0.325496 1 O pz 2 0.231429 1 O s + 16 -0.209901 2 H s 18 -0.209901 3 H s + + Vector 7 Occ=0.000000D+00 E=-2.116764D-01 + MO Center= -5.6D-15, -2.6D-07, -4.9D-01, r^2= 2.2D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 17 -0.968044 2 H s 19 0.968044 3 H s + 8 0.577300 1 O py 4 0.488604 1 O py + 16 -0.235326 2 H s 18 0.235326 3 H s + + Vector 8 Occ=0.000000D+00 E= 3.921662D-01 + MO Center= -5.1D-13, 1.3D-06, -2.7D-01, r^2= 1.7D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 16 0.716360 2 H s 18 0.716359 3 H s + 17 -0.692141 2 H s 19 -0.692140 3 H s + 5 0.548692 1 O pz 9 -0.388038 1 O pz + 6 0.208058 1 O s 13 0.188003 1 O dyy + + Vector 9 Occ=0.000000D+00 E= 4.016846D-01 + MO Center= -1.4D-14, -1.3D-06, -3.1D-01, r^2= 2.1D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 17 -0.929561 2 H s 19 0.929562 3 H s + 16 0.792573 2 H s 18 -0.792574 3 H s + 14 -0.399742 1 O dyz 4 -0.201331 1 O py + + Vector 10 Occ=0.000000D+00 E= 4.403735D-01 + MO Center= -1.5D-13, -1.4D-08, 1.2D-01, r^2= 1.2D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 7 1.075357 1 O px 3 -0.905078 1 O px + + Vector 11 Occ=0.000000D+00 E= 4.902781D-01 + MO Center= 4.7D-13, 1.1D-08, 3.2D-01, r^2= 1.4D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 6 1.103263 1 O s 9 0.910019 1 O pz + 2 -0.660735 1 O s 5 -0.653657 1 O pz + 16 0.405672 2 H s 18 0.405673 3 H s + 17 -0.314165 2 H s 19 -0.314165 3 H s + 10 -0.265530 1 O dxx 15 -0.221665 1 O dzz + + Vector 12 Occ=0.000000D+00 E= 6.342297D-01 + MO Center= -1.8D-14, -1.4D-08, 1.8D-01, r^2= 1.6D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 8 1.677442 1 O py 4 -0.906933 1 O py + 17 -0.822662 2 H s 19 0.822662 3 H s + 14 0.156405 1 O dyz + + Vector 13 Occ=0.000000D+00 E= 7.489883D-01 + MO Center= 2.0D-13, -5.2D-08, -3.6D-01, r^2= 1.5D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 6 3.446079 1 O s 2 -1.493686 1 O s + 9 -0.946294 1 O pz 17 -0.779058 2 H s + 19 -0.779059 3 H s 13 -0.637874 1 O dyy + 5 0.369294 1 O pz 15 -0.363311 1 O dzz + 10 -0.257339 1 O dxx 16 -0.240824 2 H s + + Vector 14 Occ=0.000000D+00 E= 1.256154D+00 + MO Center= 1.0D-13, -1.2D-08, 1.3D-01, r^2= 6.1D-01 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 11 1.732051 1 O dxy + + Vector 15 Occ=0.000000D+00 E= 1.278598D+00 + MO Center= -1.1D-13, -1.3D-08, 1.8D-01, r^2= 6.2D-01 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 15 1.008074 1 O dzz 13 -0.505762 1 O dyy + 10 -0.465578 1 O dxx 6 -0.174779 1 O s + + + Parallel integral file used 1 records with 0 large values + + + + NWChem DFT Gradient Module + -------------------------- + + + + charge = 1.00 + wavefunction = open shell + +XC gradient + 0.000000 0.000000 0.248126 + 0.000000 0.191781 -0.124063 + 0.000000 -0.191781 -0.124063 + +CD gradient + 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 + + 1 0.000000 0.000000 0.248126 + 2 0.000000 0.191781 -0.124063 + 3 0.000000 -0.191781 -0.124063 +nuclear repulsion gradient + 0.000000 0.000000 -2.412845 + 0.000000 -1.783800 1.206422 + 0.000000 1.783800 1.206422 + +weighted density gradient + 0.000000 0.000000 -0.310712 + 0.000000 -0.227433 0.155356 + 0.000000 0.227433 0.155356 + +kinetic energy gradient + 0.000000 0.000000 5.036422 + 0.000000 3.818092 -2.518211 + 0.000000 -3.818092 -2.518211 + +2-electron gradient + 0.000000 0.000000 -2.560704 + 0.000000 -1.998538 1.280352 + 0.000000 1.998538 1.280352 + +DFT CD+XC gradient + 0.000000 0.000000 0.248126 + 0.000000 0.191781 -0.124063 + 0.000000 -0.191781 -0.124063 + +total DFT gradient + 0.000000 0.000000 0.000287 + 0.000000 0.000103 -0.000144 + 0.000000 -0.000103 -0.000144 + + + + DFT ENERGY GRADIENTS + + atom coordinates gradient + x y z x y z + 1 O 0.000000 0.000000 0.245549 0.000000 0.000000 0.000287 + 2 H 0.000000 1.597528 -0.897675 0.000000 0.000103 -0.000144 + 3 H 0.000000 -1.597528 -0.897675 0.000000 -0.000103 -0.000144 + + ---------------------------------------- + | Time | 1-e(secs) | 2-e(secs) | + ---------------------------------------- + | CPU | 0.00 | 0.15 | + ---------------------------------------- + | WALL | 0.00 | 0.15 | + ---------------------------------------- + + Step Energy Delta E Gmax Grms Xrms Xmax Walltime + ---- ---------------- -------- -------- -------- -------- -------- -------- +@ 2 -74.78319353 -3.6D-05 0.00017 0.00014 0.00792 0.01449 18.1 + ok ok + + + + Z-matrix (autoz) + -------- + + Units are Angstrom for bonds and degrees for angles + + Type Name I J K L M Value Gradient + ----------- -------- ----- ----- ----- ----- ----- ---------- ---------- + 1 Stretch 1 2 1.03954 0.00017 + 2 Stretch 1 3 1.03954 0.00017 + 3 Bend 2 1 3 108.82343 -0.00006 + + + NWChem DFT Module + ----------------- + + + Caching 1-el integrals + + General Information + ------------------- + SCF calculation type: DFT + Wavefunction type: restricted open shell. + No. of atoms : 3 + No. of electrons : 9 + Alpha electrons : 5 + Beta electrons : 4 + Charge : 1 + Spin multiplicity: 2 + Use of symmetry is: off; symmetry adaption is: off + Maximum number of iterations: 30 + AO basis - number of functions: 19 + number of shells: 10 + Convergence on energy requested: 1.00D-06 + Convergence on density requested: 1.00D-05 + Convergence on gradient requested: 5.00D-04 + + XC Information + -------------- + Slater Exchange Functional 1.000 local + + Grid Information + ---------------- + Grid used for XC integration: medium + Radial quadrature: Mura-Knowles + Angular quadrature: Lebedev. + Tag B.-S. Rad. Rad. Pts. Rad. Cut. Ang. Pts. + --- ---------- --------- --------- --------- + O 0.60 49 5.0 434 + H 0.35 45 6.0 434 + Grid pruning is: on + Number of quadrature shells: 139 + Spatial weights used: Erf1 + + Convergence Information + ----------------------- + Convergence aids based upon iterative change in + total energy or number of iterations. + Levelshifting, if invoked, occurs when the + HOMO/LUMO gap drops below (HL_TOL): 1.00D-02 + DIIS, if invoked, will attempt to extrapolate + using up to (NFOCK): 10 stored Fock matrices. + + Damping( 0%) Levelshifting(0.5) DIIS + --------------- ------------------- --------------- + dE on: start ASAP start + dE off: 2 iters 30 iters 30 iters + + + Screening Tolerance Information + ------------------------------- + Density screening/tol_rho: 1.00D-10 + AO Gaussian exp screening on grid/accAOfunc: 14 + CD Gaussian exp screening on grid/accCDfunc: 20 + XC Gaussian exp screening on grid/accXCfunc: 20 + Schwarz screening/accCoul: 1.00D-08 + + + Loading old vectors from job with title : + + + + + + ---------------------------------------------- + Quadratically convergent ROKS + + Convergence threshold : 5.000E-04 + Maximum no. of iterations : 30 + Final Fock-matrix accuracy: 1.000E-07 + + PCG initial level shift : 5.000 + PCG change shift at maxg : 0.500 + PCG final level shift : 0.000 + NR initial level shift : 0.000 + NR change shift at maxg : 0.000 + NR final level shift : 0.000 + NR enabled at maxg : 0.000 + ---------------------------------------------- + + + #quartets = 1.540D+03 #integrals = 8.874D+03 #direct = 0.0% #cached =100.0% + + + Integral file = ./h2o_cg_opt_ub3lyp_dat.aoints.0 + Record size in doubles = 65536 No. of integs per rec = 43688 + Max. records in memory = 2 Max. records in file = 12459 + No. of bits per label = 8 No. of bits per value = 64 + + + Grid_pts file = ./h2o_cg_opt_ub3lyp_dat.gridpts.0 + Record size in doubles = 12289 No. of grid_pts per rec = 3070 + Max. records in memory = 23 Max. recs in file = 66449 + + + iter energy gnorm gmax time + ----- ------------------- --------- --------- -------- + 1 -74.7831936106 6.99D-04 3.21D-04 18.3 + 2 -74.7831936402 2.99D-04 1.48D-04 19.0 + + + Total DFT energy = -74.783193640193 + One electron energy = -116.700858015710 + Coulomb energy = 41.148275113335 + Exchange-Corr. energy = -7.689826915852 + Nuclear repulsion energy = 8.459216178035 + + Numeric. integr. density = 9.000000040430 + + Total iterative time = 1.2s + + + + DFT Final Molecular Orbital Analysis + ------------------------------------ + + Vector 2 Occ=2.000000D+00 E=-1.305351D+00 + MO Center= -6.7D-14, -1.1D-08, -5.1D-02, r^2= 4.8D-01 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 2 0.500612 1 O s 6 0.463921 1 O s + 1 -0.218088 1 O s + + Vector 3 Occ=2.000000D+00 E=-8.511841D-01 + MO Center= -4.6D-14, 2.9D-09, -5.7D-02, r^2= 7.3D-01 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 4 0.573996 1 O py 8 0.302095 1 O py + 16 0.214200 2 H s 18 -0.214200 3 H s + + Vector 4 Occ=2.000000D+00 E=-7.116709D-01 + MO Center= 7.7D-13, -5.1D-09, 2.1D-01, r^2= 6.2D-01 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 5 0.615329 1 O pz 9 0.371126 1 O pz + 6 0.259424 1 O s 2 0.182289 1 O s + + Vector 5 Occ=1.000000D+00 E=-6.794537D-01 + MO Center= -6.8D-13, -6.4D-09, 1.1D-01, r^2= 5.1D-01 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 3 0.718963 1 O px 7 0.421661 1 O px + + Vector 6 Occ=0.000000D+00 E=-2.839549D-01 + MO Center= -1.1D-14, 1.0D-07, -5.5D-01, r^2= 2.1D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 6 0.879411 1 O s 17 -0.787006 2 H s + 19 -0.787006 3 H s 9 -0.345145 1 O pz + 5 -0.325324 1 O pz 2 0.231447 1 O s + 16 -0.209904 2 H s 18 -0.209904 3 H s + + Vector 7 Occ=0.000000D+00 E=-2.115387D-01 + MO Center= -5.6D-15, -1.1D-07, -4.9D-01, r^2= 2.2D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 17 -0.968414 2 H s 19 0.968414 3 H s + 8 0.577526 1 O py 4 0.488587 1 O py + 16 -0.235195 2 H s 18 0.235195 3 H s + + Vector 8 Occ=0.000000D+00 E= 3.921683D-01 + MO Center= -5.1D-13, 5.7D-07, -2.7D-01, r^2= 1.7D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 16 0.716684 2 H s 18 0.716683 3 H s + 17 -0.691985 2 H s 19 -0.691984 3 H s + 5 0.548146 1 O pz 9 -0.387070 1 O pz + 6 0.207490 1 O s 13 0.188277 1 O dyy + + Vector 9 Occ=0.000000D+00 E= 4.018408D-01 + MO Center= -1.4D-14, -5.5D-07, -3.1D-01, r^2= 2.1D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 17 -0.929177 2 H s 19 0.929177 3 H s + 16 0.792637 2 H s 18 -0.792637 3 H s + 14 -0.399834 1 O dyz 4 -0.201639 1 O py + + Vector 10 Occ=0.000000D+00 E= 4.403877D-01 + MO Center= -1.5D-13, -6.1D-09, 1.2D-01, r^2= 1.2D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 7 1.075368 1 O px 3 -0.905061 1 O px + + Vector 11 Occ=0.000000D+00 E= 4.902138D-01 + MO Center= 4.7D-13, 4.2D-09, 3.2D-01, r^2= 1.4D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 6 1.100940 1 O s 9 0.910857 1 O pz + 2 -0.659683 1 O s 5 -0.654285 1 O pz + 16 0.405307 2 H s 18 0.405307 3 H s + 17 -0.313345 2 H s 19 -0.313345 3 H s + 10 -0.265163 1 O dxx 15 -0.221504 1 O dzz + + Vector 12 Occ=0.000000D+00 E= 6.343242D-01 + MO Center= -1.8D-14, -6.0D-09, 1.8D-01, r^2= 1.6D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 8 1.677916 1 O py 4 -0.906914 1 O py + 17 -0.822942 2 H s 19 0.822942 3 H s + 14 0.156539 1 O dyz + + Vector 13 Occ=0.000000D+00 E= 7.489251D-01 + MO Center= 2.0D-13, -2.3D-08, -3.6D-01, r^2= 1.5D+00 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 6 3.447412 1 O s 2 -1.494262 1 O s + 9 -0.945511 1 O pz 17 -0.779760 2 H s + 19 -0.779760 3 H s 13 -0.637793 1 O dyy + 5 0.369006 1 O pz 15 -0.363308 1 O dzz + 10 -0.257793 1 O dxx 16 -0.240115 2 H s + + Vector 14 Occ=0.000000D+00 E= 1.256082D+00 + MO Center= 1.0D-13, -5.2D-09, 1.3D-01, r^2= 6.1D-01 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 11 1.732051 1 O dxy + + Vector 15 Occ=0.000000D+00 E= 1.278666D+00 + MO Center= -1.1D-13, -5.9D-09, 1.8D-01, r^2= 6.2D-01 + Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function + ----- ------------ --------------- ----- ------------ --------------- + 15 1.008087 1 O dzz 13 -0.505049 1 O dyy + 10 -0.466334 1 O dxx 6 -0.174764 1 O s + + + Parallel integral file used 1 records with 0 large values + + Line search: + step= 1.00 grad=-2.1D-07 hess= 9.5D-08 energy= -74.783194 mode=accept + new step= 1.00 predicted energy= -74.783194 + + -------- + Step 3 + -------- + + + Geometry "geometry" -> "geometry" + --------------------------------- + + Output coordinates in a.u. (scale by 1.000000000 to convert to a.u.) + + No. Tag Charge X Y Z + ---- ---------------- ---------- -------------- -------------- -------------- + 1 O 8.0000 0.00000000 -0.00000001 0.24499509 + 2 H 1.0000 0.00000000 1.59768321 -0.89739755 + 3 H 1.0000 0.00000000 -1.59768320 -0.89739754 + + Atomic Mass + ----------- + + O 15.994910 + H 1.007825 + + + Effective nuclear repulsion energy (a.u.) 8.4592161780 + + Nuclear Dipole moment (a.u.) + ---------------------------- + X Y Z + ---------------- ---------------- ---------------- + 0.0000000000 -0.0000000807 0.1651656208 + + + NWChem DFT Module + ----------------- + + + + The DFT is already converged + + Total DFT energy = -74.783193640193 + + + + NWChem DFT Gradient Module + -------------------------- + + + + charge = 1.00 + wavefunction = open shell + +XC gradient + 0.000000 0.000000 0.247947 + 0.000000 0.191906 -0.123973 + 0.000000 -0.191906 -0.123973 + +CD gradient + 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 + + 1 0.000000 0.000000 0.247947 + 2 0.000000 0.191906 -0.123973 + 3 0.000000 -0.191906 -0.123973 +nuclear repulsion gradient + 0.000000 0.000000 -2.412408 + 0.000000 -1.784866 1.206204 + 0.000000 1.784866 1.206204 + +weighted density gradient + 0.000000 0.000000 -0.310476 + 0.000000 -0.227579 0.155238 + 0.000000 0.227579 0.155238 + +kinetic energy gradient + 0.000000 0.000000 5.033670 + 0.000000 3.820379 -2.516835 + 0.000000 -3.820379 -2.516835 + +2-electron gradient + 0.000000 0.000000 -2.558686 + 0.000000 -1.999786 1.279343 + 0.000000 1.999786 1.279343 + +DFT CD+XC gradient + 0.000000 0.000000 0.247947 + 0.000000 0.191906 -0.123973 + 0.000000 -0.191906 -0.123973 + +total DFT gradient + 0.000000 0.000000 0.000047 + 0.000000 0.000054 -0.000024 + 0.000000 -0.000054 -0.000024 + + + + DFT ENERGY GRADIENTS + + atom coordinates gradient + x y z x y z + 1 O 0.000000 0.000000 0.244995 0.000000 0.000000 0.000047 + 2 H 0.000000 1.597683 -0.897398 0.000000 0.000054 -0.000024 + 3 H 0.000000 -1.597683 -0.897398 0.000000 -0.000054 -0.000024 + + ---------------------------------------- + | Time | 1-e(secs) | 2-e(secs) | + ---------------------------------------- + | CPU | 0.00 | 0.15 | + ---------------------------------------- + | WALL | 0.00 | 0.15 | + ---------------------------------------- + + Step Energy Delta E Gmax Grms Xrms Xmax Walltime + ---- ---------------- -------- -------- -------- -------- -------- -------- +@ 3 -74.78319364 -1.1D-07 0.00006 0.00005 0.00024 0.00055 20.3 + ok ok ok ok + + + + Z-matrix (autoz) + -------- + + Units are Angstrom for bonds and degrees for angles + + Type Name I J K L M Value Gradient + ----------- -------- ----- ----- ----- ----- ----- ---------- ---------- + 1 Stretch 1 2 1.03935 0.00006 + 2 Stretch 1 3 1.03935 0.00006 + 3 Bend 2 1 3 108.86813 0.00001 + + + ---------------------- + Optimization converged + ---------------------- + + + Step Energy Delta E Gmax Grms Xrms Xmax Walltime + ---- ---------------- -------- -------- -------- -------- -------- -------- +@ 3 -74.78319364 -1.1D-07 0.00006 0.00005 0.00024 0.00055 20.3 + ok ok ok ok + + + + Z-matrix (autoz) + -------- + + Units are Angstrom for bonds and degrees for angles + + Type Name I J K L M Value Gradient + ----------- -------- ----- ----- ----- ----- ----- ---------- ---------- + 1 Stretch 1 2 1.03935 0.00006 + 2 Stretch 1 3 1.03935 0.00006 + 3 Bend 2 1 3 108.86813 0.00001 + + + + Geometry "geometry" -> "geometry" + --------------------------------- + + Output coordinates in a.u. (scale by 1.000000000 to convert to a.u.) + + No. Tag Charge X Y Z + ---- ---------------- ---------- -------------- -------------- -------------- + 1 O 8.0000 0.00000000 -0.00000001 0.24499509 + 2 H 1.0000 0.00000000 1.59768321 -0.89739755 + 3 H 1.0000 0.00000000 -1.59768320 -0.89739754 + + Atomic Mass + ----------- + + O 15.994910 + H 1.007825 + + + Effective nuclear repulsion energy (a.u.) 8.4592161780 + + Nuclear Dipole moment (a.u.) + ---------------------------- + X Y Z + ---------------- ---------------- ---------------- + 0.0000000000 -0.0000000807 0.1651656208 + + + Final and change from initial internal coordinates + -------------------------------------------------- + + + + Z-matrix (autoz) + -------- + + Units are Angstrom for bonds and degrees for angles + + Type Name I J K L M Value Change + ----------- -------- ----- ----- ----- ----- ----- ---------- ---------- + 1 Stretch 1 2 1.03935 0.08238 + 2 Stretch 1 3 1.03935 0.08238 + 3 Bend 2 1 3 108.86813 4.35689 + + ============================================================================== + internuclear distances + ------------------------------------------------------------------------------ + center one | center two | atomic units | a.u. + ------------------------------------------------------------------------------ + 2 H | 1 O | 1.96409 | 1.96409 + 3 H | 1 O | 1.96409 | 1.96409 + ------------------------------------------------------------------------------ + number of included internuclear distances: 2 + ============================================================================== + + + + ============================================================================== + internuclear angles + ------------------------------------------------------------------------------ + center 1 | center 2 | center 3 | degrees + ------------------------------------------------------------------------------ + 2 H | 1 O | 3 H | 108.87 + ------------------------------------------------------------------------------ + number of included internuclear angles: 1 + ============================================================================== + + + + + Task times cpu: 19.9s wall: 20.3s + Summary of allocated global arrays +----------------------------------- + No active global arrays + + + + GA Statistics for process 0 + ------------------------------ + + create destroy get put acc scatter gather read&inc +calls: 1359 1359 7.35e+04 5628 3.79e+04 28 0 2410 +number of processes/call 1.00e+00 1.00e+00 1.00e+00 1.00e+00 0.00e+00 +bytes total: 2.76e+07 2.60e+06 1.31e+07 8.96e+02 0.00e+00 1.93e+04 +bytes remote: 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 +Max memory consumed for GA by this process: 79760 bytes +MA_summarize_allocated_blocks: starting scan ... +MA_summarize_allocated_blocks: scan completed: 0 heap blocks, 0 stack blocks +MA usage statistics: + + allocation statistics: + heap stack + ---- ----- + current number of blocks 0 0 + maximum number of blocks 23 46 + current total bytes 0 0 + maximum total bytes 3321872 22509584 + maximum total K-bytes 3322 22510 + maximum total M-bytes 4 23 diff --git a/src/ddscf/fock_xc.F b/src/ddscf/fock_xc.F index 414480cb2f..98c9d7a7ae 100644 --- a/src/ddscf/fock_xc.F +++ b/src/ddscf/fock_xc.F @@ -210,9 +210,9 @@ c ----------------------- if(ndens.eq.2) then blo(1) = 2*nfock_xc+1+1 bhi(1) = 2*nfock_xc+1+1 - int_mb(igxcd+2*nfock_xc+1) = + int_mb(igxcd+2*nfock_xc+1) = = ga_create_atom_blocked(geom,ao_bas_han,'gdens+2') - call ga_copy(g_dens_scf(2),int_mb(igxcd+2*nfock_xc+1)) + call ga_copy(g_dens_scf(2),int_mb(igxcd+2*nfock_xc+1)) endif else g_dens_scf(1) = int_mb(igxcd) diff --git a/src/gradients/grad2.F b/src/gradients/grad2.F index aaec09c99b..551ed1be52 100644 --- a/src/gradients/grad2.F +++ b/src/gradients/grad2.F @@ -277,10 +277,10 @@ c $ d_jl3, d_il3, d_jk3, $ d_ij4, d_kl4, d_ik4, $ d_jl4, d_il4, d_jk4, - $ d_ik5, d_jl5, d_il5, d_jk5, - $ d_ik6, d_jl6, d_il6, d_jk6, - $ d_ik7, d_jl7, d_il7, d_jk7, - $ d_ik8, d_jl8, d_il8, d_jk8, + $ d_ik5, d_jl5, d_il5, d_jk5, + $ d_ik6, d_jl6, d_il6, d_jk6, + $ d_ik7, d_jl7, d_il7, d_jk7, + $ d_ik8, d_jl8, d_il8, d_jk8, $ blen, $ iilo, jjlo, kklo, lllo, $ iihi, jjhi, kkhi, llhi, diff --git a/src/gradients/grad_dens.F b/src/gradients/grad_dens.F index a7d2475e41..cf596d91a9 100644 --- a/src/gradients/grad_dens.F +++ b/src/gradients/grad_dens.F @@ -1,6 +1,6 @@ subroutine grad_dens (geom, basis, g_dens, g_wdens, g_eigen_diag, $ evals, occ, ndens, nbf, nbf2, nopen, nclosed, scftype, - $ movecs, omp2, pdm2, coeff,lsmear,osep) + $ movecs, omp2, odft, pdm2, coeff,lsmear,osep) c $Id$ @@ -26,6 +26,7 @@ C movecs (and Lagrangian in ROHF case) on disk integer l_buf, k_buf logical omp2 + logical odft ! [input] doing DFT (ROKS needs to know) logical osep ! [input] get seperate alpha and beta density ! for UHF @@ -67,45 +68,45 @@ C get MO vectors from file (taken from Roberts scf_movecs_read) c if (scftype .eq. 'RHF') then - -C energy-weighted density - -C create eigenvalue diagonal matrix +c +C energy-weighted density +c +C create eigenvalue diagonal matrix nocc = nclosed - if(lsmear) then + if(lsmear) then c -c smearing, therefore check new nocs +c smearing, therefore check new nocs c - if (.not. MA_Push_Get(MT_Dbl, nbf, 'tmpm', ltmpm, itmpm)) - & call errquit('dftgforce: failed to alloc tmpm',0, MA_ERR) + if (.not. MA_Push_Get(MT_Dbl, nbf, 'tmpm', ltmpm, itmpm)) + & call errquit('dftgforce: failed to alloc tmpm',0, MA_ERR) c - g_tmp = ga_create_atom_blocked(geom, basis, - & 'frac vecs') - call ga_zero(g_tmp) - do i = ga_nodeid()+1, nbf, ga_nnodes() - if(occ(i).gt.1.d-9) then - call get_col(g_vecs, nbf, i, DBL_MB(itmpm)) - call dscal(nbf, occ(i)*0.5d0, DBL_MB(itmpm), 1) - call put_col(g_tmp, nbf, i, DBL_MB(itmpm)) + g_tmp = ga_create_atom_blocked(geom, basis, + & 'frac vecs') + call ga_zero(g_tmp) + do i = ga_nodeid()+1, nbf, ga_nnodes() + if(occ(i).gt.1.d-9) then + call get_col(g_vecs, nbf, i, DBL_MB(itmpm)) + call dscal(nbf, occ(i)*0.5d0, DBL_MB(itmpm), 1) + call put_col(g_tmp, nbf, i, DBL_MB(itmpm)) + endif + enddo + do i=1,nbf + if(occ(i).gt.1.d-9) nocc=i + enddo + if (.not.ma_pop_stack(ltmpm)) + & call errquit('dftg_force: cannot pop stack',0, MA_ERR) + if(nocc.gt.nclosed) then + if(.not.ga_destroy ( g_eigen_diag )) call errquit( + ( 'grad_dens: cannot destroy eigendiag',11, GA_ERR) + if (.not. ga_create(mt_dbl, nocc, nocc,'eigen_diag', + , 1, nocc, g_eigen_diag)) + , call errquit('gradients: ga diags?',nocc*nocc, GA_ERR) + call ga_zero(g_eigen_diag) endif - enddo - do i=1,nbf - if(occ(i).gt.1.d-9) nocc=i - enddo - if (.not.ma_pop_stack(ltmpm)) - & call errquit('dftg_force: cannot pop stack',0, MA_ERR) - if(nocc.gt.nclosed) then - if(.not.ga_destroy ( g_eigen_diag )) call errquit( - ( 'grad_dens: cannot destroy eigendiag',11, GA_ERR) - if (.not. ga_create(mt_dbl, nocc, nocc,'eigen_diag', - , 1, nocc, g_eigen_diag)) - , call errquit('gradients: ga diags?',nocc*nocc, GA_ERR) - call ga_zero(g_eigen_diag) - endif - nclosed=nocc - else - g_tmp=g_vecs - endif + nclosed=nocc + else + g_tmp=g_vecs + endif #if 0 if (ga_nodeid() .eq. 0) then status = MA_alloc_get(MT_INT, nocc, 'indices', l_ind, k_ind) @@ -120,10 +121,11 @@ c status = MA_free_heap ( l_ind2 ) end if #else - call grad_diagb(g_eigen_diag, evals, nocc) + call grad_diagb(g_eigen_diag, evals, nocc) #endif - -C multiply to weighted density +c +C multiply to weighted density +c call ga_matmul_patch ('n','n', two, zero, $ g_tmp, 1, nbf, 1, nocc, $ g_eigen_diag, 1, nocc, 1, nocc, @@ -134,26 +136,32 @@ C multiply to weighted density $ g_wdens, 1, nbf, 1, nbf ) if ( omp2 ) then -C read 2nd order correction to weighted density from disk -C use g_dens(3) as buffer +c +C read 2nd order correction to weighted density from disk +C use g_dens(3) as buffer +c call util_file_name ('w_a_ao', .true., .true., fname ) status = file_read_ga ( fname, g_dens(3) ) call ga_add ( one, g_wdens, mtwo, g_dens(3), g_wdens ) end if - -C density matrix +c +C density matrix +c call ga_matmul_patch('n', 't', 2.0d0, 0.0d0, $ g_tmp, 1, nbf, 1, nocc, $ g_vecs, 1, nocc, 1, nbf, $ g_dens(1), 1, nbf, 1, nbf) call ga_symmetrize(g_dens(1)) if ( omp2 ) then -C g_dens(1) = D(HF+(2)) for 1-el. contribution -C g_dens(2) = D(HF) for 2-el. contr. -C g_dens(3) = D(HF+2(2)) " +c +C g_dens(1) = D(HF+(2)) for 1-el. contribution +C g_dens(2) = D(HF) for 2-el. contr. +C g_dens(3) = D(HF+2(2)) " call ga_copy ( g_dens(1), g_dens(2) ) -C read and add MP2 contribution +c +C read and add MP2 contribution +c call util_file_name ('p_a_ao', .true., .true., fname ) status = file_read_ga ( fname, g_dens(3) ) call ga_scale ( g_dens(3), two ) @@ -164,15 +172,16 @@ C read and add MP2 contribution else if (scftype .eq. 'ROHF') then nocc = nopen + nclosed -C read in Lagrangian matrix ('eigenvalue matrix' in ROHF case) +C read in Lagrangian matrix ('eigenvalue matrix' in ROHF case) call util_file_name('lagr', .true.,.false., fname ) status = file_read_ga( fname, g_eigen_diag ) if (.not.status) then call errquit('grad_dens: could not read Lagrangian', 110, & GA_ERR) end if - -C multiply to weighted density +c +C multiply to weighted density +c call ga_matmul_patch ('n','n', two, zero, $ g_vecs, 1, nbf, 1, nocc, $ g_eigen_diag, 1, nocc, 1, nocc, @@ -181,216 +190,257 @@ C multiply to weighted density $ g_dens(1), 1, nbf, 1, nocc, $ g_vecs, 1, nocc, 1, nbf, $ g_wdens, 1, nbf, 1, nbf ) +c + if (.not.odft) then +c +C density matrices: +C g_dens(1): D(closed) + 1/2 D(open) +C g_dens(2): D(closed) +C g_dens(3): D(open) +C density contains a factor 2 compared to most literature +C (same as in ddscf (I think...)) +c + call ga_matmul_patch('n', 't', 2.0d0, 0.0d0, + $ g_vecs, 1, nbf, 1, nclosed, + $ g_vecs, 1, nclosed, 1, nbf, + $ g_dens(1), 1, nbf, 1, nbf ) -C density matrices: -C g_dens(1): D(closed) + 1/2 D(open) -C g_dens(2): D(closed) -C g_dens(3): D(open) -C density contains a factor 2 compared to most literature -C (same as in ddscf (I think...)) + call ga_matmul_patch('n', 't', 2.0d0, 0.0d0, + $ g_vecs, 1, nbf, nclosed+1, nocc, + $ g_vecs, nclosed+1, nocc, 1, nbf, + $ g_dens(3), 1, nbf, 1, nbf ) - call ga_matmul_patch('n', 't', 2.0d0, 0.0d0, - $ g_vecs, 1, nbf, 1, nclosed, - $ g_vecs, 1, nclosed, 1, nbf, - $ g_dens(1), 1, nbf, 1, nbf ) + call ga_copy ( g_dens(1), g_dens(2) ) + call ga_dadd (one, g_dens(1), 0.5D0, g_dens(3), g_dens(1)) + call ga_symmetrize(g_dens(1)) + call ga_symmetrize(g_dens(2)) + call ga_symmetrize(g_dens(3)) +c + else +c +C density matrices: +C g_dens(1): D(alpha) +C g_dens(2): D(beta) +c if (.not.osep) then: +C g_dens(1): D(alpha)+D(beta) +C g_dens(2): D(alpha)-D(beta) +c + call ga_matmul_patch('n', 't', 1.0d0, 0.0d0, + $ g_vecs, 1, nbf, 1, nocc, + $ g_vecs, 1, nocc, 1, nbf, + $ g_dens(1), 1, nbf, 1, nbf ) - call ga_matmul_patch('n', 't', 2.0d0, 0.0d0, - $ g_vecs, 1, nbf, nclosed+1, nocc, - $ g_vecs, nclosed+1, nocc, 1, nbf, - $ g_dens(3), 1, nbf, 1, nbf ) + call ga_matmul_patch('n', 't', 1.0d0, 0.0d0, + $ g_vecs, 1, nbf, 1, nclosed, + $ g_vecs, 1, nclosed, 1, nbf, + $ g_dens(2), 1, nbf, 1, nbf ) - call ga_copy ( g_dens(1), g_dens(2) ) - call ga_dadd (one, g_dens(1), 0.5D0, g_dens(3), g_dens(1)) - call ga_symmetrize(g_dens(1)) - call ga_symmetrize(g_dens(2)) - call ga_symmetrize(g_dens(3)) + if (.not. osep) then + call ga_dadd ( one, g_dens(1), one, g_dens(2), g_dens(1) ) + call ga_dadd ( one, g_dens(1), mtwo, g_dens(2), g_dens(2) ) + endif + call ga_symmetrize(g_dens(1)) + call ga_symmetrize(g_dens(2)) +c + endif +c else if (scftype .eq. 'UHF') then - -C energy-weighted density - -C create eigenvalue diagonal matrix +c +C energy-weighted density +c +C create eigenvalue diagonal matrix nocca = nclosed + nopen ! == nalpha noccb = nclosed ! nbeta - if(lsmear) then + if(lsmear) then c -c smearing, therefore check new nocs +c smearing, therefore check new nocs c - if (.not. MA_Push_Get(MT_Dbl, nbf, 'tmpm', ltmpm, itmpm)) - & call errquit('dftgforce: failed to alloc tmpm',0, MA_ERR) + if (.not. MA_Push_Get(MT_Dbl, nbf, 'tmpm', ltmpm, itmpm)) + & call errquit('dftgforce: failed to alloc tmpm',0, MA_ERR) c - g_tmp = ga_create_atom_blocked(geom, basis, - & 'frac vecs') - call ga_zero(g_tmp) - do i = ga_nodeid()+1, nbf, ga_nnodes() - if(occ(i).gt.1.d-9) then - call get_col(g_vecs, nbf, i, DBL_MB(itmpm)) - call dscal(nbf, occ(i), DBL_MB(itmpm), 1) - call put_col(g_tmp, nbf, i, DBL_MB(itmpm)) - endif - enddo - do i=1,nbf - if(occ(i).gt.1.d-9) nocca=i - enddo - do i=nbf+1,nbf*2 - if(occ(i).gt.1.d-9) noccb=i-nbf - enddo - if (.not.ma_pop_stack(ltmpm)) - & call errquit('dftg_force: cannot pop stack',0, MA_ERR) + g_tmp = ga_create_atom_blocked(geom, basis, + & 'frac vecs') + call ga_zero(g_tmp) + do i = ga_nodeid()+1, nbf, ga_nnodes() + if(occ(i).gt.1.d-9) then + call get_col(g_vecs, nbf, i, DBL_MB(itmpm)) + call dscal(nbf, occ(i), DBL_MB(itmpm), 1) + call put_col(g_tmp, nbf, i, DBL_MB(itmpm)) + endif + enddo + do i=1,nbf + if(occ(i).gt.1.d-9) nocca=i + enddo + do i=nbf+1,nbf*2 + if(occ(i).gt.1.d-9) noccb=i-nbf + enddo + if (.not.ma_pop_stack(ltmpm)) + & call errquit('dftg_force: cannot pop stack',0, MA_ERR) - else - g_tmp=g_vecs - endif - if(nocca.gt.nopen+nclosed) then + else + g_tmp=g_vecs + endif + if(nocca.gt.nopen+nclosed) then if(.not.ga_destroy ( g_eigen_diag )) call errquit( - ( 'grad_dens: cannot destroy eigendiag',11, GA_ERR) + & 'grad_dens: cannot destroy eigendiag',11, GA_ERR) if (.not. ga_create(mt_dbl, nocca, nocca,'eigen_diag', - , 1, nocca, g_eigen_diag)) - , call errquit('gradients: ga diags?',nocca*nocca, GA_ERR) + , 1, nocca, g_eigen_diag)) + , call errquit('gradients: ga diags?',nocca*nocca, GA_ERR) call ga_zero(g_eigen_diag) endif #if 0 - if (ga_nodeid() .eq. 0) then - mxnoc=max(nocca,noccb) - status=MA_alloc_get(MT_INT,mxnoc, 'indices', l_ind, k_ind) - status=MA_alloc_get(MT_INT,mxnoc, 'indices',l_ind2,k_ind2) - do i=1, nocca - int_mb( k_ind+i-1 ) = i - int_mb( k_ind2+i-1 ) = i - end do - call ga_scatter ( g_eigen_diag, evals, int_mb(k_ind), - $ int_mb(k_ind2), nocca) - end if + if (ga_nodeid() .eq. 0) then + mxnoc=max(nocca,noccb) + status=MA_alloc_get(MT_INT,mxnoc, 'indices', l_ind, k_ind) + status=MA_alloc_get(MT_INT,mxnoc, 'indices',l_ind2,k_ind2) + do i=1, nocca + int_mb( k_ind+i-1 ) = i + int_mb( k_ind2+i-1 ) = i + end do + call ga_scatter ( g_eigen_diag, evals, int_mb(k_ind), + $ int_mb(k_ind2), nocca) + end if #else - call grad_diagb(g_eigen_diag, evals, nocca) + call grad_diagb(g_eigen_diag, evals, nocca) #endif - -C multiply to weighted density - call ga_matmul_patch ('n','n', one, zero, - $ g_tmp, 1, nbf, 1, nocca, - $ g_eigen_diag, 1, nocca, 1, nocca, - $ g_dens(1), 1, nbf, 1, nocca ) - call ga_matmul_patch ('n','t', one, zero, - $ g_dens(1), 1, nbf, 1, nocca, - $ g_vecs, 1, nocca, 1, nbf, - $ g_wdens, 1, nbf, 1, nbf ) - - if(lsmear) then c -c smearing, therefore check new nocs +C multiply to weighted density + call ga_matmul_patch ('n','n', one, zero, + $ g_tmp, 1, nbf, 1, nocca, + $ g_eigen_diag, 1, nocca, 1, nocca, + $ g_dens(1), 1, nbf, 1, nocca ) + call ga_matmul_patch ('n','t', one, zero, + $ g_dens(1), 1, nbf, 1, nocca, + $ g_vecs, 1, nocca, 1, nbf, + $ g_wdens, 1, nbf, 1, nbf ) + + if(lsmear) then c - if (.not. MA_Push_Get(MT_Dbl, nbf, 'tmpm', ltmpm, itmpm)) - & call errquit('dftgforce: failed to alloc tmpm',0, MA_ERR) +c smearing, therefore check new nocs +c + if (.not. MA_Push_Get(MT_Dbl, nbf, 'tmpm', ltmpm, itmpm)) + & call errquit('dftgforce: failed to alloc tmpm',0, MA_ERR) c g_tmp2 = ga_create_atom_blocked(geom, basis, - & 'frac vecs') + & 'frac vecs') call ga_zero(g_tmp2) do i = ga_nodeid()+1, nbf, ga_nnodes() if(occ(i).gt.1.d-9) then call get_col(g_vecs2, nbf, i, DBL_MB(itmpm)) call dscal(nbf, occ(i+nbf), DBL_MB(itmpm), 1) call put_col(g_tmp2, nbf, i, DBL_MB(itmpm)) - endif - enddo - if (.not.ma_pop_stack(ltmpm)) - & call errquit('dftg_force: cannot pop stack',0, MA_ERR) - if(noccb.gt.nclosed) then - if(.not.ga_destroy ( g_eigen_diag )) call errquit( - ( 'grad_dens: cannot destroy eigendiag',11, GA_ERR) - if (.not. ga_create(mt_dbl, noccb, noccb,'eigen_diag', - , 1, noccb, g_eigen_diag)) - , call errquit('gradients: ga diags?',noccb*noccb, GA_ERR) - call ga_zero(g_eigen_diag) + endif + enddo + if (.not.ma_pop_stack(ltmpm)) + & call errquit('dftg_force: cannot pop stack',0, MA_ERR) + if(noccb.gt.nclosed) then + if(.not.ga_destroy ( g_eigen_diag )) call errquit( + & 'grad_dens: cannot destroy eigendiag',11, GA_ERR) + if (.not. ga_create(mt_dbl, noccb, noccb,'eigen_diag', + & 1, noccb, g_eigen_diag)) + & call errquit('gradients: ga diags?',noccb*noccb, + & GA_ERR) + call ga_zero(g_eigen_diag) + endif + else + g_tmp2=g_vecs2 endif - else - g_tmp2=g_vecs2 - endif #if 0 - if (ga_nodeid() .eq. 0) then - do i=1, noccb - int_mb( k_ind+i-1 ) = i - int_mb( k_ind2+i-1 ) = i - end do - call ga_scatter ( g_eigen_diag, evals(nbf+1), int_mb(k_ind), - $ int_mb(k_ind2), noccb ) - status = MA_free_heap ( l_ind ) - status = MA_free_heap ( l_ind2 ) - end if + if (ga_nodeid() .eq. 0) then + do i=1, noccb + int_mb( k_ind+i-1 ) = i + int_mb( k_ind2+i-1 ) = i + end do + call ga_scatter ( g_eigen_diag, evals(nbf+1), int_mb(k_ind), + $ int_mb(k_ind2), noccb ) + status = MA_free_heap ( l_ind ) + status = MA_free_heap ( l_ind2 ) + end if #else - call grad_diagb(g_eigen_diag, evals(nbf+1), noccb) + call grad_diagb(g_eigen_diag, evals(nbf+1), noccb) #endif -C multiply to weighted density and add to spin up part - call ga_matmul_patch ('n','n', one, zero, - $ g_tmp2, 1, nbf, 1, noccb, - $ g_eigen_diag, 1, noccb, 1, noccb, - $ g_dens(1), 1, nbf, 1, noccb ) - call ga_matmul_patch ('n','t', one, one, - $ g_dens(1), 1, nbf, 1, noccb, - $ g_vecs2, 1, noccb, 1, nbf, - $ g_wdens, 1, nbf, 1, nbf ) - call ga_symmetrize(g_wdens) +C multiply to weighted density and add to spin up part + call ga_matmul_patch ('n','n', one, zero, + $ g_tmp2, 1, nbf, 1, noccb, + $ g_eigen_diag, 1, noccb, 1, noccb, + $ g_dens(1), 1, nbf, 1, noccb ) + call ga_matmul_patch ('n','t', one, one, + $ g_dens(1), 1, nbf, 1, noccb, + $ g_vecs2, 1, noccb, 1, nbf, + $ g_wdens, 1, nbf, 1, nbf ) + call ga_symmetrize(g_wdens) - if ( omp2 ) then -C read 2nd order correction to weighted density from disk -C use g_dens(3) as buffer - call util_file_name ('w_a_ao', .true., .true., fname ) - status = file_read_ga ( fname, g_dens(3) ) - call ga_add ( one, g_wdens, mone, g_dens(3), g_wdens ) - call util_file_name ('w_b_ao', .true., .true., fname ) - status = file_read_ga ( fname, g_dens(3) ) - call ga_add ( one, g_wdens, mone, g_dens(3), g_wdens ) - end if + if ( omp2 ) then +c +C read 2nd order correction to weighted density from disk +C use g_dens(3) as buffer +c + call util_file_name ('w_a_ao', .true., .true., fname ) + status = file_read_ga ( fname, g_dens(3) ) + call ga_add ( one, g_wdens, mone, g_dens(3), g_wdens ) + call util_file_name ('w_b_ao', .true., .true., fname ) + status = file_read_ga ( fname, g_dens(3) ) + call ga_add ( one, g_wdens, mone, g_dens(3), g_wdens ) + end if +c +C density matrix +C D_up and D_down (or and b) + call ga_matmul_patch('n', 't', 1.0d0, 0.0d0, + $ g_tmp, 1, nbf, 1, nocca, + $ g_vecs, 1, nocca, 1, nbf, + $ g_dens(1), 1, nbf, 1, nbf) + call ga_matmul_patch('n', 't', 1.0d0, 0.0d0, + $ g_tmp2, 1, nbf, 1, noccb, + $ g_vecs2, 1, noccb, 1, nbf, + $ g_vecs, 1, nbf, 1, nbf) -C density matrix -C D_up and D_down (or and b) - call ga_matmul_patch('n', 't', 1.0d0, 0.0d0, - $ g_tmp, 1, nbf, 1, nocca, - $ g_vecs, 1, nocca, 1, nbf, - $ g_dens(1), 1, nbf, 1, nbf) - call ga_matmul_patch('n', 't', 1.0d0, 0.0d0, - $ g_tmp2, 1, nbf, 1, noccb, - $ g_vecs2, 1, noccb, 1, nbf, - $ g_vecs, 1, nbf, 1, nbf) - - if ( .not. omp2 ) then -C D+ and D- (Formalism from Dupuis & King, JCP 68(9), p4000 - if (.not. osep) then + if ( .not. omp2 ) then +c +C D+ and D- (Formalism from Dupuis & King, JCP 68(9), p4000 +c + if (.not. osep) then call ga_dadd ( one, g_dens(1), mone, g_vecs, g_dens(2) ) call ga_dadd ( one, g_dens(1), one, g_vecs, g_dens(1) ) - else - call ga_copy (g_vecs,g_dens(2)) - endif - call ga_symmetrize(g_dens(1)) - call ga_symmetrize(g_dens(2)) - else ! UMP2 -C g_dens(1) = D(a+b) (HF+(2)) for 1-el. contribution -C g_dens(2) = D(a) (HF) for 2-el. contr. -C g_dens(3) = D(b) (HF) " -C g_dens(4) = D(a) (HF+2(2)) " -C g_dens(5) = D(b) (HF+2(2)) " + else + call ga_copy (g_vecs,g_dens(2)) + endif + call ga_symmetrize(g_dens(1)) + call ga_symmetrize(g_dens(2)) + else ! UMP2 +c +C g_dens(1) = D(a+b) (HF+(2)) for 1-el. contribution +C g_dens(2) = D(a) (HF) for 2-el. contr. +C g_dens(3) = D(b) (HF) " +C g_dens(4) = D(a) (HF+2(2)) " +C g_dens(5) = D(b) (HF+2(2)) " +c +C move HF matrices to g_dens(2:3) + call ga_copy ( g_dens(1), g_dens(2) ) + call ga_copy ( g_vecs, g_dens(3) ) -C move HF matrices to g_dens(2:3) - call ga_copy ( g_dens(1), g_dens(2) ) - call ga_copy ( g_vecs, g_dens(3) ) - - call ga_dadd ( one, g_dens(1), one, g_dens(3), g_dens(1) ) -C read and add MP2 contribution for spin up - call util_file_name ('p_a_ao', .true., .true., fname ) - status = file_read_ga ( fname, g_dens(4) ) - call ga_dadd ( one, g_dens(4), one, g_dens(1), g_dens(1) ) - call ga_dadd ( two, g_dens(4), one, g_dens(2), g_dens(4) ) -C spin down - call util_file_name ('p_b_ao', .true., .true., fname ) - status = file_read_ga ( fname, g_dens(5) ) - call ga_dadd ( one, g_dens(5), one, g_dens(1), g_dens(1) ) - call ga_dadd ( two, g_dens(5), one, g_dens(3), g_dens(5) ) - call ga_symmetrize(g_dens(1)) - call ga_symmetrize(g_dens(2)) - call ga_symmetrize(g_dens(3)) - call ga_symmetrize(g_dens(4)) - call ga_symmetrize(g_dens(5)) - end if ! UMP2 + call ga_dadd ( one, g_dens(1), one, g_dens(3), g_dens(1) ) +c +C read and add MP2 contribution for spin up +c + call util_file_name ('p_a_ao', .true., .true., fname ) + status = file_read_ga ( fname, g_dens(4) ) + call ga_dadd ( one, g_dens(4), one, g_dens(1), g_dens(1) ) + call ga_dadd ( two, g_dens(4), one, g_dens(2), g_dens(4) ) +c +C spin down +c + call util_file_name ('p_b_ao', .true., .true., fname ) + status = file_read_ga ( fname, g_dens(5) ) + call ga_dadd ( one, g_dens(5), one, g_dens(1), g_dens(1) ) + call ga_dadd ( two, g_dens(5), one, g_dens(3), g_dens(5) ) + call ga_symmetrize(g_dens(1)) + call ga_symmetrize(g_dens(2)) + call ga_symmetrize(g_dens(3)) + call ga_symmetrize(g_dens(4)) + call ga_symmetrize(g_dens(5)) + end if ! UMP2 c else if (scftype .eq. 'MCSCF') then c @@ -398,35 +448,35 @@ c call util_file_name('mcpdm',.true.,.false.,pdmfilename) if (eaf_open(pdmfilename, eaf_r, pdmfile) .ne. 0) $ call errquit('mcscf grad: failed opening 2pdm file',0, - & GA_ERR) + & GA_ERR) offset = 0.0d0 if (.not. ma_push_get(mt_dbl,nbf*nbf,'buffer',l_buf,k_buf)) $ call errquit('mcscf grad: memory problem',nbf**2, - & MA_ERR) + & MA_ERR) if (eaf_read(pdmfile, offset, dbl_mb(k_buf), 8*nbf**2).ne.0) $ call errquit('mcscf grad: failed reading lagrangian',0, - & DISK_ERR) + & DISK_ERR) call ga_put(g_wdens, 1, nbf, 1, nbf, dbl_mb(k_buf), nbf) offset = offset + 8*nbf**2 if (eaf_read(pdmfile, offset, dbl_mb(k_buf), 8*nbf**2).ne.0) $ call errquit('mcscf grad: failed reading 1-density',0, - & DISK_ERR) + & DISK_ERR) call ga_put(g_dens(1), 1, nbf, 1, nbf, dbl_mb(k_buf), nbf) offset = offset + 8*nbf**2 if (eaf_read(pdmfile, offset, pdm2, 8*nopen**4).ne.0) $ call errquit('mcscf grad: failed reading 2pdm ',0, - & DISK_ERR) + & DISK_ERR) call ga_get(g_vecs, 1, nbf, nclosed+1, nclosed+nopen, $ coeff, nbf) if (eaf_close(pdmfile).ne.0) $ call errquit('mcscf: failed closing 2pdm file',0, - & DISK_ERR) + & DISK_ERR) * call MA_summarize_allocated_blocks() diff --git a/src/gradients/grad_force.F b/src/gradients/grad_force.F index 83ac80c2e4..484c2e5585 100644 --- a/src/gradients/grad_force.F +++ b/src/gradients/grad_force.F @@ -132,7 +132,7 @@ c character*16 tag character*32 theory - character*8 scftype + character*8 scftype, lscftype ! lscftype is just for calling grad2 character*32 rtdb_string c @@ -215,7 +215,8 @@ C get SCF MO vectors for density if (.not. rtdb_cget(rtdb, 'mcscf:input vectors', 1, movecs_in)) $ call errquit('gradients: MCSCF MO vectors not defined',0, & RTDB_ERR) - scftype = 'mcscf' + scftype = 'mcscf' + lscftype = 'mcscf' else if (theory .eq. 'dft') then odft = .true. if (.not. rtdb_cget(rtdb, 'dft:input vectors', 1, movecs_in)) @@ -228,11 +229,11 @@ C get SCF MO vectors for density & RTDB_ERR) if (.not. rtdb_get(rtdb, 'dft:ipol', mt_int, 1, ipol)) $ ipol = 1 - if (ipol .eq. 1) then - scftype = 'rhf' - else - scftype = 'uhf' - endif + if (.not. rtdb_cget(rtdb, 'dft:scftype', 1, scftype)) + & call errquit('gradients: scftype not defined',0, + & RTDB_ERR) + lscftype = scftype + if (scftype.eq.'ROHF') lscftype = 'UHF' jfac = 1.0d0 if (ocdfit) jfac = 0.0d0 kfac = xfac(1) @@ -240,6 +241,7 @@ C get SCF MO vectors for density if (.not. rtdb_cget(rtdb, 'scf:scftype', 1, scftype)) $ call errquit('gradients: scftype not defined',0, & RTDB_ERR) + lscftype = scftype if (.not. rtdb_cget(rtdb, 'scf:input vectors', 1, movecs_in)) $ call errquit('gradients: SCF MO vectors not defined',0, & RTDB_ERR) @@ -267,12 +269,17 @@ C scftype: MCSCF, RHF, ROHF or UHF if (.not. rtdb_get(rtdb, 'dft:noc', mt_int, 2, noc)) & call errquit('gradients: rtdb_get of noc failed', 0, & RTDB_ERR) - if (ipol .eq. 1) then + if (scftype.eq.'RHF') then nclosed = noc(1) nopen = 0 - else + elseif (scftype.eq.'ROHF') then nclosed = min(noc(1),noc(2)) nopen = abs(noc(1) - noc(2)) + elseif (scftype.eq.'UHF') then + nclosed = min(noc(1),noc(2)) + nopen = abs(noc(1) - noc(2)) + else + call errquit("grad_force: invalid scftype",0,UERR) endif else if (.not. rtdb_get(rtdb, 'scf:nopen', mt_int, 1, nopen)) @@ -326,6 +333,10 @@ C # of eigenvalues and density matrices else ! ROHF nbf2 = nbf ndens = 3 + if (odft) then + nbf2 = 2*nbf + ndens = 2 + endif end if end if @@ -463,7 +474,7 @@ c & frac_occ )) frac_occ=.false. call grad_dens(geom, basis, g_dens, g_wdens, g_eigen_diag, $ dbl_mb(k_evals), dbl_mb(k_occ), ndens, nbf, nbf2, - $ nopen, nclosed, scftype, movecs_in, omp2, + $ nopen, nclosed, scftype, movecs_in, omp2, odft, $ dbl_mb(k_pdm2), dbl_mb(k_coeff),frac_occ,.false.) C free temporary arrays @@ -853,7 +864,7 @@ c $ lscratch, dbl_mb(k_scr), lbuf/12, dbl_mb(k_buf), $ int_mb(k_labels), maxq, int_mb(k_list), dbl_mb(k_q4), $ tol2e, nsh, - $ log_mb(k_act), oskel, scftype, omp2, nopen, nbf, + $ log_mb(k_act), oskel, lscftype, omp2, nopen, nbf, $ dbl_mb(k_pdm2),dbl_mb(k_pdm2a),dbl_mb(k_pdm2b), ! MCSCF $ dbl_mb(k_pdm2c),dbl_mb(k_pdm2d), dbl_mb(k_coeff), ! MCSCF $ nshblocks, @@ -887,7 +898,7 @@ c $ lscratch, dbl_mb(k_scr), lbuf/12, dbl_mb(k_buf), $ int_mb(k_labels), maxq, int_mb(k_list), dbl_mb(k_q4), $ tol2e, nsh, - $ log_mb(k_act), oskel, scftype, omp2, nopen, nbf, + $ log_mb(k_act), oskel, lscftype, omp2, nopen, nbf, $ dbl_mb(k_pdm2),dbl_mb(k_pdm2a),dbl_mb(k_pdm2b), ! MCSCF $ dbl_mb(k_pdm2c),dbl_mb(k_pdm2d), dbl_mb(k_coeff), ! MCSCF $ nshblocks, @@ -920,7 +931,7 @@ c $ lscratch, dbl_mb(k_scr), lbuf/12, dbl_mb(k_buf), $ int_mb(k_labels), maxq, int_mb(k_list), dbl_mb(k_q4), $ tol2e, nsh, - $ log_mb(k_act), oskel, scftype, omp2, nopen, nbf, + $ log_mb(k_act), oskel, lscftype, omp2, nopen, nbf, $ dbl_mb(k_pdm2),dbl_mb(k_pdm2a),dbl_mb(k_pdm2b), ! MCSCF $ dbl_mb(k_pdm2c),dbl_mb(k_pdm2d), dbl_mb(k_coeff), ! MCSCF $ nshblocks, diff --git a/src/hessian/analytic/hess_init.F b/src/hessian/analytic/hess_init.F index ef06175731..5c876639ac 100644 --- a/src/hessian/analytic/hess_init.F +++ b/src/hessian/analytic/hess_init.F @@ -27,7 +27,7 @@ c c integer rtdb, mult, g_vecs(2) integer rtdb, mult integer dftnoc(2), nbsize - logical oprint, omp2 + logical oprint, omp2, odft logical cdfit, frac_occ integer nbf_cd, nbf2, mxnocc integer g_eigen_diag @@ -53,6 +53,7 @@ c c c get geometry and basis set handles and associated useful information c + odft = .false. if (oprint) write(LuOut,*) 'HESS: set up geometry and basis' if (.not. geom_create(geom, 'geometry')) * call errquit('hess_init: geom_create problem', 555, GEOM_ERR) @@ -181,6 +182,7 @@ c nopen = nopen + 1 kfac(2) = 1.0d0 endif elseif (theory .eq. 'dft') then + odft = .true. if (.not. rtdb_get(rtdb, 'dft:mult', MT_INT, 1,mult)) * mult = 1 nopen = mult - 1 @@ -324,7 +326,7 @@ c if (oprint) write(LuOut,*) 'HESS: getting densities' call grad_dens(geom, basis, g_dens, g_wdens, g_eigen_diag, $ dbl_mb(k_evals), dbl_mb(k_occ), ndens, nbf, nbf2, - $ nopen, nclosed, scftype, movecs_in, omp2, + $ nopen, nclosed, scftype, movecs_in, omp2, odft, $ dbl_mb(k_pdm2), dbl_mb(k_coeff),frac_occ,.true.) c c free temporary arrays diff --git a/src/nwdft/dftgrad/dft_gradients.F b/src/nwdft/dftgrad/dft_gradients.F index 80bbbd54c2..4e6e1073af 100644 --- a/src/nwdft/dftgrad/dft_gradients.F +++ b/src/nwdft/dftgrad/dft_gradients.F @@ -65,6 +65,7 @@ c integer noc(2) external grad_norm, grad_max character*255 title_vecs, basis_vecs character*20 scftype_vecs + character*80 scftype logical status,frac_occ integer me, nproc, max_sh_bf, max_at_bf, nat, max_sh_bfcd, $ lforce, nactive, i, nbf_vecs, nsets, ispin, @@ -226,18 +227,40 @@ c $ call errquit('dft_gradient: DFT MO vectors not defined',0, & RTDB_ERR) status = movecs_read_header(movecs_in, title_vecs, basis_vecs, - $ scftype_vecs, nbf_vecs, nsets, nmo, 2) -c - if (ipol .ne. nsets)then ! 1 for RHF, 2 for UHF - write (LuOut,*) 'dft_gradient: ERROR ipol, nsets:',ipol,nsets - call errquit('dft_gradient: ERROR ipol, nsets disagree',2, - & INPUT_ERR) - endif + $ scftype_vecs, nbf_vecs, nsets, nmo, 2) +c +c ipol - number of spin channels (RKS=1, ROKS=2, UKS=2) +c nsets - number of sets of vectors (RKS=1, ROKS=1, UKS=2) +c + if (.not. rtdb_cget(rtdb, 'dft:scftype', 1, scftype)) + $ call errquit('dft_gradient: DFT scftype not defined',0, + & RTDB_ERR) + if (scftype.eq.'RHF') then + if (ipol .ne. nsets .or. ipol.ne.1)then + write (LuOut,*) 'dft_gradient: ERROR ipol, nsets:',ipol,nsets + call errquit('dft_gradient: ERROR ipol, nsets disagree',2, + & INPUT_ERR) + endif + elseif (scftype.eq.'ROHF') then + if (nsets.ne.1.or.ipol.ne.2) then + write (LuOut,*) 'dft_gradient: ERROR ipol, nsets:',ipol,nsets + call errquit('dft_gradient: ERROR ipol, nsets disagree',2, + & INPUT_ERR) + endif + elseif (scftype.eq.'UHF') then + if (nsets.ne.2.or.ipol.ne.2) then + write (LuOut,*) 'dft_gradient: ERROR ipol, nsets:',ipol,nsets + call errquit('dft_gradient: ERROR ipol, nsets disagree',2, + & INPUT_ERR) + endif + else + call errquit('dft_gradient: illegal scftype',0,UERR) + endif c c Should check much more info than just nbf for consistency c c -c get mo eigevectors +c get mo eigenvectors c if (nbf_ao .ne. nbf_vecs)then write(LuOut,*)'dft_gradient movecs output = ',movecs_in @@ -247,9 +270,9 @@ c status = .true. do ispin = 1, ipol status = status .and. - $ movecs_read(movecs_in, ispin, - & dbl_mb(k_occ+(ispin-1)*nbf_ao), - $ dbl_mb(k_evals(ispin)), g_vecs(ispin)) + $ movecs_read(movecs_in, min(ispin,nsets), + & dbl_mb(k_occ+(ispin-1)*nbf_ao), + $ dbl_mb(k_evals(ispin)), g_vecs(ispin)) enddo endif c @@ -261,11 +284,11 @@ c c if(frac_occ) then c -c smearing, therefore check new nocs +c smearing, therefore check new nocs c - if (.not. MA_Push_Get(MT_Dbl, nbf_ao, 'tmpm', ltmpm, itmpm)) - & call errquit('dftgforce: failed to alloc tmpm',0, MA_ERR) - rhffact = one + if (.not. MA_Push_Get(MT_Dbl, nbf_ao, 'tmpm', ltmpm, itmpm)) + & call errquit('dftgforce: failed to alloc tmpm',0, MA_ERR) + rhffact = one c do ispin=1,ipol g_tmp(ispin) = ga_create_atom_blocked(geom, ao_bas_han, @@ -283,8 +306,8 @@ c if(dbl_mb(ipoint+i).gt.toll) noc(ispin)=i enddo enddo - if (.not.ma_pop_stack(ltmpm)) - & call errquit('dftg_force: cannot pop stack',0, MA_ERR) + if (.not.ma_pop_stack(ltmpm)) + & call errquit('dftg_force: cannot pop stack',0, MA_ERR) else do ispin=1,ipol @@ -293,12 +316,12 @@ c endif do ispin = 1, ipol c -c dens = vecs*vecs +c dens = vecs*vecs c - if (odftps) call pstat_on(ps_dgemm) + if (odftps) call pstat_on(ps_dgemm) call ga_dgemm('n', 't', nbf_ao, nbf_ao, noc(ispin), rhffact, $ g_tmp(ispin), g_vecs(ispin), 0.0d0, iga_dens(ispin)) - if (odftps) call pstat_off(ps_dgemm) + if (odftps) call pstat_off(ps_dgemm) call ga_symmetrize(iga_dens(ispin)) c c free temporary arrays @@ -420,10 +443,10 @@ c $ call errquit('dftg_force: could not alloc svec',0, MA_ERR) ippp=k_wdens c - if (odftps) call pstat_on(ps_vcoul) - call xc_rep_init(rtdb, geom, ao_bas_han,iga_dens,iga_dens, - & nbf_ao,ipol,.true.,.true.) - call dftg_cdfit(ao_bas_han, cd_bas_han, + if (odftps) call pstat_on(ps_vcoul) + call xc_rep_init(rtdb, geom, ao_bas_han,iga_dens,iga_dens, + & nbf_ao,ipol,.true.,.true.) + call dftg_cdfit(ao_bas_han, cd_bas_han, $ nbf_cd, nat, tol2e, dbl_mb(k_scr), $ lscratch, dbl_mb(k_buf), lbuf, $ dbl_mb(isvec), dbl_mb(ippp), max_sh_bf, @@ -433,17 +456,18 @@ c . errquit(' dftggrad: xcrepclose failed ',0, 0) c call ga_dgop(msg_grad_2el, dbl_mb(k_frc_2el), lforce, '+') - if (odftps) call pstat_off(ps_vcoul) + if (odftps) call pstat_off(ps_vcoul) c - if (.not.ma_chop_stack(l_buf)) + if (.not.ma_chop_stack(l_buf)) $ call errquit('dft_gradient: cannot chop stack',0, MA_ERR) c -c restore alpha DM in g_dens(1) +c restore alpha DM in g_dens(1) c - if (ipol .eq. 2)then - onem = -1.d0 - call ga_dadd(one, iga_dens(1), onem, iga_dens(2), iga_dens(1)) - endif + if (ipol .eq. 2)then + onem = -1.d0 + call ga_dadd(one, iga_dens(1), onem, iga_dens(2), + & iga_dens(1)) + endif endif c c get exchange-correlation contribution to the gradient diff --git a/src/nwdft/dftgrad/dftg_getxc.F b/src/nwdft/dftgrad/dftg_getxc.F index f9c415944b..c72cdc5953 100644 --- a/src/nwdft/dftgrad/dftg_getxc.F +++ b/src/nwdft/dftgrad/dftg_getxc.F @@ -61,20 +61,20 @@ c if (xc_gotxc())then c c Compute via direct numerical quadrature. - if(.not.grid_written) then + if(.not.grid_written) then c -c check if we can get the grid from a file +c check if we can get the grid from a file c - grid_written=grid_reopen(geom) - endif - if(grid_written) then - call grid_setquad(rtdb) - call grid_packing_info - endif - call dftg_gridv0(rtdb, geom,ao_bas_han,ipol,nbf_ao, - . iga_dens, force, natom, oactive, - & nactive, rdens_atom, cetobfr) - oreopen=.false. + grid_written=grid_reopen(geom) + endif + if(grid_written) then + call grid_setquad(rtdb) + call grid_packing_info + endif + call dftg_gridv0(rtdb, geom,ao_bas_han,ipol,nbf_ao, + . iga_dens, force, natom, oactive, + & nactive, rdens_atom, cetobfr) + oreopen=.false. c!!! BGJ test !!! c diff --git a/src/nwdft/dftgrad/dftg_quadv0b.F b/src/nwdft/dftgrad/dftg_quadv0b.F index 92a38cdc40..4a7cc008a1 100644 --- a/src/nwdft/dftgrad/dftg_quadv0b.F +++ b/src/nwdft/dftgrad/dftg_quadv0b.F @@ -1,4 +1,4 @@ - Subroutine dftg_quadv0_b(ictr, ldew, AO_bas_han, ipol, GRAD, kske, + subroutine dftg_quadv0_b(ictr, ldew, AO_bas_han, ipol, GRAD, kske, & nbf_ao, mbf_ao, nat, nq, chi, delchi, & heschi, Amat, Cmat, Mmat, ccrap, I ibf, iniz, ifin, cetobfr, diff --git a/src/nwdft/input_dft/dft_inpana.F b/src/nwdft/input_dft/dft_inpana.F index 6c2f835aac..cecabc5512 100644 --- a/src/nwdft/input_dft/dft_inpana.F +++ b/src/nwdft/input_dft/dft_inpana.F @@ -137,7 +137,9 @@ c c odd # of electrons or not a singlet state --> LSD c if ((.not.even).or.(mult.ne.1).or.(theory.eq.'sodft').or. - & (scftype.eq.'UHF')) ipol=2 + & (scftype.eq.'UHF').or.(scftype.eq.'ROHF')) then + ipol=2 + endif noc(2)=0 c c Calculate number of occupied orbitals. @@ -336,9 +338,11 @@ c call util_print_centered & (LuOut,'General Information',20,.true.) write(LuOut,9020) - if (ipol.eq.1)then + if (scftype.eq."RHF")then write(LuOut,9050) - elseif (ipol.eq.2)then + elseif (scftype.eq."ROHF")then + write(LuOut,9052) + elseif (scftype.eq."UHF")then write(LuOut,9055) endif write(LuOut,8150)ncenters @@ -670,6 +674,7 @@ c 9040 format(10x,'Convergence on density requested: ',1Pd8.2) 9045 format(10x,'Convergence on gradient requested: ',1Pd8.2) 9050 format(10x,'Wavefunction type: closed shell.') + 9052 format(10x,'Wavefunction type: restricted open shell.') 9055 format(10x,'Wavefunction type: spin polarized.') 9056 format(10x,'Use of symmetry is: ',a3, & '; symmetry adaption is: ',a3) diff --git a/src/nwdft/scf_dft_cg/dft_cg_info.F b/src/nwdft/scf_dft_cg/dft_cg_info.F index 77ef3ef281..26fc83078f 100644 --- a/src/nwdft/scf_dft_cg/dft_cg_info.F +++ b/src/nwdft/scf_dft_cg/dft_cg_info.F @@ -187,7 +187,7 @@ c $ nopen = 0 if (nopen .gt. nelec) call errquit $ ('scf: nopen > nelec ', nopen, INPUT_ERR) if (mod(nelec-nopen,2) .ne. 0) call errquit - $ ('scf: no. of closed-shell electrons is not even!',nopen, + $ ('dft: no. of closed-shell electrons is not even!',nopen, & INPUT_ERR) c nclosed = (nelec-nopen) / 2 c diff --git a/src/nwdft/scf_dft_cg/dft_roks_fock.F b/src/nwdft/scf_dft_cg/dft_roks_fock.F index 4f290314d3..a872738235 100644 --- a/src/nwdft/scf_dft_cg/dft_roks_fock.F +++ b/src/nwdft/scf_dft_cg/dft_roks_fock.F @@ -151,7 +151,12 @@ c cfock = closed shell AO fock c odens = open shell density c ocoul = open shell coulomb c oexch = open shell exchange -c +c + g_a_xc = 0 + g_b_xc = 0 + g_adens = 0 + g_bdens = 0 +c g_cdens = ga_create_atom_blocked(geom, basis, 'rohf: cdens') g_cfock = ga_create_atom_blocked(geom, basis, 'rohf: cfock') g_hcore = ga_create_atom_blocked(geom, basis, 'rohf: hcore') diff --git a/src/task/task_gradient.F b/src/task/task_gradient.F index 9e41ceecad..4a8faae523 100644 --- a/src/task/task_gradient.F +++ b/src/task/task_gradient.F @@ -289,11 +289,6 @@ c == restricted open-shell DFT == if(theory.eq.'dft') then if (.not. rtdb_get(rtdb,'dft:rodft',mt_log,1,rodft)) 1 rodft = .false. - if (rodft) then - numerical = .true. ! do numerical gradients for restricted-open shell - if (ga_nodeid().eq.0) write(LuOut,*) - 1 'RODFT - numerical derivatives only' - end if end if c c Currently cosmo does not work with analytic gradients diff --git a/src/util/bgj.F b/src/util/bgj.F index 0f9abecda0..183cc60a49 100644 --- a/src/util/bgj.F +++ b/src/util/bgj.F @@ -258,10 +258,10 @@ cDEBUG status = movecs_read_header(movecs_in, title_vecs, basis_vecs, & scftype_vecs, nbf_vecs, nsets, nmo, 2) c -c ipol 1 closed-shell (RKS) -c ipol 2 open-shell (both ROKS and UKS) -c nsets 1 RKS and ROKS -c nsets 2 UKS +c ipol 1 closed-shell (RKS) +c ipol 2 open-shell (both ROKS and UKS) +c nsets 1 RKS and ROKS +c nsets 2 UKS c if (ipol .ne. nsets)then if (ipol.eq.1.and.nsets.eq.2) then @@ -302,7 +302,7 @@ c & 'bgj_get_scf_dens:beta density') endif c -c get mo eigevectors +c get mo eigenvectors c if (nbf_ao .ne. nbf_vecs)then write(6,*)'bgj_get_scf_dens movecs output = ',movecs_in