-
Couldn't load subscription status.
- Fork 44
Plane-Wave Mode #161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Plane-Wave Mode #161
Conversation
…ll, update tests, ccecp with ecut
| raise ValueError("pseudo and ecp not supported") | ||
| self.sg15_path = kwargs.pop("sg15_path", self.sg15_path) | ||
| if self.sg15_path is None: | ||
| raise ValueError("sg15_path is not set") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A warning message can be printed with information about where to find the sg15 database.
|
|
||
| Plane-wave calculations can be performed with GTH or CCECP pseudopotentials | ||
| (or all-electron for very small atoms). There is also basic support for SG15 | ||
| norm-conserving pseudopotentials. The post-SCF methods have been tested with GTH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be helpful to include some explanations about where to download the SG15 database and how to configure the path since this database is not included in the source code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
__init__.py would cause the test_**.py being installed along with the package. Most likely, this file is not needed.
| mf2.damp_type = "simple" | ||
| mf2.damp_factor = 0.7 | ||
| mf2.nvir = 4 # converge first 4 virtual bands | ||
| mf2.init_pp() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The init_pp and init_jk are automatically called within the scf() method, aren't they? Why do the explicitly called here? Can they be skipped?
| reduce_latvec = cell.lattice_vectors() / (2*np.pi) | ||
| kdota = dot(kpts, reduce_latvec) | ||
|
|
||
| swapfile = tempfile.NamedTemporaryFile(dir=lib.param.TMPDIR) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not directly create fswap = lib.H5TmpFile(dir=lib.param.TMPDIR) ?
| If not provided, a temporary file is generated. | ||
| """ | ||
| from pyscf.pbc import scf | ||
| assert(isinstance(mf, (scf.khf.KRHF,scf.kuhf.KUHF,scf.uhf.UHF))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does the gamma point RHF is excluded?
|
|
||
| def init_jk(self, with_jk=None, ace_exx=None): | ||
| if ace_exx is None: ace_exx = self.ace_exx | ||
| return jksym(self, with_jk=with_jk, ace_exx=ace_exx, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
similar to the init_jk in khf, the jksym function can be changed to a function with meaningful name, and the with_jk attribute can be returned
| nrho = 4 | ||
| elif xctype == "MGGA": | ||
| nrho = 5 | ||
| elif xctype is None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
xctype can be 'HF' in certain case.
| else: | ||
| rho_R = rhovec_R[:, 0].sum(0) | ||
| exc = dv * exc_R.dot(rho_R) | ||
| return exc, vxcvec_R |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a benefit to scale the exc value by the integral weight, here? exc and vxc have different "unit", seems misleading.
| mcc.kernel() | ||
|
|
||
| pwmf = gtomf2pwmf(mf) | ||
| pwmcc = PWKRCCSD(pwmf).kernel() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pwkrccsd can be started from a regular pwscf.PWKRHF(cell, kpts) calculation, right? I think this "normal" usage can be demonstrated . And the conversion between the GTO-KHF can then be demonstrated, with some explanation comments.
The
pyscf.pbc.pwscfmodule provides experimental support for Hartree-Fock (HF),density functional theory (DFT), second-order Møller-Plesset perturbation theory (MP2),
and coupled cluster singles doubles (CCSD) in a plane-wave basis.
The CCECP and GTH pseudopotentials are supported for these methods,
and SG15 pseudopotentials are supported for HF and DFT calculations.
Occupation smearing and symmetry reduction of k-point meshes are implemented for HF and DFT.
@hongzhouye wrote the initial version of the plane-wave mode with Hartree-Fock, MP2, and CCSD.
Feature Overview
The following self-consistent field (SCF) calculations are supported:
Currently, the Davidson algorithm is implemented for the effective Hamiltonian diagonalization.
There are two mixing schemes for the effective potential, "Simple" and "Anderson" (DIIS).
Symmetry reduction of k-points is supported for SCF calculations, along with occupation
smearing. The default plane-wave basis set and integration grid are determined by
cell.mesh,but these can be customized using the energy cutoffs
ecut_wfandecut_rhoor by settingmeshes directly using
PWKSCF.set_meshes().The following post-SCF calculations are supported:
K-point symmetry and occupation smearing are currently not supported for post-SCF
methods. The
PWKSCF.get_cpw_virtual()method can be used to create virtualmolecular orbitals in a GTO basis for use in post-SCF calculations.
Plane-wave calculations can be performed with GTH or CCECP pseudopotentials
(or all-electron for very small atoms). There is also basic support for SG15
norm-conserving pseudopotentials. The post-SCF methods have been tested with GTH
and CCECP but not SG15, while the SCF methods have been tested with GTH, CCECP, and SG15.