-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* New Rys kernel Improve tasks generation Tune Fix cupy_helper Optimized cache Rpa Adapt to scf code q_cond double to float do_j and do_k cleanup and bugfix Add LR ERI Add SR ERI Tune sr-eri Rys ERI based j-engine Tune J-engine Task adjustment Fix condense function Add tests and examples for JK matrix evaluation * Solve merging conflicts * Missing import * Fix import errors * Conditionally compiling against CUDA_VERSION * Restore CMakeLists.txt * Missing code * test name conflicts * Fix various merging conflicts * Update unittest configuration * compilation for cuda<12.4 * Update the treatment of omega in get_jk * Handle h functions * Fix a gradients initialization bug * Add assertatin and comments * Compiling issue for rys-j * some code in legacy version --------- Co-authored-by: Qiming Sun <[email protected]> Co-authored-by: xiaojie.wu <[email protected]>
- Loading branch information
1 parent
a98497f
commit ed993be
Showing
50 changed files
with
83,896 additions
and
847 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Copyright 2024 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/>. | ||
|
||
''' | ||
Compute J and K matrices separately. The J matrix is evaluated using J-engine. | ||
''' | ||
|
||
import pyscf | ||
from gpu4pyscf import scf | ||
from gpu4pyscf.scf import jk | ||
|
||
mol = pyscf.M( | ||
atom = ''' | ||
O 0.0000000000 -0.0000000000 0.1174000000 | ||
H -0.7570000000 -0.0000000000 -0.4696000000 | ||
H 0.7570000000 0.0000000000 -0.4696000000 | ||
''', | ||
basis='def2-tzvp', | ||
verbose=5 | ||
) | ||
|
||
def get_veff(self, mol, dm, *args, **kwargs): | ||
vj = jk.get_j(mol, dm[0] + dm[1]) | ||
_, vk = jk.get_jk(mol, dm, with_j=False) | ||
return vj - vk | ||
|
||
scf.uhf.UHF.get_veff = get_veff | ||
|
||
mf = mol.UHF().to_gpu().run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,3 @@ def KS(mol, xc='LDA,VWN'): | |
return RKS(mol, xc) | ||
else: | ||
return UKS(mol, xc) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.