Skip to content

Commit

Permalink
Merge branch 'pyscf:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
wxj6000 authored Nov 22, 2023
2 parents 1694ad5 + 6a1bbd1 commit 385a24e
Show file tree
Hide file tree
Showing 34 changed files with 654 additions and 1,137 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ output/
*.swo
*.swp
*~
*.log
*.h5
**/qchem_input.in
#*
dockerfiles/manylinux/wheelhouse
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Features
- Dispersion corrections via [DFTD3](https://github.com/dftd3/simple-dftd3) and [DFTD4](https://github.com/dftd4/dftd4);
- Nonlocal functional correction (vv10) for SCF and gradient;
- ECP is supported and calculated on CPU;
- PCM solvent models and their analytical gradients;
- PCM solvent models, analytical gradients, and semi-analytical Hessian matrix;

Limitations
--------
Expand All @@ -68,7 +68,7 @@ Examples
import pyscf
from gpu4pyscf.dft import rks

atom ='''
atom ='''
O 0.0000000000 -0.0000000000 0.1174000000
H -0.7570000000 -0.0000000000 -0.4696000000
H 0.7570000000 0.0000000000 -0.4696000000
Expand All @@ -91,7 +91,7 @@ Find more examples in gpu4pyscf/examples

Benchmarks
--------
Speedup with GPU4PySCF v0.6.0 over Q-Chem 6.1 (Desity fitting, SCF, def2-tzvpp, def2-universal-jkfit, (99,590))
Speedup with GPU4PySCF v0.6.0 on A100-80G over Q-Chem 6.1 on 32-cores CPU (Desity fitting, SCF, def2-tzvpp, def2-universal-jkfit, B3LYP, (99,590))

| mol | natm | LDA | PBE | B3LYP | M06 | wB97m-v |
|:------------------|-------:|-------:|-------:|--------:|-------:|----------:|
Expand Down
35 changes: 25 additions & 10 deletions benchmarks/df/dft_driver.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Copyright 2023 The GPU4PySCF Authors. All Rights Reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import os
import csv
import pyscf
Expand Down Expand Up @@ -88,16 +103,16 @@ def run_dft(path, filename):

hess_time = -1
if args.with_hessian:
#try:
start_time = time.time()
h = mf.Hessian()
h.auxbasis_response = 1
h.max_memory = 40000
hess = h.kernel().reshape([3*mol.natm, 3*mol.natm])
hess_time = time.time() - start_time
#except Exception:
# hess_time = -1
# hess = -1
try:
start_time = time.time()
h = mf.Hessian()
h.auxbasis_response = 1
h.max_memory = 40000
hess = h.kernel().reshape([3*mol.natm, 3*mol.natm])
hess_time = time.time() - start_time
except Exception:
hess_time = -1
hess = -1

np.savez(args.output_path+filename+'.npz', e_dft=e_dft, grad=f, hess=hess)
return mol.natm, mol.nao, scf_time, grad_time, hess_time, e_dft
Expand Down
Loading

0 comments on commit 385a24e

Please sign in to comment.