forked from pyscf/gpu4pyscf
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pickle serialization (pyscf#294)
* Add pickle serialization (fix pyscf#267) * syntax error * Fix DFHF serialization tests --------- Co-authored-by: Qiming Sun <[email protected]>
- Loading branch information
Showing
7 changed files
with
40 additions
and
7 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
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 |
---|---|---|
|
@@ -13,9 +13,9 @@ | |
# limitations under the License. | ||
|
||
# modified by Xiaojie Wu ([email protected]) | ||
|
||
import cupy | ||
from pyscf.dft import rks | ||
|
||
from gpu4pyscf.lib import logger | ||
from gpu4pyscf.dft import numint, gen_grid | ||
from gpu4pyscf.scf import hf | ||
|
@@ -257,6 +257,7 @@ def __init__(self, xc='LDA,VWN'): | |
################################################## | ||
# don't modify the following attributes, they are not input options | ||
self._numint = numint.NumInt() | ||
|
||
@property | ||
def omega(self): | ||
return self._numint.omega | ||
|
@@ -291,8 +292,13 @@ def reset(self, mol=None): | |
hf.SCF.reset(self, mol) | ||
self.grids.reset(mol) | ||
self.nlcgrids.reset(mol) | ||
self.cphf_grids.reset(mol) | ||
self._numint.reset() | ||
# The cphf_grids attribute is not available in the PySCF CPU version. | ||
# In PySCF's to_gpu() function, this attribute is not properly | ||
# initialized. mol of the KS object must be used for initialization. | ||
if mol is None: | ||
mol = self.mol | ||
self.cphf_grids.reset(mol) | ||
return self | ||
|
||
def nuc_grad_method(self): | ||
|
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