Skip to content
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

Added a framework to do the DKH scalar relativistic corrections in PySCF #133

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions examples/dkh/dkhscalar.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Example to show how to perform the dkh scalar relativistic corrections in PySCF

from pyscf import gto, scf
from mrh.my_pyscf.dkh import dkh

mol = gto.Mole(atom='''Ne 0 0 0''',basis='cc-pvdz-dk',verbose=3)

# Scalar Relativisitc Effects
# dkhord = 2 or 3 or 4
# Default c(speed of light) used in PySCF is different from other softwares.

mfdkh = scf.RHF(mol)
mfdkh.get_hcore = lambda *args: dkh(mol,dkhord=2)
mfdkh.kernel()

16 changes: 16 additions & 0 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,19 @@ set_target_properties (clib_mrh_lassi PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}
OUTPUT_NAME "lassi")

# Build the DKH library
option(ENABLE_DKH "Compiling DKH Library" ON)
if(ENABLE_DKH)
enable_language(Fortran)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g -O0")
set (DKH_SOURCE_FILES "dkh.f90")
add_library (clib_mrh_dkh SHARED ${DKH_SOURCE_FILES})
target_link_libraries (clib_mrh_dkh ${LAPACK_LIBRARIES})
set_target_properties (clib_mrh_dkh PROPERTIES
LINKER_LANGUAGE Fortran
CLEAN_DIRECT_OUTPUT 1
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}
OUTPUT_NAME "dkh")
else()
message(STATUS "DKH library compilation is disabled")
endif()
Loading
Loading