Skip to content

Commit

Permalink
Bugfix (pyscf#136)
Browse files Browse the repository at this point in the history
* recover deleted branch

* fixed a bug in rks hessian

* cutlass repo

* FetchContent->ExternalProject

* resolve the dependency in cmake

* add more unittest

* flake8

* Do not compress with git clone

* include dftd3 and dftd4 for CI

* change PYTHONPATH

* change import for dispersion

* cleanup unit test

* skip unit test for pyscf 2.5

* revert changes in examples

* skip rhf grad

* resolve conflict
  • Loading branch information
wxj6000 authored Apr 7, 2024
1 parent 2ad6750 commit 86b977a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gpu4pyscf/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from . import lib, grad, hessian, solvent, scf, dft

__version__ = '0.7.5'
__version__ = '0.7.6'

# monkey patch libxc reference due to a bug in nvcc
from pyscf.dft import libxc
Expand Down
6 changes: 6 additions & 0 deletions gpu4pyscf/grad/tests/test_rhf_grad.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,19 @@
import pyscf
import numpy as np
import unittest
import pytest
from pyscf import scf as cpu_scf
from gpu4pyscf import scf as gpu_scf
from packaging import version

atom = '''
O 0.0000000000 -0.0000000000 0.1174000000
H -0.7570000000 -0.0000000000 -0.4696000000
H 0.7570000000 0.0000000000 -0.4696000000
'''

pyscf_25 = version.parse(pyscf.__version__) <= version.parse('2.5.0')

bas0='cc-pvtz'

def setUpModule():
Expand Down Expand Up @@ -66,9 +70,11 @@ def test_grad_rhf(self):
def test_grad_cart(self):
_check_grad(mol_cart, tol=1e-6)

@pytest.mark.skipif(pyscf_25, reason='requires pyscf 2.6 or higher')
def test_grad_d3bj(self):
_check_grad(mol_sph, tol=1e-6, disp='d3bj')

@pytest.mark.skipif(pyscf_25, reason='requires pyscf 2.6 or higher')
def test_grad_d4(self):
_check_grad(mol_sph, tol=1e-6, disp='d4')

Expand Down
6 changes: 6 additions & 0 deletions gpu4pyscf/grad/tests/test_uhf_grad.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@
import pyscf
import numpy as np
import unittest
import pytest
from gpu4pyscf import scf
from packaging import version

atom = '''
O 0.0000000000 -0.0000000000 0.1174000000
H -0.7570000000 -0.0000000000 -0.4696000000
H 0.7570000000 0.0000000000 -0.4696000000
'''

pyscf_25 = version.parse(pyscf.__version__) <= version.parse('2.5.0')

bas0='cc-pvtz'

def setUpModule():
Expand Down Expand Up @@ -67,10 +71,12 @@ def test_grad_cart(self):
print('---- testing UHF Cart -------')
_check_grad(mol_cart, tol=1e-6)

@pytest.mark.skipif(pyscf_25, reason='requires pyscf 2.6 or higher')
def test_grad_d3bj(self):
print('---- testing UHF with D3(BJ) ----')
_check_grad(mol_sph, tol=1e-6, disp='d3bj')

@pytest.mark.skipif(pyscf_25, reason='requires pyscf 2.6 or higher')
def test_grad_d4(self):
print('------- UHF with D4 -----')
_check_grad(mol_sph, tol=1e-6, disp='d4')
Expand Down

0 comments on commit 86b977a

Please sign in to comment.