Compare commits

...

192 commits

Author SHA1 Message Date
NWChem: Open Source High-Performance Computational Chemistry
d0d141fdfb
Merge pull request #746 from edoapra/release-7-2-0
changes from master branch
2023-03-04 16:41:32 -08:00
edoapra
f571067fa2
add sodft test 2023-03-04 09:25:41 -08:00
edoapra
2e778c76e0
dftd3_c6cn 2023-03-04 09:25:41 -08:00
edoapra
a0e77f1622
qa tests for external libxc 2023-03-04 09:25:40 -08:00
edoapra
345c3a9d5b
added bas_details qa test 2023-03-04 09:25:40 -08:00
edoapra
38f5bf74fa
check mpich cache 2023-03-04 09:23:08 -08:00
edoapra
b8b651552f
restore mpich directories 2023-03-04 09:23:07 -08:00
edoapra
b94b06c154
new arg added 2023-03-04 09:23:07 -08:00
edoapra
060c5a4f47
remove cache apps 2023-03-04 09:23:07 -08:00
edoapra
d4dbd71576
added back_to_atguess and scf_dftguess 2023-03-04 09:23:06 -08:00
edoapra
962d019ba5
fix print options 2023-03-04 09:23:06 -08:00
edoapra
8260ff11f7
debug =0 2023-03-04 09:23:06 -08:00
edoapra
9c527b229d
strip debug symbols 2023-03-04 09:23:05 -08:00
edoapra
79d7c44b66
print cache size 2023-03-04 09:23:05 -08:00
edoapra
b0881d30e0
set dftguess calls dft/hfexch from a scf task 2023-03-04 09:23:05 -08:00
edoapra
dec7cefc12
back_to_atguess directive: if d_e > 1d-1 after back_to_atguess cycles, back to at guess 2023-03-04 09:23:04 -08:00
edoapra
c974f519eb
cat config.log on failure 2023-03-04 09:21:29 -08:00
Jochen Autschbach
cb55e4f911
updated IBO construction to allow for occupied and virtuals.
localization input and driver were updated, along with the QA job
localize-ibo-aa. nwparse.pl now tests for completion of IBO run
2023-03-04 09:21:09 -08:00
edoapra
249cb1f433
fix [ci skip] 2023-03-04 09:20:53 -08:00
edoapra
beb2622043
fix [ci skip] 2023-03-04 09:20:18 -08:00
edoapra
ea76c32465
tweak nprocs [ci skip] 2023-03-04 09:19:21 -08:00
edoapra
e79ee6344c
fix lib name 2023-02-26 10:15:49 -08:00
edoapra
a56f99300a
rename libxc libxc to libnwc_xc* to avoid using system libxc libs when USE_LIBXC=1 2023-02-26 10:15:39 -08:00
edoapra
8fb7c223bd brew detection only on mac 2023-02-24 15:31:46 -08:00
edoapra
aae0e105a4
guess location of hwloc without pkg-config 2023-02-23 17:15:07 -08:00
edoapra
11873d6bc6
guess location of hwloc without pkg-config 2023-02-23 17:14:49 -08:00
edoapra
0ae094fab1
compiler updates 2023-02-23 17:14:24 -08:00
edoapra
c0a37c8dd2
update 2023-02-05 14:55:55 -08:00
NWChem: Open Source High-Performance Computational Chemistry
feddab9da6
Merge pull request #731 from edoapra/release-7-2-0
Release 7.2.0 updates
2023-02-03 15:41:12 -08:00
edoapra
b80cc23ce6
always print roots decrease 2023-02-03 09:47:16 -08:00
edoapra
a091110664
redefined nstates if tddft_iguess has decreased nroots 2023-02-03 09:47:15 -08:00
edoapra
0608308267
fix undefiened 2023-02-03 09:47:15 -08:00
edoapra
3d77028c25
mirroring no longer default 2023-02-03 09:45:17 -08:00
edoapra
98062a351a
debug ga_destroy failure 2023-02-03 09:45:17 -08:00
edoapra
b164a38584
fix undefined 2023-02-03 09:45:16 -08:00
edoapra
b556e5f295
check memory for mirroring 2023-02-03 09:45:16 -08:00
edoapra
222f9a0aad
disable mirroring with mp2:tuhfreplicated=f 2023-02-03 09:44:40 -08:00
edoapra
542e7776d5
LIBXC_MODDIR location of libxc f90 modules eg. fedora /usr/lib64/gfortran/modules 2023-01-21 18:17:21 -08:00
edoapra
21a9372b96
fix setuptools vulnerability 2023-01-21 12:12:46 -08:00
edoapra
ceeecfa623
NO_NWPWXC_VDW3A=1 triggers nwpwxc_vdw3a_stub.F instead of downloading dftd3 https://github.com/nwchemgit/nwchem/issues/723 2023-01-20 23:35:53 -08:00
edoapra
dc8ddbdd03
retry wget 2023-01-20 23:35:53 -08:00
edoapra
e6c4e5ae0d
fix stray \ grep warning 2023-01-20 23:35:52 -08:00
edoapra
422811066e
replace egrep with grep to keep fedora happy 2023-01-20 23:35:52 -08:00
edoapra
b30d353f4e
retry wget 2023-01-20 23:35:51 -08:00
edoapra
eb744ccf36
use dftd3 method to address zero small denominators 2023-01-20 23:35:51 -08:00
edoapra
75819c7c64
dftd3_c6cn 2023-01-20 23:34:26 -08:00
edoapra
33bbd14112
tightened tolerances [ci skip] 2023-01-20 23:34:26 -08:00
edoapra
8097b504e2
ccca tests [ci skip] 2023-01-20 23:34:25 -08:00
edoapra
0b798636ee
memory line [ci skip] 2023-01-20 23:33:47 -08:00
edoapra
ac6f2be2d2
qemu and buildkit images to speed up 2023-01-20 21:30:41 -08:00
edoapra
50cc1ecb80
fix cache-hit-reporter [ci skip] 2023-01-20 21:30:40 -08:00
edoapra
7497b36b26
updated cache-hit-reporter [ci skip] 2023-01-20 21:30:40 -08:00
edoapra
16dd54470f
build arg GITHUB_REPOSITORY_OWNER [ci skip] 2023-01-20 21:30:06 -08:00
Edoardo Aprà
550861dc52
typo [ci skip] 2023-01-19 13:46:34 -08:00
edoapra
65bff4fa33
update [ci skip] 2023-01-16 10:54:30 -08:00
edoapra
077113ca1e
update 2023-01-16 10:51:47 -08:00
edoapra
c099e8240f
rt updates 2023-01-16 10:51:35 -08:00
NWChem: Open Source High-Performance Computational Chemistry
283d37d753
Merge pull request #719 from edoapra/release-7-2-0
updates from master
2023-01-15 18:44:50 -08:00
edoapra
401c4ce683
definition of pkg_extra 2023-01-13 18:04:54 -08:00
edoapra
1a0e45ec45
more pkgs in retry loop 2023-01-13 18:04:50 -08:00
edoapra
c269e65f85
more pkgs in retry loop 2023-01-13 18:04:48 -08:00
edoapra
afc1678a0b
retry apt install 2023-01-13 18:04:40 -08:00
edoapra
d424b23449
move mpif90 check 2023-01-13 18:04:38 -08:00
edoapra
51b5685c58
indentation 2023-01-13 18:04:36 -08:00
edoapra
51636ad620
exit 1 when mpif90 is not present 2023-01-13 18:04:28 -08:00
edoapra
0582c31d1f
libxc 6.1.0 2023-01-13 18:04:21 -08:00
edoapra
4e0747abb4
fix error termination 2023-01-13 18:04:17 -08:00
edoapra
eab2c622f2
improved check on patch command 2023-01-13 18:04:13 -08:00
Edoardo Aprà
fcbb5cac7c
update [ci skip] 2023-01-13 14:36:32 -08:00
Edoardo Aprà
326500aa46
update [ci skip] 2023-01-13 14:34:55 -08:00
NWChem: Open Source High-Performance Computational Chemistry
afe804c1d7
Merge pull request #716 from edoapra/release-7-2-0
MP2 updates for Release 7.2.0
2023-01-07 10:26:21 -08:00
edoapra
cbe7f14342
URL change for dftd3 2023-01-06 20:53:44 -08:00
edoapra
88ddd4a5ae
update after commit bbd835402d 2023-01-06 18:57:39 -08:00
edoapra
a201188046
test for basis details keyword 2023-01-06 18:57:38 -08:00
edoapra
5d279ad92b
backing off commit 58800d4f3b 2023-01-06 16:39:20 -08:00
edoapra
2d6a88d37c
force user to set BLAS_SIZE & SCALAPACK_SIZE 2023-01-06 16:23:41 -08:00
edoapra
359e43479e
fix merge operations 2023-01-06 15:32:54 -08:00
edoapra
d8e6e7e92a
mirroring to improve parallelization 2023-01-06 15:32:38 -08:00
edoapra
c41a64019d
more long to size_t 2023-01-06 15:31:22 -08:00
edoapra
069870b42f
typo 2023-01-06 15:31:03 -08:00
edoapra
86f305f5aa
default mp2:copyback back to .false. 2023-01-06 12:43:51 -08:00
edoapra
029eac1f76
trying to improve parallelization 2023-01-06 12:42:59 -08:00
NWChem: Open Source High-Performance Computational Chemistry
bd4351c477
Merge pull request #715 from edoapra/release-7-2-0
master update to Release 7 2 0
2022-12-22 18:17:34 -08:00
edoapra
249971f999
fix for recent clang 2022-12-21 16:49:22 -08:00
edoapra
3969c5c9c5
size_t for LLP64 pointers 2022-12-21 16:49:19 -08:00
edoapra
fd74cdaa93
used ga 582 from https://github.com/GlobalArrays 2022-12-21 16:48:38 -08:00
edoapra
5a5a9844ad
fix for shell conditional 2022-12-21 16:46:50 -08:00
edoapra
c2f089e638
fix for V=1 2022-12-21 16:46:21 -08:00
edoapra
d5246541f1
keep tools compilation quiet with make V=0 or V=-1 2022-12-21 16:45:31 -08:00
edoapra
87dbe4d16d
I_MPI_CC 2022-12-21 16:20:44 -08:00
edoapra
3096932faa
BUILD_MPICH for amdflang 2022-12-21 16:20:44 -08:00
edoapra
d42a8d42d5
BUILD_MPICH for amdflang 2022-12-21 16:20:43 -08:00
edoapra
ff0ca3b60a
use intel icx 2022-12-21 16:20:43 -08:00
edoapra
0f3380227c
use O1 for amdclang 15 since segvs on openblas 2022-12-21 16:20:42 -08:00
edoapra
5904c497e6
amd software updates 2022-12-21 16:18:50 -08:00
edoapra
07b51a4ad6
oneapi 2023 for macos 2022-12-21 16:18:50 -08:00
edoapra
60b2aac892
fix name 2022-12-21 16:18:49 -08:00
edoapra
e395b5504b
linux oneapi 2023 2022-12-21 16:18:20 -08:00
edoapra
7b7669aecd
macos oneapi update 2022-12-21 16:17:41 -08:00
edoapra
b539a98140
switch to latest linux oneapi. ifort 2021.7.1 2022-12-21 16:17:29 -08:00
edoapra
460bbfa679
modify apt install 2022-12-21 16:17:17 -08:00
edoapra
b90eba70fc
less verbose downloads 2022-12-21 16:17:04 -08:00
edoapra
4f55c95777
fedora fixes [ci skip] 2022-12-21 16:14:50 -08:00
edoapra
e88a9b4a1b
fedora fixes [ci skip] 2022-12-21 16:14:40 -08:00
edoapra
1a31c06d81
fedora fixes [ci skip] 2022-12-21 16:14:31 -08:00
edoapra
ac97f8369b
use nvidia hpc_sdk 22.11 2022-12-21 16:14:19 -08:00
Daniel Mejia-Rodriguez
e906d1556f
Adjust sigma threshold (libxc uses the square of this value) 2022-12-21 16:08:38 -08:00
Daniel Mejia-Rodriguez
b8628e3ea6
Changes for LibXC 4.x 2022-12-21 16:08:38 -08:00
Edoardo Aprà
ff16d36128
badge update [ci skip] 2022-12-21 16:07:42 -08:00
edoapra
a5923e59a6
remove duplicate [ci skip] 2022-12-19 11:59:35 -08:00
NWChem: Open Source High-Performance Computational Chemistry
b4bc1edd83
Merge pull request #711 from edoapra/release-7-2-0
libxc updates
2022-12-17 18:50:54 -08:00
edoapra
64eb0f562b
DENABLE_FORTRAN03=ON for version 4 2022-12-17 11:10:00 -08:00
edoapra
2e9ce24982
fixes for libxc 4 2022-12-17 11:10:00 -08:00
edoapra
cb5abdc5fe
added test for ubuntu2004 libxc 2022-12-17 11:09:59 -08:00
edoapra
5e252f987d
fix for stubbing 2022-12-17 11:09:59 -08:00
edoapra
005912cf17
typo 2022-12-17 11:09:59 -08:00
edoapra
f3a6c9a740
detect size of libxc np 2022-12-17 11:09:58 -08:00
edoapra
365d60826d
defined XC_MAJOR_VERSION only when needed 2022-12-17 11:09:58 -08:00
edoapra
68163622d3
extract XC_MAJOR_VERSION 2022-12-17 11:09:57 -08:00
edoapra
e256fd001b
check libxc version only when the define USE_LIBXC exists 2022-12-17 11:09:57 -08:00
edoapra
354c611ffa
removed erroneous #endif 2022-12-17 11:09:57 -08:00
edoapra
b022c6a94e
USE_LIBXC=-1 to use libxc pkgs 2022-12-17 11:09:56 -08:00
edoapra
b55ad84b75
fixes for libxc 3 and 4 2022-12-17 11:09:56 -08:00
edoapra
e212ad6520
external LIBXC: LIBXC_DIR replaced by LIBXC_INCLUDE/LIBXC_LIB 2022-12-17 11:08:11 -08:00
Edoardo Aprà
964077885f
update [ci skip] 2022-12-14 11:05:15 -08:00
edoapra
76b3ae89ab
update [ci skip] 2022-12-13 16:53:35 -08:00
edoapra
2fee89ba3d
output update after commit 0472252ad4 [ci skip] 2022-12-13 16:53:30 -08:00
Edoardo Aprà
4b49776db9
update [ci skip] 2022-12-13 16:07:30 -08:00
NWChem: Open Source High-Performance Computational Chemistry
c1f7d81a73
Merge pull request #708 from edoapra/release-7-2-0
Updates for Release 7.2.0
2022-12-12 10:01:43 -08:00
edoapra
9b8784f94a
move build_mpich section 2022-12-11 20:54:01 -08:00
edoapra
4af6379494
definition of MPI headers moved to config/makefile.h 2022-12-11 20:53:17 -08:00
edoapra
c72354338a
MPI env variables are now ignored unless FORCE_MPI_ENV is set 2022-12-11 20:53:13 -08:00
edoapra
cfcba1c3dc
MPI env variables are now ignored unless FORCE_MPI_ENV is set 2022-12-11 20:49:17 -08:00
edoapra
c13c48cc2e
fixes for asan 2022-12-11 16:27:11 -08:00
edoapra
5171944cc2
completing f4a9d82678 2022-12-11 16:26:43 -08:00
edoapra
8197acccc8
ifx fix 2022-12-11 16:26:23 -08:00
edoapra
14e04e83c6
ifx fix 2022-12-11 16:25:42 -08:00
edoapra
5a420b151d
missing square bracket 2022-12-11 16:24:31 -08:00
edoapra
0d496c22d6
python version 3.11 2022-12-08 18:22:10 -08:00
edoapra
dcaa2c0b1c
macos fixes 2022-12-08 18:22:10 -08:00
edoapra
12842995fe
warning about silent output 2022-12-08 18:22:09 -08:00
edoapra
980c6773a5
tddftgrad_h2o_cis_lda 2022-12-08 18:22:09 -08:00
edoapra
59c304679a
tddft_grad_tdaloc returning .false. 2022-12-08 18:22:08 -08:00
edoapra
e35608f325
added tddftgrad_h2o_cis_lda 2022-12-08 18:22:08 -08:00
edoapra
535d271ae4
reproducer for https://github.com/nwchemgit/nwchem/issues/698 2022-12-08 18:22:07 -08:00
edoapra
6ec303d600
cleanup to address https://github.com/nwchemgit/nwchem/issues/698 2022-12-08 18:20:06 -08:00
edoapra
ff1c7f9739
cleanup to address https://github.com/nwchemgit/nwchem/issues/698 2022-12-08 18:19:49 -08:00
edoapra
bf42d53dfa
bug fix for commit 518b2b72b1 2022-12-05 12:14:44 -08:00
edoapra
45fe17623d
added uhf mp2 case 2022-12-05 12:14:30 -08:00
edoapra
adb5e41671
removed unnecessary files 2022-12-03 18:59:02 -08:00
edoapra
84482224b2
replaced ga_transpose 2022-12-03 18:58:25 -08:00
edoapra
c15b2125cf
removed copy patch 2022-12-03 18:58:25 -08:00
edoapra
2fcf97e696
more time profiling 2022-12-03 18:58:24 -08:00
edoapra
a0f6fcbb23
mp2_copyback by default for better scaling 2022-12-03 18:57:43 -08:00
edoapra
81af0a71da
cross compile 2022-11-29 10:31:26 -08:00
edoapra
acb44fc970
set NWCHEM_LINK_CUDA=1 when TCE_OPENACC+1 2022-11-26 21:13:57 -08:00
edoapra
70aab8838f
stop when using cuda input option and code was not compiled with TCE_CUDA=1 2022-11-26 21:13:45 -08:00
edoapra
63e97f1916
FC=gfortran when FC is not set 2022-11-26 21:11:30 -08:00
edoapra
2a3cb34c29
use OpenBLAS DYNAMIC_ARCH only on x86 2022-11-26 21:10:22 -08:00
edoapra
2440b82ecb
replaced by peigs.pdf [ci skip] 2022-11-17 16:27:39 -08:00
edoapra
cc032adb2e
peigs.pdf update [ci skip] 2022-11-17 16:27:39 -08:00
edoapra
d4bed5492d
updates to compiles with texi2pdf [ci skip] 2022-11-17 16:27:38 -08:00
edoapra
b1a9ce09d1
Peigs documentation. CVS revision 1.1 date: 1995-04-13 17:16:46 -0700 2022-11-17 16:27:34 -08:00
Edoardo Aprà
51bdffa785
updates [ci skip] 2022-11-15 17:11:09 -08:00
edoapra
b76d87a753
check libxc version supplied with LIBXC_VERSION 2022-11-13 22:56:23 -08:00
edoapra
ed60ebd09d
fix variable name 2022-11-13 22:56:10 -08:00
edoapra
c6b69cf4fe
added LIBXC_VERSION to choose libxc version 2022-11-13 22:55:52 -08:00
edoapra
8029d67e2f
libxc 6.0.0 2022-11-13 22:55:33 -08:00
edoapra
27e4371399
fix for laplacian-dependent xc functionals 2022-11-13 22:53:02 -08:00
edoapra
0685b53433
set dolap=t only when XC_FLAGS_NEEDS_LAPLACIAN is set 2022-11-13 22:52:39 -08:00
edoapra
3f10db4e42
remove extra $ 2022-11-13 17:30:23 -08:00
edoapra
ec08f8e9d7
skip rpm install on selfhosted runner [ci skip] 2022-11-13 17:04:14 -08:00
edoapra
0173f34054
disable cpu optimizations when USE_HWOPT=n 2022-11-08 17:34:41 -08:00
edoapra
db623cad7d
mirroring 2022-11-08 17:34:30 -08:00
edoapra
3f90bad855
avoid communication in xlm_make_ao_poles 2022-11-08 17:34:00 -08:00
Edoardo Aprà
c2f1ea0836
Updates 2022-11-08 15:16:49 -08:00
edoapra
f501b3f644
fix xyz output https://github.com/nwchemgit/nwchem/issues/680 2022-11-02 10:22:09 -07:00
edoapra
402b6027b7
fix hwloc detection on mac 2022-11-02 10:22:05 -07:00
edoapra
e5237ec9d5
missing arg 2022-10-31 08:47:17 -07:00
edoapra
f06e9b1dae
fix gfortran detection 2022-10-31 08:47:09 -07:00
edoapra
63dccb56c0
context [ci skip] 2022-10-29 11:05:50 -07:00
edoapra
ed4fb3ac54
context [ci skip] 2022-10-29 11:05:50 -07:00
edoapra
25f7c14fe6
github_env [ci skip] 2022-10-29 11:05:45 -07:00
edoapra
685134ec55
typo [ci skip] 2022-10-29 10:45:50 -07:00
edoapra
15f98ae3ab
indentation [ci skip] 2022-10-29 10:45:50 -07:00
edoapra
b6ab7229db
add NWCHEM_BRANCH build arg [ci skip] 2022-10-29 10:45:50 -07:00
edoapra
72c80e14b5
updates 2022-10-29 10:45:23 -07:00
edoapra
173b83b316
limit np for talc [ci skip] 2022-10-29 10:37:18 -07:00
edoapra
bc68522c25
USE_ASAN conflicts with MALLOC_PERTURB_ [ci skip] 2022-10-28 13:24:56 -07:00
edoapra
583ddb0035
unset USE_OPENMP https://github.com/nwchemgit/nwchem/issues/678 2022-10-27 17:51:28 -07:00
edoapra
6de59b632a
7.2.0 release [ci skip] 2022-10-27 12:54:04 -07:00
edoapra
a5751a200a
ifx fix [ci skip] 2022-10-26 21:42:21 -07:00
120 changed files with 48374 additions and 74285 deletions

View file

@ -36,23 +36,18 @@ jobs:
key: ${{ matrix.folder}}-${{ matrix.fc}}/${{ matrix.archs}}-nwchem-dockeractions-v002
- name: Qemu
id: qemu
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2
with:
image: crazymax/binfmt:v6.0.0
image: tonistiigi/binfmt:qemu-v6.0.0-10
- name: Available platforms
run: |
echo ${{ steps.qemu.outputs.platforms }}
docker images
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
with:
driver-opts: |
image=moby/buildkit:master
- name: Get Arch
id: get-arch
run: |
echo "::set-output name=arch::$(echo ${{matrix.archs }} | sed 's/linux//'|sed 's/\///g' )"
shell: bash
image=moby/buildkit:v0.10.4
- name: fetch cache
if: (steps.setup-cache.outputs.cache-hit == 'true') && ( matrix.folder != 'helloworld' )
run: |
@ -62,14 +57,13 @@ jobs:
rsync -av ~/cache/libext* cache/. ; \
echo "libext cache fetched" ; \
fi
- uses: haya14busa/action-cond@v1
id: cache-hit-reporter
with:
cond: ${{ steps.setup-cache.outputs.cache-hit != '' }}
if_true: "Y"
if_false: "N"
echo "cache_hit=Y" >> $GITHUB_ENV
- name: negative-cache-hit-reporter
if: (steps.setup-cache.outputs.cache-hit != 'true')
run: |
echo "cache_hit=N" >> $GITHUB_ENV
- name: build_schedule
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3
with:
push: false
context: ${{ matrix.folder }}
@ -78,7 +72,9 @@ jobs:
tags: nwchem_image
build-args: |
FC=${{ matrix.fc }}
CACHE_HIT=${{ steps.cache-hit-reporter.outputs.value }}
CACHE_HIT=${{ env.cache_hit }}
NWCHEM_BRANCH=${{ github.ref_name }}
GITHUB_REPOSITORY_OWNER=${{ github.repository_owner }}
- name: store cache
run: |
mkdir -p ~/cache/

View file

@ -129,6 +129,16 @@ jobs:
nwchem_modules: "tce"
fc: gfortran-11
cc: gcc-11
- os: ubuntu-20.04
experimental: true
mpi_impl: mpich
armci_network: MPI-TS
nwchem_modules: "nwdft solvation driver"
fc: gfortran
cc: gcc
use_libxc: -1
blas: "internal"
blas_size: 8
- os: ubuntu-22.04
experimental: true
mpi_impl: mpich
@ -136,6 +146,7 @@ jobs:
nwchem_modules: "qmandpw qmd"
fc: gfortran-11
cc: gcc-11
use_libxc: -1
- os: ubuntu-20.04
experimental: true
mpi_impl: mpich
@ -220,7 +231,7 @@ jobs:
armci_network: MPI-TS
nwchem_modules: "tinyqmpw"
fc: ifort
cc: icc
cc: icx
use_libxc: 1
- os: macos-11
experimental: true
@ -252,7 +263,7 @@ jobs:
armci_network: MPI-TS
nwchem_modules: "nwdft solvation driver"
fc: ifort
cc: icc
cc: icx
use_simint: 1
- os: ubuntu-20.04
experimental: true
@ -357,14 +368,7 @@ jobs:
with:
path: |
~/cache
~/apps
key: ${{ matrix.os }}-${{ matrix.mpi_impl}}-${{ matrix.fc}}-xcode${{ matrix.xcode_version}}-simint${{ matrix.use_simint}}-blas${{ matrix.blas}}-blas_size${{ matrix.blas_size}}-libxc${{matrix.use_libxc}}-tblite${{matrix.use_tblite}}-simd${{ env.simd }}-nwchemcache-v003
- name: fetch apps cache
if: steps.setup-cache.outputs.cache-hit == 'true'
run: |
if [[ -f ~/apps/oneapi/setvars.sh ]]; then \
echo "apps oneapi cache fetched" ; \
export GOT_APPSCACHE="Y" ; fi
- name: build environment
run: |
pwd

View file

@ -14,12 +14,13 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.11'
check-latest: true
- run: pip install --upgrade pip wheel
- run: pip install bandit black codespell flake8 flake8-2020 flake8-bugbear
flake8-comprehensions isort mypy pytest pyupgrade safety
- run: python -m pip install --upgrade requests
- run: python -m pip install 'setuptools>=65.5.1'
- run: bandit --recursive --skip B101,B110,B306,B307,B311,B605,B607 .
- run: black --check . || true
- run: codespell --count

View file

@ -519,8 +519,6 @@ let "myexit+=$?"
let "myexit+=$?"
./runtests.mpi.unix procs $np carbon_fon
let "myexit+=$?"
./runtests.mpi.unix procs $np ch5n_nbo
let "myexit+=$?"
./runtests.mpi.unix procs $np tpss tpssh
let "myexit+=$?"
#
@ -532,7 +530,7 @@ let "myexit+=$?"
./runtests.mpi.unix procs $np h2o2_fde
let "myexit+=$?"
# tddft gradients
./runtests.mpi.unix procs $np tddftgrad_co_cis tddftgrad_n2 tddftgrad_co tddftgrad_n2_uks tddftgrad_ch2o
./runtests.mpi.unix procs $np tddftgrad_co_cis tddftgrad_n2 tddftgrad_co tddftgrad_n2_uks tddftgrad_ch2o tddftgrad_h2o_cis_lda
let "myexit+=$?"
# new xc functionals for 7.0.0
./runtests.mpi.unix procs $np dft_rscan
@ -543,6 +541,12 @@ let "myexit+=$?"
let "myexit+=$?"
./runtests.mpi.unix procs $np rt_tddft_mocap
let "myexit+=$?"
./runtests.mpi.unix procs $np rt_tddft_cytosine_cam_cdfit
let "myexit+=$?"
./runtests.mpi.unix procs $np rt_tddft_tcne_spinkick
let "myexit+=$?"
./runtests.mpi.unix procs $np rt_tddft_water_abs_spec
let "myexit+=$?"
./runtests.mpi.unix procs $np dft_ne_n12
let "myexit+=$?"
./runtests.mpi.unix procs $np dft_mfm_ch3
@ -578,6 +582,10 @@ if [[ ! -z "${USE_TBLITE}" ]]; then
let "myexit+=$?"
./runtests.mpi.unix procs $np xtb_siosi7
let "myexit+=$?"
./runtests.mpi.unix procs $np h2o_ccca o2_ccca
let "myexit+=$?"
./runtests.mpi.unix procs $np dftd3_c6cn
let "myexit+=$?"
fi
#--- if we only want quick tests get out now!
if [[ "$what" == "fast" ]]; then
@ -605,6 +613,10 @@ let "myexit+=$?"
let "myexit+=$?"
./runtests.mpi.unix procs $np dft_r2scan0
let "myexit+=$?"
./runtests.mpi.unix procs $np scf_dftguess
let "myexit+=$?"
./runtests.mpi.unix procs $np back_to_atguess
let "myexit+=$?"
#
./runtests.mpi.unix procs $np ccsdt_ompt_w3pvdz
let "myexit+=$?"
@ -685,7 +697,8 @@ echo 'Please check the final values for the last optimized structure.'
let "myexit+=$?"
./runtests.mpi.unix procs $np dielsalder
let "myexit+=$?"
./runtests.mpi.unix procs $np talc
np_small=$(get_limit $np 16)
./runtests.mpi.unix procs $np_small talc
let "myexit+=$?"
echo 'The intermediate energy values for the numerical gradient '
echo 'test may cause some differences.'

View file

