Source code for pyscf.pbc.mp

#!/usr/bin/env python
# Copyright 2014-2018 The PySCF Developers. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from pyscf.pbc import scf
from pyscf.pbc.mp import mp2
from pyscf.pbc.mp import kmp2
from pyscf.pbc.mp import kmp2_ksymm
from pyscf.pbc.lib import kpts as libkpts

[docs] def RMP2(mf, frozen=None, mo_coeff=None, mo_occ=None): mf = mf.to_rhf() return mp2.RMP2(mf, frozen, mo_coeff, mo_occ)
MP2 = RMP2
[docs] def UMP2(mf, frozen=None, mo_coeff=None, mo_occ=None): mf = mf.to_uhf() return mp2.UMP2(mf, frozen, mo_coeff, mo_occ)
[docs] def GMP2(mf, frozen=None, mo_coeff=None, mo_occ=None): mf = mf.to_ghf() return mp2.GMP2(mf, frozen, mo_coeff, mo_occ)
[docs] def KRMP2(mf, frozen=None, mo_coeff=None, mo_occ=None): if isinstance(mf.kpts, libkpts.KPoints): return kmp2_ksymm.KRMP2(mf, frozen, mo_coeff, mo_occ) else: return kmp2.KRMP2(mf, frozen, mo_coeff, mo_occ)
KMP2 = KRMP2