forked from pyscf/pyscf
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve docstring and other fixes (pyscf#2377)
* Add shls_slice kwarg for pyscf.df.incore (fix pyscf#1729) * Fix example 31-xc_value_on_grid.py (fix pyscf#1725) * Fix FCI wfn_symmetry example (fix pyscf#1726); simplify the fci direct_spin0_symm implementation * Update GHF-X2C docstrings (fix pyscf#1707) * Generating XC_CODES from libxc (fix pyscf#1692, pyscf#48) * Lint issues * Update copyright line (issue pyscf#1421) * Add example for BCCD (fix pyscf#1591)
- Loading branch information
Showing
17 changed files
with
1,038 additions
and
972 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/env python | ||
|
||
''' | ||
Brueckner coupled-cluster doubles (BCCD) and BCCD(T) calculations for RHF, UHF and GHF. | ||
See also the relevant discussions in https://github.com/pyscf/pyscf/issues/1591 . | ||
''' | ||
|
||
from pyscf import gto, scf, cc | ||
|
||
mol = gto.M( | ||
atom = 'H 0 0 0; F 0 0 1.1', | ||
basis = 'ccpvdz', | ||
verbose = 0, | ||
spin = 0, | ||
) | ||
myhf = mol.HF().run() | ||
|
||
mycc = cc.BCCD(myhf).run() | ||
e_r = mycc.e_tot | ||
e_ccsd_t = mycc.ccsd_t() | ||
PSI4_reference = -0.002625521337000 | ||
print(f'RHF-BCCD total energy {mycc.e_tot}.') | ||
print(f'BCCD(T) correlation energy {e_ccsd_t}. Difference to Psi4 {e_ccsd_t - PSI4_reference}') | ||
print(f'Max. value in BCCD T1 amplitudes {abs(mycc.t1).max()}') | ||
|
||
mygcc = cc.BCCD(myhf.to_ghf()).run() | ||
e_g = mygcc.e_tot | ||
print(f'GHF-BCCD total energy {mygcc.e_tot}.') | ||
|
||
# Run BCCD with frozen orbitals | ||
myhf = mol.UHF().run() | ||
myucc = cc.BCCD(myhf) | ||
myucc.frozen = [0] | ||
myucc.kernel() | ||
print(f'UHF-BCCD total energy {myucc.e_tot}.') |
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
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.