@ -18,7 +18,7 @@
# Richland, WA 99352-0999
#
$quiet = 0;
$debug = 1;
$debug = 0;
$num_argv = @ARGV;
if ($num_argv == 0) {
@ -402,7 +402,7 @@ foreach $filename (@FILES_TO_PARSE) {
}
}
if (/Excitation energy/ || /Rotatory /) {
if (/Excitation energy/ || /Rotatory / || /IBO loc: largest element in /) {
if ($debug) {print "\ndebug: $_";}
@line_tokens = split(' ');
$num_line_tokens = @line_tokens;

View file

@ -32,7 +32,9 @@
export HYDRA_DEBUG=0
# find memory leaks using this glibc feature that
# initialized memory blocks to non-zero values
export MALLOC_PERTURB_=$(($RANDOM % 255 + 1))
if [[ -z "${USE_ASAN}" ]]; then
export MALLOC_PERTURB_=$(($RANDOM % 255 + 1))
fi
if [[ -z "${NWCHEM_TARGET}" ]]; then
UNAME_S=$(uname -s)

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,41 @@
#
# $Id$
#
title "Water geometry optimization in cc-pvdz basis set"
start h2o
geometry autosym
O 0.0 1.0 -0.02
H -0.74 1.0 -0.76
H 0.74 1.0 -0.76
O 0.0 0.0 -0.02
H -0.74 0.0 -0.76
H 0.74 0.0 -0.76
end
basis
H library cc-pvdz
O library cc-pvdz
end
driver
clear
end
scf; print low; end
#task scf optimize
dft
vectors input hcore
maxiter 1
end
task dft ignore
set back_to_atguess 2
dft
maxiter 99
end
task dft

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,64 @@
start
title "test basis details keyword"
echo
geometry
C 0.000000 0.000000 0.000000
H 0.000000 0.000000 1.089000
H 1.026719 0.000000 -0.363000
H -0.513360 -0.889165 -0.363000
H -0.513360 0.889165 -0.363000
end
basis b1
* details library aug-cc-pvdz
end
basis b2 bse
* library aug-cc-pvdz
end
basis b3 spherical
* library aug-cc-pvdz
end
basis b4
* library aug-cc-pvdz
end
set "ao basis" b1
dft
vectors output b1.mos
print low
end
task dft
set "ao basis" b2
dft
vectors input project b1 b1.mos output b2.mos
end
task dft
set "ao basis" b3
dft
vectors input project b2 b2.mos output b3.mos
end
task dft
set "ao basis" b4
dft
vectors input project b3 b3.mos output b4.mos
end
task dft

View file

@ -0,0 +1,836 @@
argument 1 = /Users/edo/nwchem/nwchem-edoapra-master/QA/tests/bas_details/bas_details.nw
NWChem w/ OpenMP: maximum threads = 1
============================== echo of input deck ==============================
start
title "test basis details keyword"
echo
geometry
C 0.000000 0.000000 0.000000
H 0.000000 0.000000 1.089000
H 1.026719 0.000000 -0.363000
H -0.513360 -0.889165 -0.363000
H -0.513360 0.889165 -0.363000
end
basis b1
* details library aug-cc-pvdz
end
basis b2 bse
* library aug-cc-pvdz
end
basis b3 spherical
* library aug-cc-pvdz
end
basis b4
* library aug-cc-pvdz
end
set "ao basis" b1
dft
vectors output b1.mos
print low
end
task dft
set "ao basis" b2
dft
vectors input project b1 b1.mos output b2.mos
end
task dft
set "ao basis" b3
dft
vectors input project b2 b2.mos output b3.mos
end
task dft
set "ao basis" b4
dft
vectors input project b3 b3.mos output b4.mos
end
task dft
================================================================================
Northwest Computational Chemistry Package (NWChem) 7.2.0
--------------------------------------------------------
Environmental Molecular Sciences Laboratory
Pacific Northwest National Laboratory
Richland, WA 99352
Copyright (c) 1994-2022
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 = WE40672
program = /Users/edo/nwchem/nwchem-edoapra-master/bin/MACX64/nwchem
date = Wed Dec 14 18:04:30 2022
compiled = Wed_Dec_14_18:03:49_2022
source = /Users/edo/nwchem/nwchem-edoapra-master
nwchem branch = 7.2.0
nwchem revision = nwchem_on_git-4232-g9621f8a386
ga revision = 5.8.1
use scalapack = T
input = /Users/edo/nwchem/nwchem-edoapra-master/QA/tests/bas_details/bas_details.nw
prefix = bas_details.
data base = ./bas_details.db
status = startup
nproc = 1
time left = -1s
Memory information
------------------
heap = 26214396 doubles = 200.0 Mbytes
stack = 26214401 doubles = 200.0 Mbytes
global = 52428800 doubles = 400.0 Mbytes (distinct from heap & stack)
total = 104857597 doubles = 800.0 Mbytes
verify = yes
hardfail = no
Directory information
---------------------
0 permanent = .
0 scratch = .
NWChem Input Module
-------------------
test basis details keyword
--------------------------
Scaling coordinates for geometry "geometry" by 1.889725989
(inverse scale = 0.529177249)
TD symmetry detected
------
auto-z
------
Looking for out-of-plane bends
no constraints, skipping 0.000000000000000E+000
no constraints, skipping 0.000000000000000E+000
Geometry "geometry" -> ""
-------------------------
Output coordinates in angstroms (scale by 1.889725989 to convert to a.u.)
No. Tag Charge X Y Z
---- ---------------- ---------- -------------- -------------- --------------
1 C 6.0000 0.00000000 0.00000000 0.00000000
2 H 1.0000 -0.62873455 0.62873455 0.62873455
3 H 1.0000 0.62873455 -0.62873455 0.62873455
4 H 1.0000 -0.62873455 -0.62873455 -0.62873455
5 H 1.0000 0.62873455 0.62873455 -0.62873455
Atomic Mass
-----------
C 12.000000
H 1.007825
Effective nuclear repulsion energy (a.u.) 13.4477252140
Nuclear Dipole moment (a.u.)
----------------------------
X Y Z
---------------- ---------------- ----------------
0.0000000000 0.0000000000 0.0000000000
Symmetry information
--------------------
Group name Td
Group number 42
Group order 24
No. of unique centers 2
Symmetry unique atoms
1 2
Z-matrix (autoz)
--------
Units are Angstrom for bonds and degrees for angles
Type Name I J K L M Value
----------- -------- ----- ----- ----- ----- ----- ----------
1 Stretch 1 2 1.08900
2 Stretch 1 3 1.08900
3 Stretch 1 4 1.08900
4 Stretch 1 5 1.08900
5 Bend 2 1 3 109.47122
6 Bend 2 1 4 109.47122
7 Bend 2 1 5 109.47122
8 Bend 3 1 4 109.47122
9 Bend 3 1 5 109.47122
10 Bend 4 1 5 109.47122
XYZ format geometry
-------------------
5
geometry
C 0.00000000 0.00000000 0.00000000
H -0.62873455 0.62873455 0.62873455
H 0.62873455 -0.62873455 0.62873455
H -0.62873455 -0.62873455 -0.62873455
H 0.62873455 0.62873455 -0.62873455
==============================================================================
internuclear distances
------------------------------------------------------------------------------
center one | center two | atomic units | angstroms
------------------------------------------------------------------------------
2 H | 1 C | 2.05791 | 1.08900
3 H | 1 C | 2.05791 | 1.08900
4 H | 1 C | 2.05791 | 1.08900
5 H | 1 C | 2.05791 | 1.08900
------------------------------------------------------------------------------
number of included internuclear distances: 4
==============================================================================
==============================================================================
internuclear angles
------------------------------------------------------------------------------
center 1 | center 2 | center 3 | degrees
------------------------------------------------------------------------------
2 H | 1 C | 3 H | 109.47
2 H | 1 C | 4 H | 109.47
2 H | 1 C | 5 H | 109.47
3 H | 1 C | 4 H | 109.47
3 H | 1 C | 5 H | 109.47
4 H | 1 C | 5 H | 109.47
------------------------------------------------------------------------------
number of included internuclear angles: 6
==============================================================================
Summary of "b1" -> "" (cartesian)
------------------------------------------------------------------------------
Tag Description Shells Functions and Types
---------------- ------------------------------ ------ ---------------------
* aug-cc-pvdz on all atoms
Summary of "b2" -> "" (cartesian)
------------------------------------------------------------------------------
Tag Description Shells Functions and Types
---------------- ------------------------------ ------ ---------------------
* aug-cc-pvdz on all atoms
Summary of "b3" -> "" (spherical)
------------------------------------------------------------------------------
Tag Description Shells Functions and Types
---------------- ------------------------------ ------ ---------------------
* aug-cc-pvdz on all atoms
Summary of "b4" -> "" (cartesian)
------------------------------------------------------------------------------
Tag Description Shells Functions and Types
---------------- ------------------------------ ------ ---------------------
* aug-cc-pvdz on all atoms
NWChem DFT Module
-----------------
test basis details keyword
Basis "ao basis" -> "b1" (spherical)
-----
C (Carbon)
----------
Exponent Coefficients
-------------- ---------------------------------------------------------
1 S 6.66500000E+03 0.000692
1 S 1.00000000E+03 0.005329
1 S 2.28000000E+02 0.027077
1 S 6.47100000E+01 0.101718
1 S 2.10600000E+01 0.274740
1 S 7.49500000E+00 0.448564
1 S 2.79700000E+00 0.285074
1 S 5.21500000E-01 0.015204
2 S 6.66500000E+03 -0.000146
2 S 1.00000000E+03 -0.001154
2 S 2.28000000E+02 -0.005725
2 S 6.47100000E+01 -0.023312
2 S 2.10600000E+01 -0.063955
2 S 7.49500000E+00 -0.149981
2 S 2.79700000E+00 -0.127262
2 S 5.21500000E-01 0.544529
3 S 1.59600000E-01 1.000000
4 S 4.69000000E-02 1.000000
5 P 9.43900000E+00 0.038109
5 P 2.00200000E+00 0.209480
5 P 5.45600000E-01 0.508557
6 P 1.51700000E-01 1.000000
7 P 4.04100000E-02 1.000000
8 D 5.50000000E-01 1.000000
9 D 1.51000000E-01 1.000000
H (Hydrogen)
------------
Exponent Coefficients
-------------- ---------------------------------------------------------
1 S 1.30100000E+01 0.019685
1 S 1.96200000E+00 0.137977
1 S 4.44600000E-01 0.478148
2 S 1.22000000E-01 1.000000
3 S 2.97400000E-02 1.000000
4 P 7.27000000E-01 1.000000
5 P 1.41000000E-01 1.000000
Summary of "ao basis" -> "b1" (spherical)
------------------------------------------------------------------------------
Tag Description Shells Functions and Types
---------------- ------------------------------ ------ ---------------------
C aug-cc-pvdz 9 23 4s3p2d
H aug-cc-pvdz 5 9 3s2p
Caching 1-el integrals
WARNING: movecs_in_org=atomic not equal to movecs_in=./b1.mos
Time after variat. SCF: 0.4
Time prior to 1st pass: 0.4
Total DFT energy = -40.098721470454
One electron energy = -79.817762448480
Coulomb energy = 32.731732491192
Exchange-Corr. energy = -6.460416727190
Nuclear repulsion energy = 13.447725214025
Numeric. integr. density = 10.000005610713
Total iterative time = 0.3s
Occupations of the irreducible representations
----------------------------------------------
irrep alpha beta
-------- -------- --------
a1 2.0 2.0
a2 0.0 0.0
e 0.0 0.0
t1 0.0 0.0
t2 3.0 3.0
Task times cpu: 0.4s wall: 0.4s
NWChem Input Module
-------------------
NWChem DFT Module
-----------------
test basis details keyword
Basis "ao basis" -> "b2" (spherical)
-----
C (Carbon)
----------
Exponent Coefficients
-------------- ---------------------------------------------------------
1 S 6.66500000E+03 0.000692
1 S 1.00000000E+03 0.005329
1 S 2.28000000E+02 0.027077
1 S 6.47100000E+01 0.101718
1 S 2.10600000E+01 0.274740
1 S 7.49500000E+00 0.448564
1 S 2.79700000E+00 0.285074
1 S 5.21500000E-01 0.015204
2 S 6.66500000E+03 -0.000146
2 S 1.00000000E+03 -0.001154
2 S 2.28000000E+02 -0.005725
2 S 6.47100000E+01 -0.023312
2 S 2.10600000E+01 -0.063955
2 S 7.49500000E+00 -0.149981
2 S 2.79700000E+00 -0.127262
2 S 5.21500000E-01 0.544529
3 S 1.59600000E-01 1.000000
4 S 4.69000000E-02 1.000000
5 P 9.43900000E+00 0.038109
5 P 2.00200000E+00 0.209480
5 P 5.45600000E-01 0.508557
6 P 1.51700000E-01 1.000000
7 P 4.04100000E-02 1.000000
8 D 5.50000000E-01 1.000000
9 D 1.51000000E-01 1.000000
H (Hydrogen)
------------
Exponent Coefficients
-------------- ---------------------------------------------------------
1 S 1.30100000E+01 0.019685
1 S 1.96200000E+00 0.137977
1 S 4.44600000E-01 0.478148
2 S 1.22000000E-01 1.000000
3 S 2.97400000E-02 1.000000
4 P 7.27000000E-01 1.000000
5 P 1.41000000E-01 1.000000
Summary of "ao basis" -> "b2" (spherical)
------------------------------------------------------------------------------
Tag Description Shells Functions and Types
---------------- ------------------------------ ------ ---------------------
C aug-cc-pvdz 9 23 4s3p2d
H aug-cc-pvdz 5 9 3s2p
Caching 1-el integrals
WARNING: movecs_in_org=project not equal to movecs_in=./b2.mos
Time after variat. SCF: 0.7
Time prior to 1st pass: 0.7
Total DFT energy = -40.098721474766
One electron energy = -79.817417679667
Coulomb energy = 32.731340846306
Exchange-Corr. energy = -6.460369855430
Nuclear repulsion energy = 13.447725214025
Numeric. integr. density = 10.000005610781
Total iterative time = 0.2s
Occupations of the irreducible representations
----------------------------------------------
irrep alpha beta
-------- -------- --------
a1 2.0 2.0
a2 0.0 0.0
e 0.0 0.0
t1 0.0 0.0
t2 3.0 3.0
Task times cpu: 0.3s wall: 0.3s
NWChem Input Module
-------------------
NWChem DFT Module
-----------------
test basis details keyword
Basis "ao basis" -> "b3" (spherical)
-----
C (Carbon)
----------
Exponent Coefficients
-------------- ---------------------------------------------------------
1 S 6.66500000E+03 0.000692
1 S 1.00000000E+03 0.005329
1 S 2.28000000E+02 0.027077
1 S 6.47100000E+01 0.101718
1 S 2.10600000E+01 0.274740
1 S 7.49500000E+00 0.448564
1 S 2.79700000E+00 0.285074
1 S 5.21500000E-01 0.015204
2 S 6.66500000E+03 -0.000146
2 S 1.00000000E+03 -0.001154
2 S 2.28000000E+02 -0.005725
2 S 6.47100000E+01 -0.023312
2 S 2.10600000E+01 -0.063955
2 S 7.49500000E+00 -0.149981
2 S 2.79700000E+00 -0.127262
2 S 5.21500000E-01 0.544529
3 S 1.59600000E-01 1.000000
4 S 4.69000000E-02 1.000000
5 P 9.43900000E+00 0.038109
5 P 2.00200000E+00 0.209480
5 P 5.45600000E-01 0.508557
6 P 1.51700000E-01 1.000000
7 P 4.04100000E-02 1.000000
8 D 5.50000000E-01 1.000000
9 D 1.51000000E-01 1.000000
H (Hydrogen)
------------
Exponent Coefficients
-------------- ---------------------------------------------------------
1 S 1.30100000E+01 0.019685
1 S 1.96200000E+00 0.137977
1 S 4.44600000E-01 0.478148
2 S 1.22000000E-01 1.000000
3 S 2.97400000E-02 1.000000
4 P 7.27000000E-01 1.000000
5 P 1.41000000E-01 1.000000
Summary of "ao basis" -> "b3" (spherical)
------------------------------------------------------------------------------
Tag Description Shells Functions and Types
---------------- ------------------------------ ------ ---------------------
C aug-cc-pvdz 9 23 4s3p2d
H aug-cc-pvdz 5 9 3s2p
Caching 1-el integrals
WARNING: movecs_in_org=project not equal to movecs_in=./b3.mos
Time after variat. SCF: 1.0
Time prior to 1st pass: 1.0
Total DFT energy = -40.098721474784
One electron energy = -79.817393093582
Coulomb energy = 32.731313156390
Exchange-Corr. energy = -6.460366751616
Nuclear repulsion energy = 13.447725214025
Numeric. integr. density = 10.000005610778
Total iterative time = 0.2s
Occupations of the irreducible representations
----------------------------------------------
irrep alpha beta
-------- -------- --------
a1 2.0 2.0
a2 0.0 0.0
e 0.0 0.0
t1 0.0 0.0
t2 3.0 3.0
Task times cpu: 0.3s wall: 0.3s
NWChem Input Module
-------------------
NWChem DFT Module
-----------------
test basis details keyword
Basis "ao basis" -> "b4" (cartesian)
-----
C (Carbon)
----------
Exponent Coefficients
-------------- ---------------------------------------------------------
1 S 6.66500000E+03 0.000692
1 S 1.00000000E+03 0.005329
1 S 2.28000000E+02 0.027077
1 S 6.47100000E+01 0.101718
1 S 2.10600000E+01 0.274740
1 S 7.49500000E+00 0.448564
1 S 2.79700000E+00 0.285074
1 S 5.21500000E-01 0.015204
2 S 6.66500000E+03 -0.000146
2 S 1.00000000E+03 -0.001154
2 S 2.28000000E+02 -0.005725
2 S 6.47100000E+01 -0.023312
2 S 2.10600000E+01 -0.063955
2 S 7.49500000E+00 -0.149981
2 S 2.79700000E+00 -0.127262
2 S 5.21500000E-01 0.544529
3 S 1.59600000E-01 1.000000
4 S 4.69000000E-02 1.000000
5 P 9.43900000E+00 0.038109
5 P 2.00200000E+00 0.209480
5 P 5.45600000E-01 0.508557
6 P 1.51700000E-01 1.000000
7 P 4.04100000E-02 1.000000
8 D 5.50000000E-01 1.000000
9 D 1.51000000E-01 1.000000
H (Hydrogen)
------------
Exponent Coefficients
-------------- ---------------------------------------------------------
1 S 1.30100000E+01 0.019685
1 S 1.96200000E+00 0.137977
1 S 4.44600000E-01 0.478148
2 S 1.22000000E-01 1.000000
3 S 2.97400000E-02 1.000000
4 P 7.27000000E-01 1.000000
5 P 1.41000000E-01 1.000000
Summary of "ao basis" -> "b4" (cartesian)
------------------------------------------------------------------------------
Tag Description Shells Functions and Types
---------------- ------------------------------ ------ ---------------------
C aug-cc-pvdz 9 25 4s3p2d
H aug-cc-pvdz 5 9 3s2p
Caching 1-el integrals
WARNING: movecs_in_org=project not equal to movecs_in=./b4.mos
Time after variat. SCF: 1.3
Time prior to 1st pass: 1.3
Total DFT energy = -40.100836427564
One electron energy = -79.804187567806
Coulomb energy = 32.702475992294
Exchange-Corr. energy = -6.446850066076
Nuclear repulsion energy = 13.447725214025
Numeric. integr. density = 10.000005618093
Total iterative time = 0.3s
Occupations of the irreducible representations
----------------------------------------------
irrep alpha beta
-------- -------- --------
a1 2.0 2.0
a2 0.0 0.0
e 0.0 0.0
t1 0.0 0.0
t2 3.0 3.0
Task times cpu: 0.4s wall: 0.4s
NWChem Input Module
-------------------
Summary of allocated global arrays
-----------------------------------
No active global arrays
MA_summarize_allocated_blocks: starting scan ...
heap block 'gridpts', handle 74, address 0x7fedf6985698:
type of elements: double precision
number of elements: 33554432
address of client space: 0x7fedf6985700
index for client space: 17581915250195
total number of bytes: 268435568
MA_summarize_allocated_blocks: scan completed: 1 heap block, 0 stack blocks
MA usage statistics:
allocation statistics:
heap stack
---- -----
current number of blocks 1 0
maximum number of blocks 25 55
current total bytes 268435568 0
maximum total bytes 273176464 22512552
maximum total K-bytes 273177 22513
maximum total M-bytes 274 23
CITATION
--------
Please cite the following reference when publishing
results obtained with NWChem:
E. Apra, E. J. Bylaska, W. A. de Jong, N. Govind, K. Kowalski,
T. P. Straatsma, M. Valiev, H. J. J. van Dam, Y. Alexeev, J. Anchell,
V. Anisimov, F. W. Aquino, R. Atta-Fynn, J. Autschbach, N. P. Bauman,
J. C. Becca, D. E. Bernholdt, K. Bhaskaran-Nair, S. Bogatko, P. Borowski,
J. Boschen, J. Brabec, A. Bruner, E. Cauet, Y. Chen, G. N. Chuev,
C. J. Cramer, J. Daily, M. J. O. Deegan, T. H. Dunning Jr., M. Dupuis,
K. G. Dyall, G. I. Fann, S. A. Fischer, A. Fonari, H. Fruchtl, L. Gagliardi,
J. Garza, N. Gawande, S. Ghosh, K. Glaesemann, A. W. Gotz, J. Hammond,
V. Helms, E. D. Hermes, K. Hirao, S. Hirata, M. Jacquelin, L. Jensen,
B. G. Johnson, H. Jonsson, R. A. Kendall, M. Klemm, R. Kobayashi, V. Konkov,
S. Krishnamoorthy, M. Krishnan, Z. Lin, R. D. Lins, R. J. Littlefield,
A. J. Logsdail, K. Lopata, W. Ma, A. V. Marenich, J. Martin del Campo,
D. Mejia-Rodriguez, J. E. Moore, J. M. Mullin, T. Nakajima, D. R. Nascimento,
J. A. Nichols, P. J. Nichols, J. Nieplocha, A. Otero-de-la-Roza, B. Palmer,
A. Panyala, T. Pirojsirikul, B. Peng, R. Peverati, J. Pittner, L. Pollack,
R. M. Richard, P. Sadayappan, G. C. Schatz, W. A. Shelton, D. W. Silverstein,
D. M. A. Smith, T. A. Soares, D. Song, M. Swart, H. L. Taylor, G. S. Thomas,
V. Tipparaju, D. G. Truhlar, K. Tsemekhman, T. Van Voorhis,
A. Vazquez-Mayagoitia, P. Verma, O. Villa, A. Vishnu, K. D. Vogiatzis,
D. Wang, J. H. Weare, M. J. Williamson, T. L. Windus, K. Wolinski,
A. T. Wong, Q. Wu, C. Yang, Q. Yu, M. Zacharias, Z. Zhang, Y. Zhao,
and R. J. Harrison
"NWChem: Past, present, and future
J. Chem. Phys. 152, 184102 (2020)
doi:10.1063/5.0004997
AUTHORS
-------
E. Apra, E. J. Bylaska, N. Govind, K. Kowalski, M. Valiev, D. Mejia-Rodriguez,
A. Kunitsa, N. P. Bauman, A. Panyala, W. A. de Jong, T. P. Straatsma,
H. J. J. van Dam, D. Wang, T. L. Windus, J. Hammond, J. Autschbach, A. Woods,
K. Bhaskaran-Nair, J. Brabec, K. Lopata, S. A. Fischer, S. Krishnamoorthy,
M. Jacquelin, W. Ma, M. Klemm, O. Villa, Y. Chen, V. Anisimov, F. Aquino,
S. Hirata, M. T. Hackler, E. Hermes, L. Jensen, J. E. Moore, J. C. Becca,
V. Konjkov, T. Risthaus, M. Malagoli, A. Marenich, A. Otero-de-la-Roza,
J. Mullin, P. Nichols, R. Peverati, J. Pittner, Y. Zhao, P.-D. Fan,
A. Fonari, M. J. Williamson, R. J. Harrison, J. R. Rehr, M. Dupuis,
D. Silverstein, D. M. A. Smith, J. Nieplocha, V. Tipparaju, M. Krishnan,
B. E. Van Kuiken, A. Vazquez-Mayagoitia, M. Swart, Q. Wu, T. Van Voorhis,
A. A. Auer, M. Nooijen, L. D. Crosby, E. Brown, G. Cisneros, G. I. Fann,
H. Fruchtl, J. Garza, K. Hirao, R. A. Kendall, J. A. Nichols, K. Tsemekhman,
K. Wolinski, J. Anchell, D. E. Bernholdt, P. Borowski, T. Clark, D. Clerc,
H. Dachsel, M. J. O. Deegan, K. Dyall, D. Elwood, E. Glendening, M. Gutowski,
A. C. Hess, J. Jaffe, B. G. Johnson, J. Ju, R. Kobayashi, R. Kutteh, Z. Lin,
R. Littlefield, X. Long, B. Meng, T. Nakajima, S. Niu, L. Pollack, M. Rosing,
K. Glaesemann, G. Sandrone, M. Stave, H. Taylor, G. Thomas, J. H. van Lenthe,
A. T. Wong, Z. Zhang.
Total times cpu: 1.6s wall: 1.6s

View file

@ -19,7 +19,12 @@ geometry
H .566733 1.075185 -.889981
H -.423217 -1.094815 .824662
H -.423217 -1.094815 -.824662
symmetry c1
# symmetry c1
end
scf
sym off
adapt off
end
task SCF energy

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,62 @@
echo
charge 0
geometry noautoz
O 0.92504 0.99938 2.07185
O 1.68765 1.57908 -0.29568
H 3.55204 2.68516 0.28628
C 0.29661 0.89268 3.31517
C 2.11209 1.80315 2.02170
C 2.43675 2.01653 0.57987
H 0.67784 1.56486 4.44460
O -1.08891 -0.62239 2.15648
O -1.72707 -1.54708 -0.16299
H -3.68169 -2.46110 0.48375
C -0.80690 0.02845 3.35278
C -2.33997 -1.33013 2.13140
C -2.56045 -1.79603 0.72196
H -1.50976 -0.14582 4.51669
Ca 0.00000 0.00000 0.00000
O -0.92505 0.99938 -2.07185
O -1.68765 1.57908 0.29568
H -3.55205 2.68516 -0.28628
C -0.29662 0.89268 -3.31516
C -2.11210 1.80315 -2.02170
C -2.43676 2.01653 -0.57987
H -0.67784 1.56486 -4.44460
O 1.08890 -0.62239 -2.15647
O 1.72706 -1.54708 0.16299
H 3.68169 -2.46110 -0.48374
C 0.80690 0.02845 -3.35278
C 2.33996 -1.33013 -2.13140
C 2.56044 -1.79603 -0.72196
H 1.50975 -0.14582 -4.51669
H 2.97119 1.25775 2.53560
H 1.91900 2.79894 2.54200
H 1.85225 2.99521 0.59220
H -3.18534 -0.63249 2.44484
H -2.28804 -2.21902 2.84328
H -2.02490 -2.77456 0.95706
H -2.97119 1.25775 -2.53560
H -1.91901 2.79894 -2.54200
H -1.85225 2.99521 -0.59220
H 3.18533 -0.63249 -2.44484
H 2.28803 -2.21902 -2.84328
H 2.02489 -2.77456 -0.95706
end
basis "ao basis" spherical
* library def2-svp
end
dft
direct
xc cpbe96 xpbe96
adft
disp vdw 4
convergence fast
end
task dft

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,6 @@
start dimer
title "Water dimer DFT using fragment initial guess"
geometry print nocenter noautoz dimer
symmetry c1 tol 0.0
geometry print nocenter noautoz noautosym dimer
O -0.595 1.165 -0.048
H 0.110 1.812 -0.170
H -1.452 1.598 -0.154
@ -9,14 +8,12 @@ start dimer
H 0.175 -2.013 0.348
H 0.177 -0.480 0.010
end
geometry print nocenter noautoz h2o1
symmetry c1 tol 0.0
geometry print nocenter noautoz noautosym h2o1
O -0.595 1.165 -0.048
H 0.110 1.812 -0.170
H -1.452 1.598 -0.154
end
geometry print nocenter noautoz h2o2
symmetry c1 tol 0.0
geometry print nocenter noautoz noautosym h2o2
O 0.724 -1.284 0.034
H 0.175 -2.013 0.348
H 0.177 -0.480 0.010
@ -27,19 +24,26 @@ start dimer
end
set dft:no_prune true
dft
sym off
adapt off
grid xfine
tolerances tight
convergence energy 1d-9
end
set geometry h2o1
dft; vectors input atomic output h2o1.movecs; grid xfine; tolerances tight; end
dft; vectors input atomic output h2o1.movecs; end
task dft
set geometry h2o2
dft; vectors input atomic output h2o2.movecs; grid xfine; tolerances tight; end
dft; vectors input atomic output h2o2.movecs; end
task dft
set geometry dimer
dft
vectors input fragment h2o1.movecs h2o2.movecs \
output dimer.movecs; tolerances tight; grid xfine;
output dimer.movecs;
end
task dft
@ -53,23 +57,23 @@ start dimer
# Spin-paired Thomas Fermi
set geometry h2o1
dft; frozemb geometry h2o2 vectors h2o2.movecs; frozemb_ts tf; \
vectors input h2o1.movecs output h2o1.fde.movecs; odft; grid xfine; tolerances tight; end
vectors input h2o1.movecs output h2o1.fde.movecs; odft; end
task dft
# Spin-unpaired
dft; frozemb geometry h2o2 vectors h2o2.movecs; frozemb_ts tf; \
vectors input h2o1.movecs output h2o1.fde.movecs; odft; grid xfine; tolerances tight; end
vectors input h2o1.movecs output h2o1.fde.movecs; odft; end
task dft
# Spin-paired von Weisacker
set geometry h2o1
dft; frozemb geometry h2o2 vectors h2o2.movecs; frozemb_ts vw; \
vectors input h2o1.movecs output h2o1.fde.movecs; odft; grid xfine; tolerances tight; end
vectors input h2o1.movecs output h2o1.fde.movecs; odft; end
task dft
# Spin-unpaired
dft; frozemb geometry h2o2 vectors h2o2.movecs; frozemb_ts vw; \
vectors input h2o1.movecs output h2o1.fde.movecs; odft; grid xfine; tolerances tight; end
vectors input h2o1.movecs output h2o1.fde.movecs; odft; end
task dft
unset dft:frozemb

File diff suppressed because it is too large Load diff

View file

@ -11,12 +11,11 @@ basis spherical
end
set dft:no_prune T
set dft:job_grid_acc 1d-20
set dft:tol_rho 1d-30
dft
grid xfine
grid lebedev H 350 18 I 350 18
grid huge
tolerances acccoul 15
xc b3lyp
end

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -71,7 +71,7 @@ convergence energy 1e-10
end
property
localization ibo
localization ibo 2
end
task scf property

View file

@ -1,4 +1,4 @@
running on 4 processors
running on 6 processors
argument 1 = acrylic-acid.nw
@ -77,12 +77,14 @@ convergence energy 1e-10
end
property
localization ibo
localization ibo 2
end
#task scf energy
task scf property
================================================================================
@ -90,7 +92,7 @@ task scf property
Northwest Computational Chemistry Package (NWChem) 7.0.1
Northwest Computational Chemistry Package (NWChem) 7.2.0
--------------------------------------------------------
@ -98,7 +100,7 @@ task scf property
Pacific Northwest National Laboratory
Richland, WA 99352
Copyright (c) 1994-2020
Copyright (c) 1994-2022
Pacific Northwest National Laboratory
Battelle Memorial Institute
@ -123,21 +125,21 @@ task scf property
Job information
---------------
hostname = ja31
program = /home/workspace/jochena/nwchem/github-fork-ibo-devel/bin/LINUX64/nwchem
date = Thu May 5 15:37:05 2022
hostname = ja04
program = /home/workspace/jochena/nwchem/github-fork-ibovir-devel/bin/LINUX64/nwchem
date = Tue Feb 14 12:19:49 2023
compiled = Thu_May_05_15:36:59_2022
source = /home/workspace/jochena/nwchem/github-fork-ibo-devel
nwchem branch = 7.0.0
nwchem revision = nwchem_on_git-3953-g107e8544ce
ga revision = 5.8.1
use scalapack = T
compiled = Tue_Feb_14_12:19:44_2023
source = /home/workspace/jochena/nwchem/github-fork-ibovir-devel
nwchem branch = 7.2.0
nwchem revision = nwchem_on_git-4622-g8f291f7cfd
ga revision = 5.8.0
use scalapack = F
input = acrylic-acid.nw
prefix = testjob.
data base = ./testjob.db
status = startup
nproc = 3
nproc = 5
time left = -1s
@ -145,10 +147,10 @@ task scf property
Memory information
------------------
heap = 6553596 doubles = 50.0 Mbytes
stack = 6553601 doubles = 50.0 Mbytes
heap = 6553598 doubles = 50.0 Mbytes
stack = 6553595 doubles = 50.0 Mbytes
global = 13107200 doubles = 100.0 Mbytes (distinct from heap & stack)
total = 26214397 doubles = 200.0 Mbytes
total = 26214393 doubles = 200.0 Mbytes
verify = yes
hardfail = no
@ -265,7 +267,7 @@ task scf property
library name resolved from: environment
library file name is: <
/home/workspace/jochena/nwchem/github-fork-ibo-devel/src/basis/libraries/>
/home/workspace/jochena/nwchem/github-fork-ibovir-devel/src/basis/libraries/>
@ -278,7 +280,7 @@ task scf property
library name resolved from: environment
library file name is: <
/home/workspace/jochena/nwchem/github-fork-ibo-devel/src/basis/libraries/>
/home/workspace/jochena/nwchem/github-fork-ibovir-devel/src/basis/libraries/>
Basis "iao basis" -> "" (spherical)
-----
@ -502,22 +504,22 @@ task scf property
iter energy gnorm gmax time
----- ------------------- --------- --------- --------
1 -265.3310324443 1.42D+00 2.92D-01 0.2
2 -265.4360577045 4.13D-01 8.78D-02 0.4
3 -265.4514376314 3.64D-02 9.22D-03 0.8
4 -265.4516512505 1.03D-03 2.34D-04 1.3
5 -265.4516513710 7.80D-06 1.92D-06 1.9
1 -265.3310324443 1.42D+00 2.92D-01 0.1
2 -265.4360577045 4.13D-01 8.78D-02 0.2
3 -265.4514376314 3.64D-02 9.22D-03 0.4
4 -265.4516512505 1.03D-03 2.34D-04 0.6
5 -265.4516513711 7.80D-06 1.92D-06 0.9
Final RHF results
------------------
Total SCF energy = -265.451651371048
One-electron energy = -682.442839763839
Total SCF energy = -265.451651371050
One-electron energy = -682.442839763841
Two-electron energy = 255.473969802116
Nuclear repulsion energy = 161.517218590675
Time for solution = 1.8s
Time for solution = 0.9s
Final eigenvalues
@ -558,7 +560,7 @@ task scf property
-------------------------------------
Vector 6 Occ=2.000000D+00 E=-1.441125D+00
MO Center= -1.1D+00, 2.6D-02, -3.4D-17, r^2= 1.2D+00
MO Center= -1.1D+00, 2.6D-02, -2.1D-17, r^2= 1.2D+00
Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function
----- ------------ --------------- ----- ------------ ---------------
58 0.413566 5 O s 30 0.293845 3 C s
@ -566,7 +568,7 @@ task scf property
57 0.208468 5 O s 45 0.150994 4 O s
Vector 7 Occ=2.000000D+00 E=-1.338769D+00
MO Center= -9.1D-01, -4.1D-01, -2.6D-17, r^2= 1.4D+00
MO Center= -9.1D-01, -4.1D-01, 6.6D-17, r^2= 1.4D+00
Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function
----- ------------ --------------- ----- ------------ ---------------
44 0.424994 4 O s 58 -0.352816 5 O s
@ -575,7 +577,7 @@ task scf property
57 -0.176450 5 O s
Vector 8 Occ=2.000000D+00 E=-1.070923D+00
MO Center= 1.1D+00, 2.8D-01, -4.7D-17, r^2= 1.5D+00
MO Center= 1.1D+00, 2.8D-01, 3.4D-17, r^2= 1.5D+00
Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function
----- ------------ --------------- ----- ------------ ---------------
16 0.400200 2 C s 2 0.337172 1 C s
@ -583,7 +585,7 @@ task scf property
17 0.160365 2 C s
Vector 9 Occ=2.000000D+00 E=-8.974613D-01
MO Center= 2.3D-01, 2.6D-01, -9.8D-17, r^2= 3.3D+00
MO Center= 2.3D-01, 2.6D-01, -1.0D-16, r^2= 3.3D+00
Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function
----- ------------ --------------- ----- ------------ ---------------
30 -0.305983 3 C s 2 0.303431 1 C s
@ -592,7 +594,7 @@ task scf property
1 -0.152955 1 C s
Vector 10 Occ=2.000000D+00 E=-7.642057D-01
MO Center= 1.6D-01, 3.0D-01, 1.4D-16, r^2= 4.1D+00
MO Center= 1.6D-01, 3.0D-01, 5.3D-16, r^2= 4.1D+00
Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function
----- ------------ --------------- ----- ------------ ---------------
60 0.316925 5 O px 16 -0.241192 2 C s
@ -602,7 +604,7 @@ task scf property
4 0.156757 1 C px 71 0.155748 6 H s
Vector 11 Occ=2.000000D+00 E=-7.114488D-01
MO Center= 2.7D-01, 9.8D-03, -1.4D-16, r^2= 3.1D+00
MO Center= 2.7D-01, 9.8D-03, -3.3D-16, r^2= 3.1D+00
Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function
----- ------------ --------------- ----- ------------ ---------------
19 0.248395 2 C py 81 0.212079 8 H s
@ -612,7 +614,7 @@ task scf property
44 0.168207 4 O s 46 -0.165171 4 O px
Vector 12 Occ=2.000000D+00 E=-6.942998D-01
MO Center= -5.7D-01, -1.8D-01, 7.4D-17, r^2= 3.0D+00
MO Center= -5.7D-01, -1.8D-01, -2.1D-16, r^2= 3.0D+00
Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function
----- ------------ --------------- ----- ------------ ---------------
61 0.332130 5 O py 47 -0.285481 4 O py
@ -622,7 +624,7 @@ task scf property
33 0.150516 3 C py
Vector 13 Occ=2.000000D+00 E=-6.290129D-01
MO Center= -9.9D-01, 1.2D-01, 2.6D-16, r^2= 1.6D+00
MO Center= -9.9D-01, 1.2D-01, -3.2D-16, r^2= 1.6D+00
Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function
----- ------------ --------------- ----- ------------ ---------------
62 0.438625 5 O pz 65 0.308876 5 O pz
@ -630,7 +632,7 @@ task scf property
51 0.167682 4 O pz 37 0.158757 3 C pz
Vector 14 Occ=2.000000D+00 E=-6.234118D-01
MO Center= 8.0D-01, 1.3D-02, -1.6D-16, r^2= 3.8D+00
MO Center= 8.0D-01, 1.3D-02, 4.5D-16, r^2= 3.8D+00
Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function
----- ------------ --------------- ----- ------------ ---------------
4 0.334286 1 C px 76 0.262842 7 H s
@ -639,7 +641,7 @@ task scf property
18 -0.161739 2 C px
Vector 15 Occ=2.000000D+00 E=-5.982438D-01
MO Center= -2.3D-02, 2.4D-01, -5.0D-17, r^2= 3.5D+00
MO Center= -2.3D-02, 2.4D-01, -3.8D-17, r^2= 3.5D+00
Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function
----- ------------ --------------- ----- ------------ ---------------
61 0.305744 5 O py 18 0.273635 2 C px
@ -649,7 +651,7 @@ task scf property
33 -0.180575 3 C py 71 -0.170295 6 H s
Vector 16 Occ=2.000000D+00 E=-5.496397D-01
MO Center= 1.1D+00, 6.0D-02, 2.5D-17, r^2= 3.3D+00
MO Center= 1.1D+00, 6.0D-02, 3.0D-16, r^2= 3.3D+00
Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function
----- ------------ --------------- ----- ------------ ---------------
5 0.298431 1 C py 71 -0.271981 6 H s
@ -658,7 +660,7 @@ task scf property
33 0.163556 3 C py 61 -0.150120 5 O py
Vector 17 Occ=2.000000D+00 E=-4.889073D-01
MO Center= -9.0D-01, -2.5D-01, -6.7D-17, r^2= 2.0D+00
MO Center= -9.0D-01, -2.5D-01, -5.3D-16, r^2= 2.0D+00
Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function
----- ------------ --------------- ----- ------------ ---------------
62 -0.430815 5 O pz 48 0.407766 4 O pz
@ -666,7 +668,7 @@ task scf property
34 0.166236 3 C pz
Vector 18 Occ=2.000000D+00 E=-4.582158D-01
MO Center= -5.2D-01, -7.3D-01, -9.6D-17, r^2= 1.9D+00
MO Center= -5.2D-01, -7.3D-01, -1.6D-16, r^2= 1.9D+00
Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function
----- ------------ --------------- ----- ------------ ---------------
46 0.549426 4 O px 49 0.417524 4 O px
@ -674,7 +676,7 @@ task scf property
64 -0.174821 5 O py 18 0.151160 2 C px
Vector 19 Occ=2.000000D+00 E=-4.009704D-01
MO Center= 1.1D+00, 1.5D-01, -2.0D-16, r^2= 2.0D+00
MO Center= 1.1D+00, 1.5D-01, -4.1D-16, r^2= 2.0D+00
Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function
----- ------------ --------------- ----- ------------ ---------------
20 0.384445 2 C pz 6 0.352495 1 C pz
@ -682,7 +684,7 @@ task scf property
48 -0.214439 4 O pz 51 -0.173233 4 O pz
Vector 20 Occ=0.000000D+00 E= 9.067747D-02
MO Center= 8.9D-01, 1.5D-02, 2.7D-17, r^2= 3.0D+00
MO Center= 8.9D-01, 1.5D-02, 9.9D-17, r^2= 3.0D+00
Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function
----- ------------ --------------- ----- ------------ ---------------
9 0.621145 1 C pz 23 -0.459696 2 C pz
@ -692,7 +694,7 @@ task scf property
65 0.155474 5 O pz
Vector 21 Occ=0.000000D+00 E= 1.933962D-01
MO Center= -2.6D+00, 1.3D-01, -3.0D-16, r^2= 2.6D+00
MO Center= -2.6D+00, 1.3D-01, 2.0D-16, r^2= 2.6D+00
Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function
----- ------------ --------------- ----- ------------ ---------------
87 1.532433 9 H s 17 -0.762684 2 C s
@ -702,7 +704,7 @@ task scf property
60 0.181785 5 O px 3 0.180050 1 C s
Vector 22 Occ=0.000000D+00 E= 1.990748D-01
MO Center= 2.4D+00, 1.2D+00, -1.1D-16, r^2= 4.4D+00
MO Center= 2.4D+00, 1.2D+00, 5.2D-17, r^2= 4.4D+00
Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function
----- ------------ --------------- ----- ------------ ---------------
3 1.857859 1 C s 77 -1.791874 7 H s
@ -712,7 +714,7 @@ task scf property
8 0.218519 1 C py 35 0.169789 3 C px
Vector 23 Occ=0.000000D+00 E= 2.314259D-01
MO Center= 1.7D+00, -2.0D-01, -9.3D-17, r^2= 6.0D+00
MO Center= 1.7D+00, -2.0D-01, 9.0D-16, r^2= 6.0D+00
Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function
----- ------------ --------------- ----- ------------ ---------------
3 1.936960 1 C s 72 -1.805329 6 H s
@ -721,7 +723,7 @@ task scf property
8 -0.489914 1 C py 5 -0.154259 1 C py
Vector 24 Occ=0.000000D+00 E= 2.626515D-01
MO Center= 1.3D-01, -2.5D-02, -4.7D-16, r^2= 2.9D+00
MO Center= 1.3D-01, -2.5D-02, 7.6D-16, r^2= 2.9D+00
Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function
----- ------------ --------------- ----- ------------ ---------------
37 -0.804941 3 C pz 23 0.756689 2 C pz
@ -731,7 +733,7 @@ task scf property
62 0.158924 5 O pz
Vector 25 Occ=0.000000D+00 E= 2.688800D-01
MO Center= 1.9D+00, 3.8D-01, 5.4D-16, r^2= 6.9D+00
MO Center= 1.9D+00, 3.8D-01, -1.8D-15, r^2= 6.9D+00
Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function
----- ------------ --------------- ----- ------------ ---------------
77 -1.706163 7 H s 72 1.689090 6 H s
@ -741,7 +743,7 @@ task scf property
87 -0.319009 9 H s 3 -0.288918 1 C s
Vector 26 Occ=0.000000D+00 E= 3.855495D-01
MO Center= -4.6D-01, -2.3D-01, 1.1D-16, r^2= 3.7D+00
MO Center= -4.6D-01, -2.3D-01, -1.7D-16, r^2= 3.7D+00
Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function
----- ------------ --------------- ----- ------------ ---------------
31 4.026240 3 C s 45 -1.439431 4 O s
@ -751,7 +753,7 @@ task scf property
50 -0.560923 4 O py 82 -0.528079 8 H s
Vector 27 Occ=0.000000D+00 E= 4.475195D-01
MO Center= 5.8D-01, 2.5D-01, -9.4D-17, r^2= 3.9D+00
MO Center= 5.8D-01, 2.5D-01, 3.4D-16, r^2= 3.9D+00
Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function
----- ------------ --------------- ----- ------------ ---------------
21 3.533345 2 C px 3 -2.731556 1 C s
@ -761,7 +763,7 @@ task scf property
7 0.878572 1 C px 30 0.524028 3 C s
Vector 28 Occ=0.000000D+00 E= 4.523376D-01
MO Center= 1.5D+00, -1.4D-01, 9.3D-17, r^2= 4.3D+00
MO Center= 1.5D+00, -1.4D-01, -3.7D-16, r^2= 4.3D+00
Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function
----- ------------ --------------- ----- ------------ ---------------
17 6.048068 2 C s 3 -4.672145 1 C s
@ -771,7 +773,7 @@ task scf property
59 -0.983223 5 O s 36 0.975052 3 C py
Vector 29 Occ=0.000000D+00 E= 4.789847D-01
MO Center= 2.6D-01, 3.3D-01, -1.0D-16, r^2= 3.8D+00
MO Center= 2.6D-01, 3.3D-01, 2.1D-18, r^2= 3.8D+00
Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function
----- ------------ --------------- ----- ------------ ---------------
17 2.858248 2 C s 3 -2.090889 1 C s
@ -781,7 +783,7 @@ task scf property
35 0.814942 3 C px 63 0.614144 5 O px
Vector 30 Occ=0.000000D+00 E= 5.702926D-01
MO Center= 1.4D+00, 5.8D-01, 2.3D-15, r^2= 2.8D+00
MO Center= 1.4D+00, 5.8D-01, -1.9D-15, r^2= 2.8D+00
Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function
----- ------------ --------------- ----- ------------ ---------------
17 2.332617 2 C s 31 -1.303425 3 C s
@ -831,7 +833,7 @@ task scf property
2 1 1 0 0.077897 0.000000 0.000002
2 1 0 1 0.000000 0.000000 0.000000
2 0 2 0 -24.880694 0.000000 90.697964
2 0 1 1 0.000000 0.000000 0.000000
2 0 1 1 -0.000000 0.000000 0.000000
2 0 0 2 -22.450650 0.000000 0.000000
@ -842,19 +844,20 @@ task scf property
*** ORBITAL LOCALIZATION ***
****************************
IAO-IBO localization
--------------------
IAO-IBO localization
--------------------
(occ and virt orbitals)
IBO loc: largest element in C(iao, trans) S C(iao) -1: 0.000000000000
IBO loc: largest element in C(iao,T) S C(iao) -1: 0.00000000
Significant deviations from zero may indicate
elevated numerical noise in the IAO generation
IBO loc: largest element of C(MO, trans) C(MO) -1: 0.000000000000
IBO loc: largest element in C(MO,T) C(MO) -1: 0.00000000
should be zero, for CMOs in the IAO basis
iter Max. delocal Mean delocal Converge
---- ------------ ------------ ---------
---- ------------ ------------ --------
1 6.4744549430 3.2718681346 0.00D+00
2 2.9502374379 1.7407413313 7.84D-01
3 2.1535052593 1.5156908043 6.80D-01
@ -863,10 +866,10 @@ task scf property
6 2.1555070209 1.5083589529 8.63D-05
7 2.1555070209 1.5083589538 6.36D-06
8 2.1555070209 1.5083589538 9.22D-08
9 2.1555070209 1.5083589538 0.00D+00
9 2.1555070209 1.5083589538 3.73D-09
IBO loc: largest element of C(MO, trans) C(MO) -1: 0.000000000000
should be zero, for LMOs in the IAO basis
IBO loc: largest element in C(MO,T) C(MO) -1: 0.00000000
should be zero, for IBOs in the IAO basis
IAO-IBO localized orbitals
@ -890,9 +893,59 @@ task scf property
18 -0.507592 2.000 4( 0.93) 3( 0.04) 5( 0.01) 2( 0.01)
19 -0.424380 2.000 2( 0.53) 1( 0.43) 3( 0.04)
IBO localization (occ): IBOs will be stored
in file locorb.movecs, number
1 to 19
IBO loc: largest element in C(iao,T) S C(iao) -1: 0.00000000
Significant deviations from zero may indicate
elevated numerical noise in the IAO generation
non-zero singular values: 10
IBO loc: largest element in C(MO,T) C(MO) -1: 0.00000000
should be zero, for CMOs in the IAO basis
iter Max. delocal Mean delocal Converge
---- ------------ ------------ --------
1 5.7963239473 4.2732750386 0.00D+00
2 2.4941110119 2.1820228090 7.23D-01
3 2.1364906389 1.9920797446 4.32D-01
4 2.1348072188 1.9904017968 1.39D-01
5 2.1348013497 1.9903805756 9.02D-03
6 2.1348017491 1.9903804736 7.84D-04
7 2.1348017624 1.9903804751 5.13D-05
8 2.1348017624 1.9903804751 3.41D-06
9 2.1348017624 1.9903804751 2.26D-07
10 2.1348017624 1.9903804751 1.34D-08
11 2.1348017624 1.9903804751 5.27D-09
IBO loc: largest element in C(MO,T) C(MO) -1: 0.00000000
should be zero, for IBOs in the IAO basis
IAO-IBO localized orbitals
1 0.209314 0.000 1( 0.55) 2( 0.44)
2 0.251712 0.000 3( 0.64) 4( 0.25) 5( 0.07) 2( 0.03)
3 0.441767 0.000 9( 0.69) 5( 0.30)
4 0.571110 0.000 7( 0.57) 1( 0.42)
5 0.576430 0.000 6( 0.58) 1( 0.41)
6 0.588168 0.000 8( 0.57) 2( 0.42)
7 0.612417 0.000 3( 0.61) 5( 0.34) 4( 0.04)
8 0.678788 0.000 2( 0.50) 3( 0.47) 4( 0.02)
9 0.845663 0.000 3( 0.59) 4( 0.40)
10 0.862369 0.000 1( 0.50) 2( 0.50)
IBO localization (vir): IBOs will be stored
in file locorb.movecs, number
20 to 29
Exiting Localization driver routine
Task times cpu: 2.0s wall: 2.1s
Task times cpu: 1.0s wall: 1.2s
NWChem Input Module
@ -914,7 +967,7 @@ MA usage statistics:
current number of blocks 0 0
maximum number of blocks 22 14
current total bytes 0 0
maximum total bytes 139392 22511336
maximum total bytes 139376 22511288
maximum total K-bytes 140 22512
maximum total M-bytes 1 23
@ -954,10 +1007,10 @@ MA usage statistics:
-------
E. Apra, E. J. Bylaska, N. Govind, K. Kowalski, M. Valiev, D. Mejia-Rodriguez,
A. Kunitsa, N. P. Bauman, A. Panyala, W. A. de Jong, T. P. Straatsma,
H. J. J. van Dam, D. Wang, T. L. Windus, J. Hammond, J. Autschbach,
H. J. J. van Dam, D. Wang, T. L. Windus, J. Hammond, J. Autschbach, A. Woods,
K. Bhaskaran-Nair, J. Brabec, K. Lopata, S. A. Fischer, S. Krishnamoorthy,
M. Jacquelin, W. Ma, M. Klemm, O. Villa, Y. Chen, V. Anisimov, F. Aquino,
S. Hirata, M. T. Hackler, Eric Hermes, L. Jensen, J. E. Moore, J. C. Becca,
S. Hirata, M. T. Hackler, E. Hermes, L. Jensen, J. E. Moore, J. C. Becca,
V. Konjkov, T. Risthaus, M. Malagoli, A. Marenich, A. Otero-de-la-Roza,
J. Mullin, P. Nichols, R. Peverati, J. Pittner, Y. Zhao, P.-D. Fan,
A. Fonari, M. J. Williamson, R. J. Harrison, J. R. Rehr, M. Dupuis,
@ -972,4 +1025,4 @@ MA usage statistics:
K. Glaesemann, G. Sandrone, M. Stave, H. Taylor, G. Thomas, J. H. van Lenthe,
A. T. Wong, Z. Zhang.
Total times cpu: 2.0s wall: 2.1s
Total times cpu: 1.0s wall: 1.2s

View file

@ -2,7 +2,7 @@ start o2_ccca
title "O2, ccCA test"
memory stack 1000 heap 100 global 4000 mb
memory total 5000 mb global 4000 mb
geometry units au
O 0.0000000000 0.0000000000 -2.0000

View file

@ -42,7 +42,7 @@ set nwpw:minimizer 2
task pspw energy
nwpw
tolerances 1.0d-9 1.0d-9
tolerances 1d-12 1d-12
end
driver
clear

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,252 @@
##
## Real-time TDDFT QA
## rt_tddft_cytosine_cam_cdfit
##
## This will test range-separated XC and charge density fitting by
## propagating from a converged ground state in the absence of an
## external field. Since we are at a variational minimum, the dipole
## moment and energy should be time-independent and consistent with
## the DFT SCF values.
##
## Suggested checks:
## nw_rtparse -xdipole -px -c myrun.out cytosine.out
## nw_rtparse -xdipole -py -c myrun.out cytosine.out
## nw_rtparse -xdipole -pz -c myrun.out cytosine.out
## nw_rtparse -xenergy -c myrun.out cytosine.out
##
title "Cytosine CD fitting + CAM-B3LYP"
memory 1800 mb
start cytosine
echo
geometry "system" units angstroms noautosym nocenter noautoz
C -0.21392 1.48233 -2.56453
C 1.70616 2.50220 -1.71935
C 2.22400 1.26962 -1.26854
C 1.47919 0.17758 -1.49356
H -0.16957 -0.54127 -2.42952
H 2.00878 4.39665 -1.75063
H 3.23491 3.58949 -1.32727
H 3.09143 1.21549 -0.77806
H 1.72181 -0.74069 -1.17471
N 0.28958 0.27064 -2.13203
N 0.52437 2.60665 -2.33531
N 2.40270 3.63507 -1.53819
O -1.30179 1.51461 -3.16181
end
set geometry "system"
##
## H, C, N, O: cc-pvdz
##
basis spherical
H S
13.0100000 0.0196850
1.9620000 0.1379770
0.4446000 0.4781480
H S
0.1220000 1.0000000
H P
0.7270000 1.0000000
C S
6665.0000000 0.0006920 -0.0001460
1000.0000000 0.0053290 -0.0011540
228.0000000 0.0270770 -0.0057250
64.7100000 0.1017180 -0.0233120
21.0600000 0.2747400 -0.0639550
7.4950000 0.4485640 -0.1499810
2.7970000 0.2850740 -0.1272620
0.5215000 0.0152040 0.5445290
C S
0.1596000 1.0000000
C P
9.4390000 0.0381090
2.0020000 0.2094800
0.5456000 0.5085570
C P
0.1517000 1.0000000
C D
0.5500000 1.0000000
N S
9046.0000000 0.0007000 -0.0001530
1357.0000000 0.0053890 -0.0012080
309.3000000 0.0274060 -0.0059920
87.7300000 0.1032070 -0.0245440
28.5600000 0.2787230 -0.0674590
10.2100000 0.4485400 -0.1580780
3.8380000 0.2782380 -0.1218310
0.7466000 0.0154400 0.5490030
N S
0.2248000 1.0000000
N P
13.5500000 0.0399190
2.9170000 0.2171690
0.7973000 0.5103190
N P
0.2185000 1.0000000
N D
0.8170000 1.0000000
O S
11720.0000000 0.0007100 -0.0001600
1759.0000000 0.0054700 -0.0012630
400.8000000 0.0278370 -0.0062670
113.7000000 0.1048000 -0.0257160
37.0300000 0.2830620 -0.0709240
13.2700000 0.4487190 -0.1654110
5.0250000 0.2709520 -0.1169550
1.0130000 0.0154580 0.5573680
O S
0.3023000 1.0000000
O P
17.7000000 0.0430180
3.8540000 0.2289130
1.0460000 0.5087280
O P
0.2753000 1.0000000
O D
1.1850000 1.0000000
end
# ##
# ## H, C, N, O: ahlrichs coulomb fitting
# ##
basis "cd basis"
H S
9.30813000E+00 0.03446618
2.30671800E+00 0.12253380
H S
7.52012000E-01 1.0000000
H S
2.73978000E-01 1.0000000
H P
2.03270400E+00 1.0000000
H P
7.90252000E-01 1.0000000
H D
2.01954800E+00 1.0000000
C S
5.91553927E+02 0.31582020
1.72117940E+02 0.87503863
5.47992590E+01 2.30760524
C S
1.89590940E+01 1.0000000
C S
7.05993000E+00 1.0000000
C S
2.79484900E+00 1.0000000
C S
1.15863400E+00 1.0000000
C S
4.94324000E-01 1.0000000
C S
2.12969000E-01 1.0000000
C P
3.27847358E-01 1.0000000
C P
7.86833659E-01 1.0000000
C P
1.97101832E+00 1.0000000
C D
4.01330100E+00 1.0000000
C D
1.24750500E+00 1.0000000
C D
4.08148000E-01 1.0000000
C F
9.00000000E-01 1.0000000
N S
7.91076935E+02 0.41567506
2.29450184E+02 1.14750694
7.28869600E+01 3.01935767
N S
2.51815960E+01 1.0000000
N S
9.37169700E+00 1.0000000
N S
3.71065500E+00 1.0000000
N S
1.53946300E+00 1.0000000
N S
6.57553000E-01 1.0000000
N S
2.83654000E-01 1.0000000
N P
4.70739194E-01 1.0000000
N P
1.12977407E+00 1.0000000
N P
2.83008403E+00 1.0000000
N D
5.83298650E+00 1.0000000
N D
1.73268650E+00 1.0000000
N D
5.45242500E-01 1.0000000
N F
1.82648000E+00 1.0000000
O S
9.57843253E+02 0.56249624
2.81967425E+02 1.49108985
9.01998320E+01 3.86547733
O S
3.11382990E+01 1.0000000
O S
1.14937320E+01 1.0000000
O S
4.48404900E+00 1.0000000
O S
1.82350400E+00 1.0000000
O S
7.60903000E-01 1.0000000
O S
3.20292000E-01 1.0000000
O P
6.14708863E-01 1.0000000
O P
1.47530127E+00 1.0000000
O P
3.69562968E+00 1.0000000
O D
7.65267200E+00 1.0000000
O D
2.21786800E+00 1.0000000
O D
6.82337000E-01 1.0000000
O F
2.19178082E+00 1.0000000
end
##
## CAM-B3LYP with tight convergence
##
## (no need for "direct" since coulomb part done with charge density fitting)
##
dft
xc xcamb88 1.00 lyp 0.81 vwn_5 0.19 hfexch 1.00
cam 0.33 cam_alpha 0.19 cam_beta 0.46
convergence density 1d-9
tolerances tight acccoul 10
end
task dft energy
##
## No excitation, just propagate a few steps with full checking and profiling
##
rt_tddft
tmax 1.0
dt 0.2
nchecks *
checklvl 3
nrestarts 0
prof
end
task dft rt_tddft

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,115 @@
##
## Real-time TDDFT QA
## rt_tddft_tcne_spinkick
##
## This tests open shell propagation and spin-dependent excitation
## rules. Here we excite the alpha spin with a positive kick, and the
## beta spin with a negative kick.
##
## Suggested checks:
## nw_rtparse -xdipole -salpha -pz -c myrun.out tcne.out
## nw_rtparse -xdipole -sbeta -pz -c myrun.out tcne.out
## nw_rtparse -xenergy -c myrun.out tcne.out
## nw_rtparse -xS2 -c myrun.out tcne.out
##
title "Tetracyanoethylene anion"
echo
start tcne
echo
##
## optimized with cc-pvdz/B3LYP
##
geometry "system" units angstroms noautosym nocenter noautoz
C -1.77576486 0.66496556 0.00004199
N -2.94676621 0.71379797 0.00004388
C -0.36046718 0.62491168 0.00003506
C 0.36049301 -0.62492429 -0.00004895
C 1.77579907 -0.66504145 -0.00006082
N 2.94680364 -0.71382258 -0.00006592
C -0.31262746 -1.87038951 -0.00011201
N -0.85519492 -2.90926164 -0.00016331
C 0.31276207 1.87031662 0.00010870
N 0.85498782 2.90938919 0.00016857
end
set geometry "system"
##
## C, N: 6-31G
##
basis
C S
3047.5249000 0.0018347
457.3695100 0.0140373
103.9486900 0.0688426
29.2101550 0.2321844
9.2866630 0.4679413
3.1639270 0.3623120
C SP
7.8682724 -0.1193324 0.0689991
1.8812885 -0.1608542 0.3164240
0.5442493 1.1434564 0.7443083
C SP
0.1687144 1.0000000 1.0000000
N S
4173.5110000 0.0018348
627.4579000 0.0139950
142.9021000 0.0685870
40.2343300 0.2322410
12.8202100 0.4690700
4.3904370 0.3604550
N SP
11.6263580 -0.1149610 0.0675800
2.7162800 -0.1691180 0.3239070
0.7722180 1.1458520 0.7408950
N SP
0.2120313 1.0000000 1.0000000
end
charge -1
dft
mult 2
odft
xc b3lyp
end
task dft energy
##
## Excite alpha and beta spins with different kick excitations. Also
## do full checking.
##
rt_tddft
tmax 5.0
dt 0.2
nrestarts 0
nchecks *
checklvl 3
field "ka"
type delta
polarization z
max 0.001
spin alpha
end
field "kb"
type delta
polarization z
max -0.001
spin beta
end
excite "system" with "ka"
excite "system" with "kb"
end
task dft rt_tddft

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,56 @@
#
# $Id$
#
title "3 Water molecules scf with DFT hfexch"
start h2o
geometry autosym
O -0.167787 1.645761 0.108747
H 0.613411 1.102620 0.113724
H -0.093821 2.209720 -0.643619
O 1.517569 -0.667424 -0.080674
H 1.989645 -1.098799 0.612047
H 0.668397 -1.091798 -0.139744
O -1.350388 -0.964879 -0.092208
H -1.908991 -1.211298 0.626207
H -1.263787 -0.018107 -0.055536
end
basis
H library aug-cc-pvdz
O library aug-cc-pvtz
end
set dftguess t
scf
#uhf
#triplet
end
task scf
eof
driver
clear
end
set movecs:tanalyze 0d0
task dft
eof
dft
xc hfexch
end
scf
print 'final vector analysis' "final vector analysis"
end
#task dft
#eof
set forces:fakezero t
task scf optimize
eof
task dft gradient
eof
scf; print low; end
task scf optimize

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,30 @@
echo
title h2o
start h2o
geometry units bohr
symmetry c1
H -1.57866004 0.0 0.40931277
O 0.00000000 0.0 -0.81862553
H 1.57866004 0.0 0.40931277
end
basis "ao basis"
* library 6-31G
end
dft
xc slater 1.0 pw91lda 1.0
# xc slater 1.0 pw91lda 1.0 hfexch 1d-8
end
tddft
cis
nroots 10
algorithm 1
notriplet
civecs
grad
root 1
end
end
#set tddft:tdaloc .false.
task tddft gradient
task tddft gradient numerical

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,5 @@
<!---[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fnwchemgit%2Fnwchem%2Fbadge%3Fref%3Dmaster&style=flat)](https://actions-badge.atrox.dev/nwchemgit/nwchem/goto?ref=master)--->
[![NWChem_CI](https://img.shields.io/github/workflow/status/nwchemgit/nwchem/NWChem_CI)](https://github.com/nwchemgit/nwchem/actions)
[![NWChem_CI](https://img.shields.io/github/actions/workflow/status/nwchemgit/nwchem/github_actions.yml?style=plastic)](https://github.com/nwchemgit/nwchem/actions)
<!---[![Build Travis-CI Status](https://img.shields.io/travis/nwchemgit/nwchem.svg)](https://travis-ci.org/nwchemgit/nwchem/builds)--->
[![License](https://img.shields.io/badge/license-ECL2-blue.svg)](https://raw.githubusercontent.com/nwchemgit/nwchem/master/LICENSE.md)
[![Github Downloads All Releases](https://img.shields.io/github/downloads/nwchemgit/nwchem/total.svg)](https://github.com/nwchemgit/nwchem/releases)

View file

@ -141,8 +141,11 @@ jobs:
export TRAVIS_BUILD_DIR=`pwd`
unset USE_SIMINT
mytee=tee
if [[ `uname -s` == "Darwin" ]]; then mytee=gtee; fi
source travis/nwchem.bashrc; cd QA && ./doqmtests.mpi 3 | $mytee >(ts "%d%b%Y %H:%M:%S" > ../../../../doqmtests.mpi.log.` date +%b%d%Y_%H:%M`)
if [[ `uname -s` == "Darwin" ]]; then mytee=gtee; dist=Darwin; fi
if test -f "/usr/lib/os-release"; then dist=$(grep ID= /etc/os-release |grep -v VERSION|head -1 |cut -c4-| sed 's/\"//g') ; fi
if [[ $dist == "fedora" ]]; then nprocs=2; else nprocs=3 ;fi
echo nprocs is $nprocs
source travis/nwchem.bashrc; cd QA && ./doqmtests.mpi $nprocs | $mytee >(ts "%d%b%Y %H:%M:%S" > ../../../../doqmtests.mpi.log.` date +%b%d%Y_%H:%M`)
shell: bash
- name: Check if QA testing has failed
if: ${{ failure() }} && steps.qa_test.outcome == 'failure'

51
release.notes.7.2.0 Normal file
View file

@ -0,0 +1,51 @@
NWChem Version 7.2.0 Release Notes
NWChem is now available on Github at
https://github.com/nwchemgit/nwchem
Documentation available from the NWChem website at
https://nwchemgit.github.io
NWChem 7.2.0 is released as open-source under the ECL 2.0 license.
NWChem 7.2.0 will be released with the latest Global Arrays Toolkit (v5.8.2).
NEW FUNCTIONALITY
Modules:
Molecular GW with Gaussian basis
Interfaces:
* Plumed
* Libxc
* tblite
Compilation:
Added the enviroment variable USE_HWOPT: when USE_HWOPT=n all hardware (non-dynamic) optimizations are not used (e.g. gcc -march=native)
Solvation module:
* COSMO updates
Gaussian DFT module:
* New functionality: exact two-component relativistic Hamiltonian (X2C)
* New functionality: Auxiliary Density Functional Theory (ADFT) XC method
* New functionality: Resolution of Identity Time-Dependft DFT (RITDFT)
* New DFT XC functionals
- r2SCAN0
- r2scan-D3 and rscan-D3
- n12-sx
- mn15 and mn15-l
- mn12-sx and mm12-l
- revm11
- wb97, wb97-d3 and wb97x
- r2SCAN, r2SCAN-L
Basis set
* added autoaux fitting basis sets to libraries.bse
* new "bse" input option
BUG FIXES/ENHANCEMENTS
TBD

View file

@ -238,6 +238,7 @@ cd ../..
echo ln -sf simint.l${SIMINT_MAXAM}_p${PERMUTE_SLOW}_d${DERIV}.install simint_install
ln -sf simint.l${SIMINT_MAXAM}_p${PERMUTE_SLOW}_d${DERIV}.install simint_install
cd simint_install/lib
strip --strip-debug libsimint.a
ln -sf libsimint.a libnwc_simint.a
export SIMINT_HOME=${SRC_HOME}/simint.l${SIMINT_MAXAM}_p${PERMUTE_SLOW}_d${DERIV}.install
echo 'SIMINT library built with maximum angular momentum='${SIMINT_MAXAM}

View file

@ -1135,11 +1135,13 @@ c Now read the basis for this magical atom type in using
c the given tag
c
10 if (.not. inp_a(field)) field=' '
#ifdef IGNORE_HEH
c
c ignore spherical vs cartesian from bse for He/H
c since they do assign spherical when the other elements are cartesian
c
if (.not.inp_compare(.false., 'h', string(1:1))) then
#endif
if(read_sphere) then
if (inp_compare(.false., 'spherical', field)) then
if (.not. bas_set_spherical(basis, .true.))
@ -1147,7 +1149,9 @@ c
& (' bas_set_spherical failed ',911, BASIS_ERR)
endif
endif
#ifdef IGNORE_HEH
endif
#endif
if (.not. inp_read()) call errquit
$ ('bas_tag_lib: premature EOF', 0, INPUT_ERR)
c

View file

@ -19,7 +19,7 @@
# For development tree
#RELEASE :=
# For current release tree
RELEASE := 7.0.0
RELEASE := 7.2.0
#
ifndef NWCHEM_TOP
@ -243,10 +243,10 @@ endif
# specified below. Use of MPI requires substituting the tcgmsg-mpi
# wrapper for the normal tcgmsg library.
# the 2 following environmental variables are need for linking
# LIBMPI - represents the name of mpi library (with -l)
# MPI_LIB - represents the path to the mpi library
#LIBMPI = -lmpich
#MPI_LIB= /usr/local/lib
# NWLIBMPI - represents the name of mpi library (with -l)
# NWMPI_LIB - represents the path to the mpi library
#NWLIBMPI = -lmpich
#NWMPI_LIB= /usr/local/lib
#JN: under the new structure, tools should be listed first as
# their header files are needed for dependency analysis of
@ -292,9 +292,6 @@ ifdef BUILD_SCALAPACK
$(error )
endif
ifndef SCALAPACK_SIZE
SCALAPACK_SIZE=8
endif
SCALAPACK=-L$(NWCHEM_TOP)/src/libext/lib -lnwc_scalapack
endif
@ -317,15 +314,6 @@ ifdef BUILD_ELPA
endif
ifdef BUILD_MPICH
NW_CORE_SUBDIRS += libext
PATH := $(NWCHEM_TOP)/src/libext/bin:$(PATH)
MPI_INCLUDE = $(shell PATH=$(NWCHEM_TOP)/src/libext/bin:$(PATH) $(NWCHEM_TOP)/src/tools/guess-mpidefs --mpi_include)
MPI_LIB = $(shell PATH=$(NWCHEM_TOP)/src/libext/bin:$(PATH) $(NWCHEM_TOP)/src/tools/guess-mpidefs --mpi_lib)
LIBMPI = $(shell PATH=$(NWCHEM_TOP)/src/libext/bin:$(PATH) $(NWCHEM_TOP)/src/tools/guess-mpidefs --libmpi)
LIBMPI += $(shell /usr/local/bin/pkg-config --libs-only-L hwloc 2> /dev/null)
endif
ifndef EXTERNAL_GA_PATH
NW_CORE_SUBDIRS += tools
@ -1105,7 +1093,7 @@ ifeq ($(TARGET),MACX)
ifeq ($(FC),g77)
#g77, only decent one form Fink http://fink.sf.net
#gcc version 3.4 20031015 (experimental)
_G77V33= $(shell g77 -v 2>&1|egrep spec|head -n 1|awk ' /3.3/ {print "Y"}')
_G77V33= $(shell g77 -v 2>&1|grep spec|head -n 1|awk ' /3.3/ {print "Y"}')
FDEBUG= -O1 -g
FOPTIONS = -fno-second-underscore -fno-globals -Wno-globals
FOPTIMIZE = -O3 -fno-inline-functions -funroll-loops
@ -1142,7 +1130,7 @@ ifeq ($(TARGET),MACX)
GNUMAJOR=$(shell $(FC) -dM -E - < /dev/null 2> /dev/null | grep __GNUC__ |cut -c18-)
ifdef GNUMAJOR
GNUMINOR=$(shell $(FC) -dM -E - < /dev/null 2> /dev/null | egrep __GNUC_MINOR | cut -c24)
GNUMINOR=$(shell $(FC) -dM -E - < /dev/null 2> /dev/null | grep __GNUC_MINOR | cut -c24)
GNU_GE_4_6 = $(shell [ $(GNUMAJOR) -gt 4 ] || [ $(GNUMAJOR) -eq 4 -a $(GNUMINOR) -ge 6 ] && echo true)
GNU_GE_4_8 = $(shell [ $(GNUMAJOR) -gt 4 ] || [ $(GNUMAJOR) -eq 4 -a $(GNUMINOR) -ge 8 ] && echo true)
GNU_GE_6 = $(shell [ $(GNUMAJOR) -ge 6 ] && echo true)
@ -1260,8 +1248,8 @@ ifeq ($(TARGET),MACX)
ifeq ($(FC),xlf)
LDOPTIONS = -Wl,-multiply_defined -Wl,warning
else
# _GCC4= $(shell gcc -v 2>&1|egrep spec|head -n 1|awk ' / 3./ {print "N";exit}; / 2./ {print "N";exit};{print "Y"}')
_GCC4= $(shell $(CC) -dM -E - < /dev/null | egrep __VERS | cut -c22|awk ' /3/ {print "N";exit}; /2/ {print "N";exit};{print "Y"}')
# _GCC4= $(shell gcc -v 2>&1|grep spec|head -n 1|awk ' / 3./ {print "N";exit}; / 2./ {print "N";exit};{print "Y"}')
_GCC4= $(shell $(CC) -dM -E - < /dev/null | grep __VERS | cut -c22|awk ' /3/ {print "N";exit}; /2/ {print "N";exit};{print "Y"}')
ifeq ($(_GCC4),Y)
# EXTRA_LIBS +=
else
@ -1353,7 +1341,7 @@ ifeq ($(TARGET),MACX64)
GNUMAJOR=$(shell $(FC) -dM -E - < /dev/null 2> /dev/null | grep __GNUC__ |cut -c18-)
ifneq ($(strip $(GNUMAJOR)),)
GNUMINOR=$(shell $(FC) -dM -E - < /dev/null 2> /dev/null | egrep __GNUC_MINOR | cut -c24)
GNUMINOR=$(shell $(FC) -dM -E - < /dev/null 2> /dev/null | grep __GNUC_MINOR | cut -c24)
GNU_GE_4_6 = $(shell [ $(GNUMAJOR) -gt 4 -o \( $(GNUMAJOR) -eq 4 -a $(GNUMINOR) -ge 6 \) ] && echo true)
GNU_GE_4_8 = $(shell [ $(GNUMAJOR) -gt 4 -o \( $(GNUMAJOR) -eq 4 -a $(GNUMINOR) -ge 8 \) ] && echo true)
GNU_GE_6 = $(shell [ $(GNUMAJOR) -ge 6 ] && echo true)
@ -1427,11 +1415,11 @@ ifeq ($(TARGET),MACX64)
ifeq ($(FC),ifort)
_IFCV11= $(shell ifort -logo 2>&1|egrep "Version "|head -n 1|sed 's/.*Version \([0-9][0-9]\).*/\1/' | awk '{if ($$1 >= 11) {print "Y";exit}}')
_IFCV12= $(shell ifort -logo 2>&1|egrep "Version "|head -n 1|sed 's/.*Version \([0-9][0-9]\).*/\1/' | awk '{if ($$1 >= 12) {print "Y";exit}}')
_IFCV14= $(shell ifort -logo 2>&1|egrep "Version "|head -n 1|sed 's/.*Version \([0-9][0-9]\).*/\1/' | awk '{if ($$1 >= 14) {print "Y";exit}}')
_IFCV15ORNEWER=$(shell ifort -logo 2>&1|egrep "Version "|head -n 1 | sed 's/.*Version \([0-9][0-9]\).*/\1/' | awk '{if ($$1 >= 15) {print "Y";exit}}')
_IFCV17=$(shell ifort -logo 2>&1|egrep "Version "|head -n 1 | sed 's/.*Version \([0-9][0-9]\).*/\1/' | awk '{if ($$1 >= 17) {print "Y";exit}}')
_IFCV11= $(shell ifort -logo 2>&1|grep "Version "|head -n 1|sed 's/.*Version \([0-9][0-9]\).*/\1/' | awk '{if ($$1 >= 11) {print "Y";exit}}')
_IFCV12= $(shell ifort -logo 2>&1|grep "Version "|head -n 1|sed 's/.*Version \([0-9][0-9]\).*/\1/' | awk '{if ($$1 >= 12) {print "Y";exit}}')
_IFCV14= $(shell ifort -logo 2>&1|grep "Version "|head -n 1|sed 's/.*Version \([0-9][0-9]\).*/\1/' | awk '{if ($$1 >= 14) {print "Y";exit}}')
_IFCV15ORNEWER=$(shell ifort -logo 2>&1|grep "Version "|head -n 1 | sed 's/.*Version \([0-9][0-9]\).*/\1/' | awk '{if ($$1 >= 15) {print "Y";exit}}')
_IFCV17=$(shell ifort -logo 2>&1|grep "Version "|head -n 1 | sed 's/.*Version \([0-9][0-9]\).*/\1/' | awk '{if ($$1 >= 17) {print "Y";exit}}')
DEFINES += -DIFCV8 -DIFCLINUX
ifdef USE_I4FLAGS
@ -1594,7 +1582,7 @@ ifeq ($(TARGET),$(findstring $(TARGET),LINUX CYGNUS CYGWIN))
GNUMAJOR=$(shell $(FC) -dM -E - < /dev/null 2> /dev/null | grep __GNUC__ |cut -c18-)
ifdef GNUMAJOR
GNUMINOR=$(shell $(FC) -dM -E - < /dev/null 2> /dev/null | egrep __VERS | cut -c24)
GNUMINOR=$(shell $(FC) -dM -E - < /dev/null 2> /dev/null | grep __VERS | cut -c24)
GNU_GE_4_6 = $(shell [ $(GNUMAJOR) -gt 4 ] || [ $(GNUMAJOR) -eq 4 -a $(GNUMINOR) -ge 6 ] && echo true)
GNU_GE_4_8 = $(shell [ $(GNUMAJOR) -gt 4 ] || [ $(GNUMAJOR) -eq 4 -a $(GNUMINOR) -ge 8 ] && echo true)
GNU_GE_6 = $(shell [ $(GNUMAJOR) -ge 6 ] && echo true)
@ -1643,7 +1631,7 @@ ifeq ($(TARGET),$(findstring $(TARGET),LINUX CYGNUS CYGWIN))
_CPU = $(shell uname -m )
ifeq ($(FC),g77)
_G77V33= $(shell g77 -v 2>&1|egrep spec|head -n 1|awk ' /3.3/ {print "Y"}')
_G77V33= $(shell g77 -v 2>&1|grep spec|head -n 1|awk ' /3.3/ {print "Y"}')
FOPTIONS += -fno-second-underscore
FOPTIONS += -fno-f90 -ffixed-line-length-72 -ffixed-form
FOPTIMIZE += -O2 -malign-double -finline-functions
@ -1669,7 +1657,7 @@ ifeq ($(TARGET),$(findstring $(TARGET),LINUX CYGNUS CYGWIN))
_CPU=i786
else
ifeq ($(_CPU),i686)
_GOTSSE2= $(shell cat /proc/cpuinfo | egrep sse2 | tail -n 1 | awk ' /sse2/ {print "Y"}')
_GOTSSE2= $(shell cat /proc/cpuinfo | grep sse2 | tail -n 1 | awk ' /sse2/ {print "Y"}')
ifeq ($(_GOTSSE2),Y)
_CPU=i786
endif
@ -1750,7 +1738,7 @@ ifeq ($(TARGET),$(findstring $(TARGET),LINUX CYGNUS CYGWIN))
ifdef USE_DEBUG
FOPTIONS += -g
endif
_IFCV7= $(shell ifort -v 2>&1|egrep "Version "|head -n 1|awk '/7./ {print "Y"; exit}')
_IFCV7= $(shell ifort -v 2>&1|grep "Version "|head -n 1|awk '/7./ {print "Y"; exit}')
ifneq ($(_IFCV7),Y)
DEFINES+= -DIFCV8
ifeq ($(FC),ifc)
@ -2212,7 +2200,7 @@ ifneq ($(TARGET),LINUX)
else
GNUMAJOR=$(shell $(FC) -dM -E - < /dev/null 2> /dev/null | grep __GNUC__ |cut -c18-)
ifdef GNUMAJOR
GNUMINOR=$(shell $(FC) -dM -E - < /dev/null 2> /dev/null | egrep __GNUC_MINOR | cut -c24)
GNUMINOR=$(shell $(FC) -dM -E - < /dev/null 2> /dev/null | grep __GNUC_MINOR | cut -c24)
GNU_GE_4_6 = $(shell [ $(GNUMAJOR) -gt 4 ] || [ $(GNUMAJOR) -eq 4 -a $(GNUMINOR) -ge 6 ] && echo true)
GNU_GE_4_8 = $(shell [ $(GNUMAJOR) -gt 4 ] || [ $(GNUMAJOR) -eq 4 -a $(GNUMINOR) -ge 8 ] && echo true)
endif
@ -2304,9 +2292,9 @@ ifneq ($(TARGET),LINUX)
endif
ifeq ($(FC),ifort)
_IFCV9= $(shell ifort -v 2>&1|egrep "Version "|head -n 1|awk '/9./ {print "Y"}; /10./ {print "Y"; exit}')
_IFCV81= $(shell ifort -v 2>&1|egrep "Version "|head -n 1|awk ' /8.1/ {print "Y";exit}; /9./ {print "Y"; exit}; /10./ {print "Y"; exit}')
_IFCV8= $(shell ifort -v 2>&1|egrep "Version "|head -n 1|awk ' /8./ {print "Y";exit}; /9./ {print "Y"; exit}; /10./ {print "Y"; exit}')
_IFCV9= $(shell ifort -v 2>&1|grep "Version "|head -n 1|awk '/9./ {print "Y"}; /10./ {print "Y"; exit}')
_IFCV81= $(shell ifort -v 2>&1|grep "Version "|head -n 1|awk ' /8.1/ {print "Y";exit}; /9./ {print "Y"; exit}; /10./ {print "Y"; exit}')
_IFCV8= $(shell ifort -v 2>&1|grep "Version "|head -n 1|awk ' /8./ {print "Y";exit}; /9./ {print "Y"; exit}; /10./ {print "Y"; exit}')
ifeq ($(_IFCV8),Y)
DEFINES+= -DIFCV8
@ -2315,7 +2303,7 @@ ifneq ($(TARGET),LINUX)
ifeq ($(_IFCV81),Y)
DEFINES+= -DIFCV81
endif
ITANIUMNO = $(shell cat /proc/cpuinfo | egrep family | head -n 1 2>&1 | awk ' /Itanium 2/ { print "-tpp2"; exit };/Itanium/ { print "-tpp1"}')
ITANIUMNO = $(shell cat /proc/cpuinfo | grep family | head -n 1 2>&1 | awk ' /Itanium 2/ { print "-tpp2"; exit };/Itanium/ { print "-tpp1"}')
FOPTIONS += -auto -w -ftz $(ITANIUMNO)
ifdef USE_GPROF
FOPTIONS += -qp
@ -2410,20 +2398,20 @@ ifneq ($(TARGET),LINUX)
# support for traditional Intel(R) Fortran compiler
ifeq ($(_FC),ifort)
ifeq ($(shell $(CNFDIR)/check_env.sh $(USE_HWOPT)),1)
_GOTSSE3= $(shell cat /proc/cpuinfo | egrep sse3 | tail -n 1 | awk ' /sse3/ {print "Y"}')
_GOTSSE42= $(shell cat /proc/cpuinfo | egrep sse4_2 | tail -n 1 | awk ' /sse4_2/ {print "Y"}')
_GOTAVX= $(shell cat /proc/cpuinfo | egrep avx | tail -n 1 | awk ' /avx/ {print "Y"}')
_GOTAVX2= $(shell cat /proc/cpuinfo | egrep fma | tail -n 1 | awk ' /fma/ {print "Y"}')
_GOTAVX512F= $(shell cat /proc/cpuinfo | egrep avx512f | tail -n 1 | awk ' /avx512f/ {print "Y"}')
_GOTSSE3= $(shell cat /proc/cpuinfo | grep sse3 | tail -n 1 | awk ' /sse3/ {print "Y"}')
_GOTSSE42= $(shell cat /proc/cpuinfo | grep sse4_2 | tail -n 1 | awk ' /sse4_2/ {print "Y"}')
_GOTAVX= $(shell cat /proc/cpuinfo | grep avx | tail -n 1 | awk ' /avx/ {print "Y"}')
_GOTAVX2= $(shell cat /proc/cpuinfo | grep fma | tail -n 1 | awk ' /fma/ {print "Y"}')
_GOTAVX512F= $(shell cat /proc/cpuinfo | grep avx512f | tail -n 1 | awk ' /avx512f/ {print "Y"}')
endif
_IFCE = $(shell ifort -V 2>&1 |head -1 |awk ' /64/ {print "Y";exit};')
_IFCV7= $(shell ifort -v 2>&1|egrep "Version "|head -n 1|awk ' /7./ {print "Y";exit}')
_IFCV11= $(shell ifort -logo 2>&1|egrep "Version "|head -n 1|sed 's/.*Version \([0-9][0-9]\).*/\1/' | awk '{if ($$1 >= 11) {print "Y";exit}}')
_IFCV12= $(shell ifort -logo 2>&1|egrep "Version "|head -n 1|sed 's/.*Version \([0-9][0-9]\).*/\1/' | awk '{if ($$1 >= 12) {print "Y";exit}}')
_IFCV14= $(shell ifort -logo 2>&1|egrep "Version "|head -n 1|sed 's/.*Version \([0-9][0-9]\).*/\1/' | awk '{if ($$1 >= 14) {print "Y";exit}}')
_IFCV15ORNEWER=$(shell ifort -logo 2>&1|egrep "Version "|head -n 1 | sed 's/.*Version \([0-9][0-9]\).*/\1/' | awk '{if ($$1 >= 15) {print "Y";exit}}')
_IFCV17=$(shell ifort -logo 2>&1|egrep "Version "|head -n 1 | sed 's/.*Version \([0-9][0-9]\).*/\1/' | awk '{if ($$1 >= 17) {print "Y";exit}}')
_IFCV18=$(shell ifort -logo 2>&1|egrep "Version "|head -n 1 | sed 's/.*Version \([0-9][0-9]\).*/\1/' | awk '{if ($$1 >= 18) {print "Y";exit}}')
_IFCV7= $(shell ifort -v 2>&1|grep "Version "|head -n 1|awk ' /7./ {print "Y";exit}')
_IFCV11= $(shell ifort -logo 2>&1|grep "Version "|head -n 1|sed 's/.*Version \([0-9][0-9]\).*/\1/' | awk '{if ($$1 >= 11) {print "Y";exit}}')
_IFCV12= $(shell ifort -logo 2>&1|grep "Version "|head -n 1|sed 's/.*Version \([0-9][0-9]\).*/\1/' | awk '{if ($$1 >= 12) {print "Y";exit}}')
_IFCV14= $(shell ifort -logo 2>&1|grep "Version "|head -n 1|sed 's/.*Version \([0-9][0-9]\).*/\1/' | awk '{if ($$1 >= 14) {print "Y";exit}}')
_IFCV15ORNEWER=$(shell ifort -logo 2>&1|grep "Version "|head -n 1 | sed 's/.*Version \([0-9][0-9]\).*/\1/' | awk '{if ($$1 >= 15) {print "Y";exit}}')
_IFCV17=$(shell ifort -logo 2>&1|grep "Version "|head -n 1 | sed 's/.*Version \([0-9][0-9]\).*/\1/' | awk '{if ($$1 >= 17) {print "Y";exit}}')
_IFCV18=$(shell ifort -logo 2>&1|grep "Version "|head -n 1 | sed 's/.*Version \([0-9][0-9]\).*/\1/' | awk '{if ($$1 >= 18) {print "Y";exit}}')
# Intel EM64T is required
ifneq ($(_IFCE),Y)
@ -2456,12 +2444,12 @@ ifneq ($(TARGET),LINUX)
#
ifeq ($(_IFCV15ORNEWER), Y)
IFORTVER=$(shell ifort -v 2>&1|cut -d " " -f 3)
ifeq ($(IFORTVER),2021.7.0)
$(info )
$(info ifort 2021.7.0 not validated)
$(info )
$(error )
endif
# ifeq ($(IFORTVER),2021.7.0)
# $(info )
# $(info ifort 2021.7.0 not validated)
# $(info )
# $(error )
# endif
# fpp seems to get lost with ifort 15 in the offload bit
# only use EXPLICITF for offload because otherwise we want debugging to be easy
# FOPTIONS += -Qoption,fpp,-P -Qoption,fpp,-c_com=no -allow nofpp_comments
@ -2619,7 +2607,7 @@ ifneq ($(TARGET),LINUX)
endif
ifeq ($(_CC),icc)
ICCV15ORNEWER=$(shell icc -V 2>&1|egrep "Version "|head -n 1 | sed 's/.*Version \([0-9][0-9]\).*/\1/' | awk '{if ($$1 >= 15) {print "Y";exit}}')
ICCV15ORNEWER=$(shell icc -V 2>&1|grep "Version "|head -n 1 | sed 's/.*Version \([0-9][0-9]\).*/\1/' | awk '{if ($$1 >= 15) {print "Y";exit}}')
ifdef USE_KNL
COPTIONS += -xMIC-AVX512 -ftz
DEFINES+= -DINTEL_64ALIGN
@ -3317,7 +3305,7 @@ ifeq ($(BUILDING_PYTHON),python)
ifndef GOT_PYTHONCONFIG
PYMAJOR:=$(word 1, $(subst ., ,$(PYTHONVERSION)))
errorpythonconfig:$
errorpythonconfig:
$(info )
$(info python-config not found in your PATH)
$(info Please install the packages)
@ -3455,14 +3443,6 @@ else
CORE_LIBS += $(BLASOPT)
endif
ifdef NWCHEM_LINK_CUDA
ifeq ($(_FC),pgf90)
CORE_LIBS += -acc -cuda -cudalib=cublas
endif
ifeq ($(_FC),gfortran)
CORE_LIBS += -fopenacc -lcublas
endif
endif
ifdef BLASOPT
@ -3532,39 +3512,97 @@ endif
ifdef USE_MPI
#ifeq ($(FC),$(findstring $(FC),mpifrt mpfort mpif77 mpxlf mpif90 ftn scorep-ftn))
ifeq ($(FC),$(findstring $(FC), ftn scorep-ftn))
LIBMPI =
MPI_INCLUDE =
MPI_LIB =
else
NWLIBMPI =
NWMPI_INCLUDE =
NWMPI_LIB =
else ifdef BUILD_MPICH
NW_CORE_SUBDIRS += libext
PATH := $(NWCHEM_TOP)/src/libext/bin:$(PATH)
NWMPI_INCLUDE = $(shell PATH=$(NWCHEM_TOP)/src/libext/bin:$(PATH) $(NWCHEM_TOP)/src/tools/guess-mpidefs --mpi_include)
NWMPI_LIB = $(shell PATH=$(NWCHEM_TOP)/src/libext/bin:$(PATH) $(NWCHEM_TOP)/src/tools/guess-mpidefs --mpi_lib)
NWLIBMPI = $(shell PATH=$(NWCHEM_TOP)/src/libext/bin:$(PATH) $(NWCHEM_TOP)/src/tools/guess-mpidefs --libmpi)
NWLIBMPI += $(shell pkg-config --libs-only-L hwloc 2> /dev/null)
ifeq ($(NWCHEM_TARGET),MACX64)
GOT_BREW = $(shell command -v brew 2> /dev/null)
ifdef GOT_BREW
NWLIBMPI += -L$(shell brew --prefix)/lib
endif
endif
else ifdef FORCE_MPI_ENV
ifndef MPI_INCLUDE
# check if mpif90 is present
MPIF90YN = $(shell $(NWCHEM_TOP)/src/tools/guess-mpidefs --mpi_include)
ifeq ($(MPIF90YN),mpif90notfound)
errormpif90:
$(info )
$(info mpif90 not found. Please add its location to PATH)
$(info e.g. export PATH=/usr/local/bin:/usr/lib64/openmpi/bin:...)
$(info )
endif
MPI_INCLUDE = $(shell $(NWCHEM_TOP)/src/tools/guess-mpidefs --mpi_include)
errormpi1:
$(info )
$(info FORCE_MPI_ENV set but MPI_INCLUDE not set)
$(info )
$(error )
else
NWMPI_INCLUDE = $(MPI_INCLUDE)
endif
ifndef MPI_LIB
MPI_LIB = $(shell $(NWCHEM_TOP)/src/tools/guess-mpidefs --mpi_lib)
endif
errormpi2:
$(info )
$(info FORCE_MPI_ENV set but MPI_LIB not set)
$(info )
$(error )
else
NWMPI_LIB = $(MPI_LIB)
endif
ifndef LIBMPI
LIBMPI = $(shell $(NWCHEM_TOP)/src/tools/guess-mpidefs --libmpi)
errormpi3:
$(info )
$(info FORCE_MPI_ENV set but LIBMPI not set)
$(info )
$(error )
else
NWLIBMPI = $(LIBMPI)
endif
else
ifeq ($(shell pwd), $(NWCHEM_TOP)/src)
ifndef FORCE_MPI_ENV
ifdef LIBMPI
$(info ***warning LIBMPI ignored since FORCE_MPI_ENV not set***)
endif
ifdef MPI_LIB
$(info ***warning MPI_LIB ignored since FORCE_MPI_ENV not set***)
endif
ifdef MPI_INCLUDE
$(info ***warning MPI_INCLUDE ignored since FORCE_MPI_ENV not set***)
endif
endif
endif
# check if mpif90 is present
MPIF90YN = $(shell $(NWCHEM_TOP)/src/tools/guess-mpidefs --mpi_include)
ifeq ($(MPIF90YN),mpif90notfound)
errormpif90:
$(info )
$(info mpif90 not found. Please add its location to PATH)
$(info e.g. export PATH=/usr/local/bin:/usr/lib64/openmpi/bin:...)
$(info )
$(error )
endif
NWMPI_INCLUDE = $(shell $(NWCHEM_TOP)/src/tools/guess-mpidefs --mpi_include)
NWMPI_LIB = $(shell $(NWCHEM_TOP)/src/tools/guess-mpidefs --mpi_lib)
NWLIBMPI = $(shell $(NWCHEM_TOP)/src/tools/guess-mpidefs --libmpi)
endif
ifdef MPI_LIB
CORE_LIBS += $(patsubst -L-L%,-L%,-L$(MPI_LIB))
ifdef NWMPI_INCLUDE
LIB_INCLUDES += $(patsubst -I-I%,-I%,-I$(NWMPI_INCLUDE))
endif
ifdef NWMPI_LIB
CORE_LIBS += $(patsubst -L-L%,-L%,-L$(NWMPI_LIB))
endif
ifdef OLD_GA
CORE_LIBS += -ltcgmsg-mpi $(LIBMPI)
CORE_LIBS += -ltcgmsg-mpi $(NWLIBMPI)
else
CORE_LIBS += $(LIBMPI)
CORE_LIBS += $(NWLIBMPI)
endif
else
errornousempi:
$(info )
$(info please set the env. variable USE_MPI)
$(info and provide a working MPI installation)
$(info )
$(error )
ifdef OLD_GA
CORE_LIBS += -ltcgmsg
else
@ -3608,13 +3646,13 @@ endif
ifdef USE_LIBXC
DEFINES += -DUSE_LIBXC
EXTRA_LIBS += -L$(NWCHEM_TOP)/src/libext/libxc/install/lib
EXTRA_LIBS += -lxcf03 -lxc
EXTRA_LIBS += -lnwc_xcf03 -lnwc_xc
endif
# we use an external libxc library out of LIBXC_DIR
ifdef LIBXC_DIR
ifdef LIBXC_LIB
DEFINES += -DUSE_LIBXC
EXTRA_LIBS += -L$(LIBXC_DIR)/lib
EXTRA_LIBS += -L$(LIBXC_LIB)
EXTRA_LIBS += -lxcf03 -lxc
endif
@ -3636,7 +3674,7 @@ ifdef BUILD_PLUMED
LD_LIBRARY_PATH := $(NWCHEM_TOP)/src/libext/lib:$(LD_LIBRARY_PATH)
DEFINES += -DUSE_PLUMED
PLUMED_HOME=$(NWCHEM_TOP)/src/libext
PLUMED_DYNAMIC_LIBS=$(shell test -x $(NWCHEM_TOP)/src/libext/bin/plumed && $(NWCHEM_TOP)/src/libext/bin/plumed info --configuration|egrep DYNAMIC_LIBS| cut -c 14-)
PLUMED_DYNAMIC_LIBS=$(shell test -x $(NWCHEM_TOP)/src/libext/bin/plumed && $(NWCHEM_TOP)/src/libext/bin/plumed info --configuration|grep DYNAMIC_LIBS| cut -c 14-)
PLUMED_HASMPI = $(shell test -x $(NWCHEM_TOP)/src/libext/bin/plumed && $(NWCHEM_TOP)/src/libext/bin/plumed info --configuration|grep program_can_run_mpi|cut -c 21-21)
endif
ifdef USE_PLUMED
@ -3650,8 +3688,8 @@ ifdef USE_PLUMED
$(info Please add to your PATH the directory where the plumed command is found )
$(info )
endif
PLUMED_HOME = $(shell plumed info --configuration|egrep prefix=|head -1|cut -c 8-)
PLUMED_DYNAMIC_LIBS = $(shell plumed info --configuration|egrep DYNAMIC_LIBS| cut -c 14-)
PLUMED_HOME = $(shell plumed info --configuration|grep prefix=|head -1|cut -c 8-)
PLUMED_DYNAMIC_LIBS = $(shell plumed info --configuration|grep DYNAMIC_LIBS| cut -c 14-)
PLUMED_HASMPI = $(plumed info --configuration|grep program_can_run_mpi|cut -c 21-21)
#PLUMED_LOAD= /home/edo/tahoma/apps/plumed262.intel20u2/lib/libplumed.a -ldl -lstdc++ -lfftw3 -lz -ldl -llapack -lblas -rdynamic -Wl,-Bsymbolic -fopenmp
ifndef PLUMED_DYNAMIC_LIBS
@ -3737,6 +3775,7 @@ ifdef TCE_OPENACC
FOPTIONS += -acc
LDOPTIONS += -acc
endif
NWCHEM_LINK_CUDA=1
endif
ifndef HIP
@ -3753,6 +3792,15 @@ ifdef USE_F90_ALLOCATABLE
DEFINES += -DUSE_F90_ALLOCATABLE
endif
ifdef NWCHEM_LINK_CUDA
ifeq ($(_FC),pgf90)
CORE_LIBS += -acc -cuda -cudalib=cublas
endif
ifeq ($(_FC),gfortran)
CORE_LIBS += -fopenacc -lcublas
endif
endif
ifdef GWCMPLX
ifdef GWEN
errorgw:
@ -3884,8 +3932,24 @@ ifeq ($(shell echo $(BLASOPT) |awk '/lblas/ {print "Y"; exit}'),Y)
DEFINES += -DBLAS_NOTHREADS
endif
ifndef BLAS_SIZE
LIB_DEFINES += -DUSE_INTEGER8
ifneq ($(or $(SCALAPACK),$(SCALAPACK_LIB)),)
ifndef SCALAPACK_SIZE
$(info )
$(info You must set)
$(info SCALAPACK_SIZE)
$(info )
$(error )
endif
endif
ifneq ($(or $(BLASOPT),$(BLAS_LIB)),)
ifndef BLAS_SIZE
$(info )
$(info You must set)
$(info BLAS_SIZE)
$(info see https://nwchemgit.github.io/Compiling-NWChem.html#how-to-deal-with-integer-size-of-linear-algebra-libraries)
$(info )
$(error )
endif
endif
ifeq ($(BLAS_SIZE),8)
LIB_DEFINES += -DUSE_INTEGER8
@ -3969,7 +4033,7 @@ ifndef FLINT
ifdef TCE_CUDA
ifdef USE_TTLG
CUDA_VERS_GE8=$(shell nvcc --version|egrep rel| awk '/release 9/ {print "Y";exit}; /release 8/ {print "Y";exit};{print "N"}')
CUDA_VERS_GE8=$(shell nvcc --version|grep rel| awk '/release 9/ {print "Y";exit}; /release 8/ {print "Y";exit};{print "N"}')
ifeq ($(CUDA_VERS_GE8),N)
CUDA_FLAGS = -O3 -Xcompiler -std=c++11 -DNOHTIME -Xptxas --warn-on-spills $(CUDA_ARCH)
else

View file

@ -18,6 +18,11 @@
integer ijshell, ilo, ihi, jlo, jhi
integer l_buf, l_scr
integer k_buf, k_scr
logical do_mirr
logical util_mirrmat
external util_mirrmat
integer g_x_mirr,g_y_mirr,g_z_mirr
integer g_x_org,g_y_org,g_z_org
!
double precision center(3)
!
@ -27,6 +32,34 @@
call ga_zero(g_x)
call ga_zero(g_y)
call ga_zero(g_z)
g_x_mirr=0
g_y_mirr=0
g_z_mirr=0
do_mirr=util_mirrmat(1,g_x,g_x_mirr,
D .false., .true.)
do_mirr=do_mirr.and.util_mirrmat(1,g_y,g_y_mirr,
D .false., .true.)
do_mirr=do_mirr.and.util_mirrmat(1,g_z,g_z_mirr,
D .false., .true.)
if(do_mirr) then
g_x_org=g_x
g_x=g_x_mirr
g_y_org=g_y
g_y=g_y_mirr
g_z_org=g_z
g_z=g_z_mirr
else
if(g_x_mirr.ne.0) then
if(.not.ga_destroy(g_x_mirr))call errquit(
$ 'could not destroy mirrx handle',1, GA_ERR)
endif
if(g_y_mirr.ne.0) then
if(.not.ga_destroy(g_y_mirr))call errquit(
$ 'could not destroy mirry handle',1, GA_ERR)
endif
endif
if(oscfps) call pstat_on(ps_int_dip)
!
! grab basis set info type stuff
@ -65,7 +98,8 @@
!
! get the integrals we want
!
call int_mpole(ibas, ishell, jbas, jshell,
! call int_mpole(ibas, ishell, jbas, jshell,
call int_mpole(jbas, jshell, ibas, ishell,
$ 1,
$ center,
$ mscratch, dbl_mb(k_scr), max1e, dbl_mb(k_buf))
@ -84,6 +118,20 @@
if(.not.MA_pop_stack(l_buf))
$ call errquit('int_dip_ga:pop failed',0, MA_ERR)
!
if (do_mirr) then
g_x=g_x_org
call util_mirrmerge(g_x_mirr,g_x)
if(.not.ga_destroy(g_x_mirr))call errquit(
$ 'could not destroy g_x_mirr handle',1, GA_ERR)
g_y=g_y_org
call util_mirrmerge(g_y_mirr,g_y)
if(.not.ga_destroy(g_y_mirr))call errquit(
$ 'could not destroy g_y_mirr handle',1, GA_ERR)
g_z=g_z_org
call util_mirrmerge(g_z_mirr,g_z)
if(.not.ga_destroy(g_z_mirr))call errquit(
$ 'could not destroy g_x_mirr handle',1, GA_ERR)
endif
call ga_sync()
!
if (util_print('multipole', print_debug)) then
@ -101,15 +149,16 @@
implicit none
#include "global.fh"
integer g_x, g_y, g_z, ilo, ihi, jlo, jhi
double precision buf(jlo:jhi,3,ilo:ihi)
! double precision buf(jlo:jhi,3,ilo:ihi)
double precision buf(ilo:ihi,3,jlo:jhi)
integer i, j
do i = ilo,ihi
c do i = ilo,ihi
do j = jlo, jhi
call ga_put(g_x,i,i,j,j,buf(j,1,i),1)
call ga_put(g_y,i,i,j,j,buf(j,2,i),1)
call ga_put(g_z,i,i,j,j,buf(j,3,i),1)
call ga_put(g_x,ilo,ihi,j,j,buf(ilo,1,j),1)
call ga_put(g_y,ilo,ihi,j,j,buf(ilo,2,j),1)
call ga_put(g_z,ilo,ihi,j,j,buf(ilo,3,j),1)
end do
end do
c end do
end
subroutine int_qdr_ga(ibas, jbas, g_xx, g_xy, g_xz,

View file

@ -276,9 +276,9 @@ c
gamma_tol = 1d-10
c
if (ga_nodeid() .eq. 0) then
write(6,2)
2 format(/10x,' iter Max. delocal Mean delocal Converge'/
$ 10x,' ---- ------------ ------------ ---------')
write(6,9001)
9001 format(/10x,' iter Max. delocal Mean delocal Converge'/
& 10x,' ---- ------------ ------------ --------')
call util_flush(6)
end if
c
@ -323,9 +323,9 @@ c
call ga_dgop(2, d , 1, '+')
c
if (ga_nodeid() .eq. 0) then
write(6,1) iter, dmax, d/dble(nloc), gamma_max
1 format(10x, i5, 2f15.10, 1p,d12.2,d12.2)
call util_flush(6)
write(6,'(10x, i5, 2f15.10, 1p,d12.2,d12.2)')
& iter, dmax, d/dble(nloc), gamma_max
call util_flush(6)
end if
call ga_sync
c
@ -439,8 +439,8 @@ c
end if
end do
end do
write(6,77) s, (list(a), pop(a), a=1,nlist)
77 format(i5, 100(2x,i4,'(',f5.2,')'))
write(6,9002) s, (list(a), pop(a), a=1,nlist)
9002 format(i5, 100(2x,i4,'(',f5.2,')'))
end do
call util_flush(6)
end if
@ -498,10 +498,10 @@ c
u21 = util_random(12345)
c
if (ga_nodeid() .eq. 0) then
write(6,2)
2 format(/10x,' iter Max. dipole2 Mean dipole2 Converge'/
$ 10x,' ---- ------------ ------------ ---------')
call util_flush(6)
write(6,9001)
9001 format(/10x,' iter Max. dipole2 Mean dipole2 Converge'/
& 10x,' ---- ------------ ------------ --------')
call util_flush(6)
end if
c
dprev = 0.0d0
@ -544,9 +544,9 @@ c
call ga_dgop(2, d , 1, '+')
c
if (ga_nodeid() .eq. 0) then
write(6,1) iter, dmax, d/dble(nloc), gamma_max
1 format(10x, i5, 2f17.8, 1p,2d12.2)
call util_flush(6)
write(6,'(10x, i5, 2f17.8, 1p,2d12.2)')
& iter, dmax, d/dble(nloc), gamma_max
call util_flush(6)
end if
call ga_sync
c
@ -663,8 +663,8 @@ c
end if
end do
end do
write(6,77) s, (list(a), pop(a), a=1,nlist)
77 format(i5, 100(2x,i4,'(',f5.2,')'))
write(6,9002) s, (list(a), pop(a), a=1,nlist)
9002 format(i5, 100(2x,i4,'(',f5.2,')'))
end do
call util_flush(6)
end if
@ -674,16 +674,19 @@ c
end
c
c =================================================================
c
subroutine localizeIBO(basis, minbas,
& c, nloc, iloc, nbf, nmo,
& g_c, g_smat, g_iao, mnbf, eval, occ)
c
c IAO-IBO localization
c
subroutine localizeIBO(minbas, c, g_c, nloc, nbf, mnbf,
& natoms)
c
c IBO localization. Similar to Pipek-Mezey, but in an orthonormal
c IAO basis. Analysis of the resulting IBOs is done in the calling
c routine.
c
c written by Jochen Autschbach, jochena@buffalo.edu,
c adapted from routine localizePM
implicit none
#include "errquit.fh"
#include "nwc_const.fh"
#include "mafdecls.fh"
@ -692,136 +695,92 @@ c
#include "bas.fh"
#include "util.fh"
#include "stdio.fh"
c
c Localize the nloc orbitals in iloc(*) by mixing with each other
c
integer basis, minbas, nloc, iloc(*), nbf, nmo, mnbf
double precision c(mnbf, 2), eval(nbf), occ(nbf)
integer g_c, g_smat, g_iao
integer maxat, nlist
*............................ these should be dynamically allocated ?
parameter (maxat = nw_max_atom)
integer list(maxat)
double precision pop(maxat)
integer iter, ss, s, tt, t, a, u, bflo, bfhi, natoms, geom
c subroutine arguments:
integer minbas ! minimal basis for IAOs (in)
integer nloc ! number of orbitals to localize (in)
integer nbf ! size of AO basis (in)
integer mnbf ! size of minimal basis (in)
integer natoms ! number of atoms (in)
double precision c(nbf, 2) ! memory used for MO transformations
integer g_c ! orbital coefficients in IAO basis (inout)
c local variables:
integer nlist
integer iter, s, t, a, u, bflo, bfhi, geom
double precision ast, bst, qast, qat, qas, gamma, cosg, sing, d,
& qs, dprev, tol, dmax, gamma_tol, gamma_max, tmp
double precision minval, swap
integer nrot, set, pair, neven
integer ntmp1, ntmp2
logical master, debug
integer imo, jmo, kmo
integer g_tmp1, g_tmp2, g_cibocc
character*(11) pname
character*(256) lmotrans
logical file_write_ga
external file_write_ga
integer g_tmp
character*(12) pname
c -----------------------------------------------------------------
pname = 'iao-ibo loc'
pname = 'iao-ibo iter'
master = (ga_nodeid() .eq. 0)
debug = .false. ! true, during development
if (debug.and.master) write(luout,*) 'entering '//pname
c
if (.not. bas_geom(basis, geom)) call errquit
$ (pname//': basis ', 0, BASIS_ERR)
c sanity checks, so we don't crash later:
if (.not. bas_geom(minbas, geom)) call errquit
& (pname//': minbas ', 0, BASIS_ERR)
if (.not. geom_ncent(geom, natoms)) call errquit
$ (pname//': geom',0, GEOM_ERR)
c
if (natoms.gt.maxat) call errquit
& (pname//': maxat too small ', 911, UNKNOWN_ERR)
& (pname//': geom',0, GEOM_ERR)
if (mnbf>nbf) call errquit
& (pname//': mnbf>nbf', 0, UNKNOWN_ERR)
if (nloc>nbf) call errquit
& (pname//': nloc>nbf', 0, UNKNOWN_ERR)
if (nloc>mnbf) call errquit
& (pname//': nloc>mnbf', 0, UNKNOWN_ERR)
c note sure if we need this for sure, but later we assume this
if (nloc.gt.mnbf) call errquit
& (pname//': nloc > mnbf', 66, UNKNOWN_ERR)
if (nloc.gt.nbf) call errquit
& (pname//': nloc > nbf', 66, UNKNOWN_ERR)
c DEBUG some things related to the basis function centers
c DEBUG some things related to the minimal basis centers
if (debug) then
do a = 1, natoms
if (.not. bas_ce2bfr(basis, a, bflo, bfhi))
$ call errquit('localized: basis ', 0, BASIS_ERR)
if (master) then
write(luout,'(1x,a,3i4)') 'ao basis, atom = ', a, bflo, bfhi
end if
if (.not. bas_ce2bfr(minbas, a, bflo, bfhi))
& call errquit('localized: basis ', 0, BASIS_ERR)
& call errquit(pname//': minbas', 0, BASIS_ERR)
if (master) then
write(luout,'(1x,a,3i4)') 'minbas , atom = ', a, bflo, bfhi
write(luout,'(1x,a,3i4)') 'minbas, atom = ', a, bflo, bfhi
end if
end do
end if ! debug
c transform the set of occupied MOs to be localized to the IAO basis
c via C(iao, trans) S C(MO)
if (.not. ga_create(MT_DBL, mnbf, nloc , 'loc:cibocc',
& mnbf, 0, g_cibocc)) call errquit(pname//': cibocc',0, GA_ERR)
if (.not. ga_create(MT_DBL, nbf, nloc , 'loc:tmp1',
& nbf, 0, g_tmp1)) call errquit(pname//': tmp1',0, GA_ERR)
call ga_dgemm('n', 'n', nbf, nloc, nbf,
& 1.0d0, g_smat, g_c, 0.0d0, g_tmp1)
call ga_dgemm('t', 'n', mnbf, nloc, nbf,
& 1.0d0, g_iao, g_tmp1, 0.0d0, g_cibocc)
if (.not. ga_destroy(g_tmp1))
& call errquit(pname//': ga_destroy failed g_tmp1',0, GA_ERR)
c if (debug) call ga_print(g_cibocc)
if (debug .and. master) write(luout,*) 'cibocc done'
c save a copy of the starting MOs for later
if (.not.ga_duplicate(g_cibocc, g_tmp2, 'g_tmp2')) call
& errquit(pname//': ga_dup cibocc', 0, GA_ERR)
call ga_copy(g_cibocc, g_tmp2)
c the MOs in the orthonormal IAO basis must form an orthogonal
c matrix. test that before localization, and again later
if (.not. ga_create(MT_DBL, nloc, nloc , 'loc:tmp1',
& mnbf, 0, g_tmp1)) call errquit(pname//': tmp1',0, GA_ERR)
if (.not. ga_create(MT_DBL, nloc, nloc , 'ibo:tmp',
& 0, 0, g_tmp)) call errquit(pname//': tmp',0, GA_ERR)
call ga_dgemm('t', 'n', nloc, nloc, mnbf,
& 1.0d0, g_cibocc, g_cibocc, 0.0d0, g_tmp1)
call ga_dgemm('t', 'n', nloc, nloc, mnbf,
& 1.0d0, g_c, g_c, 0.0d0, g_tmp)
call ga_add_todiag(g_tmp1, -1.0d0)
call ga_add_todiag(g_tmp, -1.0d0)
call ga_maxelt(g_tmp1, tmp)
call ga_maxelt(g_tmp, tmp)
if (master) then
write(luout,'(/1x,a,1x,f18.12)')
& 'IBO loc: largest element of C(MO, trans) C(MO) -1: ',
write(luout,'(/1x,a,1x,f18.8)')
& 'IBO loc: largest element in C(MO,T) C(MO) -1: ',
& tmp
write(luout,'(1x,a)')
& 'should be zero, for CMOs in the IAO basis'
end if
if (.not. ga_destroy(g_tmp1))
& call errquit(pname//': ga_destroy failed g_tmp1',0, GA_ERR)
if (.not. ga_destroy(g_tmp))
& call errquit(pname//': ga_destroy failed g_tmp',0, GA_ERR)
c
tol = 1d-8
gamma_tol = 1d-10
c
if (master) then
write(luout,2)
2 format(/10x,' iter Max. delocal Mean delocal Converge'/
$ 10x,' ---- ------------ ------------ ---------')
call util_flush(luout)
write(luout,9001)
9001 format(/10x,' iter Max. delocal Mean delocal Converge'/
& 10x,' ---- ------------ ------------ --------')
call util_flush(luout)
end if
c
dprev = 0.0d0
@ -832,25 +791,24 @@ c
c
c Analyze convergence by forming P
c
d = 0.0d0
dmax = 0.0d0
do ss = 1+ga_nodeid(), nloc, ga_nnodes()
s = iloc(ss)
call ga_get(g_cibocc, 1, mnbf, s, s, c(1,1), 1)
qs = 0.0d0
do a = 1, natoms
if (.not. bas_ce2bfr(minbas, a, bflo, bfhi))
& call errquit(pname//': basis ', 1, BASIS_ERR)
qas = 0.0d0
do u = bflo, bfhi
qas = qas + c(u,1)*c(u,1)
end do
qs = qs + qas**2
d = 0.0d0
dmax = 0.0d0
do s = 1+ga_nodeid(), nloc, ga_nnodes()
call ga_get(g_c, 1, mnbf, s, s, c(1,1), 1)
qs = 0.0d0
do a = 1, natoms
if (.not. bas_ce2bfr(minbas, a, bflo, bfhi))
& call errquit(pname//': basis ', 1, BASIS_ERR)
qas = 0.0d0
do u = bflo, bfhi
qas = qas + c(u,1)*c(u,1)
end do
* write(luout,*) ' ds ', s, 1.0d0/qs
dmax = max(dmax, 1.0d0/qs)
d = d + 1.0d0/qs
end do
qs = qs + qas**2
end do
* write(luout,*) ' ds ', s, 1.0d0/qs
dmax = max(dmax, 1.0d0/qs)
d = d + 1.0d0/qs
end do
c
#ifdef NWCHEM_USE_GOP_ABSMAX
call ga_dgop(1, gamma_max, 1, 'absmax')
@ -861,84 +819,77 @@ c
call ga_dgop(1, gamma_max, 1, 'max')
call ga_dgop(1, dmax, 1, 'max')
#endif
call ga_dgop(2, d , 1, '+')
call ga_dgop(2, d , 1, '+')
c
if (ga_nodeid() .eq. 0) then
write(luout,1) iter, dmax, d/dble(nloc), gamma_max
1 format(10x, i5, 2f15.10, 1p,d12.2,d12.2)
call util_flush(luout)
end if
call ga_sync
if (ga_nodeid() .eq. 0) then
write(luout,'(10x, i5, 2f15.10, 1p,d12.2,d12.2)')
& iter, dmax, d/dble(nloc), gamma_max
call util_flush(luout)
end if
call ga_sync
if (iter.gt.1 .and. gamma_max.lt.tol) goto 1000
gamma_max = 0.0d0
c Loop over pairs with as much parallelism as possible
neven = nloc + mod(nloc,2)
do set = 1, neven-1
do pair = 1+ga_nodeid(), neven/2, ga_nnodes()
call localize_pairs(neven, set, pair, s, t)
if (t .le. nloc) then
call ga_get(g_c, 1, mnbf, s, s, c(1,1), 1)
call ga_get(g_c, 1, mnbf, t, t, c(1,2), 1)
c
** if (abs(d-dprev)/dble(nloc) .lt. tol) goto 1000
** dprev = d
if (iter.gt.1 .and. gamma_max.lt.tol) goto 1000
gamma_max = 0.0d0
c Form rotation information
c
c Loop over pairs with as much parallelism as possible
ast = 0.0d0
bst = 0.0d0
do a = 1, natoms
if (.not. bas_ce2bfr(minbas, a, bflo, bfhi))
& call errquit(pname//': basis ', 2,
& BASIS_ERR)
c
neven = nloc + mod(nloc,2)
do set = 1, neven-1
do pair = 1+ga_nodeid(), neven/2, ga_nnodes()
call localize_pairs(neven, set, pair, ss, tt)
if (tt .le. nloc) then
s = iloc(ss)
t = iloc(tt)
* write(luout,*) nloc, neven, set, pair, ss, tt, s, t
call ga_get(g_cibocc, 1, mnbf, s, s, c(1,1), 1)
call ga_get(g_cibocc, 1, mnbf, t, t, c(1,2), 1)
c
c Form rotation information
c
ast = 0.0d0
bst = 0.0d0
do a = 1, natoms
if (.not. bas_ce2bfr(minbas, a, bflo, bfhi))
& call errquit(pname//': basis ', 2,
& BASIS_ERR)
c
qast = 0.0d0
qas = 0.0d0
qat = 0.0d0
do u = bflo, bfhi
qast = qast + c(u,2)*c(u,1) + c(u,1)*c(u,2)
qas = qas + c(u,1)*c(u,1)
qat = qat + c(u,2)*c(u,2)
end do
qast = qast * 0.5d0
c
c ast = ast + qast**2 - 0.25d0*(qas - qat)**2
c bst = bst + qast*(qas - qat)
tmp = -1.0d0*(qas**4 + qat**4)
tmp = tmp + 6.0d0*((qas**2 + qat**2)* qast**2)
tmp = tmp + qas**3 * qat + qas * qat**3
ast = ast + 0.25d0*tmp
tmp = 4.0d0 * qast*(qas**3 - qat**3)
bst = bst + 0.25d0*tmp
end do
c
gamma = 0.25d0*acos(-ast/sqrt(ast**2+bst**2))
gamma = sign(gamma,bst)
gamma_max = max(gamma_max, abs(gamma))
* if (iter .eq. 1 .and. abs(gamma).lt.0.01d0) then
* gamma = (util_random(0)-0.5d0)*3.14d0
* endif
c
if (abs(gamma) .gt. gamma_tol) then
nrot = nrot + 1
cosg = cos(gamma)
sing = sin(gamma)
c
c Do the rotation of C
c
call drot(mnbf, c(1,1), 1, c(1,2), 1, cosg, sing)
call ga_put(g_cibocc, 1, mnbf, s, s, c(1,1), 1)
call ga_put(g_cibocc, 1, mnbf, t, t, c(1,2), 1)
end if
end if
end do
call ga_sync
end do
qast = 0.0d0
qas = 0.0d0
qat = 0.0d0
do u = bflo, bfhi
qast = qast + c(u,2)*c(u,1) + c(u,1)*c(u,2)
qas = qas + c(u,1)*c(u,1)
qat = qat + c(u,2)*c(u,2)
end do
qast = qast * 0.5d0
c
c ast = ast + qast**2 - 0.25d0*(qas - qat)**2
c bst = bst + qast*(qas - qat)
tmp = -1.0d0*(qas**4 + qat**4)
tmp = tmp + 6.0d0*((qas**2 + qat**2)* qast**2)
tmp = tmp + qas**3 * qat + qas * qat**3
ast = ast + 0.25d0*tmp
tmp = 4.0d0 * qast*(qas**3 - qat**3)
bst = bst + 0.25d0*tmp
end do
c
gamma = 0.25d0*acos(-ast/sqrt(ast**2+bst**2))
gamma = sign(gamma,bst)
gamma_max = max(gamma_max, abs(gamma))
if (abs(gamma) .gt. gamma_tol) then
nrot = nrot + 1
cosg = cos(gamma)
sing = sin(gamma)
c
c Do the rotation of C
c
call drot(mnbf, c(1,1), 1, c(1,2), 1, cosg, sing)
call ga_put(g_c, 1, mnbf, s, s, c(1,1), 1)
call ga_put(g_c, 1, mnbf, t, t, c(1,2), 1)
end if
end if
end do
call ga_sync
end do
end do
c
1000 continue
@ -947,178 +898,29 @@ c
c the MOs in the orthonormal IAO basis must form an orthogonal
c matrix. test that after localization
if (.not. ga_create(MT_DBL, nloc, nloc , 'loc:tmp1',
& mnbf, 0, g_tmp1)) call errquit(pname//': tmp1',0, GA_ERR)
if (.not. ga_create(MT_DBL, nloc, nloc , 'ibo:tmp',
& mnbf, 0, g_tmp)) call errquit(pname//': tmp',0, GA_ERR)
call ga_dgemm('t', 'n', nloc, nloc, mnbf,
& 1.0d0, g_cibocc, g_cibocc, 0.0d0, g_tmp1)
call ga_dgemm('t', 'n', nloc, nloc, mnbf,
& 1.0d0, g_c, g_c, 0.0d0, g_tmp)
call ga_add_todiag(g_tmp1, -1.0d0)
call ga_add_todiag(g_tmp, -1.0d0)
call ga_maxelt(g_tmp1, tmp)
call ga_maxelt(g_tmp, tmp)
if (master) then
write(luout,'(/1x,a,1x,f18.12)')
& 'IBO loc: largest element of C(MO, trans) C(MO) -1: ',
write(luout,'(/1x,a,1x,f18.8)')
& 'IBO loc: largest element in C(MO,T) C(MO) -1: ',
& tmp
write(luout,'(1x,a)')
& 'should be zero, for LMOs in the IAO basis'
& 'should be zero, for IBOs in the IAO basis'
end if
c Following steps:
c 1. while we have array g_tmp1 allocated, also calculate the
c localization transform. The starting MOs were saved in g_tmp2 in
c the IAO basis
if (.not. ga_destroy(g_tmp))
& call errquit(pname//': ga_destroy failed g_tmp',0, GA_ERR)
c 2. calculate LMO energies and order the LMO set by energy
return
end
c 3. save the localization transform to a file, instead of
c generating it again in the calling routine and saving it from
c there
c 4. We then transform the CMOs to re-ordered LMOs in the
c AO basis and store the transformed MOs back in g_c
c CMOs(iao, trans) * LMOs(iao) = localization transform -> g_tmp1
call ga_dgemm('t', 'n', nloc, nloc, mnbf,
& 1.0d0, g_tmp2, g_cibocc, 0.0d0, g_tmp1)
if (.not. ga_destroy(g_tmp2))
& call errquit(pname//': ga_destroy failed g_tmp2',0, GA_ERR)
c transform MO energies. We assume that the first nloc MOs were
c localized, and that the Fock matrix was diagonal in the basis of
c input MOs. We also assume (this is tested upon entry) that
c nloc is smaller than the column sizes of arays eval, c(:,1:2)
c so we don't segfault when using c(:,:) as temp memory
do jmo = 1,nloc
call ga_get(g_tmp1, 1, nloc, jmo, jmo, c(1,1), 1)
tmp = 0.0d0
do imo = 1,nloc
tmp = tmp + eval(imo) * c(imo,1)**2
end do ! jmo
c(jmo,2) = tmp ! temp storage for transformed MO energies
end do ! imo
do imo = 1,nloc
eval(imo) = c(imo,2)
end do
c sort LMOs by energy. We'll have to do this on the master node, or
c otherwise avoid having multiple nodes working on the same data
if (master) then
do imo = 1,nloc -1
minval = eval(imo)
c find lowest eval(kmo) below eval(imo)
kmo = 0
do jmo = imo+1, nloc
if (eval(jmo).lt.minval) then
kmo = jmo
minval = eval(jmo)
end if
end do
c if kmo > 0 we swap imo and jmo
if (kmo.ne.0) then
if (debug.and.master) write(luout,*) 'swap ',imo,kmo
c swap eigenvalues
swap = eval(imo)
eval(imo) = eval(kmo)
eval(kmo) = swap
c swap columns of LMO transformation
call ga_get(g_tmp1, 1, nloc, imo, imo, c(1,1), 1)
call ga_get(g_tmp1, 1, nloc, kmo, kmo, c(1,2), 1)
call ga_put(g_tmp1, 1, nloc, imo, imo, c(1,2), 1)
call ga_put(g_tmp1, 1, nloc, kmo, kmo, c(1,1), 1)
c swap LMOs in IAO basis, for the analysis below
call ga_get(g_cibocc, 1, mnbf, imo, imo, c(1,1), 1)
call ga_get(g_cibocc, 1, mnbf, kmo, kmo, c(1,2), 1)
call ga_put(g_cibocc, 1, mnbf, imo, imo, c(1,2), 1)
call ga_put(g_cibocc, 1, mnbf, kmo, kmo, c(1,1), 1)
end if
end do
end if ! master
call ga_sync
c write transformation to scratch file
call util_file_name('lmotrans',.true.,.true.,lmotrans)
if(.not.file_write_ga(lmotrans,g_tmp1)) call errquit
& (pname//': could not write lmotrans',0, DISK_ERR)
if (debug.and.master) write (luout,*)
& pname//': lmos reordered and lmotrans written'
c transform CMOs to re-ordered LMOs
if (.not. ga_create(MT_DBL, nbf, nloc , 'loc:tmp2',
& nbf, 0, g_tmp2)) call errquit(pname//': tmp2',0, GA_ERR)
call ga_dgemm('n', 'n', nbf, nloc, nloc,
& 1.0d0, g_c, g_tmp1, 0.0d0, g_tmp2)
call ga_copy(g_tmp2, g_c)
if (debug.and.master) write (luout,*) pname//': g_c now has LMOs'
if (.not. ga_destroy(g_tmp1))
& call errquit(pname//': ga_destroy failed g_tmp1',0, GA_ERR)
if (.not. ga_destroy(g_tmp2))
& call errquit(pname//': ga_destroy failed g_tmp2',0, GA_ERR)
c Analyze localization of each MO:
c per LMO, a list of atomic populations is printed
c in decreasing magnitude, with the polulations in parentheses
if (master) then
write(luout,'(/1x,a/)') 'IAO-IBO localized orbitals'
do ss = 1, nloc
s = iloc(ss)
call ga_get(g_cibocc, 1, mnbf, s, s, c(1,1), 1)
nlist = 0
do a = 1, natoms
if (.not. bas_ce2bfr(minbas, a, bflo, bfhi))
& call errquit('localized: basis ', 3,
& BASIS_ERR)
qas = 0.0d0
do u = bflo, bfhi
qas = qas + c(u,1)*c(u,1)
end do
if (abs(qas) .gt. 0.01d0) then
nlist = nlist + 1
list(nlist) = a
pop(nlist) = qas
end if
end do
do u = 1, nlist
do t = 1, u-1
if (abs(pop(t)).lt.abs(pop(u))) then
tmp = pop(u)
pop(u) = pop(t)
pop(t) = tmp
tt = list(u)
list(u) = list(t)
list(t) = tt
end if
end do
end do
write(luout,77) s, eval(s),
& occ(s),(list(a), pop(a), a=1,nlist)
77 format(i5, 1x, f14.6,1x, f5.3, 1x,100(2x,i4,'(',f5.2,')'))
end do
write(luout,*)
call util_flush(luout)
end if
if (.not. ga_destroy(g_cibocc))
& call errquit(pname//': ga_destroy failed g_cibocc',0, GA_ERR)
if (debug.and.master) write(luout,*) 'leaving '//pname
end
c
c =================================================================
c

View file

@ -249,7 +249,8 @@ c
c create a global array to store x, y, z and x^2, y^2, z^2 for each AO
c
if (.not. ga_create(mt_dbl, 6*nbf, nbf, 'GXLM',
$ 32,32,g_xlm)) call errquit('mo_r_and_r2: g_xlm',6*nbf*nbf,
c $ 32,32,g_xlm)) call errquit('mo_r_and_r2: g_xlm',6*nbf*nbf,
$ nbf,32,g_xlm)) call errquit('mo_r_and_r2: g_xlm',6*nbf*nbf,
& GA_ERR)
c
c compute dipoles and quadrupole components for each AO
@ -301,6 +302,7 @@ c
#include "geom.fh"
#include "stdio.fh"
#include "util_params.fh"
#include "util.fh"
c
integer basis ! [input] basis
double precision center(3) ! [input] the expansion center
@ -318,6 +320,9 @@ c
integer ilo, ihi, jlo, jhi, idim, jdim, ind, i, j, l, ioff
integer l_scr, k_scr, l_mp, k_mp
integer lmax ! Maximum value of L = 2
integer clo, chi, rlo, rhi
integer type, dim1, dim2
logical doloop, oprint
c
if (.not. bas_geom(basis, geom)) call errquit
$ ('multipole: bad basis', 0, BASIS_ERR)
@ -349,11 +354,30 @@ c
& call errquit('xlm_pole: cannot allocate scratch', maxscr,
& MA_ERR)
c
call ga_distribution(g_xlm,
. ga_nodeid(), rlo, rhi, clo, chi)
doloop=.not.(rlo.eq.0.and.rhi.eq.-1.and.clo.eq.0.and.chi.eq.-1)
call ga_inquire(g_xlm, type, dim1, dim2)
oprint=(ga_nodeid() .eq. 0 .and.
$ util_print('debug_xlm_make', print_debug))
if(oprint) then
write(luout,*) ' dim1 dim2 ',dim1,dim2
write(luout,*) ' rlo rhi ',rlo,rhi
write(luout,*) ' clo chi ',clo,chi
endif
call ga_zero(g_xlm)
nproc=0
if(doloop) nproc=1
call ga_igop(65536,nproc,1,'+')
if(oprint) then
write(luout,*) ' using ',nproc,
C ' nodes out of ',ga_nnodes()
call util_flush(6)
endif
c
if (doloop) then
ijshell = -1
me = ga_nodeid()
nproc = ga_nnodes()
do ishell = 1, nshell
if (.not. bas_cn2bfr(basis, ishell, ilo, ihi)) call errquit
& ('xlm_pole: bas_cn2bfr failed for basis', basis,
@ -429,6 +453,7 @@ c
end do
end do
c
endif
call ga_sync
c
c write(LuOut,*) ' THE AO MPOLES '

View file

@ -8,7 +8,9 @@ c
#include "esp_common.fh"
#include "global.fh"
#include "msgids.fh"
#include "geom.fh"
#include "util.fh"
#include "errquit.fh"
c
real*8 x(3,natoms),q(ndim,4)
real*8 g(*)
@ -83,6 +85,7 @@ c
c
call util_file_name('xyz',.false.,.false.,xyzfil)
open(unit=lfnxyz,file=xyzfil,form='formatted',status='unknown')
#if 0
write(lfnxyz,2000) natoms
2000 format('* Coordinates in XYZ format',/,i5)
do 5 i=1,natoms
@ -90,6 +93,11 @@ c
+ (10.0d0*cau2nm*x(j,i),j=1,3),q(i,4)
2001 format(a,t3,4f12.6)
5 continue
#else
if(.not.geom_print_xyz(igeom, lfnxyz))
A call errquit(' failed geom_print_xyz',
E 0, GEOM_ERR)
#endif
close(lfnxyz)
endif
c

View file

@ -38,7 +38,7 @@ include ../config/makelib.h
FOPTIMIZE += -O0
endif
endif
ifeq ($(FC),ifort)
ifeq ($(_FC),ifort)
FOPTIONS += -save
endif
ifeq ($(_FC),xlf)

View file

@ -9,7 +9,6 @@ SHORTVERSION=2021.11.001
VERSION=new_release_2021.11.001
#https://gitlab.mpcdf.mpg.de/elpa/elpa/-/archive/new_release_2020.11.001/elpa-new_release_2020.11.001.tar.gz
echo mpif90 is `which mpif90`
export ARFLAGS=rU
if [ -f elpa-${VERSION}.tar.gz ]; then
echo "using existing" elpa-${VERSION}.tar.gz
else
@ -21,8 +20,14 @@ tar xzf elpa-${VERSION}.tar.gz
ln -sf elpa-${VERSION} elpa
cd elpa
UNAME_S=$(uname -s)
if [[ ${UNAME_S} == Linux ]]; then
export ARFLAGS=rU
fi
if [[ ${UNAME_S} == Darwin ]]; then
export FORTRAN_CPP=$(find /usr/local/Cellar/gcc/`brew list --versions gcc|cut -c 5-`/bin -name cpp*)
if [[ -z "$HOMEBREW_PREFIX" ]]; then
HOMEBREW_PREFIX=/usr/local
fi
export FORTRAN_CPP=$(find "$HOMEBREW_PREFIX"/Cellar/gcc/`brew list --versions gcc|cut -c 5-`/bin -name cpp*)
if ! [ -x "$(command -v $FORTRAN_CPP)" ]; then
echo
echo cpp from gcc homebrew missing
@ -153,7 +158,11 @@ fi
if [ ! -f configure ]; then
sh ./autogen.sh
fi
fi
# patch affinity
rm -f check_thread_affinity.patch
wget https://raw.githubusercontent.com/conda-forge/elpa-feedstock/main/recipe/check_thread_affinity.patch
patch -p2 -s -N < check_thread_affinity.patch
mkdir -p build
cd build
if [[ ! -z "${BUILD_SCALAPACK}" ]]; then
@ -197,11 +206,13 @@ unset SCALAPACK_FCFLAGS
unset SCALAPACK_LDFLAGS
echo mpif90 is `which mpif90`
echo MPIF90 is "$MPIF90"
make V=1 -j1 FC=$MPIF90 CC=$MPICC -l0.0001
make V=0 -j1 FC=$MPIF90 CC=$MPICC -l0.0001
if [[ "$?" != "0" ]]; then
echo " "
echo "Elpa compilation failed"
echo " "
echo "****** config.log *****"
cat config.log
exit 1
fi
make V=0 install

View file

@ -5,8 +5,8 @@
include ../../config/makefile.h
install/lib/libxc.a:
./build_libxc.sh
install/lib/libnwc_xc.a:
./build_libxc.sh $(LIBXC_VERSION)
LIB_TARGETS += libxc

View file

@ -7,14 +7,25 @@ check_tgz() {
[ -f $1 ] && gunzip -t $1 > /dev/null && myexit=1
echo $myexit
}
VERSION=5.2.2
if [ $# -eq 0 ]; then
VERSION=6.1.0
else
VERSION=$1
fi
VERSION_MAJOR=$(echo $VERSION | cut -d . -f 1)
if [[ "$VERSION_MAJOR" -lt 4 ]]; then
echo
echo "LIBXC unsupported version " "$VERSION"
echo "please use 4.0.0 and later versions"
echo
exit 1
fi
TGZ=libxc-${VERSION}.tar.gz
if [ `check_tgz $TGZ` == 1 ]; then
echo "using existing $TGZ"
else
echo "downloading $TGZ"
curl -L https://gitlab.com/libxc/libxc/-/archive/${VERSION}/libxc-${VERSION}.tar.gz -o $TGZ
curl -sS -L https://gitlab.com/libxc/libxc/-/archive/${VERSION}/libxc-${VERSION}.tar.gz -o $TGZ
if [ `check_tgz $TGZ` != 1 ]; then
rm -f libxc-${VERSION}.tar.gz
curl -L https://github.com/ElectronicStructureLibrary/libxc/archive/refs/tags/${VERSION}.tar.gz -o $TGZ
@ -78,7 +89,7 @@ fi
cd libxc
# patch pk09 to avoid compiler memory problems
patch -p0 -N < ../pk09.patch
#patch -p0 -N < ../pk09.patch
mkdir -p build
cd build
if [[ -z "${NWCHEM_TOP}" ]]; then
@ -100,10 +111,22 @@ else
fcflags=" "
fi
rm -rf libxc/build
if [[ "${USE_HWOPT}" == "n" ]]; then
enable_xhost_flag=OFF
else
enable_xhost_flag=ON
fi
$CMAKE -E env CFLAGS="$cflags" LDFLAGS="$ldflags" FCFLAGS="$fcflags" FFLAGS="$fcflags" \
$CMAKE -DCMAKE_INSTALL_PREFIX=${NWCHEM_TOP}/src/libext/libxc/install -DCMAKE_C_COMPILER=$CC -DENABLE_FORTRAN=ON -DCMAKE_Fortran_COMPILER=$FC -DDISABLE_KXC=OFF \
-DENABLE_XHOST="$enable_xhost_flag" \
-DENABLE_FORTRAN03=ON \
-DCMAKE_INSTALL_LIBDIR="lib" -DCMAKE_BUILD_TYPE=Release ..
make -j4 | tee make.log
make install
strip --strip-debug ../../install/lib/libxc.a
strip --strip-debug ../../install/lib/libxcf03.a
ln -sf ../../install/lib/libxc.a ../../install/lib/libnwc_xc.a
ln -sf ../../install/lib/libxcf03.a ../../install/lib/libnwc_xcf03.a

View file

@ -8,8 +8,16 @@ if [ -f OpenBLAS-${VERSION}.tar.gz ]; then
echo "using existing" OpenBLAS-${VERSION}.tar.gz
else
rm -rf OpenBLAS*
curl -L https://github.com/xianyi/OpenBLAS/archive/v${VERSION}.tar.gz -o OpenBLAS-${VERSION}.tar.gz
tries=1 ; until [ "$tries" -ge 6 ] ; do
if [ "$tries" -gt 1 ]; then sleep 9; echo attempt no. $tries ; fi
curl -L https://github.com/xianyi/OpenBLAS/archive/v${VERSION}.tar.gz -o OpenBLAS-${VERSION}.tar.gz ;
# check tar.gz integrity
gzip -t OpenBLAS-${VERSION}.tar.gz >& /dev/null
if [ $? -eq 0 ]; then break ; fi
tries=$((tries+1)) ; done
fi
gzip -t OpenBLAS-${VERSION}.tar.gz >& /dev/null
if [ $? -ne 0 ]; then echo "openBLAS tarball not ready"; rm -f OpenBLAS-${VERSION}.tar.gz; exit 1 ; fi
tar xzf OpenBLAS-${VERSION}.tar.gz
ln -sf OpenBLAS-${VERSION} OpenBLAS
cd OpenBLAS
@ -65,8 +73,10 @@ if [[ "${NWCHEM_TARGET}" == "LINUX" ]]; then
else
binary=64
fi
if [ -n "${USE_DYNAMIC_ARCH}" ]; then
FORCETARGET+="DYNAMIC_ARCH=1 DYNAMIC_OLDER=1"
if [[ -n "${USE_DYNAMIC_ARCH}" ]] || [[ "${USE_HWOPT}" == "n" ]]; then
if [[ "$arch" == "x86_64" ]]; then
FORCETARGET+="DYNAMIC_ARCH=1 DYNAMIC_OLDER=1"
fi
fi
#cray ftn wrapper
if [[ ${FC} == ftn ]]; then
@ -136,10 +146,21 @@ elif [[ -n ${FC} ]] && [[ "${FC}" == "ifort" ]] || [[ "${FC}" == "ifx" ]]; then
LAPACK_FPFLAGS_VAL=" -fp-model source -O2 -g "
else
#assuming gfortran
FORCETARGET+=' F_COMPILER=GFORTRAN '
LAPACK_FPFLAGS_VAL=" "
if [[ ${BLAS_SIZE} == 8 ]]; then
LAPACK_FLAGS_VAL+=" -fdefault-integer-8"
fi
LAPACK_FPFLAGS_VAL+=" -fdefault-integer-8"
fi
fi
if [[ -n ${CC} ]] && [[ "${CC}" == "amdclang" ]]; then
let VERSIONEQ15=$(expr `${CC} -dM -E - < /dev/null 2> /dev/null|egrep 15|grep __clang_major__ |cut -d ' ' -f 3 ` \= 15)
if [[ ${VERSIONEQ15} == 1 ]]; then
echo "amdclang 15 buggy. reduced optimization to O1"
FORCETARGET+=' COMMON_OPT=-O1'
fi
fi
if [[ -z "${FC}" ]]; then
FC=gfortran
fi
if [[ -z "${CC}" ]]; then
CC=cc
@ -179,6 +200,13 @@ else
THREADOPT="1"
MYNTS="128"
fi
# cross compilation
GOTMINGW64=$("$CC" -dM -E - </dev/null 2> /dev/null |grep MINGW64|cut -c21)
if [[ "${GOTMINGW64}" == "1" ]]; then
FORCETARGET+=HOSTCC=\"gcc\"
THREADOPT="0"
MYNTS="1"
fi
#we want openblas to use pthreads and not openmp.
#but NWChem and OpenBLAS both use USE_OPENMP
@ -187,7 +215,8 @@ if [[ ! -z "${USE_OPENMP}" ]]; then
unset USE_OPENMP
NWCHEM_USE_OPENMP=1
fi
echo make $FORCETARGET LAPACK_FPFLAGS=$LAPACK_FPFLAGS_VAL INTERFACE64=$sixty4_int BINARY=$binary NUM_THREADS=$MYNTS NO_CBLAS=1 NO_LAPACKE=1 DEBUG=0 USE_THREAD=$THREADOPT libs netlib -j4
echo FC is $FC
echo make FC=$FC $FORCETARGET LAPACK_FPFLAGS=$LAPACK_FPFLAGS_VAL INTERFACE64=$sixty4_int BINARY=$binary NUM_THREADS=$MYNTS NO_CBLAS=1 NO_LAPACKE=1 DEBUG=0 USE_THREAD=$THREADOPT libs netlib -j4
echo
echo OpenBLAS compilation in progress
echo output redirected to libext/openblas/OpenBLAS/openblas.log
@ -195,7 +224,7 @@ echo
if [[ ${_FC} == xlf ]]; then
make FC="xlf -qextname" $FORCETARGET LAPACK_FPFLAGS="$LAPACK_FPFLAGS_VAL" INTERFACE64="$sixty4_int" BINARY="$binary" NUM_THREADS=$MYNTS NO_CBLAS=1 NO_LAPACKE=1 DEBUG=0 USE_THREAD="$THREADOPT" libs netlib -j4 >& openblas.log
else
make $FORCETARGET LAPACK_FPFLAGS="$LAPACK_FPFLAGS_VAL" INTERFACE64="$sixty4_int" BINARY="$binary" NUM_THREADS=128 NO_CBLAS=1 NO_LAPACKE=1 DEBUG=0 USE_THREAD="$THREADOPT" libs netlib -j4 >& openblas.log
make FC=$FC $FORCETARGET LAPACK_FPFLAGS="$LAPACK_FPFLAGS_VAL" INTERFACE64="$sixty4_int" BINARY="$binary" NUM_THREADS=128 NO_CBLAS=1 NO_LAPACKE=1 DEBUG=0 USE_THREAD="$THREADOPT" libs netlib -j4 >& openblas.log
fi
if [[ "$?" != "0" ]]; then
tail -500 openblas.log
@ -206,6 +235,7 @@ if [[ "$?" != "0" ]]; then
fi
mkdir -p ../../lib
strip --strip-debug libopenblas*-*.a
cp libopenblas.a ../../lib/libnwc_openblas.a
#make PREFIX=. install
if [[ ! -z "${NWCHEM_USE_OPENMP}" ]]; then

View file

@ -30,7 +30,17 @@ if [[ -z "${NWCHEM_TOP}" ]]; then
fi
if [[ ! -z "${BUILD_MPICH}" ]]; then
export PATH=${NWCHEM_TOP}/src/libext/bin:$PATH
export LDFLAGS=`pkg-config --libs-only-L hwloc`
if [ -x "$(command -v pkg-config1)" ]; then
export LDFLAGS=`pkg-config --libs-only-L hwloc`
else
if [ -x "$(command -v brew)" ]; then
export LDFLAGS=-L`brew --prefix`/lib/
else
echo 'WARNING: cannot guess the location of the hwloc library'
# exit 1
fi
fi
echo LDFLAGS for hwloc is $LDFLAGS
fi
if [[ "$FC" = "ftn" ]] || [[ ! -z "$USE_CMAKE_MASTER" ]] ; then
get_cmake_master
@ -110,7 +120,13 @@ if [[ -f "scalapack-$COMMIT.tar.gz" ]]; then
else
echo "downloading" "scalapack-$COMMIT.tar.gz"
rm -f scalapack-$COMMIT.tar.gz
curl -L https://github.com/Reference-ScaLAPACK/scalapack/archive/$COMMIT.tar.gz -o scalapack-$COMMIT.tar.gz
tries=1 ; until [ "$tries" -ge 6 ] ; do
if [ "$tries" -gt 1 ]; then sleep 9; echo attempt no. $tries ; fi
curl -L https://github.com/Reference-ScaLAPACK/scalapack/archive/$COMMIT.tar.gz -o scalapack-$COMMIT.tar.gz
# check tar.gz integrity
gzip -t scalapack-$COMMIT.tar.gz >& /dev/null
if [ $? -eq 0 ]; then break ; fi
tries=$((tries+1)) ; done
fi
tar xzf scalapack-$COMMIT.tar.gz
ln -sf scalapack-$COMMIT scalapack
@ -193,6 +209,9 @@ echo MPICH_CC is "$MPICH_CC"
if [[ -z "$I_MPI_F90" ]] ; then
export I_MPI_F90="$FC"
fi
if [[ -z "$I_MPI_CC" ]] ; then
export I_MPI_CC="$CC"
fi
echo I_MPI_F90 is "$I_MPI_F90"
if [[ -z "$PE_ENV" ]] ; then
#check if mpif90 and FC are consistent
@ -282,6 +301,7 @@ if [[ "$?" != "0" ]]; then
exit 1
fi
mkdir -p ../../../lib
strip --strip-debug lib/libscalapack.a
cp lib/libscalapack.a ../../../lib/libnwc_scalapack.a
if [[ "$KNL_SWAP" == "1" ]]; then
module swap craype-haswell craype-mic-knl

View file

@ -219,5 +219,5 @@ fi
$CMAKE --install _build
cd ..
strip --strip-debug ../lib/libtblite.a
ln -sf ../lib/libtblite.a ../lib/libnwc_tblite.a

View file

@ -55,7 +55,8 @@ c
integer l_c_t, k_c_t
integer l_act, k_act, l_actsh, k_actsh
integer twopdmunit
integer junk, ninseg, ierr, i, j, ish, ishlo, ishhi, shmax, tdim
integer junk(2), ninseg, ierr, i, j, ish, ishlo, ishhi, shmax,
t tdim
integer nsh, natoms, nactive, nblock
c
integer k_scr, l_scr, k_lab, l_lab, k_eri, l_eri, leneri, lenscr
@ -482,10 +483,6 @@ c
else
call ga_copy(g_buf_trans,g_buf)
endif
cc call ga_print(g_buf_trans)
cc call ga_print(g_buf)
c call ga_sync()
c call ga_mask_sync(.true.,.false.)
call ga_sync()
c
c Now have locally (a,1:nbfpairlocal). Loop thru local shell pairs
@ -524,7 +521,6 @@ c
ptr = ptr + count*(oseg_hi-oseg_lo+1)
end do
c
cedo call ga_mask_sync(.true.,.false.)
call ga_sync
c
end do ! End of i
@ -1158,27 +1154,12 @@ c check for boundaries of buff()
write(6,*) ga_nodeid(),' i_1.gt.ihi ',i_1,ihi
call errquit(' mp2copybck: i boundary passed ',0,0)
endif
#if 0
call ga_get(g_a_trans,i_0,i_1,
A jlo,jhi,buff(i_0,jlo),i_ld)
#else
call ga_get(g_a_trans,i_0,i_1,
A jlo,jhi,buff,i_ld)
call ga_put(g_a, i_0, i_1, jlo, jhi, buff, i_ld)
#endif
enddo
endif
c everybody needs to have the buffer filled
call ga_sync()
cold if(dowork) call ga_put(g_a, ilo, ihi, jlo, jhi, buff, ihi-ilo+1)
call ga_sync()
#if 0
call ga_sync()
tr=ga_ddot(g_a,g_a)
tr_tr=ga_ddot(g_a_trans,g_a_trans)
if(abs(tr-tr_tr).gt.1d-6)then
if(ga_nodeid().eq.0)write(6,*) 'tr ',tr,' tr_tr ',tr_tr
endif
#endif
return
end

View file

@ -717,6 +717,10 @@ c
endif
endif
call pstat_on(ps_laifock)
if (doprint) then
write(6,111) ' Start laifock', util_wallsec()
call util_flush(6)
end if
call mp2_lai_fock_uhf_prepar(
$ g_p_ab_a,g_p_ab_b,g_p_ij_a,g_p_ij_b,
$ noa,nob,nva,nvb,g_tmpa, g_tmpb,nmo)
@ -725,6 +729,10 @@ c
$ noa,nob,nva,nvb,g_lai_a,g_lai_b,rtdb,tol2e_fock)
call mp2_lai_fock_uhf_tidy(g_tmpa, g_tmpb)
call pstat_off(ps_laifock)
if (doprint) then
write(6,111) ' Done laifock', util_wallsec()
call util_flush(6)
end if
c
if (omatrix) then
call ga_print(g_lai_a)
@ -782,11 +790,20 @@ c
if(.not.ga_create(mt_dbl,nmo,nmo,'tot beta dens',nmo,0,
$ g_p_tot_b))call errquit(
$ 'mp2_energy: ga_create failed',0, GA_ERR)
c
c
if (doprint) then
write(6,111) ' Start make_tot_dens', util_wallsec()
call util_flush(6)
end if
call mp2_make_tot_dens(g_p_ij_a,g_p_ij_b,g_p_ab_a,g_p_ab_b,
$ g_rhs,g_p_tot_a,g_p_tot_b,noa,nva,nob,nvb,nbf,nmo,
$ int_mb(k_map_a), int_mb(k_map_b),
$ g_vecs_a,g_vecs_b,basis,scftype)
if (doprint) then
write(6,111) ' Done make_tot_dens', util_wallsec()
call util_flush(6)
end if
c
if (otrace) then
call mp2_print_trace_norm(g_p_tot_a,'g_p_tot_a',nmo)
@ -931,6 +948,7 @@ c
endif
c
call ga_sync
111 format(a,' at ', f10.1,'s')
c
end
subroutine mp2_print_trace_norm(g, text, n)

View file

@ -333,7 +333,7 @@ c
end if
call pstat_on(ps_maket)
call mp2_make_tuhf(nbf,noa_lo,noa_hi,nva_lo,nva_hi,
call mp2_make_tuhf(rtdb,nbf,noa_lo,noa_hi,nva_lo,nva_hi,
$ sym_lo_oa,sym_hi_oa,sym_lo_va,sym_hi_va,num_oa,num_va,
$ nob_lo,nob_hi,nvb_lo,nvb_hi,sym_lo_ob,sym_hi_ob,
$ sym_lo_vb,sym_hi_vb,num_ob,num_vb,oseg_lo,oseg_hi,

View file

@ -22,6 +22,8 @@ c
double precision mp2y, scfy
double precision mp2z, scfz
double precision ndip(3)
logical ga_create_atom_blocked
external ga_create_atom_blocked
integer geom
c
if (.not. bas_cando_mpoles(basis)) return
@ -31,15 +33,9 @@ c
c
c Generate dipole integrals
c
*ga:1:0
if(.not.ga_create(mt_dbl,nbf,nbf,' ao integs x ',
$ 0,0,g_x)) call errquit('mp2_dipole: ga',0, GA_ERR)
*ga:1:0
if(.not.ga_create(mt_dbl,nbf,nbf,' ao integs y ',
$ 0,0,g_y)) call errquit('mp2_dipole: ga',0, GA_ERR)
*ga:1:0
if(.not.ga_create(mt_dbl,nbf,nbf,' ao integs z',
$ 0,0,g_z)) call errquit('mp2_dipole: ga',0, GA_ERR)
g_x = ga_create_atom_blocked(geom, basis,'ao integs x')
g_y = ga_create_atom_blocked(geom, basis,'ao integs y')
g_z = ga_create_atom_blocked(geom, basis,'ao integs z')
c
call int_init(rtdb,1,basis)
call int_dip_ga(basis, basis, g_x, g_y, g_z)
@ -48,8 +44,7 @@ c
c Generate SCF AO density
c
*ga:1:0
if(.not.ga_create(mt_dbl, nbf, nbf,' AO density ',
$ 0,0,g_dens)) call errquit('mp2_dipole: ga',0, GA_ERR)
g_dens = ga_create_atom_blocked(geom, basis,'ao density')
call ga_dgemm('n', 't', nbf, nbf, noa, 1.0d0, g_vecs_a,
$ g_vecs_a, 0.0d0, g_dens)
call ga_dgemm('n', 't', nbf, nbf, nob, 1.0d0, g_vecs_b,
@ -62,8 +57,7 @@ c
c Form the MP2 AO density
c
*ga:1:0
if(.not.ga_create(mt_dbl,nmo,nbf,'scratch',0,0,g_scratch))
$ call errquit('mp2_grad: scratch',1, GA_ERR)
g_scratch = ga_create_atom_blocked(geom, basis,'scratch')
call ga_dgemm('n','t',nmo,nbf,nmo,1.0d0,g_p_tot_a,g_vecs_a,
$ 0.0d0,g_scratch)
call ga_dgemm('n','n',nbf,nbf,nmo,1.0d0,g_vecs_a,g_scratch,

View file

@ -26,6 +26,8 @@
character*256 p_a_ao
character*256 p_b_ao
integer base
integer l_buf,k_buf
integer ilo,ihi,jlo,jhi,dowork
c
call util_file_name('p_a_ao',.true.,.true.,p_a_ao)
call util_file_name('p_b_ao',.true.,.true.,p_b_ao)
@ -48,22 +50,48 @@ c$$$ call ga_put(g_p_tot_a,i,i,a+noa,a+noa,temp,1)
c$$$ end do
c$$$ end do
c
call ga_distribution(g_p_tot_a, ga_nodeid(),
T ilo, ihi, jlo, jhi)
c check if distrib by columns
if ((ilo.eq.0).and.(ihi.eq.-1)) then
dowork=0
else
if(ilo.ne.1.and.ihi.ne.nmo) call
R errquit(' mp2maketotdens bug ',0,0)
dowork=1
endif
ioff = 0
do i = 1+ga_nodeid(),noa,ga_nnodes() ! Loop thru SCF order
if(dowork.eq.1) then
do i = 1,noa
ii = map_a(i)
if(ii.ge.jlo.and.ii.le.jhi) then
do a = 1,nva
ii = map_a(i)
aa = map_a(a+noa)-noa
ia = ioff+a+(i-1)*nva
call ga_get(g_rhs,ia,ia,1,1,xx,1)
call ga_put(g_p_tot_a,aa+noa,aa+noa,ii,ii,xx,1)
call ga_put(g_p_tot_a,ii,ii,aa+noa,aa+noa,xx,1)
end do
endif
end do
c
call ga_copy_patch('n',g_p_ij_a,1,noa,1,noa,g_p_tot_a,
$ 1,noa,1,noa)
call ga_copy_patch('n',g_p_ab_a,1,nva,1,nva,g_p_tot_a,
$ noa+1,nmo,noa+1,nmo)
if (.not. ma_push_get(mt_dbl, nmo, 'mp2: maket',
$ l_buf, k_buf)) call errquit
$ ('mp2: insufficient memory : bug ', nmo, MA_ERR)
do i=jlo,jhi
if(i.le.noa) then
call ga_get(g_p_ij_a,1,noa,i,i,dbl_mb(k_buf),noa)
call ga_put(g_p_tot_a,1,noa,i,i,dbl_mb(k_buf),noa)
else
call ga_get(g_p_ab_a,1,nva,i-noa,i-noa,dbl_mb(k_buf),nva)
call ga_put(g_p_tot_a,noa+1,nmo,i,i,dbl_mb(k_buf),nva)
endif
enddo
if (.not. ma_pop_stack(l_buf)) call errquit
$ ('mp2: pop_stack failed ', nmo, MA_ERR)
endif
call ga_mask_sync(.true.,.false.)
call ga_sync()
c
if (scftype .eq. 'UHF') then
base = (nva*noa)
@ -71,15 +99,18 @@ c
base = 0 ! Alpha is the same as beta
end if
ioff = base
do i = 1+ga_nodeid(),nob,ga_nnodes() ! Loop thru SCF order
if (dowork.eq.1) then
do i = 1,nob
ii = map_b(i)
if(ii.ge.jlo.and.ii.le.jhi) then
do a = 1,nvb
ii = map_b(i)
aa = map_b(a+nob)-nob
ia = ioff+a+(i-1)*nvb
call ga_get(g_rhs,ia,ia,1,1,xx,1)
call ga_put(g_p_tot_b,aa+nob,aa+nob,ii,ii,xx,1)
call ga_put(g_p_tot_b,ii,ii,aa+nob,aa+nob,xx,1)
end do
endif
end do
c$$$ call ga_copy_patch('n',g_rhs,base+1,base+(nvb*nob),
c$$$ $ 1,1,g_p_tot_b,nob+1,nmo,1,nob)
@ -90,11 +121,25 @@ c$$$ call ga_get(g_rhs,indx,indx,1,1,temp,1)
c$$$ call ga_put(g_p_tot_b,i,i,a+nob,a+nob,temp,1)
c$$$ end do
c$$$ end do
c
call ga_copy_patch('n',g_p_ij_b,1,nob,1,nob,g_p_tot_b,
$ 1,nob,1,nob)
call ga_copy_patch('n',g_p_ab_b,1,nvb,1,nvb,g_p_tot_b,
$ nob+1,nmo,nob+1,nmo)
c
if (.not. ma_push_get(mt_dbl, nmo, 'mp2: maket',
$ l_buf, k_buf)) call errquit
$ ('mp2: insufficient memory : bug ', nmo, MA_ERR)
do i=jlo,jhi
if(i.le.nob) then
call ga_get(g_p_ij_b,1,nob,i,i,dbl_mb(k_buf),nob)
call ga_put(g_p_tot_b,1,nob,i,i,dbl_mb(k_buf),nob)
else
call ga_get(g_p_ab_b,1,nvb,i-nob,i-nob,dbl_mb(k_buf),nvb)
call ga_put(g_p_tot_b,nob+1,nmo,i,i,dbl_mb(k_buf),nvb)
endif
enddo
if (.not. ma_pop_stack(l_buf)) call errquit
$ ('mp2: pop_stack failed ', nmo, MA_ERR)
endif
call ga_sync()
c
*ga:1:0
if(.not.ga_create(mt_dbl,nmo,nbf,'scratch',0,0,g_scratch))

View file

@ -46,7 +46,7 @@ c
call ga_copy_patch('n',g_w_ai_a,1,noa_hi,1,nva,g_w_tot_a,
$ 1, noa_hi, noa_hi+1, nmo)
c
call ga_transpose(g_w_ai_a,g_w_ai_a_tr)
call mp2_transpwai(g_w_ai_a,g_w_ai_a_tr)
call ga_copy_patch('n',g_w_ai_a_tr,1,nva,1,noa_hi,g_w_tot_a,
$ noa_hi+1,nmo,1,noa_hi)
call ga_copy_patch('n',g_w_ij_a,1,noa_hi,1,noa_hi,g_w_tot_a,
@ -55,7 +55,7 @@ c
$ noa_hi+1,nmo,noa_hi+1,nmo)
call ga_copy_patch('n',g_w_ai_b,1,nob_hi,1,nvb,g_w_tot_b,
$ 1, nob_hi, nob_hi+1,nmo)
call ga_transpose(g_w_ai_b,g_w_ai_b_tr)
call mp2_transpwai(g_w_ai_b,g_w_ai_b_tr)
call ga_copy_patch('n',g_w_ai_b_tr,1,nvb,1,nob_hi,g_w_tot_b,
$ nob_hi+1,nmo,1,nob_hi)
call ga_copy_patch('n',g_w_ij_b,1,nob_hi,1,nob_hi,g_w_tot_b,
@ -148,3 +148,44 @@ c
c
end
subroutine mp2_transpwai(g,g_tr)
implicit none
#include "mafdecls.fh"
#include "global.fh"
#include "errquit.fh"
integer g,g_tr
c
integer ilo,ihi,jlo,jhi
integer i,j
integer k_buf,l_buf
integer n_row,n_col,gtype
integer dowork
c
call ga_inquire(g_tr, gtype, n_row, n_col)
call ga_distribution(g_tr, ga_nodeid(),
T ilo, ihi, jlo, jhi)
if ((ilo.eq.0).and.(ihi.eq.-1)) then
dowork=0
else
c check if distrib by columns
if(ilo.ne.1.and.ihi.ne.n_row) call
R errquit(' mp2transpwai bug ',0,0)
dowork=1
endif
if(dowork.eq.1) then
if (.not. ma_push_get(mt_dbl, n_row, 'mp2: wdens',
$ l_buf, k_buf)) call errquit
$ ('mp2: insufficient memory : bug ', n_row, MA_ERR)
do j=jlo,jhi
call ga_get(g,j,j,1,n_row,dbl_mb(k_buf),1)
if (.not.ma_verify_allocator_stuff()) stop ' ma ck 2b'
call ga_put(g_tr,1,n_row,j,j,dbl_mb(k_buf),n_row)
if (.not.ma_verify_allocator_stuff()) stop ' ma ck 2b'
enddo
if (.not. ma_pop_stack(l_buf)) call errquit
$ ('mp2transp pop_stack failed ', n_row, MA_ERR)
endif
call ga_sync()
return
end

View file

@ -1,4 +1,4 @@
subroutine mp2_make_tuhf(nbf,noa_lo,noa_hi,nva_lo,nva_hi,
subroutine mp2_make_tuhf(rtdb,nbf,noa_lo,noa_hi,nva_lo,nva_hi,
$ sym_lo_oa,sym_hi_oa,sym_lo_va,sym_hi_va,num_oa,num_va,
$ nob_lo,nob_hi,nvb_lo,nvb_hi, sym_lo_ob,sym_hi_ob,
$ sym_lo_vb,sym_hi_vb,num_ob,num_vb,
@ -16,6 +16,7 @@
#include "rtdb.fh"
#include "eaf.fh"
#include "util.fh"
integer rtdb
character*8 task
integer nbf,i
integer noa_lo,noa_hi,nva_lo,nva_hi
@ -49,6 +50,12 @@ c
parameter (eps=1d-14)
c
logical otdebug
logical do_mirra,do_mirrb,do_mirr
integer g_ta_mirr,g_tb_mirr,g_ta_org,g_tb_org
logical util_mirrmat,tuhfreplicated
external util_mirrmat
integer util_mirrmem,mem_mirr
external util_mirrmem
c
integer l_ia_uv, k_ia_uv, l_tmp, k_tmp, l_ia_jb, k_ia_jb
double precision ddot
@ -82,6 +89,48 @@ c
*ga:1:0
if(.not.ga_create(mt_dbl,nob*nvb,nva,'T_b',(nob*nvb),0,g_t_b))
$ call errquit('could not alloc ga for T_b',1, GA_ERR)
if (.not.rtdb_get(rtdb, 'mp2:tuhfreplicated', mt_log, 1,
T tuhfreplicated)) tuhfreplicated=.false.
do_mirr=.false.
do_mirra=.false.
do_mirrb=.false.
if(tuhfreplicated) then
mem_mirr=
M util_mirrmem(1,g_t_a)+
M util_mirrmem(1,g_t_b)
if(ga_nodeid().eq.0) then
write(6,14) ' needed by mirroring: ', mem_mirr
write(6,14) ' ga_memory_avail() : ', ga_memory_avail()
endif
14 format(a,i10,' bytes')
if(ga_memory_avail().gt. mem_mirr) then
do_mirra=util_mirrmat(1,g_t_a,g_ta_mirr,
D .false., .true.)
do_mirrb=util_mirrmat(1,g_t_b,g_tb_mirr,
D .false., .true.)
else
if(ga_nodeid().eq.0)
W write(6,*) ' insuff. memory for mirroring '
endif
endif
if(do_mirra.and.do_mirrb) then
if(ga_nodeid().eq.0)
w write(6,*) 'mp2_make_tuhf mirroring'
do_mirr=.true.
g_ta_org=g_t_a
g_tb_org=g_t_b
g_t_a=g_ta_mirr
g_t_b=g_tb_mirr
else
if(do_mirra) then
if(.not.ga_destroy(g_ta_mirr))call errquit(
$ 'could not destroy mirrt_a handle',1, GA_ERR)
write(6,10) ga_nodeid(),'destroyed g_ta_mirr',g_ta_mirr
10 format(i5,a,i5)
endif
g_ta_org=0
g_tb_org=0
endif
tunitptra=1
tunitptrb=1
do i=oseg_lo,oseg_hi
@ -189,6 +238,12 @@ c
enddo
enddo
call ga_sync()
if (do_mirr) then
call ga_mask_sync(.true.,.false.)
call ga_merge_mirrored(g_t_a)
call ga_mask_sync(.true.,.false.)
call ga_merge_mirrored(g_t_b)
endif
do a_a=nva_lo_local,nva_hi_local
counta = 0
do b=nva_lo,nva_hi
@ -265,8 +320,21 @@ c
esing = esing + (-4.0d0*eab + eaa)/4.0d0
etrip = etrip + (-3.0d0*eaa)/4.0d0
c
if(.not.ga_destroy(g_t_b))call errquit(
$ 'could not destroy t_b handle',1, GA_ERR)
if(do_mirr) then
if(.not.ga_destroy(g_t_b))call errquit(
$ 'could not destroy mirr t_b handle',1, GA_ERR)
if(.not.ga_destroy(g_t_a))call errquit(
$ 'could not destroy mirr t_a handle',1, GA_ERR)
g_t_a=g_ta_org
g_t_b=g_tb_org
endif
if(.not.ga_destroy(g_t_b))then
if(ga_nodeid().eq.0) call ga_summarize(1)
call ga_sync()
call errquit(
$ 'could not destroy t_b handle',1, GA_ERR)
endif
if(.not.ga_destroy(g_t_a))call errquit(
$ 'could not destroy t_a handle',1, GA_ERR)
c

View file

@ -30,7 +30,7 @@ c
c $Id$
c
c ======================================================================================================
C> \mainpage Northwest Computational Chemistry Package (NWChem) 7.0.1
C> \mainpage Northwest Computational Chemistry Package (NWChem) 7.2.0
C>
C> NWChem is an open-source computational chemistry package distributed under the terms of
C> the Educational Community License (ECL) 2.0
@ -461,7 +461,7 @@ c
write(LuOut,*)
write(LuOut,*)
call util_print_centered(LuOut,
$ 'Northwest Computational Chemistry Package (NWChem) 7.0.1',
$ 'Northwest Computational Chemistry Package (NWChem) 7.2.0',
$ 40, .true.)
write(LuOut,*)
write(LuOut,*)
@ -557,7 +557,7 @@ C
C Print version information to ecce.out file
C
compiled(inp_strlen(compiled)+1:inp_strlen(compiled)+25) =
$ ' Version 7.0.1'
$ ' Version 7.2.0'
call ecce_print_version(compiled(1:inp_strlen(compiled)))
C
If ( Inp_StrLen(BatchID) .gt. 0) then

View file

@ -25,7 +25,8 @@ c
double precision grid_acc(num_gridtypes)
double precision job_grid_acc
character*16 element
character*16 tag
character*16 tag, tag_mod
integer lenb
double precision eps
parameter (eps = 1.d-20)
data gridtypes /'xcoarse', 'coarse', 'medium', 'fine', 'xfine',
@ -418,7 +419,10 @@ c
c hack for nbo
if(tag(3:4).eq.'gh') iptr=5
if(tag(1:1).eq.'X'.or.tag(1:1).eq.'x') iptr=2
if (.not. geom_tag_to_element(tag(iptr:), symbol,
lenb=inp_strlen(tag)
tag_mod=' '
tag_mod(1:lenb-iptr+1)=tag(iptr:lenb)
if (.not. geom_tag_to_element(tag_mod, symbol,
& element, i_atomic_number)) then
if (inp_compare(.false.,tag(1:2),'bq')) then
i_atomic_number = 0

View file

@ -26,7 +26,8 @@ c
logical same_atom, same_bq, isbq
c
character*16 element
character*16 tag
character*16 tag,tag_mod
integer lenb
character*2 symbol
c
logical lnewtype
@ -179,7 +180,10 @@ c Hence they should always have i_atomic_number .eq. 0
c no matter what follows the X.
c
if(tag(1:1).eq.'X'.or.tag(1:1).eq.'x') iptr=2
if (.not. geom_tag_to_element(tag(iptr:), symbol,
lenb=inp_strlen(tag)
tag_mod=' '
tag_mod(1:lenb-iptr+1)=tag(iptr:lenb)
if (.not. geom_tag_to_element(tag_mod, symbol,
& element, i_atomic_number)) then
if (inp_compare(.false.,tag(1:2),'bq')) then
if(bqdontcare) then

View file

@ -212,7 +212,7 @@ c
c
c write noc (consistent with definition in ddscf) to rtdb
c
if (.not. rtdb_put(rtdb, 'dft:noc', mt_int, 2, noc))
if (.not. rtdb_put(rtdb, 'dft:noc', mt_int, 2, noc(1)))
& call errquit('inpana: rtdb_put of noc failed', 0, RTDB_ERR)
cHvD
use_nwxc = util_module_avail("nwxc")
@ -1049,3 +1049,115 @@ c
endif
return
end
subroutine dft_sethfx(rtdb)
implicit none
#include "geom.fh"
#include "rtdb.fh"
#include "mafdecls.fh"
#include "cdft.fh"
#include "errquit.fh"
integer rtdb
c
character*10 pname
integer i,nopen
double precision thresh,tol2e
pname='dft_sethfx'
c multiplicity
if(rtdb_get(rtdb, 'scf:nopen', MT_INT, 1, nopen)) then
mult=nopen+1
ipol=2
if (.not. rtdb_put(rtdb, 'dft:ipol', mt_int, 1, ipol))
& call errquit(pname//': rtdb_put failed', 0, RTDB_ERR)
if (.not. rtdb_put(rtdb, 'dft:mult', mt_int, 1, mult))
& call errquit(pname//': rtdb_put failed', 1, RTDB_ERR)
endif
do i = 1, numfunc
xfac(i)=0.d0
cfac(i)=0.d0
lcfac(i)=.false.
nlcfac(i)=.false.
lxfac(i)=.false.
nlxfac(i)=.false.
xccomb(i)=.false.
enddo
lxfac(1) = .true.
nlxfac(1) = .true.
xfac(1) = 1.0d0
if (.not. rtdb_put(rtdb, 'dft:cfac',
& mt_dbl, numfunc, cfac(1)))
& call errquit(pname//': rtdb_put failed', 2, RTDB_ERR)
if (.not. rtdb_put(rtdb, 'dft:xfac',
& mt_dbl, numfunc, xfac(1)))
& call errquit(pname//': rtdb_put failed', 3, RTDB_ERR)
if (.not. rtdb_put(rtdb, 'dft:lcfac',
& mt_log, numfunc, lcfac(1)))
& call errquit(pname//': rtdb_put failed', 4, RTDB_ERR)
if (.not. rtdb_put(rtdb, 'dft:nlcfac',
& mt_log, numfunc, nlcfac(1)))
& call errquit(pname//': rtdb_put failed', 5, RTDB_ERR)
if (.not. rtdb_put(rtdb, 'dft:lxfac',
& mt_log, numfunc, lxfac(1)))
& call errquit(pname//': rtdb_put failed', 6, RTDB_ERR)
if (.not. rtdb_put(rtdb, 'dft:nlxfac',
& mt_log, numfunc, nlxfac(1)))
& call errquit(pname//': rtdb_put failed', 7, RTDB_ERR)
if (.not. rtdb_cput(rtdb, 'dft:theory', 1, 'dft'))
$ call errquit('rtdb_cput failed',0, RTDB_ERR)
if (.not.rtdb_put(rtdb,'dft:e_conv',mt_dbl,1,1d-8))
. call errquit(pname//': rtdbput econv failed',0, RTDB_ERR)
if (.not.rtdb_get(rtdb, 'scf:thresh', MT_DBL, 1, thresh))
& thresh=1d-4
d_conv=thresh*thresh
cdbg write(6,*) ' d_conv is ',d_conv
if(.not. rtdb_put(rtdb, 'dft:d_conv', mt_dbl, 1, d_conv))
& call errquit('dft_rdinput: rtdb_put failed', 106, RTDB_ERR)
if (.not. rtdb_get(rtdb, 'scf:tol2e', MT_DBL, 1, tol2e))
* tol2e=1d-12
itol2e=-log10(tol2e)
cdbg write(6,*) ' itol2e is ',itol2e
if (.not. rtdb_put(rtdb, 'dft:itol2e', mt_int, 1, 12))
. call errquit(pname//': rtdbput itol2e failed',0, RTDB_ERR)
return
end
subroutine dft_sethfx_cleanup(rtdb)
implicit none
#include "geom.fh"
#include "bas.fh"
#include "rtdb.fh"
#include "mafdecls.fh"
#include "cdft.fh"
#include "errquit.fh"
integer level_org
common /dftg/ level_org
integer rtdb
character*18 pname
integer i
pname='dft_sethfx_cleanup'
call util_print_set_level(level_org)
return
end
logical function dft_guesshfx(rtdb)
implicit none
#include "rtdb.fh"
#include "mafdecls.fh"
#include "cdft.fh"
#include "errquit.fh"
integer level_org
common /dftg/ level_org
integer rtdb
c
logical dftguess
c
dft_guesshfx=.false.
if(.not.rtdb_get(rtdb,'dftguess',mt_log,1,dftguess))
D dftguess=.false.
if(dftguess) then
if(.not.rtdb_delete(rtdb,'dftguess'))
D call errquit(' rtdb_delete failed',0,RTDB_ERR)
call dft_sethfx(rtdb)
dft_guesshfx=.true.
call util_print_get_level(level_org)
call util_print_set_level(10)
endif
return
end

View file

@ -12,12 +12,20 @@ LIBRARY = libnwdft.a
LIB_INCLUDES = -I../include
ifdef USE_LIBXC
LIB_DEFINES += -DXC_MAJOR_VERSION=$(shell grep XC_MAJOR_VERSION ../../libext/libxc/install/include/xc_version.h |cut -d " " -f 3)
LIB_DEFINES += -DLIBXC_NP_SIZE=$(shell ./libxc_findsizenp.sh ../../libext/libxc/install/include)
LIB_INCLUDES += -I../../libext/libxc/install/include
endif
ifdef LIBXC_DIR
LIB_INCLUDES += -I$(LIBXC_DIR)/include
ifdef LIBXC_INCLUDE
LIB_DEFINES += -DXC_MAJOR_VERSION=$(shell grep XC_MAJOR_VERSION $(LIBXC_INCLUDE)/xc_version.h |cut -d " " -f 3)
LIB_DEFINES += -DLIBXC_NP_SIZE=$(shell ./libxc_findsizenp.sh $(LIBXC_INCLUDE))
LIB_INCLUDES += -I$(LIBXC_INCLUDE)
endif
ifdef LIBXC_MODDIR
LIB_INCLUDES += -I$(LIBXC_MODDIR)
endif
LIB_INCLUDES += -I.
include ../../config/makefile.h
include ../../config/makelib.h

View file

@ -1,3 +1,8 @@
#ifdef USE_LIBXC
#if XC_MAJOR_VERSION < 4
#error "need libxc version > 3 "
#endif
#endif
integer, parameter :: maxfunc = 100
integer :: libxc_nfuncs

View file

@ -0,0 +1,18 @@
#!/usr/bin/env bash
npstring=$(egrep np "$1"/xc.h|head -1)
np_array=($npstring)
count=-1
sizenp_string=' '
for substring in "${np_array[@]}"; do
[[ $substring == "np," ]] && sizenp_string=${np_array[$count]} && break
((++count))
done
if [[ "$sizenp_string" == 'int' ]]; then
size_np=4
elif [[ "$sizenp_string" == 'size_t' ]]; then
size_np=8
else
echo "unexpected sizenp_string $sizenp_string"
exit 1
fi
echo $size_np

View file

@ -57,14 +57,20 @@
double precision :: Amat3(nq,NCOL_AMAT3)
double precision :: Cmat3(nq,NCOL_CMAT3)
#ifdef USE_LIBXC
double precision :: fac
double precision, external :: ddot
logical gga,mgga,dolap
logical,external :: nwchem_libxc_family
#if LIBXC_NP_SIZE == 4
integer*4 nqs
#elif LIBXC_NP_SIZE == 8
integer(c_size_t) :: nqs
#ifdef USE_LIBXC
#else
#error "unexpected value for LIBXC_NP_SIZE"
#endif
type(xc_f03_func_t) :: xcfunc
gga = .false.
@ -154,22 +160,39 @@
call xc_f03_func_init(xcfunc,libxc_funcs(ifunc),polarized)
call xc_f03_func_set_dens_threshold(xcfunc, tol_rho)
call xc_f03_func_set_sigma_threshold(xcfunc, tol_rho**2)
#if XC_MAJOR_VERSION > 4
call xc_f03_func_set_sigma_threshold(xcfunc, tol_rho)
call xc_f03_func_set_zeta_threshold(xcfunc, 1d-10)
#endif
select case(libxc_family(ifunc))
#if XC_MAJOR_VERSION > 4
case (XC_FAMILY_LDA, XC_FAMILY_HYB_LDA)
#else
case (XC_FAMILY_LDA)
#endif
if ((.not.do_2nd) .and. (.not.do_3rd)) then
call xc_f03_lda_exc_vxc(xcfunc,nqs,
$ dbl_mb(krho),dbl_mb(kexc),dbl_mb(kvrho))
elseif (.not.do_3rd) then
#if XC_MAJOR_VERSION > 4
call xc_f03_lda_exc_vxc_fxc(xcfunc,nqs,dbl_mb(krho),
$ dbl_mb(kexc),dbl_mb(kvrho),dbl_mb(kv2rho2))
#else
call xc_f03_lda_exc_vxc(xcfunc,nqs,dbl_mb(krho),
$ dbl_mb(kexc),dbl_mb(kvrho))
call xc_f03_lda_fxc(xcfunc,nqs,dbl_mb(krho),dbl_mb(kv2rho2))
#endif
else
#if XC_MAJOR_VERSION > 4
call xc_f03_lda_exc_vxc_fxc_kxc(xcfunc,nqs,dbl_mb(krho),
$ dbl_mb(kexc),dbl_mb(kvrho),dbl_mb(kv2rho2),
$ dbl_mb(kv3rho3))
#else
call xc_f03_lda_exc_vxc(xcfunc,nqs,dbl_mb(krho),
$ dbl_mb(kexc),dbl_mb(kvrho))
call xc_f03_lda_fxc(xcfunc,nqs,dbl_mb(krho),dbl_mb(kv2rho2))
call xc_f03_lda_kxc(xcfunc,nqs,dbl_mb(krho),dbl_mb(kv3rho3))
#endif
endif
@ -186,17 +209,43 @@
$ dbl_mb(kexc),
$ dbl_mb(kvrho),dbl_mb(kvsigma))
elseif (.not.do_3rd) then
#if XC_MAJOR_VERSION > 4
call xc_f03_gga_exc_vxc_fxc(xcfunc,nqs,
$ dbl_mb(krho),dbl_mb(ksigma),dbl_mb(kexc),
$ dbl_mb(kvrho),dbl_mb(kvsigma),dbl_mb(kv2rho2),
$ dbl_mb(kv2rhosig),dbl_mb(kv2sig2))
#else
call xc_f03_gga_exc_vxc(xcfunc,nqs,
$ dbl_mb(krho),dbl_mb(ksigma),
$ dbl_mb(kexc),
$ dbl_mb(kvrho),dbl_mb(kvsigma))
call xc_f03_gga_fxc(xcfunc,nqs,
$ dbl_mb(krho),dbl_mb(ksigma),
$ dbl_mb(kv2rho2),dbl_mb(kv2rhosig),
$ dbl_mb(kv2sig2))
#endif
else
#if XC_MAJOR_VERSION > 4
call xc_f03_gga_exc_vxc_fxc_kxc(xcfunc,nqs,
$ dbl_mb(krho),dbl_mb(ksigma),dbl_mb(kexc),
$ dbl_mb(kvrho),dbl_mb(kvsigma),dbl_mb(kv2rho2),
$ dbl_mb(kv2rhosig),dbl_mb(kv2sig2),
$ dbl_mb(kv3rho3),dbl_mb(kv3rho2sig),
$ dbl_mb(kv3rhosig2),dbl_mb(kv3sig3))
#else
call xc_f03_gga_exc_vxc(xcfunc,nqs,
$ dbl_mb(krho),dbl_mb(ksigma),
$ dbl_mb(kexc),
$ dbl_mb(kvrho),dbl_mb(kvsigma))
call xc_f03_gga_fxc(xcfunc,nqs,
$ dbl_mb(krho),dbl_mb(ksigma),
$ dbl_mb(kv2rho2),dbl_mb(kv2rhosig),
$ dbl_mb(kv2sig2))
call xc_f03_gga_kxc(xcfunc,nqs,
$ dbl_mb(krho),dbl_mb(ksigma),
$ dbl_mb(kv3rho3),dbl_mb(kv3rho2sig),
$ dbl_mb(kv3rhosig2),dbl_mb(kv3sig3))
#endif
endif
else
if ((.not.do_2nd).and.(.not.do_3rd)) then
@ -204,17 +253,41 @@
$ dbl_mb(krho),dbl_mb(ksigma),
$ dbl_mb(kvrho),dbl_mb(kvsigma))
elseif (.not.do_3rd) then
#if XC_MAJOR_VERSION > 4
call xc_f03_gga_vxc_fxc(xcfunc,nqs,
$ dbl_mb(krho),dbl_mb(ksigma),
$ dbl_mb(kvrho),dbl_mb(kvsigma),dbl_mb(kv2rho2),
$ dbl_mb(kv2rhosig),dbl_mb(kv2sig2))
#else
call xc_f03_gga_vxc(xcfunc,nqs,
$ dbl_mb(krho),dbl_mb(ksigma),
$ dbl_mb(kvrho),dbl_mb(kvsigma))
call xc_f03_gga_fxc(xcfunc,nqs,
$ dbl_mb(krho),dbl_mb(ksigma),
$ dbl_mb(kv2rho2),dbl_mb(kv2rhosig),
$ dbl_mb(kv2sig2))
#endif
else
#if XC_MAJOR_VERSION > 4
call xc_f03_gga_vxc_fxc_kxc(xcfunc,nqs,
$ dbl_mb(krho),dbl_mb(ksigma),
$ dbl_mb(kvrho),dbl_mb(kvsigma),dbl_mb(kv2rho2),
$ dbl_mb(kv2rhosig),dbl_mb(kv2sig2),
$ dbl_mb(kv3rho3),dbl_mb(kv3rho2sig),
$ dbl_mb(kv3rhosig2),dbl_mb(kv3sig3))
#else
call xc_f03_gga_vxc(xcfunc,nqs,
$ dbl_mb(krho),dbl_mb(ksigma),
$ dbl_mb(kvrho),dbl_mb(kvsigma))
call xc_f03_gga_fxc(xcfunc,nqs,
$ dbl_mb(krho),dbl_mb(ksigma),
$ dbl_mb(kv2rho2),dbl_mb(kv2rhosig),
$ dbl_mb(kv2sig2))
call xc_f03_gga_kxc(xcfunc,nqs,
$ dbl_mb(krho),dbl_mb(ksigma),
$ dbl_mb(kv3rho3),dbl_mb(kv3rho2sig),
$ dbl_mb(kv3rhosig2),dbl_mb(kv3sig3))
#endif
endif
call dfill(nq,0d0,dbl_mb(kexc),1)
endif
@ -222,8 +295,8 @@
case (XC_FAMILY_MGGA, XC_FAMILY_HYB_MGGA)
gga = .true.
mgga = .true.
dolap = .true.
dolap = iand(libxc_flags(ifunc),xc_flags_needs_laplacian).eq.
$ xc_flags_needs_laplacian
if (iand(libxc_flags(ifunc),xc_flags_have_exc).eq.
$ xc_flags_have_exc) then

View file

@ -41,7 +41,11 @@
xcfamily = xc_f03_func_info_get_family(xcinfo)
select case(xcfamily)
#if XC_MAJOR_VERSION > 4
case (XC_FAMILY_LDA, XC_FAMILY_HYB_LDA)
#else
case (XC_FAMILY_LDA)
#endif
case (XC_FAMILY_GGA, XC_FAMILY_HYB_GGA)
case (XC_FAMILY_MGGA, XC_FAMILY_HYB_MGGA)
case default
@ -50,7 +54,11 @@
endselect
select case(xcfamily)
#if XC_MAJOR_VERSION > 4
case (XC_FAMILY_HYB_LDA, XC_FAMILY_HYB_GGA, XC_FAMILY_HYB_MGGA)
#else
case (XC_FAMILY_HYB_GGA, XC_FAMILY_HYB_MGGA)
#endif
if (iand(xcflags,xc_flags_hyb_cam).eq.xc_flags_hyb_cam) then
call xc_f03_hyb_cam_coef(xcfunc,cam_omega,cam_alpha,cam_beta)

View file

@ -73,9 +73,7 @@
subroutine nwchem_libxc_print
use,intrinsic :: iso_c_binding
#ifdef USE_LIBXC
use xc_f03_lib_m, only: xc_f03_version_string,
$ xc_f03_reference,
$ xc_f03_functional_get_name
use xc_f03_lib_m, only: xc_f03_functional_get_name
#endif
implicit none
@ -109,9 +107,7 @@
subroutine nwchem_libxc_print_header
use,intrinsic :: iso_c_binding
#ifdef USE_LIBXC
use xc_f03_lib_m, only: xc_f03_version_string,
$ xc_f03_reference,
$ xc_f03_functional_get_name
use xc_f03_lib_m, only: xc_f03_version_string
#endif
implicit none

View file

@ -371,7 +371,7 @@ c
else if (lewin) then
if (nroots.gt.newin) nroots = newin
else if (nroots.gt.nov(1)+nov(2)) then
if (nodezero.and.util_print('initial guess',print_default))
if (nodezero.and.util_print('initial guess',print_low))
1 write(LuOut,9040) nroots,nov(1)+nov(2)
nroots=nov(1)+nov(2)
if (.not.rtdb_put(rtdb,'tddft:nroots',mt_int,1,nroots))

View file

@ -58,7 +58,6 @@ c
character*4 targetsym ! Symmetry of target excited state
double precision cwall ! Wall timings
double precision ccpu ! CPU timings
double precision dcpu ! CPU timings
integer algorithm ! =1 multiple fock build; =2: conventional
integer mult ! Ground state spin multiplicity
integer l_irs(2),k_irs(2)! Irreps
@ -116,6 +115,8 @@ c double precision, allocatable, dimension(:,:) :: eye
integer iwhich
c
nodezero=(ga_nodeid().eq.0)
ccpu=0d0
cwall=0d0
cjb
c call ga_print(g_movecs(1))
c

View file

@ -616,7 +616,7 @@ c
call tddft_grad_compute_dao(ipol,nao,nocc,g_mo,g_d)
c DEBUG
c call ga_print(g_d)
if (tddft_grad_util_print('tddft grad g',print_debug)) then
if (util_print('tddft grad g',print_debug)) then
if (oroot) write(LuOut,*)'DEBUG: '//pname//'D'
call tddft_grad_print_array(ipol,1,g_d,dble(ipol))
endif
@ -640,7 +640,7 @@ c
enddo
c DEBUG
c call ga_print(g_p_ao)
if (tddft_grad_util_print('tddft grad g',print_debug)) then
if (util_print('tddft grad g',print_debug)) then
if (oroot) write(LuOut,*)'DEBUG: '//pname//'P'
c call tddft_grad_print_array(ipol,1,g_p_ao,dble(ipol))
call tddft_grad_print_array(ipol,1,g_d(3),dble(ipol))
@ -798,7 +798,7 @@ c
c Daniel (11-30-12): Print X+Y and X-Y in the AO basis
c DEBUG
c call ga_print(g_d(5))
if (tddft_grad_util_print('tddft grad g',print_debug)) then
if (util_print('tddft grad g',print_debug)) then
if (oroot) write(LuOut,*)'DEBUG: '//pname//'(X+Y)'
call tddft_grad_print_array(ipol,1,g_d(5),dble(ipol))
endif
@ -818,7 +818,7 @@ c Daniel (11-30-12): Print W (note, this contains the ground state
c density matrix contribution as well).
c DEBUG
c call ga_print(g_wp_ao)
if (tddft_grad_util_print('tddft grad g',print_debug)) then
if (util_print('tddft grad g',print_debug)) then
if (oroot) write(LuOut,*)'DEBUG: '//pname//'W'
call tddft_grad_print_array(1,1,g_wp_ao,dble(ipol))
endif
@ -1140,7 +1140,7 @@ c Daniel (4-8-13): Need conditional statement here for CAM functionals
c
c Print results if so required
c
if (tddft_grad_util_print('tddft grad terms',print_high)) then
if (util_print('tddft grad terms',print_high)) then
if (oroot) then
write(LuOut,5)ir
5 format(' The Excited State Energy Gradient by Terms',

View file

@ -102,7 +102,7 @@ c
call nga_scale_patch(g_tp(ip),blo,bhi,0.5d0)
enddo
c
if (tddft_grad_util_print(pname,print_debug)) then
if (util_print(pname,print_debug)) then
oroot = ga_nodeid().eq.0
if (oroot) write(LuOut,*)'DEBUG: '//pname//'P'
call tddft_grad_print_array(ipol,nroots,g_tp,dble(ipol))

View file

@ -120,17 +120,22 @@ c
c
c Daniel (2-8-13): This is a local TDA variable, so that we don't need
c to change the global tda variable.
logical tdaloc
logical tdaloc, tddft_grad_tdaloc
external tddft_grad_tdaloc
logical oprint
integer g_r_x(2),g_r_org(2)
c
double precision Exc(2) ! Exchange-correlation energy
c
pname="tddft_grad_compute_r: "
iwhich = 0 ! call to tddft_nga_cont()
write(6,*) ' 0 tda ',tda
c
c 1. Do the T contributions
c
c 1.1. Create global array to hold Tuv
c
oprint=util_print('tddft_grad_r',print_debug)
idim(1) = nroot*ipol
idim(2) = nao
idim(3) = nao
@ -180,6 +185,7 @@ c fock_xc:triplet here for restricted triplet calculations to work.
c
call tddft_nga_cont(rtdb,ihdl_geom,ihdl_bfao,g_tuv,g_apbt,g_ambt,
+nao,ipol,tol2e,tda,oskel,kfac,lhashf,.false.,nroot,iwhich,lhascd)
write(6,*) ' 2 tda ',tda
c Daniel (2-26-13): Reset fock_xc:triplet here for restricted triplet
c calculations to work.
if (otriplet) then
@ -217,11 +223,11 @@ c
c
c 1. Done T contributions
cDEBUG
c if (tddft_grad_util_print('tddft grad r',print_debug)) then
c oroot = ga_nodeid().eq.0
c if (oroot) write(LuOut,*)'DEBUG A: tddft_grad_comp_r: R'
c call tddft_grad_print_array(ipol,nroot,g_r,dble(ipol))
c endif
if (oprint) then
oroot = ga_nodeid().eq.0
if (oroot) write(LuOut,*)'DEBUG A: tddft_grad_comp_r: R_T'
call tddft_grad_print_array(ipol,nroot,g_r,dble(ipol))
endif
cDEBUG
c
c 2. Do the (X+Y) and (X-Y) contributions
@ -278,32 +284,10 @@ c
+ call errquit(pname//'failed to create g_apby',0,GA_ERR)
if (.not.nga_create(mt_dbl,3,idim,'vectors (A-B)Y',ichnk,g_amby))
+ call errquit(pname//'failed to create g_amby',0,GA_ERR)
c
tdaloc=tddft_grad_tdaloc(rtdb,tda,lhashf)
c
c 2.5 Compute (A+B)X, (A-B)X, (A+B)Y and (A-B)Y
c
c Daniel (1-5-13): We manipulate the code here because the
c R vector has the same number of terms for RPA and CIS. This is a
c consequence of (X-Y) = X. It might be a good idea to avoid doing this
c part for the Y vector since Y = 0. Note that the coupling matrix
c expressions H^+[V] and H^-[V] can both be nonzero for CIS, so it isn't
c okay to skip the anti-symmetric part in the tddft_nga_cont routine.
c What CIS does is makes the Y vector contribution zero in the following
c routines.
c Daniel (2-8-13): Set the local TDA variable so that we don't change
c the global one.
if (lhashf) then
if (tda) then
tdaloc = .false. ! For CIS calculations
else
tdaloc = .false. ! For RPA calculations
endif
else
if (tda) then
tdaloc = .true. ! For TDDFT/TDA calculations
else
tdaloc = .false. ! For TDDFT calculations
endif
endif
call tddft_nga_cont(rtdb,ihdl_geom,ihdl_bfao,g_x,g_apbx,g_ambx,
+nao,ipol,tol2e,tdaloc,oskel,kfac,lhashf,otriplet,nroot,iwhich,
+lhascd)
@ -349,6 +333,21 @@ c 2.10 Transform (A+B)(X+Y) to MO basis occupied-occupied block only
c
call tddft_grad_trans_ao2mo(ipol,nao,nfc,naoc,nocc,nav,nfv,
+ nroot,1.0d0,0.0d0,"ij",g_mo,g_apbx,g_hij,"ij")
if(oprint)then
c extra ga to keep track of X
if (.not. ga_duplicate(g_r(1), g_r_x(1), 'gtmp2'))
c call errquit('tdgcr: gadupl failed',0,0)
call ga_zero(g_r_x(1))
g_r_org(1)=g_r(1)
g_r(1)=g_r_x(1)
if(ipol.eq.2) then
if (.not. ga_duplicate(g_r(2), g_r_x(2), 'gtmp2'))
c call errquit('tdgcr: gadupl failed',0,0)
call ga_zero(g_r_x(2))
g_r_org(2)=g_r(2)
g_r(2)=g_r_x(2)
endif
endif
c
c 2.11 Add -sum_j (X+Y)ja [(A+B)(X+Y)ji] to Ria
c
@ -546,11 +545,21 @@ c
c 2. Done (X+Y) and (X-Y) contributions
c
cDEBUG
c if (tddft_grad_util_print('tddft grad r',print_debug)) then
c oroot = ga_nodeid().eq.0
c if (oroot) write(LuOut,*)'DEBUG B: tddft_grad_comp_r: R'
c call tddft_grad_print_array(ipol,nroot,g_r,dble(ipol))
c endif
if (oprint) then
oroot = ga_nodeid().eq.0
if (oroot) write(LuOut,*)'DEBUG B: tddft_grad_comp_r: R_x'
call tddft_grad_print_array(ipol,nroot,g_r_x,dble(ipol))
call ga_add(1d0,g_r_x(1),1d0,g_r_org(1),g_r_org(1))
g_r(1)=g_r_org(1)
if (.not.ga_destroy(g_r_x(1)))
+ call errquit(pname//'failed to destroy grx',1,GA_ERR)
if(ipol.eq.2) then
call ga_add(1d0,g_r_x(2),1d0,g_r_org(2),g_r_org(2))
g_r(2)=g_r_org(2)
if (.not.ga_destroy(g_r_x(2)))
+ call errquit(pname//'failed to destroy grx',2,GA_ERR)
endif
endif
cDEBUG
c
c 3. Do the Gxc contributions
@ -664,14 +673,14 @@ c
enddo
call ga_sync()
cDEBUG
c if (tddft_grad_util_print('tddft grad r',print_debug)) then
c oroot = ga_nodeid().eq.0
c if (oroot) write(LuOut,*)'DEBUG C: tddft_grad_comp_r: den'
c call tddft_grad_print_array(ipol,nroot,int_mb(k_den2),
c + dble(ipol))
c call tddft_grad_print_array(ipol,nroot,int_mb(k_den2+1),
c + dble(ipol))
c endif
if (oprint) then
oroot = ga_nodeid().eq.0
if (oroot) write(LuOut,*)'DEBUG C: tddft_grad_comp_r: den'
call tddft_grad_print_array(ipol,nroot,int_mb(k_den2),
+ dble(ipol))
call tddft_grad_print_array(ipol,nroot,int_mb(k_den2+1),
+ dble(ipol))
endif
cDEBUG
c Daniel (1-10-13): For a single restricted root ngxc = 1 and there are 2
c density matrices fed to fock_xc, the GS density matrix D and the
@ -689,7 +698,7 @@ c fock_xc.
+ int_mb(k_gxc), Exc, ipol, .false.)
call ga_sync()
c DEBUG
if (tddft_grad_util_print('tddft grad r',print_debug)) then
if (oprint) then
oroot = ga_nodeid().eq.0
if (oroot) write(LuOut,*)'DEBUG: '//pname//'gxc'
call tddft_grad_print_array(ipol,nroot,int_mb(k_gxc),
@ -734,9 +743,9 @@ c
endif ! xc_gotxc()
c
c Debug print
if (tddft_grad_util_print('tddft grad r',print_debug)) then
if (oprint) then
oroot = ga_nodeid().eq.0
if (oroot) write(LuOut,*)'DEBUG: '//pname//'R'
if (oroot) write(LuOut,*)'DEBUG: '//pname//'R_all'
call tddft_grad_print_array(ipol,nroot,g_r,dble(ipol))
endif
c

View file

@ -147,7 +147,7 @@ c (X-Y)ias(X-Y)ibs
c
enddo ! ip = 1, ipol
c
if (tddft_grad_util_print('tddft grad t',print_debug)) then
if (util_print('tddft grad t',print_debug)) then
oroot = ga_nodeid().eq.0
if (oroot) write(LuOut,*)'DEBUG: '//pname//'T'
call tddft_grad_print_array(ipol,nroot,g_tp,dble(ipol))

View file

@ -141,7 +141,8 @@ c
parameter (oskel=.false.)
double precision Exc(2) ! Exchange-correlation energy
c
logical tdaloc
logical tdaloc, tddft_grad_tdaloc
external tddft_grad_tdaloc
logical doitw,doitz
logical doitxpy1,doitxpy2
logical doitxmy1,doitxmy2
@ -599,7 +600,7 @@ c Daniel (2-12-13): We need to set triplet here for fock_xc.
+ int_mb(k_gxc), Exc, ipol, .false.)
call ga_sync()
c DEBUG
if (tddft_grad_util_print('tddft grad w',print_debug)) then
if (util_print('tddft grad w',print_debug)) then
oroot = ga_nodeid().eq.0
if (oroot) write(LuOut,*)'DEBUG: '//pname//'gxc'
call tddft_grad_print_array(ipol,nroots,int_mb(k_gxc),
@ -746,29 +747,7 @@ c
c
c - Compute (A+B)X, (A-B)X, (A+B)Y and (A-B)Y
c
c Daniel (1-7-13): We manipulate the code here because the
c R vector has the same number of terms for RPA and CIS. This is a
c consequence of (X-Y) = X. It might be a good idea to avoid doing this
c part for the Y vector since Y = 0. Note that the coupling matrix
c expressions H^+[V] and H^-[V] can both be nonzero for CIS, so it isn't
c okay to skip the anti-symmetric part in the tddft_nga_cont routine.
c What CIS does is makes the Y vector contribution zero in the following
c routines.
c Daniel (2-8-13): Set the local TDA variable so that we don't change
c the global one.
if (lhashf) then
if (tda) then
tdaloc = .false. ! For CIS and TDDFT/TDA (hybrid) calculations
else
tdaloc = .false. ! For RPA and TDDFT (hybrid) calculations
endif
else
if (tda) then
tdaloc = .true. ! For TDDFT/TDA (pure) calculations
else
tdaloc = .false. ! For TDDFT (pure) calculations
endif
endif
tdaloc=tddft_grad_tdaloc(rtdb,tda,lhashf)
call tddft_nga_cont(rtdb,ihdl_geom,ihdl_bfao,g_x,g_apbx,g_ambx,
+ nao,ipol,tol2e,tdaloc,oskel,kfac,lhashf,otriplet,nroots,iwhich,
+ lhascd)
@ -1190,7 +1169,7 @@ c
enddo
call ga_sync()
c
if (tddft_grad_util_print('tddft grad w',print_debug)) then
if (util_print('tddft grad w',print_debug)) then
oroot = ga_nodeid().eq.0
if (oroot) write(LuOut,*)'DEBUG: '//pname//'W'
call tddft_grad_print_array(ipol,nroots,g_w,dble(ipol))

View file

@ -60,7 +60,6 @@ c
c
logical odiff,oprint
parameter (odiff=.true.)
parameter (oprint=.true.)
c
c Input:
c
@ -124,35 +123,20 @@ c
logical oroot
c
character*32 pname
logical tdaloc
logical tdaloc, tddft_grad_tdaloc
external tddft_grad_tdaloc
logical oprint_debug
c
pname= "tddft_grad_solve: "
oprint=util_print('tddft_grad_solve',print_medium)
oprint_debug=util_print('tddft_grad_solvecphf',print_debug)
c
c Initialize the common block for tddft_grad_solve_product and
c tddft_grad_solve_precond
c
oroot = ga_nodeid().eq.0
c
c Daniel (1-5-13): For a CIS calculation, we still need to solve the
c full Z vector equation (i.e. we need to have the equation solved when
c B =/= 0). This is confirmed by running an RPA calculation with B = 0,
c since there were no further modifications beyond making B = 0 for
c that formulation of the linear response equations and you obtain the
c correct answer for the CIS gradients that way.
c
if (lhashf) then
if (tda) then
tdaloc = .false. ! For CIS calculations
else
tdaloc = .false. ! For RPA calculations
endif
else
if (tda) then
tdaloc = .true. ! For TDDFT/TDA calculations
else
tdaloc = .false. ! For TDDFT calculations
endif
endif
tdaloc=tddft_grad_tdaloc(rtdb,tda,lhashf)
c End test
tdg_tol2e = tol2e
tdg_kfac = kfac
@ -177,7 +161,6 @@ c End test
tdg_g_mo(1) = g_mo(1)
tdg_g_mo(2) = g_mo(2)
tdg_e_mo = iptr_mo_e
c tdg_tda = tda
tdg_tda = tdaloc
tdg_oskel = oskel
tdg_lhashf = lhashf
@ -224,6 +207,14 @@ c
call ga_copy(g_b,g_x)
call tddft_grad_solve_precond(g_x,0.0d0)
endif
if(oprint_debug) then
if(oroot) write(luout,*) ' LHS'
call util_flush(luout)
call ga_print(g_x)
if(oroot) write(luout,*) ' RHS'
call util_flush(luout)
call ga_print(g_b)
endif
c
call ga_lkain(rtdb,g_x,g_b,tddft_grad_solve_product,
+ tddft_grad_solve_precond,solve_thresh,
@ -254,7 +245,7 @@ c
if (.not.ga_destroy(g_x))
+ call errquit(pname//'failed to destroy g_x',0, GA_ERR)
c
if (tddft_grad_util_print('tddft grad z',print_debug)) then
if (util_print('tddft grad z',print_debug)) then
if (oroot) write(LuOut,*)'DEBUG: '//pname//'Z'
call tddft_grad_print_array(ipol,nroots,g_z,dble(ipol))
endif
@ -266,4 +257,41 @@ c Reset fock_xc:triplet here for restricted triplet calculations
endif
c
end
c $Id$
c We manipulate the code here because the
c R vector has the same number of terms for RPA and CIS. This is a
c consequence of (X-Y) = X. It might be a good idea to avoid doing this
c part for the Y vector since Y = 0. Note that the coupling matrix
c expressions H^+[V] and H^-[V] can both be nonzero for CIS, so it isn't
c okay to skip the anti-symmetric part in the tddft_nga_cont routine.
c What CIS does is makes the Y vector contribution zero in the following
c routines.
c Set the local TDA variable so that we don't change
c the global one.
logical function tddft_grad_tdaloc(rtdb,tda,lhashf)
implicit none
#include "rtdb.fh"
#include "mafdecls.fh"
integer rtdb
logical tda
logical lhashf
c
logical tdaloc_rtdb
c
if (lhashf) then
if (tda) then
tddft_grad_tdaloc = .false. ! For CIS calculations
else
tddft_grad_tdaloc = .false. ! For RPA calculations
endif
else
if (tda) then
cold tddft_grad_tdaloc = .true. ! For TDDFT/TDA calculations
tddft_grad_tdaloc = .false. ! For TDDFT/TDA calculations
else
tddft_grad_tdaloc = .false. ! For TDDFT calculations
endif
endif
if (rtdb_get(rtdb,'tddft:tdaloc',mt_log,1,tdaloc_rtdb))
+ tddft_grad_tdaloc=tdaloc_rtdb
return
end

View file

@ -168,6 +168,9 @@ c Get the start times
c
c Init pstat
call dft_pstat_init(rtdb)
c
call util_print_push
call util_print_rtdb_load(rtdb,'tddft')
c
c Print header
if (oroot) call tddft_grad_print_header(luout)
@ -225,7 +228,7 @@ c Print calculation information
c
c Print start times
if (oroot) then
if (tddft_grad_util_print('tddft grad time',print_default)) then
if (util_print('tddft grad time',print_default)) then
write(luout,*)
write(luout,"(' Start at time cpu:',f11.1,'s wall:',f11.1,
+ 's')")-tddft_grad_cpu,-tddft_grad_wall
@ -435,7 +438,7 @@ c Print end times and wrap up
tddft_grad_cpu = tddft_grad_cpu + util_cpusec()
tddft_grad_wall = tddft_grad_wall + util_wallsec()
if (oroot) then
if (tddft_grad_util_print('tddft grad time',print_default)) then
if (util_print('tddft grad time',print_default)) then
write(LuOut,*)
write(LuOut,"(' TDDFT Gradient time cpu:',f11.1,'s wall:',
+ f11.1,'s')")tddft_grad_cpu,tddft_grad_wall
@ -496,6 +499,7 @@ c
c <-- MN solvation models
c
call dft_pstat_print
call util_print_pop
return
end
c $Id$

View file

@ -248,6 +248,7 @@ C RTDB flag for printing out all matrices
logical lprint_mats !print matrices to stdout?
logical lsave_mats !save matrices to file?
logical molden, forceatguess, save_evals, densmat
integer back_to_atguess
character*256 file_mat1,movecs_in_org
integer ma_type, no_sflip,l_at_flip,k_at_flip
character*26 date
@ -301,7 +302,7 @@ c
oprint_info = util_print('common', print_debug)
oprint_parm = util_print('parameters', print_default)
oprint_3c2e = util_print('3c 2e integrals', print_default)
oprint_conv = util_print('convergence', print_default)
oprint_conv = util_print('convergence', print_low)
oprint_conv_details = util_print('convergence details',
& print_high)
oprint_vecs = util_print('intermediate vectors', print_high)
@ -862,9 +863,13 @@ c optionally, g_x2c_c2u is also allocated and kept.
end if ! do_x2c
c
c == determine guess ==
if(.not.rtdb_get(rtdb,'back_to_atguess',mt_int,1,
N back_to_atguess))
. back_to_atguess=0
if(.not.rtdb_get(rtdb,'forceatguess',mt_log,1,forceatguess))
. forceatguess=.false.
if(forceatguess) movecs_in='atomic'
1993 if(forceatguess) movecs_in='atomic'
if(movecs_in.eq.'atomic') back_to_atguess=0
call dft_guessin(movecs_in,ldmix,ncanorg,fon,
, vecs_or_dens,
, ipol,nbf_ao,g_movecs,g_gmovecs,
@ -1820,8 +1825,21 @@ c
call dft_scfcvg(rms, derr, Etold, Etnew,
& e_conv, d_conv, g_conv, ipol,
& iter, iterations, idone, rtdb,
& converged, diising)
& converged, diising,
B back_to_atguess)
c
if(movecs_in.ne.'atomic'.and.back_to_atguess.lt.0) then
movecs_in='atomic'
if(ga_nodeid().eq.0)
W write(luout,*) ' restart from atomic guess'
if (.not. ga_destroy(g_denso(1))) call errquit
& ('dft_scf: could not destroy g_denso', 0, GA_ERR)
if(ipol.eq.2) then
if (.not. ga_destroy(g_denso(2))) call errquit
& ('dft_scf: could not destroy g_dens2', 0, GA_ERR)
endif
goto 1993
endif
if (oprint_time)
& call dft_tstamp(' called scfcvg ')
c

View file

@ -1,6 +1,7 @@
subroutine dft_scfcvg(rms, derr, etold, etnew, e_conv,
& d_conv, g_conv, ipol, iter, iterations,
& idone, rtdb, converged, diising)
& idone, rtdb, converged, diising,
B back_to_atguess)
c
c $Id$
c
@ -21,6 +22,7 @@ c
integer rtdb ! [input]
logical converged ! [output]
logical diising ! [input]
integer back_to_atguess ! [in/out]
c
#include "mafdecls.fh"
#include "rtdb.fh"
@ -89,6 +91,13 @@ c Check over-all convergence.
c
converged = e_conv_logical.and.d_conv_logical.and.g_conv_logical
if (converged)idone = 1
c
c try at guess if d_e > 1d-1 after back_to_atguess iterations
c
if(.not.converged.and.back_to_atguess.gt.0) then
if(abde.gt.1d-1.and.iter.gt.back_to_atguess)
B back_to_atguess=-1
endif
c
c Check iteration value.
c

View file

@ -1945,7 +1945,7 @@ c
call dft_scfcvg(rms, derr, Etold, Etnew,
& e_conv, d_conv, g_conv, ipol,
& iter, iterations, idone, rtdb,
& converged, diising)
& converged, diising, 0)
c
#ifdef LOOSE_START
if (delta.lt.1.d-3)then

View file

@ -42,6 +42,7 @@ C>
double precision cnj !< [Input] \f$\mathrm{CN}^B(R)\f$
double precision top,bottom,dist,c6_ref
double precision cna,cnb
double precision c6_mem,dist_save
integer i,j
double precision eps
parameter (eps=1d-90)
@ -49,6 +50,8 @@ c
c6cn=0.0d0
top=0.0d0
bottom=0.0d0
c6_mem=-1.d+99
dist_save=1.0d99
do i=1,maxcn(iat)
do j=1,maxcn(jat)
c6_ref=c6ab(iat,jat,i,j,1)
@ -56,6 +59,10 @@ c
cna=c6ab(iat,jat,i,j,2)
cnb=c6ab(iat,jat,i,j,3)
dist=(cna-cni)**2+(cnb-cnj)**2
if (dist.lt.dist_save) then
dist_save=dist
c6_mem=c6_ref
endif
top=top+dexp(k3*dist)*c6_ref
bottom=bottom+dexp(k3*dist)
endif
@ -65,8 +72,7 @@ c
if (bottom.gt.eps) then
c6cn=top/bottom
else
c6cn=0.0d0
call errquit(' c6cn returning zero ',0,0)
c6cn=c6_mem
endif
return
end

View file

@ -11,7 +11,14 @@
LIBRARY = libnwpw.a
$(info USE_OPENMP $(origin USE_OPENMP))
ifdef USE_OPENMP
# QA issues
override undefine USE_OPENMP
endif
$(info USE_OPENMP $(origin USE_OPENMP))
LIB_DEFINES =

View file

@ -42,9 +42,6 @@ endif
ifeq ($(USE_MPIF),y)
LIB_DEFINES += -DMPI
ifneq ($(MPI_INCLUDE),)
LIB_INCLUDES += $(patsubst -I-I%,-I%,-I$(MPI_INCLUDE))
endif
else
LIB_DEFINES += -DTCGMSG
endif

View file

@ -47,9 +47,6 @@ endif
ifeq ($(USE_MPIF),y)
LIB_DEFINES += -DMPI
ifneq ($(MPI_INCLUDE),)
LIB_INCLUDES += $(patsubst -I-I%,-I%,-I$(MPI_INCLUDE))
endif
else
LIB_DEFINES += -DTCGMSG
endif

View file

@ -43,9 +43,6 @@ endif
ifeq ($(USE_MPIF),y)
LIB_DEFINES += -DMPI
ifneq ($(MPI_INCLUDE),)
LIB_INCLUDES += $(patsubst -I-I%,-I%,-I$(MPI_INCLUDE))
endif
else
LIB_DEFINES += -DTCGMSG
endif

View file

@ -43,9 +43,6 @@ endif
ifeq ($(USE_MPIF),y)
LIB_DEFINES += -DMPI
ifneq ($(MPI_INCLUDE),)
LIB_INCLUDES += $(patsubst -I-I%,-I%,-I$(MPI_INCLUDE))
endif
else
LIB_DEFINES += -DTCGMSG
endif

View file

@ -41,9 +41,6 @@ endif
ifeq ($(USE_MPIF),y)
LIB_DEFINES += -DMPI
ifneq ($(MPI_INCLUDE),)
LIB_INCLUDES += $(patsubst -I-I%,-I%,-I$(MPI_INCLUDE))
endif
else
USES_BLAS += D3dB-tcgmsg.F
LIB_DEFINES += -DTCGMSG

View file

@ -43,9 +43,6 @@ endif
ifeq ($(USE_MPIF),y)
LIB_DEFINES += -DMPI
ifneq ($(MPI_INCLUDE),)
LIB_INCLUDES += $(patsubst -I-I%,-I%,-I$(MPI_INCLUDE))
endif
else
LIB_DEFINES += -DTCGMSG
endif

View file

@ -41,9 +41,6 @@ endif
ifeq ($(USE_MPIF),y)
LIB_DEFINES += -DMPI
ifneq ($(MPI_INCLUDE),)
LIB_INCLUDES += $(patsubst -I-I%,-I%,-I$(MPI_INCLUDE))
endif
else
LIB_DEFINES += -DTCGMSG
endif

View file

@ -40,9 +40,6 @@ include ../../../config/makelib.h
ifeq ($(USE_MPIF),y)
LIB_DEFINES += -DMPI
ifneq ($(MPI_INCLUDE),)
LIB_INCLUDES += $(patsubst -I-I%,-I%,-I$(MPI_INCLUDE))
endif
ifeq ($(DEV_GA),y)
LIB_DEFINES += -DGA_DEV
endif

View file

@ -13,18 +13,26 @@
nwpwxc_c_vs98.o nwpwxc_c_lsda.o nwpwxc_c_vwn1.o \
nwpwxc_c_vwn1_rpa.o nwpwxc_c_vwn2.o nwpwxc_c_vwn3.o nwpwxc_c_vwn4.o \
nwpwxc_c_vwn5.o nwpwxc_c_op.o \
nwpwxc_cs00.o nwpwxc_vdw3a.o nwpwxc_vdw3b.o nwpwxc_vdw3c.o \
nwpwxc_cs00.o nwpwxc_vdw3b.o nwpwxc_vdw3c.o \
nwpwxcP_xc_b97.o nwpwxc_x_b97.o nwpwxc_c_b97.o nwpwxc_xc_kt1.o \
nwpwxc_c_spbe.o nwpwxc_x_ssbD_1.o nwpwxc_c_perdew81.o \
nwpwxc_c_perdew86.o nwpwxc_x_pw91.o nwpwxc_x_pw6.o nwpwxc_x_b86b.o \
nwpwxc_x_scan.o nwpwxc_c_scan.o
ifdef NO_NWPWXC_VDW3A
OBJ_OPTIMIZE += nwpwxc_vdw3a_stub.o
else
OBJ_OPTIMIZE += nwpwxc_vdw3a.o
endif
OBJ = nwpwxc_block.o nwpwxc_add.o nwpwxc_query.o nwpwxc_nwchem.o \
nwpwxc_vdw3d.o
LIBRARY = libnwpwlib.a
USES_BLAS = nwpwxc_vdw3a.F nwpwxc_vdw3c.F nwpwxc_eval.F nwpwxc_c_vwn_a.fh
USES_BLAS = nwpwxc_vdw3c.F nwpwxc_eval.F nwpwxc_c_vwn_a.fh
ifndef NO_NWPWXC_VDW3A
USES_BLAS += nwpwxc_vdw3a.F
endif
HEADERS = nwpwxc.fh nwpwxc_param.fh
@ -32,7 +40,9 @@
include ../../../config/makefile.h
include ../../../config/makelib.h
ifndef NO_NWPWXC_VDW3A
nwpwxc_vdw3a.F:
./build_dftd3a.sh
./build_dftd3a.sh
endif

View file

@ -5,14 +5,24 @@ do_exit(){
echo ' '
exit 1
}
rm -f dftd3.f nwpwxc_vdw3a.F
export PATH=`pwd`:$PATH
check_patch(){
if [[ ! -x "$(command -v patch)" ]]; then
#try to download busybox for x86_64 linux
if [[ $(uname -s) == "Linux" ]] && [[ $(uname -m) == "x86_64" ]] ; then
if [[ $(uname -s) == "Linux" ]] ; then
echo "patch command missing"
echo "downloading busybox to use patch command"
wget https://www.busybox.net/downloads/binaries/1.31.0-defconfig-multiarch-musl/busybox-x86_64 -O patch
if [[ $(uname -m) == "x86_64" ]] ; then
barch=x86_64
elif [[ $(uname -m) == "aarch64" ]] ; then
barch=armv8l
elif [[ $(uname -m) == "ppc64" ]] ; then
barch=powerpc64
elif [[ $(echo armv6l| awk ' /arm*/ { print "arm"}') == "arm" ]] ; then
barch=armv5l
else
do_exit
fi
wget https://www.busybox.net/downloads/binaries/1.31.0-defconfig-multiarch-musl/busybox-$barch -O patch
if [ "$?" != 0 ]; then
do_exit
else
@ -22,7 +32,18 @@ if [[ ! -x "$(command -v patch)" ]]; then
do_exit
fi
fi
URL1="https://www.chemie.uni-bonn.de/pctc/mulliken-center/software/dft-d3/"
}
if [[ ! -z "${NO_NWPWXC_VDW3A}" ]]; then
rm -f nwpwxc_vdw3a.F
echo ' removed nwpwxc_vdw3a.F source'
exit 0
fi
check_patch
rm -f dftd3.f nwpwxc_vdw3a.F
export PATH=`pwd`:$PATH
#URL1="https://www.chemie.uni-bonn.de/pctc/mulliken-center/software/dft-d3/"
URL1="https://www.chemiebn.uni-bonn.de/pctc/mulliken-center/software/dft-d3/"
URL2="https://web.archive.org/web/20210527062154if_/https://www.chemie.uni-bonn.de/pctc/mulliken-center/software/dft-d3/"
declare -a urls=("$URL1" "$URL1" "$URL1" "$URL2" "$URL2")
TGZ=dftd3.tgz
@ -47,10 +68,12 @@ else
echo chchc ${COM1} ${urls[$tries]}/"$TGZ" ${COM2}
tries=1 ; until [ "$tries" -ge 5 ] ; do
${COM1} ${urls[$tries]}/"$TGZ" ${COM2} && break
tries=$((tries+1)) ; echo attempt no. $tries ; sleep 5 ; done
tries=$((tries+1)) ; echo attempt no. $tries ; sleep 9 ; done
fi
if [[ ! -f "$TGZ" ]]; then
echo "download failed"
echo "if internet connectivity is missing"
echo "set NO_NWPWXC_VDW3A=1"
exit 1
fi
tar xzf dftd3.tgz dftd3.f

View file

@ -0,0 +1,28 @@
subroutine nwpwxc_vdw3_dftd3()
call errquit(' dft-d3 functionality missing',0,0)
end subroutine
#if 0
subroutine nwpwxc_printoptions
end subroutine nwpwxc_printoptions
subroutine nwpwxc_setfuncpar(func,version,TZ,s6,rs6,s18,rs18,alp)
end subroutine nwpwxc_setfuncpar
subroutine nwpwxc_rdpar(dtmp,version,s6,s18,rs6,rs18,alp)
end subroutine nwpwxc_rdpar
subroutine nwpwxc_edisp(max_elem,maxc,n,xyz,iz,c6ab,mxc,
end subroutine nwpwxc_edisp
subroutine nwpwxc_adisp(max_elem,maxc,n,xyz,iz,c6ab,mxc,
end subroutine nwpwxc_adisp
c subroutine nwpwxc_gdisp(max_elem,maxc,n,xyz,iz,c6ab,mxc,r2r4,r0ab,rcov,
subroutine nwpwxc_gdisp(max_elem,maxc,n,xyz,iz,c6ab,mxc,
end subroutine nwpwxc_gdisp
subroutine nwpwxc_get_dC6_dCNij(maxc,max_elem,c6ab,mxci,mxcj,
end subroutine nwpwxc_get_dC6_dCNij
subroutine nwpwxc_getc6(maxc,max_elem,c6ab,mxc,iat,jat,nci,ncj,c6)
end subroutine nwpwxc_getc6
subroutine nwpwxc_ncoord(natoms,rcov,iz,xyz,cn,cn_thr)
end subroutine nwpwxc_ncoord
subroutine nwpwxc_loadc6(fname,maxc,max_elem,c6ab,maxci)
end subroutine nwpwxc_loadc6
subroutine nwpwxc_limit(iat,jat,iadr,jadr)
end subroutine nwpwxc_limit
#endif

View file

@ -1,12 +1,8 @@
#
# $Id$
#
all: ; texi2dvi peigs.texi
dvips peigs.dvi
all: ; texi2pdf peigs.texi
#.EXPORT_ALL_VARIABLES:
.EXPORT_ALL_VARIABLES:
.PHONY : clean

Binary file not shown.

File diff suppressed because it is too large Load diff

3943
src/peigs/doc/peigs.texi Normal file

File diff suppressed because it is too large Load diff

View file

@ -63,6 +63,7 @@
CalcPerturbedTDPmat1.o \
CalcPerturbedTDPmat1_opt.o \
localization_driver.o \
ibo_localization.o \
hnd_vec_write.o \
giao_b1_movecs_tools.o \
aor_r1_beta_anl_tools.o\

View file

@ -0,0 +1,967 @@
subroutine ibo_localization(rtdb, geom, ltyp, basis, g_movecs,
& nocc, nvir, nmo, nbf, natoms, eval, occ, c, pop, list)
c =================================================================
c IAO construction and generation of occupied or virtual IBOs.
c Written by J. Autschbach, jochena@buffalo.edu
c
c The formalism is described in G. Knizia, J. Chem. Theory
c Comput. 2013, 9, 4834 (with additional useful information provided
c in Senjean et al., J. Chem. Theory Comput. 2021, 17, 1337 and the
c SI of that article). What is implemented here corresponds to
c Knizia's original formulation, and the equations for p = 4 in
c Appendix D as given in the 'bugfixed' version of the article on
c the author's web page [https://sites.psu.edu/knizia/software/
c (accessed 02/2023)].
c g_movecs and arrays occ and eval are for the MOs of a given
c spin (alpha or beta)
c The localization routine called from here is in
c src/ddscf/localize.F
c =================================================================
implicit none
#include "errquit.fh"
#include "mafdecls.fh"
#include "global.fh"
#include "msgids.fh"
#include "geom.fh"
#include "rtdb.fh"
#include "bas.fh"
#include "util.fh"
#include "stdio.fh"
#include "apiP.fh"
#include "prop.fh"
#include "bgj.fh"
c subroutine arguments:
integer rtdb, geom, basis
character*(3) ltyp
integer g_movecs
integer nocc, nvir, nmo, nbf, natoms
double precision eval(nbf), occ(nbf), c(nbf,2)
double precision pop(natoms)
integer list(natoms)
c local GA handles:
integer g_s2, g_s12, g_p12, g_p21
integer g_ctilde, g_iao, g_mo
integer g_temp, g_tmp1, g_tmp2, g_cib, g_u, g_vt
integer g_smat
c local variables:
logical master, debug
integer dbg, info
integer ncore, imo, jmo, kmo
integer n1, n2, nsing, noff
integer s, nlist, a, i, t, tt, u, bflo, bfhi
double precision rtemp, qas
double precision small
parameter (small=1d-8)
integer
& mnbf, iao_mxprim, iao_mxang, iao_mxcont,
& iao_mxnbf_cn, iao_mxnbf_ce, iao_nshells,
& minbas
double precision minval, swap
integer l_val, k_val
logical int_normalize
external int_normalize
integer ga_create_atom_blocked
external ga_create_atom_blocked
character*(256) lmotrans
logical file_write_ga
external file_write_ga
character*(16) pname
c =================================================================
pname = 'ibo_localization'
dbg = 0
master = ga_nodeid().eq.0
debug = (dbg>0) .and. master ! .true. during development
if (ltyp.ne.'occ' .and. ltyp.ne.'vir') call errquit
& (pname//': loc. type unknown', 0, BASIS_ERR)
if(debug) then
if (ltyp.eq.'occ') write (luout,*)
& 'entering occupied IBO localization'
if (ltyp.eq.'vir') write (luout,*)
& 'entering virtual IBO localization'
end if
if (.not. geom_num_core(rtdb, geom, 'ddscf', ncore)) ncore = 0
if (debug) write (luout,*) 'ncore = ',ncore
c ------------------------------
c construct IAOs in the AO basis
c ------------------------------
c Note:
c Basis 1 is the AO basis used in the SCF calculation
c Basis 2 is the minimal auxiliary basis
c AO Overlap Matrix S1 -> g_smat:
g_smat = ga_create_atom_blocked(geom, basis, 'loc:smat')
call ga_zero(g_smat)
call int_1e_ga(basis, basis, g_smat, 'overlap', .false.)
c auxiliary basis overlap S2 -> g_s2 basis needs to defined in
c the input as "iao basis". we will now create the basis here and
c then calculate the overlap and the mixed ao-iao basis overlap
c S12
if (.not. bas_create(minbas, 'iao basis'))
& call errquit(pname//': cannot create iao bas', 86, BASIS_ERR)
if (.not. bas_rtdb_load(rtdb, geom, minbas, 'iao basis'))
& call errquit(pname//': iao basis not present', 86, BASIS_ERR)
if (.not. int_normalize(rtdb,minbas))
& call errquit(pname//': int_normalize iao', 86, INT_ERR)
if (.not. bas_numbf(minbas, mnbf))
& call errquit(pname//': bas err iao mnbf', 86, BASIS_ERR)
if (.not. bas_nprim_cn_max(minbas,iao_mxprim))
& call errquit(pname//': bas err iao mxprim', 86, BASIS_ERR)
if (.not. bas_high_angular(minbas,iao_mxang))
& call errquit(pname//': bas err iao mxang', 86, BASIS_ERR)
if (.not. bas_ncontr_cn_max(minbas,iao_mxcont))
& call errquit(pname//': bas err iao mxcont', 86, BASIS_ERR)
if (.not. bas_nbf_cn_max(minbas,iao_mxnbf_cn))
& call errquit(pname//': bas err iao mcnbf_cn', 86, BASIS_ERR)
if (.not. bas_nbf_ce_max(minbas,iao_mxnbf_ce))
& call errquit(pname//': bas err iao mxnbf_ce', 86, BASIS_ERR)
if (.not. bas_numcont(minbas,iao_nshells))
& call errquit(pname//': bas err iao nshells', 86, BASIS_ERR)
c not sure if it makes much sense in case the minimal basis for
c the IAOs is larger than our regular basis, so let's check that
c here and exit with an error if nbf < mnbf
if (nbf.lt.mnbf) call errquit
& (pname//': nbf < mnbf. cannot handle!', 66, UNKNOWN_ERR)
c create overlap for minbas, and the mixed basis-minbas
c overlap S12.
c Then we calculate the projectors P12 and P21
c via solving S1 P12 = S12 for P12 etc.
g_s2 = ga_create_atom_blocked(geom, minbas, 'loc:s2')
call ga_zero(g_s2)
call int_1e_ga(minbas, minbas, g_s2, 'overlap', .false.)
if (.not. ga_create(MT_DBL, nbf, mnbf, 'loc:s12',
& nbf, 0, g_s12)) call errquit(pname//': S12',61, GA_ERR)
call ga_zero(g_s12)
call int_1e_ga(basis, minbas, g_s12, 'overlap', .false.)
if (.not.ga_duplicate(g_s12, g_p12, 'g_p12')) call
& errquit(pname//': ga_dup P12',62,GA_ERR)
call ga_copy(g_s12, g_p12)
#ifdef SCALAPACK
info = ga_solve(g_smat, g_p12)
if (debug) write(luout,*)
& 'info from ga_solve P12:', info
#else
if (debug) write(luout,*) 'call 1 ma_solve'
call ma_solve(g_smat, g_p12)
#endif
if (.not. ga_create(MT_DBL, mnbf, nbf, 'loc:p21',
& mnbf, 0, g_p21)) call errquit(pname//': P21',63, GA_ERR)
call ga_transpose(g_s12, g_p21)
if (debug) write(luout,*) 'P12 assembled'
c S12 no longer needed
if (.not. ga_destroy(g_s12))
& call errquit(pname//': ga_destroy failed g_s12',61, GA_ERR)
c : scalapack throws a 'ga_to_SL: rows/cols error' so we're using
c ma_solve for the time being
c#ifdef SCALAPACK
c info = ga_solve(g_s2, g_p21)
c if (debug) write(luout,*)
c & 'info from ga_solve P21:', info
c#else
if (debug) write(luout,*) 'call 2 ma_solve'
call ma_solve(g_s2, g_p21)
c#endif
c g_s2 no longer needed
if (.not. ga_destroy(g_s2)) call errquit(
& pname//': error destroying g_s2',0, GA_ERR)
if (dbg>1) then
call ga_print(g_p12)
call ga_print(g_p21)
end if
c store P12 * P21 in array g_temp; we'll need it soon
if (.not.ga_duplicate(g_smat, g_temp, 'g_temp')) call
& errquit(pname//': ga_dup temp', 71, GA_ERR)
call ga_dgemm('n', 'n', nbf, nbf, mnbf,
& 1.0d0, g_p12, g_p21, 0.0d0, g_temp)
if (debug) write (luout,*) 'p12 p21 -> temp'
c P21 is no longer needed
if (.not. ga_destroy(g_p21))
& call errquit(pname//': ga_destroy failed g_p21',61, GA_ERR)
c construct IAOS from occ. MOs:
c copy the relevant CMOs to g_mo
if (.not. ga_create(MT_DBL, nbf, nocc, 'loc:g_mo',
& nbf, 0, g_mo)) call errquit(pname//': g_mo',0, GA_ERR)
call ga_copy_patch('n',
& g_movecs, 1, nbf, 1, nocc,
& g_mo, 1, nbf, 1, nocc)
if (debug) write (luout,*) 'movecs(occ) -> mo'
c create C-tilde from Appendix C of Knizia's IBO paper. g_temp
c holds P12 * P21; we won't need it after the next matrix
c multiplication
if (.not. ga_create(MT_DBL, nbf, nocc, 'loc:ctilde',
& nbf, 0, g_ctilde)) call errquit('loc_driver: sc',0, GA_ERR)
call ga_dgemm('n', 'n', nbf, nocc, nbf,
& 1.0d0, g_temp, g_mo, 0.0d0, g_ctilde)
if (.not. ga_destroy(g_temp))
& call errquit(pname//': ga_destroy failed g_temp',71, GA_ERR)
if (debug) write (luout,*) 'pre sym_orth 1'
call sym_orth(g_ctilde, g_smat, nbf, nocc)
if (dbg>1) call ga_print(g_ctilde)
c now assemble the matrix products to form matrix A from Appendix
c C of the IBO paper. The result will be accumulated in array
c g_iao which are the IAOs in basis 1. The shape of the array is
c the same as P12
if (.not.ga_duplicate(g_smat, g_tmp1, 'g_tmp1')) call
& errquit(pname//': ga_dup tmp1', 72, GA_ERR)
if (.not.ga_duplicate(g_smat, g_tmp2, 'g_tmp2')) call
& errquit(pname//': ga_dup tmp2', 72, GA_ERR)
if (.not.ga_duplicate(g_smat, g_temp, 'g_temp')) call
& errquit(pname//': ga_dup temp', 72, GA_ERR)
if (.not.ga_duplicate(g_p12, g_iao, 'g_iao')) call
& errquit(pname//': ga_dup iao', 72, GA_ERR)
c C * C(T)
call ga_dgemm('n', 't', nbf, nbf, nocc,
& 1.0d0, g_mo, g_mo, 0.0d0, g_temp)
c C * C(T) * S1 -> tmp1
call ga_dgemm('n', 'n', nbf, nbf, nbf,
& 1.0d0, g_temp, g_smat, 0.0d0, g_tmp1)
c tilde-C * tilde-C(T)
call ga_dgemm('n', 't', nbf, nbf, nocc,
& 1.0d0, g_ctilde, g_ctilde, 0.0d0, g_temp)
c tilde-C * tilde-C(T) * S1 -> tmp2
call ga_dgemm('n', 'n', nbf, nbf, nbf,
& 1.0d0, g_temp, g_smat, 0.0d0, g_tmp2)
c C * C(T) * S1 * tilde-C * tilde-C(T) * S1
call ga_dgemm('n', 'n', nbf, nbf, nbf,
& 1.0d0, g_tmp1, g_tmp2, 0.0d0, g_temp)
c multiply prev. result by P12 and store in g_iao
call ga_dgemm('n', 'n', nbf, mnbf, nbf,
& 1.0d0, g_temp, g_p12, 0.0d0, g_iao)
c form C * C(T) -1
call ga_add_todiag(g_tmp1, -1.0d0)
c form tilde-C * tilde-C(T) -1
call ga_add_todiag(g_tmp2, -1.0d0)
c multiply the two prev. results with each other, then multiply
c the result with P12 and add to g_iao
call ga_dgemm('n', 'n', nbf, nbf, nbf,
& 1.0d0, g_tmp1, g_tmp2, 0.0d0, g_temp)
call ga_dgemm('n', 'n', nbf, mnbf, nbf,
& 1.0d0, g_temp, g_p12, 1.0d0, g_iao)
c g_ctilde no longer needed
if (.not. ga_destroy(g_ctilde))
& call errquit(pname//': ga_destroy failed ctilde',62, GA_ERR)
c delete temp arrays before calling sym_orth, which allocates its
c own temp memory
if (.not. ga_destroy(g_tmp1))
& call errquit(pname//': ga_destroy failed g_tmp1',71, GA_ERR)
if (.not. ga_destroy(g_tmp2))
& call errquit(pname//': ga_destroy failed g_tmp2',71, GA_ERR)
if (.not. ga_destroy(g_temp))
& call errquit(pname//': ga_destroy failed g_temp',71, GA_ERR)
c last step: orthonormalize g_iao
if (debug) write (luout,*) 'pre sym_orth 2'
call sym_orth(g_iao, g_smat, nbf, mnbf)
call ga_sync
if (dbg>1) call ga_print(g_iao)
c check orthogonality of IAOs w.r.t. metric S1
c g_p12 is used for scratch
if (.not. ga_create(MT_DBL, mnbf, mnbf, 'g_temp',
& mnbf, 0, g_temp)) call errquit(pname//': temp',73, GA_ERR)
call ga_dgemm('n', 'n', nbf, mnbf, nbf,
& 1.0d0, g_smat, g_iao, 0.0d0, g_p12)
call ga_dgemm('t', 'n', mnbf, mnbf, nbf,
& 1.0d0, g_iao, g_p12, 0.0d0, g_temp)
if (dbg>1) call ga_print(g_temp)
call ga_add_todiag(g_temp, -1.0d0)
call ga_maxelt(g_temp, rtemp)
if (master) then
write(luout,'(/1x,a,1x,f18.8)')
& 'IBO loc: largest element in C(iao,T) S C(iao) -1: ',
& rtemp
write(luout,'(1x,a/1x,a/)')
& 'Significant deviations from zero may indicate',
& 'elevated numerical noise in the IAO generation'
end if
if (.not. ga_destroy(g_temp))
& call errquit(pname//': ga_destroy failed g_temp',73, GA_ERR)
c g_p12 no longer needed
if (.not. ga_destroy(g_p12))
& call errquit(pname//': ga_destroy failed g_p12',61, GA_ERR)
c ---------------------------------------------------------------
c IAOs are now in array g_iao. Next, generate occupied or virtual
c IBOs, depending on the input settings (ltyp)
c ---------------------------------------------------------------
if (ltyp.eq.'occ') then
c -----------------------
c generate occupied IBOs:
c -----------------------
c note: g_mo already holds the occupied MOs
if (debug) then
write(luout,*) 'movecs(occ) -> mo'
end if
c few more sanity check, just in case
if (nocc.gt.mnbf) call errquit
& (pname//': nocc > mnbf', 66, UNKNOWN_ERR)
if (nocc.gt.nbf) call errquit
& (pname//': nocc > nbf', 66, UNKNOWN_ERR)
c transform the set of occupied MOs to be localized to the IAO
c basis via C(iao,T) S C(MO)
if (.not. ga_create(MT_DBL, mnbf, nocc , 'loc:cib',
& mnbf, 0, g_cib))
& call errquit(pname//': cib',0, GA_ERR)
if (.not. ga_create(MT_DBL, nbf, nocc , 'loc:tmp1',
& 0, 0, g_tmp1)) call errquit(pname//': tmp1',0, GA_ERR)
call ga_dgemm('n', 'n', nbf, nocc, nbf,
& 1.0d0, g_smat, g_mo, 0.0d0, g_tmp1)
call ga_dgemm('t', 'n', mnbf, nocc, nbf,
& 1.0d0, g_iao, g_tmp1, 0.0d0, g_cib)
if (.not. ga_destroy(g_tmp1))
& call errquit(pname//': ga_destroy failed g_tmp1',0, GA_ERR)
if (dbg>1) call ga_print(g_cib)
if (debug) write(luout,*) 'cib done'
c save a copy of the starting MOs for later
if (.not.ga_duplicate(g_cib, g_tmp2, 'g_tmp2')) call
& errquit(pname//': ga_dup cib', 0, GA_ERR)
call ga_copy(g_cib, g_tmp2)
c perform localization of the MOs in IAO basis:
call localizeIBO(minbas, c, g_cib, nocc, nbf, mnbf,
& natoms)
else if (ltyp.eq.'vir') then
c ----------------------
c generate virtual IBOs:
c ----------------------
c store the virtual MOs in g_mo. The array is allocated, so we
c destroy it frst
if (.not. ga_destroy(g_mo)) call errquit(
& pname//': error destroying g_mo',1, GA_ERR)
if (.not. ga_create(MT_DBL, nbf, nvir, 'loc:g_mo',
& nbf, 0, g_mo)) call errquit(pname//': g_mo',1, GA_ERR)
call ga_copy_patch('n',
& g_movecs, 1, nbf, nocc+1, nmo,
& g_mo, 1, nbf, 1, nvir)
c sanity check: for virtual localization, assume no. of
c virtuals >= (mnbf-nocc)
if (nvir.lt.(mnbf-nocc)) call errquit
& (pname//': nvir < mnbf-nocc. Cannot handle', 66,
& UNKNOWN_ERR)
if (debug) then
write(luout,*) 'movecs(vir) -> mo'
write(luout,*) 'nocc, nvir, nmo, nbf, mnbf',
& nocc, nvir, nmo, nbf, mnbf
end if
c transform the set of virtual MOs to the IAO basis
c via C(iao,T) S C(MO), store in g_tmp2 (and keep the array)
if (.not. ga_create(MT_DBL, mnbf, nvir , 'loc:tmp2',
& 0, 0, g_tmp2)) call errquit(pname//': tmp2',0, GA_ERR)
if (.not. ga_create(MT_DBL, nbf, nvir , 'loc:tmp1',
& 0, 0, g_tmp1)) call errquit(pname//': tmp1',0, GA_ERR)
call ga_dgemm('n', 'n', nbf, nvir, nbf,
& 1.0d0, g_smat, g_mo, 0.0d0, g_tmp1)
call ga_dgemm('t', 'n', mnbf, nvir, nbf,
& 1.0d0, g_iao, g_tmp1, 0.0d0, g_tmp2)
if (.not. ga_destroy(g_tmp1))
& call errquit(pname//': ga_destroy failed g_tmp1',0, GA_ERR)
if (debug .and. master) write(luout,*) 'cib before svd'
c now perform SVD on the matrix C(vir) that we just calculated and
c stored in array g_tmp2. The "eigenvector" matrix U gives the
c true virtual MOs in the IAO basis that we want to localize
c #(sing. values) = min(mnbf,nvir) = mnbf , assuming virtuals.
c The non-zero singular values must number mnbf - nocc, which
c means we will localize a number of virtuals that's smaller than
c nvir and also smaller than min(mnbf,nvir).
nsing=min(mnbf,nvir)
if (.not. ma_push_get(MT_DBL, nsing, 'svd-vals', l_val, k_val))
& call errquit(pname//': svd-vals', nsing, MA_ERR)
if (.not. ga_create(MT_DBL, mnbf, nsing,'g_u', 0, 0, g_u))
& call errquit(pname//': svd-U', mnbf*nsing, GA_ERR)
if (.not. ga_create(MT_DBL, nsing, nvir, 'g_vt',0, 0, g_vt))
& call errquit(pname//': svd-vT', nsing*nvir, GA_ERR)
if (debug) write(luout,*) 'svd: m,n,nsing=',mnbf,nvir,nsing
call wrap_dgesvd(g_tmp2, g_u, g_vt, dbl_mb(k_val))
c wrap_dgesvd leaves the content of the array in arg 1 intact, no
c matter what the options in the call to dgesvd are inside the
c routine, so g_tmp2 still contains the initial (redundant)
c virtual MO set expressed in the IAO basis. We'll use it later.
if (debug) then
write(luout,*) pname//' singular values:'
do imo = 1,mnbf
write(luout,*) imo, dbl_mb(k_val+imo-1)
end do
end if
c count the non-zero singular values: re-define nsing
nsing = 0
do imo = 1,mnbf
if (dbl_mb(k_val+imo-1) .gt.small) nsing = nsing+1
end do
if (master) write(luout,'(1x,a,i10)')
& 'non-zero singular values: ',nsing
c we should have as many non-zero singlular values as we have
c additional IAOs beyond the number of occupied MOs. Check that,
c and print a warning if the values differ.
if (nsing .ne. (mnbf-nocc)) then
if (master)
& write(luout,'(/1x,a/1x,a/1x,a/1x,a,i6/1x,a,i6/1x,a)')
& 'WARNING: number of non-zero singular values differs from',
& ' the number of IAOs minus the number of occupied MOs.',
& ' Will continue suspiciously!',
& ' nsing : ', nsing,
& ' mnbf - nocc : ', mnbf - nocc,
& ' The numbers in the two previous lines should be the same.'
end if
c array g_cib will hold the left-singular vectors corresponding to
c non-zero singlular values. Since dgesvd returns them in
c descending order, and they are by definition positive, we simply
c take the first nsing vectors
if (.not. ga_create(MT_DBL, mnbf, nsing,'loc:cib', 0, 0, g_cib))
& call errquit(pname//': cib', mnbf*nsing, GA_ERR)
call ga_copy_patch('n',
& g_u, 1, mnbf, 1, nsing,
& g_cib, 1, mnbf, 1, nsing )
c dellocate memory used for SVD
if (.not. ga_destroy(g_vt))
& call errquit(pname//': ga_destroy failed g_vt',0, GA_ERR)
if (.not. ga_destroy(g_u))
& call errquit(pname//': ga_destroy failed g_u',0, GA_ERR)
if (.not. ma_pop_stack(l_val)) call errquit(
& pname//': error MA pop svd-vals',0, MA_ERR)
if (dbg>1) call ga_print(g_cib)
if (debug) write(luout,*) 'cib done'
c perform localization of the MOs in IAO basis:
call localizeIBO(minbas, c, g_cib, nsing, nbf, mnbf,
& natoms)
end if ! ltyp occ or vir
c localization interations done
c calculate the localization transform. The starting MOs were
c saved in g_tmp2 in the IAO basis
c CMOs(iao,T) * LMOs(iao) = localization transform -> g_tmp1
if (ltyp.eq.'occ') then
if (.not. ga_create(MT_DBL, nocc, nocc, 'loc:tmp1',
& 0, 0, g_tmp1)) call errquit(pname//': tmp1',0, GA_ERR)
n1 = nocc ! dimensioning used later
n2 = nocc
noff = 0
call ga_dgemm('t', 'n', nocc, nocc, mnbf,
& 1.0d0, g_tmp2, g_cib, 0.0d0, g_tmp1)
if (debug) write(luout,*) 'ibo occ: transformation in g_tmp1'
elseif (ltyp.eq.'vir') then
n1 = nvir ! dimensioning used later
n2 = nsing
noff = nocc ! offset for virtual orbitals
if (.not. ga_create(MT_DBL, nvir, nsing, 'loc:tmp1',
& 0, 0, g_tmp1)) call errquit(pname//': tmp1',0, GA_ERR)
call ga_dgemm('t', 'n', nvir, nsing, mnbf,
& 1.0d0, g_tmp2, g_cib, 0.0d0, g_tmp1)
end if ! ltyp
if(noff+n1 > nbf) call errquit (pname//
& ': noff + n1 > nbf', noff, UNKNOWN_ERR)
if (.not. ga_destroy(g_tmp2))
& call errquit(pname//': ga_destroy failed g_tmp2',0, GA_ERR)
c transform MO energies. We assume that the Fock matrix was diagonal
c in the basis of input MOs. We also assume that the loop dimensions
c do not exceed the capacity of array c(:,:)
do jmo = 1,n2
call ga_get(g_tmp1, 1, n1, jmo, jmo, c(1,1), 1)
rtemp = 0.0d0
do imo = 1,n1
rtemp = rtemp + eval(imo+noff) * c(imo,1)**2
end do ! jmo
c(jmo,2) = rtemp ! transformed MO energies
end do ! imo
do imo = 1,n2
eval(imo+noff) = c(imo,2)
end do
if (debug) write(luout,*) 'transformed MO energies'
c sort IBOs by energy. We'll have to do this on the master
c node, or otherwise avoid having multiple nodes working on the
c same data
if (master) then
do imo = 1,n2 -1
minval = eval(imo+noff)
c find lowest eval(kmo) below eval(imo) (with offsets)
kmo = 0
do jmo = imo+1, n2
if (eval(jmo+noff).lt.minval) then
kmo = jmo
minval = eval(jmo+noff)
end if
end do
c if kmo > 0 we swap imo and jmo
if (kmo.ne.0) then
if (debug) write(luout,*) 'swap ',imo,kmo
c swap eigenvalues
swap = eval(imo+noff)
eval(imo+noff) = eval(kmo+noff)
eval(kmo+noff) = swap
c swap columns of LMO transformation
call ga_get(g_tmp1, 1, n1, imo, imo, c(1,1), 1)
call ga_get(g_tmp1, 1, n1, kmo, kmo, c(1,2), 1)
call ga_put(g_tmp1, 1, n1, imo, imo, c(1,2), 1)
call ga_put(g_tmp1, 1, n1, kmo, kmo, c(1,1), 1)
c swap LMOs in IAO basis, for the analysis below
call ga_get(g_cib, 1, mnbf, imo, imo, c(1,1), 1)
call ga_get(g_cib, 1, mnbf, kmo, kmo, c(1,2), 1)
call ga_put(g_cib, 1, mnbf, imo, imo, c(1,2), 1)
call ga_put(g_cib, 1, mnbf, kmo, kmo, c(1,1), 1)
end if
end do
end if ! master
call ga_sync
c write transformation to scratch file
call util_file_name('lmotrans',.true.,.true.,lmotrans)
if(.not.file_write_ga(lmotrans,g_tmp1)) call errquit
& (pname//': could not write lmotrans',0, DISK_ERR)
if (debug) write (luout,*)
& pname//': lmos reordered and lmotrans written'
c transform CMOs to re-ordered LMOs
if (.not. ga_create(MT_DBL, nbf, n2 , 'loc:tmp2',
& nbf, 0, g_tmp2)) call errquit(pname//': tmp2',0, GA_ERR)
call ga_dgemm('n', 'n', nbf, n2, n1,
& 1.0d0, g_mo, g_tmp1, 0.0d0, g_tmp2)
if (debug) write (luout,*) pname//': g_tmp2 now has LMOs'
if (.not. ga_destroy(g_tmp1))
& call errquit(pname//': ga_destroy failed g_tmp1',0, GA_ERR)
c copy the IBOs into the relevant part of movecs
if (ltyp.eq.'occ') then
call ga_copy_patch('n',
& g_tmp2, 1, nbf, 1, nocc,
& g_movecs, 1, nbf, 1, nocc)
else if (ltyp.eq.'vir') then
call ga_copy_patch('n',
& g_tmp2, 1, nbf, 1, nsing,
& g_movecs, 1, nbf, nocc+1, nocc+nsing)
end if
if (debug) write (luout,*) pname//': IBOs copied to g_movecs'
if (.not. ga_destroy(g_tmp2))
& call errquit(pname//': ga_destroy failed g_tmp2',0, GA_ERR)
c Analyze localization of each MO: per LMO, a list of atomic
c populations is printed in decreasing magnitude, with the
c polulations in parentheses. This code is equivalent to the on
c found in the Pipek-Mezey localization routine
if (master) then
write(luout,'(/1x,a/)') 'IAO-IBO localized orbitals'
do s = 1, n2
call ga_get(g_cib, 1, mnbf, s, s, c(1,1), 1)
nlist = 0
do a = 1, natoms
if (.not. bas_ce2bfr(minbas, a, bflo, bfhi))
& call errquit('localized: basis ', 3,
& BASIS_ERR)
qas = 0.0d0
do u = bflo, bfhi
qas = qas + c(u,1)*c(u,1)
end do
if (abs(qas) .gt. 0.01d0) then
nlist = nlist + 1
list(nlist) = a
pop(nlist) = qas
end if
end do
do u = 1, nlist
do t = 1, u-1
if (abs(pop(t)).lt.abs(pop(u))) then
rtemp = pop(u)
pop(u) = pop(t)
pop(t) = rtemp
tt = list(u)
list(u) = list(t)
list(t) = tt
end if
end do
end do
write(luout,9002) s, eval(s+noff),
& occ(s+noff),(list(a), pop(a), a=1,nlist)
9002 format(i5, 1x, f14.6,1x, f5.3, 1x,100(2x,i4,'(',f5.2,')'))
end do
write(luout,*)
call util_flush(luout)
end if
if (.not. ga_destroy(g_cib))
& call errquit(pname//': ga_destroy failed g_cib',0, GA_ERR)
c deallocate remaining arrays that are no longer needed
if (.not. ga_destroy(g_iao)) call errquit(
& pname//': error destroying g_iao',0, GA_ERR)
if (.not. ga_destroy(g_mo)) call errquit(
& pname//': error destroying g_mo',0, GA_ERR)
c smat not needed anymore
if (.not. ga_destroy(g_smat)) call errquit(
& pname//': error destroying g_smat',0, GA_ERR)
c destroy minimal basis (iao basis)
if (.not.bas_destroy(minbas))
& call errquit(pname//'iao bas_destroy failed',0,BASIS_ERR)
if (ltyp.eq.'occ') then
n1 = 1
n2 = nocc
else if (ltyp.eq.'vir') then
n1 = nocc + 1
n2 = nocc + nsing
end if
if (master) write(luout,
& '(/1x,a,a,a/1x,a/1x,i10,2x,a,1x,i10/)')
& 'IBO localization (',ltyp,'): IBOs will be stored',
& 'in file locorb.movecs, number ',n1, 'to', n2
return
end
c =================================================================
subroutine sym_orth(g_c, g_s, n1, n2)
implicit none
#include "global.fh"
#include "mafdecls.fh"
#include "errquit.fh"
#include "stdio.fh"
#include "numerical_constants.fh"
c Given input vectors collected in matrix C, and a metric S,
c calculate
c C' = C times [transpose(C) S C]**(-1/2) such that
c transpose(C') S C' = unit matrix
c matrix S is square symmetric, dimension n1, n1
c matrix C has dimension n1, n2
c in the calling routine, matrix C may be allocated with more than
c n2 columns, which is the reason we use ga_copy_patch below
integer g_c ! in/out
integer g_s ! input
integer n1, n2 ! input
integer g_sc, g_csc
character*(8) pname
logical debug
c -----------------------------------------------------------------
pname = 'sym_orth'
debug = .false. .and. ga_nodeid().eq.0 !during development
if (debug) write(luout,*) 'entering '//pname
if(.not.ga_create(mt_dbl,n1,n2,'g_sc',0,0,g_sc))
& call errquit(pname//': error creating g_sc',141, GA_ERR)
if(.not.ga_create(mt_dbl,n2,n2,'g_csc',0,0,g_csc))
& call errquit(pname//': error creating g_csc',142, GA_ERR)
call ga_dgemm('n','n',n1, n2, n1, 1.0d0,
& g_s, g_c, 0.0d0, g_sc)
call ga_dgemm('t','n',n2, n2, n1, 1.0d0,
& g_c, g_sc, 0.0d0, g_csc)
call ga_matpow(g_csc, -FP_Half, 1d-12)
call ga_copy_patch('n',
& g_c, 1, n1, 1, n2,
& g_sc, 1, n1, 1, n2)
call ga_dgemm('n','n',n1, n2, n2, 1.0d0,
& g_sc, g_csc, 0.0d0, g_c)
if (.not. ga_destroy(g_sc))
& call errquit(pname//': error destroy g_sc',141, GA_ERR)
if (.not. ga_destroy(g_csc))
& call errquit(pname//': error destroy g_csc',142, GA_ERR)
if (debug) write(luout,*) 'leaving '//pname
return
end
c =================================================================
subroutine wrap_dgesvd(g_a, g_u, g_vt, values)
implicit none
#include "errquit.fh"
#include "global.fh"
#include "mafdecls.fh"
integer g_a, g_u, g_vt
double precision values(*)
c wrapper routine for call to dgesvd. This is similar to ga_svd_seq
c in util/ga_it2.F but some of the array dimensions had to be
c adjusted to match the usage case in the virtual IBO construction
c where m < n
integer n, m, type, l_a, k_a, l_u, k_u, l_vt, k_vt,
& l_work, k_work, lwork, info, nsing
character*(11) pname
c -----------------------------------------------------------------
pname = 'wrap_dgesvd'
call ga_inquire(g_a, type, m, n)
if (type.ne.MT_DBL) then
call errquit (pname//': array type not MT_DBL',
& type, UNKNOWN_ERR)
end if
nsing = min(m,n)
if (ga_nodeid() .eq. 0) then
lwork = 10*max(m,n)
if (.not. ma_push_get(type, m*n, 'svd', l_a, k_a))
& call errquit(pname//': a',m*n, MA_ERR)
if (.not. ma_push_get(type, m*nsing, 'svd', l_u, k_u))
& call errquit(pname//': u',m*nsing, MA_ERR)
if (.not. ma_push_get(type, nsing*n, 'svd', l_vt, k_vt))
& call errquit(pname//': vt',nsing*n, MA_ERR)
if (.not. ma_push_get(type, lwork, 'svd', l_work, k_work))
& call errquit(pname//': work',lwork, MA_ERR)
call ga_get(g_a, 1, m, 1, n, dbl_mb(k_a), m)
call dgesvd('s','s',m,n,dbl_mb(k_a),m,values,
& dbl_mb(k_u),m,dbl_mb(k_vt),nsing,
& dbl_mb(k_work),lwork,info)
if (info.ne.0) call errquit(pname//':svd failed',info,MEM_ERR)
call ga_put(g_u, 1, m, 1, nsing, dbl_mb(k_u), m)
call ga_put(g_vt, 1, nsing, 1, n, dbl_mb(k_vt), nsing)
if (.not. ma_chop_stack(l_a)) call errquit(pname//': svd ma',0,
& MA_ERR)
end if
call ga_sync()
call ga_brdcst(1,values,nsing*8,0)
call ga_sync()
end

View file

@ -34,8 +34,8 @@ c ==================================================================
#include "apiP.fh"
#include "prop.fh"
#include "bgj.fh"
#include "util.fh"
#include "util.fh"
#include "nwc_const.fh"
c subroutine arguments:
integer rtdb ! [input] rtdb handle
@ -46,17 +46,18 @@ c subroutine arguments:
c local GA handles:
integer g_uc(4), g_smat, g_sc, g_tran
integer g_movecs(2), g_cmo(2), g_temp, g_tmp1, g_tmp2
integer g_s2, g_s12, g_p12, g_p21
integer g_ctilde, g_iao, g_mo
c MA variables:
integer l_c, k_c, l_sc, k_sc, l_eval, k_eval, l_occ, k_occ
integer l_dip(3), k_dip(3)
integer l_pop, k_pop, l_list, k_list
c other local variables:
integer nclosed(2), nopen(2), nvirt(2), ncore,
& ndens, nbf, nmo, nloc, i
integer loc_opt
integer nclosed(2), nopen(2), nvirt(2), ncore, nocc, nvir,
& ndens, nbf, nmo, nloc, i, natoms
integer info, dbg, ispin
@ -92,13 +93,8 @@ c other local variables:
logical int_normalize
external int_normalize
c variables for IAO basis
integer
& nbf_iao, nbf_iao_mxprim, nbf_iao_mxang, nbf_iao_mxcont,
& nbf_iao_mxnbf_cn, nbf_iao_mxnbf_ce, nshells_iao,
& minbas
character*(19) pname
character*(3) ltyp
c ==================================================================
@ -124,20 +120,52 @@ c ----------------------
write (luout,9000) ! general header
if (loctype.eq.1) then
call util_print_centered(luout,
& 'Pipek-Mezey localization', 32, .true.)
& 'Pipek-Mezey localization', 25, .true.)
elseif (loctype.eq.2) then
call util_print_centered(luout,
& 'Boys localization', 25, .true.)
elseif (loctype.eq.3) then
call util_print_centered(luout,
& 'IAO-IBO localization', 20, .true.)
& 'IAO-IBO localization', 25, .true.)
else
write (luout,*) 'loctype =',loctype
write (luout,*) 'LocType value not supported. Exiting.'
return
end if
end if
c retrieve localization option from rtdb if it exists
if (.not. rtdb_get(rtdb, 'prop:loc_opt', mt_int, 1,
& loc_opt ))
& loc_opt = 0
c option is currently only implemented for IBOs:
if (loc_opt.gt.0 .and. (loctype.ne.3)) then
if (oprint) write(luout,'(/1x,a/1x,a)')
& 'localization option not implemented for chosen loc. type',
& 'setting option to 0 ...'
loc_opt = 0
end if
if (oprint) then
if (loc_opt .eq.0) then
call util_print_centered(luout,
& '(occupied orbitals)', 25, .false.)
else if (loc_opt.eq.1) then
call util_print_centered(luout,
& '(virtual orbitals)', 25, .false.)
else if (loc_opt.eq.2) then
call util_print_centered(luout,
& '(occ and virt orbitals)', 25, .false.)
else
call errquit(pname//': localization option out of range',
& loc_opt, INPUT_ERR)
end if
end if
c -------------------------------------------------------
c assemble some data:
@ -160,8 +188,19 @@ c allocate dbl_mb(leval) = orbital energies:
if (debug)
& write (luout,*) 'loc driver: nclosed,nopen,nvirt',nclosed(1),
& nopen(1), nvirt(1)
& nopen(1), nvirt(1)
natoms = 0
if (.not. geom_ncent(geom, natoms)) call errquit
& (pname//': geom',0, GEOM_ERR)
if (natoms.lt.1) call errquit
& (pname//': could not get natoms from rtdb', 911, UNKNOWN_ERR)
if (natoms.gt.nw_max_atom) call errquit
& (pname//': nw_max_atom too small ', 911, UNKNOWN_ERR)
c Skip localization if we have an open-shell system
c (to be extended eventually, localizing alpha and
c beta spin orbitals separately):
@ -190,9 +229,15 @@ c dynamically but for now let's make sure we don't get out of
c bounds:
if (nmo.gt.maxnloc) call
& errquit('loc_driver: maxnloc too small',0, BASIS_ERR)
& errquit('loc_driver: maxnloc too small',0, BASIS_ERR)
c for the time being, we set these variables here:
ispin = 1
nocc = nclosed(1)
nvir = nvirt(ispin)
c --------------------------------------------
c setup complete. Now proceed to the localization
c --------------------------------------------
@ -471,335 +516,72 @@ c smat not needed anymore
if (.not. ga_destroy(g_smat)) call errquit(
& 'loc_driver: error destroying g_smat',0, GA_ERR)
c ================================================================
c ===============================================================
else if (loctype.eq.3) then
c ====================
c IAO-IBO localization
c ====================
c AO Overlap Matrix S1 -> g_smat:
g_smat = ga_create_atom_blocked(geom, basis, 'loc:smat')
call ga_zero(g_smat)
call int_1e_ga(basis, basis, g_smat, 'overlap', .false.)
c auxiliary basis overlap S2 -> g_s2 basis needs to defined in the
c input as "iao basis". we will now create the basis here and then
c calculate the overlap and the mixed ao-iao basis overlap S12
if (.not. bas_create(minbas, 'iao basis'))
& call errquit(pname//': cannot create iao bas', 86, BASIS_ERR)
if (.not. bas_rtdb_load(rtdb, geom, minbas, 'iao basis'))
& call errquit(pname//': iao basis not present', 86, BASIS_ERR)
if (.not. int_normalize(rtdb,minbas))
& call errquit(pname//': int_normalize failed iao', 86, INT_ERR)
if (.not. bas_numbf(minbas, nbf_iao))
& call errquit(pname//': bas error nbf_iao', 86, BASIS_ERR)
if (.not. bas_nprim_cn_max(minbas,nbf_iao_mxprim))
& call errquit(pname//': bas error iao mxprim', 86, BASIS_ERR)
if (.not. bas_high_angular(minbas,nbf_iao_mxang))
& call errquit(pname//': bas error iao mxang', 86, BASIS_ERR)
if (.not. bas_ncontr_cn_max(minbas,nbf_iao_mxcont))
& call errquit(pname//': bas error iao mxcont', 86, BASIS_ERR)
if (.not. bas_nbf_cn_max(minbas,nbf_iao_mxnbf_cn))
& call errquit(pname//': bas error iao mcnbf_cn', 86, BASIS_ERR)
if (.not. bas_nbf_ce_max(minbas,nbf_iao_mxnbf_ce))
& call errquit(pname//': bas error iao mxnbf_ce', 86, BASIS_ERR)
if (.not. bas_numcont(minbas,nshells_iao))
& call errquit(pname//': bas error iao nshells', 86, BASIS_ERR)
c create overlap for minbas, and the mixed basis-minbas
c overlap S12.
c Then we calculate the projectors P12 and P21
c via solving S1 P12 = S12 for P12 etc.
g_s2 = ga_create_atom_blocked(geom, minbas, 'loc:s2')
call ga_zero(g_s2)
call int_1e_ga(minbas, minbas, g_s2, 'overlap', .false.)
if (.not. ga_create(MT_DBL, nbf, nbf_iao, 'loc:s12',
& nbf, 0, g_s12)) call errquit(pname//': S12',61, GA_ERR)
call ga_zero(g_s12)
call int_1e_ga(basis, minbas, g_s12, 'overlap', .false.)
if (.not.ga_duplicate(g_s12, g_p12, 'g_p12')) call
& errquit(pname//': ga_dup P12',62,GA_ERR)
call ga_copy(g_s12, g_p12)
#ifdef SCALAPACK
info = ga_solve(g_smat, g_p12)
if (debug) write(luout,*)
& 'info from ga_solve P12:', info
#else
if (debug) write(luout,*) 'call 1 ma_solve'
call ma_solve(g_smat, g_p12)
#endif
if (.not. ga_create(MT_DBL, nbf_iao, nbf, 'loc:p21',
& nbf_iao, 0, g_p21)) call errquit(pname//': P21',63, GA_ERR)
call ga_transpose(g_s12, g_p21)
if (debug) write(luout,*) 'P12 assembled'
c S12 no longer needed
if (.not. ga_destroy(g_s12))
& call errquit(pname//': ga_destroy failed g_s12',61, GA_ERR)
c : scalapack throws a 'ga_to_SL: rows/cols error' so we're using
c ma_solve for the time being
c#ifdef SCALAPACK
c info = ga_solve(g_s2, g_p21)
c if (debug) write(luout,*)
c & 'info from ga_solve P21:', info
c#else
if (debug) write(luout,*) 'call 2 ma_solve'
call ma_solve(g_s2, g_p21)
c#endif
c g_s2 no longer needed
if (.not. ga_destroy(g_s2)) call errquit(
& pname//': error destroying g_s2',0, GA_ERR)
if (dbg>1) then
call ga_print(g_p12)
call ga_print(g_p21)
end if
c store P12 * P21 in array g_temp; we'll need it soon
if (.not.ga_duplicate(g_smat, g_temp, 'g_temp')) call
& errquit(pname//': ga_dup temp', 71, GA_ERR)
call ga_dgemm('n', 'n', nbf, nbf, nbf_iao,
& 1.0d0, g_p12, g_p21, 0.0d0, g_temp)
if (debug) write (luout,*) 'p12 p21 -> temp'
c P21 is no longer needed
if (.not. ga_destroy(g_p21))
& call errquit(pname//': ga_destroy failed g_p21',61, GA_ERR)
c we will localize the doubly occupied orbitals, assuming a
c closed-shell calculation and no designated core
c corbitals. Eventually, this will need to be extended to a loop
c over spins, for unrestricted SCF, and we may want to add
c localization of the virtual space, too
if (.not. geom_num_core(rtdb, geom, 'ddscf', ncore)) ncore = 0
if (debug) write (luout,*) 'ncore = ',ncore
ispin = 1
do i = 1, nclosed(ispin)
iloc(i) = i
end do
nloc = nclosed(ispin)
c copy the relevant CMOs to g_mo
if (.not. ga_create(MT_DBL, nbf, nloc, 'loc:g_mo',
& nbf, 0, g_mo)) call errquit(pname//': g_mo',0, GA_ERR)
call ga_copy_patch('n',
& g_movecs(ispin), 1, nbf, 1, nloc,
& g_mo, 1, nbf, 1, nloc)
if (debug) write (luout,*) 'movecs -> mo'
c create C-tilde from Appendix C of Knizia's IBO paper. g_temp
c holds P12 * P21; we won't need it after the next matrix
c multiplication
if (.not. ga_create(MT_DBL, nbf, nloc, 'loc:ctilde',
& nbf, 0, g_ctilde)) call errquit('loc_driver: sc',0, GA_ERR)
call ga_dgemm('n', 'n', nbf, nloc, nbf,
& 1.0d0, g_temp, g_mo, 0.0d0, g_ctilde)
if (.not. ga_destroy(g_temp))
& call errquit(pname//': ga_destroy failed g_temp',71, GA_ERR)
if (debug) write (luout,*) 'pre sym_orth 1'
call sym_orth(g_ctilde, g_smat, nbf, nloc)
if (dbg>1) call ga_print(g_ctilde)
c now assemble the matrix products to form matrix A from Appendix
c C of the IBO paper. The result will be accumulated in array
c g_iao which are the IAOs in basis 1. The shape of the array is
c the same as P12
if (.not.ga_duplicate(g_smat, g_tmp1, 'g_tmp1')) call
& errquit(pname//': ga_dup tmp1', 72, GA_ERR)
if (.not.ga_duplicate(g_smat, g_tmp2, 'g_tmp2')) call
& errquit(pname//': ga_dup tmp2', 72, GA_ERR)
if (.not.ga_duplicate(g_smat, g_temp, 'g_temp')) call
& errquit(pname//': ga_dup temp', 72, GA_ERR)
if (.not.ga_duplicate(g_p12, g_iao, 'g_iao')) call
& errquit(pname//': ga_dup iao', 72, GA_ERR)
c C * C(trans)
call ga_dgemm('n', 't', nbf, nbf, nloc,
& 1.0d0, g_mo, g_mo, 0.0d0, g_temp)
c C * C(trans) * S1 -> tmp1
call ga_dgemm('n', 'n', nbf, nbf, nbf,
& 1.0d0, g_temp, g_smat, 0.0d0, g_tmp1)
c tilde-C * tilde-C(trans)
call ga_dgemm('n', 't', nbf, nbf, nloc,
& 1.0d0, g_ctilde, g_ctilde, 0.0d0, g_temp)
c tilde-C * tilde-C(trans) * S1 -> tmp2
call ga_dgemm('n', 'n', nbf, nbf, nbf,
& 1.0d0, g_temp, g_smat, 0.0d0, g_tmp2)
c C * C(trans) * S1 * tilde-C * tilde-C(trans) * S1
call ga_dgemm('n', 'n', nbf, nbf, nbf,
& 1.0d0, g_tmp1, g_tmp2, 0.0d0, g_temp)
c multiply prev. result by P12 and store in g_iao
call ga_dgemm('n', 'n', nbf, nbf_iao, nbf,
& 1.0d0, g_temp, g_p12, 0.0d0, g_iao)
c form C * C(trans) -1
call ga_add_todiag(g_tmp1, -1.0d0)
c form tilde-C * tilde-C(trans) -1
call ga_add_todiag(g_tmp2, -1.0d0)
c multiply the two prev. results with each other, then multiply
c the result with P12 and add to g_iao
call ga_dgemm('n', 'n', nbf, nbf, nbf,
& 1.0d0, g_tmp1, g_tmp2, 0.0d0, g_temp)
call ga_dgemm('n', 'n', nbf, nbf_iao, nbf,
& 1.0d0, g_temp, g_p12, 1.0d0, g_iao)
c g_ctilde no longer needed
if (.not. ga_destroy(g_ctilde))
& call errquit(pname//': ga_destroy failed ctilde',62, GA_ERR)
c delete temp arrays before calling sym_orth, which allocates its
c own temp memory
if (.not. ga_destroy(g_tmp1))
& call errquit(pname//': ga_destroy failed g_tmp1',71, GA_ERR)
if (.not. ga_destroy(g_tmp2))
& call errquit(pname//': ga_destroy failed g_tmp2',71, GA_ERR)
if (.not. ga_destroy(g_temp))
& call errquit(pname//': ga_destroy failed g_temp',71, GA_ERR)
c last step: orthonormalize g_iao
if (debug) write (luout,*) 'pre sym_orth 2'
call sym_orth(g_iao, g_smat, nbf, nbf_iao)
call ga_sync
if (dbg>1) call ga_print(g_iao)
c check orthogonality of IAOs w.r.t. metric S1
c g_p12 is used for scratch
if (.not. ga_create(MT_DBL, nbf_iao, nbf_iao, 'g_temp',
& nbf_iao, 0, g_temp)) call errquit(pname//': temp',73, GA_ERR)
call ga_dgemm('n', 'n', nbf, nbf_iao, nbf,
& 1.0d0, g_smat, g_iao, 0.0d0, g_p12)
call ga_dgemm('t', 'n', nbf_iao, nbf_iao, nbf,
& 1.0d0, g_iao, g_p12, 0.0d0, g_temp)
if (dbg>1) call ga_print(g_temp)
call ga_add_todiag(g_temp, -1.0d0)
call ga_maxelt(g_temp, rtemp)
if (master) then
write(luout,'(/1x,a,1x,f18.12)')
& 'IBO loc: largest element in C(iao, trans) S C(iao) -1: ',
& rtemp
write(luout,'(1x,a/1x,a/)')
& 'Significant deviations from zero may indicate',
& 'elevated numerical noise in the IAO generation'
end if
if (.not. ga_destroy(g_temp))
& call errquit(pname//': ga_destroy failed g_temp',73, GA_ERR)
c g_p12 no longer needed
if (.not. ga_destroy(g_p12))
& call errquit(pname//': ga_destroy failed g_p12',61, GA_ERR)
c allocate some memory used in the localization routine:
if (.not. ma_push_get(mt_dbl, 2*nbf_iao, 'c', l_c, k_c))
& call errquit(pname//': ma for c', 0, MA_ERR)
c jochen: comment
c IBO localization was modeled on the pre-existing PM
c localization code
call localizeIBO(basis, minbas,
& dbl_mb(k_c),
& nloc, iloc, nbf, nmo, g_mo, g_smat, g_iao, nbf_iao,
& dbl_mb(k_eval+(ispin-1)*nbf), dbl_mb(k_occ+(ispin-1)*nbf))
c g_mo now holds the localized MOs in the AO basis
c assuming occupied MO localization, we copy the LMOs into the
c relevant part of movecs
call ga_copy_patch('n',
& g_mo, 1, nbf, 1, nloc,
& g_movecs(1), 1, nbf, 1, nloc)
c deallocate remaining arrays that are no longer needed
if (.not. ma_pop_stack(l_c)) call errquit(
& pname//': error MA pop c',0, MA_ERR)
if (.not. ga_destroy(g_iao)) call errquit(
& pname//': error destroying g_iao',0, GA_ERR)
if (.not. ga_destroy(g_mo)) call errquit(
& pname//': error destroying g_mo',0, GA_ERR)
c smat not needed anymore
if (.not. ga_destroy(g_smat)) call errquit(
& pname//': error destroying g_smat',0, GA_ERR)
c destroy minimal basis (iao basis)
if (.not.bas_destroy(minbas))
& call errquit(pname//'iao bas_destroy failed',0,BASIS_ERR)
c ===================================================
c IAO-IBO localization (occupied or virtual orbitals)
c ===================================================
ispin = 1
nocc = nclosed(ispin)
nvir = nvirt(ispin)
c allocate MA array for pairs of MOs. The actual dimensions
c needed are less or equal to 2*nbf
if (.not. ma_push_get(mt_dbl, 2*nbf, 'c mo', l_c, k_c))
& call errquit(pname//': ma for c', 0, MA_ERR)
if (.not. ma_push_get(mt_dbl, natoms, 'pop', l_pop, k_pop))
& call errquit(pname//': loc:pop', 0, MA_ERR)
if (.not. ma_push_get(mt_int, natoms, 'list', l_list, k_list))
& call errquit(pname//': loc:list', 0, MA_ERR)
if (loc_opt.eq.0) then
ltyp = 'occ'
call ibo_localization(rtdb, geom, ltyp, basis,
& g_movecs(ispin),nocc,nvir, nmo, nbf, natoms,
& dbl_mb(k_eval+(ispin-1)*nbf),
& dbl_mb(k_occ+(ispin-1)*nbf),
& dbl_mb(k_c),
& dbl_mb(k_pop), int_mb(k_list))
else if (loc_opt.eq.1) then
ltyp = 'vir'
call ibo_localization(rtdb, geom, ltyp, basis,
& g_movecs(ispin),nocc,nvir, nmo, nbf, natoms,
& dbl_mb(k_eval+(ispin-1)*nbf),
& dbl_mb(k_occ+(ispin-1)*nbf),
& dbl_mb(k_c),
& dbl_mb(k_pop), int_mb(k_list))
else if(loc_opt.eq.2) then
ltyp = 'occ'
call ibo_localization(rtdb, geom, ltyp, basis,
& g_movecs(ispin),nocc,nvir, nmo, nbf, natoms,
& dbl_mb(k_eval+(ispin-1)*nbf),
& dbl_mb(k_occ+(ispin-1)*nbf),
& dbl_mb(k_c),
& dbl_mb(k_pop), int_mb(k_list))
ltyp = 'vir'
call ibo_localization(rtdb, geom, ltyp, basis,
& g_movecs(ispin),nocc,nvir, nmo, nbf, natoms,
& dbl_mb(k_eval+(ispin-1)*nbf),
& dbl_mb(k_occ+(ispin-1)*nbf),
& dbl_mb(k_c),
& dbl_mb(k_pop), int_mb(k_list))
else
call errquit(pname//': loc_opt out of range',loc_opt,
& UNKNOWN_ERR)
end if ! loc_opt
end if ! loctype
@ -849,84 +631,6 @@ c ==================================================================
& 10x,28(1h*),/,10x,'*** ORBITAL LOCALIZATION ***',/,
& 10x,28(1h*)/)
9020 format(/,10x,'Open shell calculations not yet implemented',
9020 format(/,10x,'Spin-unrestricted calculations not yet implemented',
& ' for the Localization module. Exiting')
end
c =================================================================
subroutine sym_orth(g_c, g_s, n1, n2)
implicit none
#include "global.fh"
#include "mafdecls.fh"
#include "errquit.fh"
#include "stdio.fh"
#include "numerical_constants.fh"
c Given input vectors collected in matrix C, and a metric S,
c calculate
c C' = C times [transpose(C) S C]**(-1/2) such that
c transpose(C') S C = unit matrix
c matrix S is square symmetric, dimension n1, n1
c matrix C has dimension n1, n2
c in the calling routine, matrix C may be allocated with more than
c n2 columns, which is the reason we use ga_copy_patch below
integer g_c ! in/out
integer g_s ! input
integer n1, n2 ! input
integer g_sc, g_csc
character*(8) pname
logical debug
c -----------------------------------------------------------------
pname = 'sym_orth'
debug = .false. .and. ga_nodeid().eq.0 !during development
if (debug) write(luout,*) 'entering '//pname
if(.not.ga_create(mt_dbl,n1,n2,'g_sc',0,0,g_sc))
& call errquit(pname//': error creating g_sc',141, GA_ERR)
if(.not.ga_create(mt_dbl,n2,n2,'g_csc',0,0,g_csc))
& call errquit(pname//': error creating g_csc',142, GA_ERR)
call ga_dgemm('n','n',n1, n2, n1, 1.0d0,
& g_s, g_c, 0.0d0, g_sc)
call ga_dgemm('t','n',n2, n2, n1, 1.0d0,
& g_c, g_sc, 0.0d0, g_csc)
call ga_matpow(g_csc, -FP_Half, 1d-12)
call ga_copy_patch('n',
& g_c, 1, n1, 1, n2,
& g_sc, 1, n1, 1, n2)
call ga_dgemm('n','n',n1, n2, n2, 1.0d0,
& g_sc, g_csc, 0.0d0, g_c)
if (.not. ga_destroy(g_sc))
& call errquit(pname//': error destroy g_sc',141, GA_ERR)
if (.not. ga_destroy(g_csc))
& call errquit(pname//': error destroy g_csc',142, GA_ERR)
if (debug) write(luout,*) 'leaving '//pname
return
end

View file

@ -68,7 +68,7 @@ c ... jochen:
integer aoresponse, nfreq, l_fr, k_fr,
& velocity, magneticpert, aor_giao, aor_damp, aor_conv,
& aor_orbeta, aor_gprime, aor_quad, aor_analyze,
& loc_boys, loc_pm, loc_ibo
& loc_boys, loc_pm, loc_ibo, loc_opt, itmp
double precision gamwidth, convergence
c
c>>> declarations from NWdft
@ -144,7 +144,8 @@ c ... jochen:
loc_boys = 1
loc_pm = 1
loc_ibo = 1
c
loc_opt = 0
c
c read inputs; store in rtdb
c
do iline = 1,infinity ! infinite loop over input lines
@ -315,15 +316,29 @@ c ... jochen: localization input
if (inp_a(test)) then
if ( inp_compare(.false., 'boys', test)) then
loc_boys = 0
itmp = 0
if (inp_i(itmp)) then ! localization option
loc_opt = itmp
end if
elseif ( inp_compare(.false., 'ibo', test)) then
loc_ibo = 0
itmp = 0
if (inp_i(itmp)) then ! localization option
loc_opt = itmp
end if
elseif ( inp_compare(.false., 'pm', test)) then
loc_pm = 0
itmp = 0
if (inp_i(itmp)) then ! localization option
loc_opt = itmp
end if
else ! default is PM
loc_pm = 0
loc_opt = 0
end if
else
loc_pm = 0
loc_opt = 0
end if
c ... jochen end
elseif ( inp_compare(.false., 'stoneanalysis', test)) then
@ -687,7 +702,12 @@ c
c
if (.not. rtdb_put(rtdb, 'prop:loc_ibo', mt_int, 1,
$ loc_ibo ))
$ call errquit('prop_input: rtdb_put failed', 0, RTDB_ERR)
$ call errquit('prop_input: rtdb_put failed', 0, RTDB_ERR)
c
if (.not. rtdb_put(rtdb, 'prop:loc_opt', mt_int, 1,
$ loc_opt ))
$ call errquit('prop_input: rtdb_put failed', 0, RTDB_ERR)
c
if (.not. rtdb_put(rtdb, 'prop:spinspin', mt_int, 1,
$ spinspin ))
$ call errquit('prop_input: rtdb_put failed', 0, RTDB_ERR)

Some files were not shown because too many files have changed in this diff Show more