1# Copyright 2014-2020 The PySCF Developers. All Rights Reserved. 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15from pyscf.pbc.dft.gen_grid import UniformGrids, BeckeGrids 16from pyscf.pbc.dft import rks 17from pyscf.pbc.dft import uks 18from pyscf.pbc.dft import roks 19from pyscf.pbc.dft import krks 20from pyscf.pbc.dft import kuks 21from pyscf.pbc.dft import kroks 22from pyscf.pbc.dft import krkspu 23from pyscf.pbc.dft import kukspu 24 25UKS = uks.UKS 26ROKS = roks.ROKS 27 28KRKS = krks.KRKS 29KUKS = kuks.KUKS 30KROKS = kroks.KROKS 31 32KRKSpU = krkspu.KRKSpU 33KUKSpU = kukspu.KUKSpU 34 35def RKS(cell, *args, **kwargs): 36 if cell.spin == 0: 37 return rks.RKS(cell, *args, **kwargs) 38 else: 39 return roks.ROKS(cell, *args, **kwargs) 40RKS.__doc__ = rks.RKS.__doc__ 41 42def KS(cell, *args, **kwargs): 43 if cell.spin == 0: 44 return rks.RKS(cell, *args, **kwargs) 45 else: 46 return uks.UKS(cell, *args, **kwargs) 47KS.__doc__ = ''' 48A wrap function to create DFT object (RKS or UKS) for PBC systems.\n 49''' + rks.RKS.__doc__ 50 51def KKS(cell, *args, **kwargs): 52 if cell.spin == 0: 53 return krks.KRKS(cell, *args, **kwargs) 54 else: 55 return kuks.KUKS(cell, *args, **kwargs) 56KKS.__doc__ = ''' 57A wrap function to create DFT object with k-point sampling (KRKS or KUKS).\n 58''' + krks.KRKS.__doc__ 59