Skip to content

Commit

Permalink
cmake workflow for dftd3 and dftd4
Browse files Browse the repository at this point in the history
  • Loading branch information
wxj6000 committed Jan 12, 2024
1 parent 19dc057 commit 03979e7
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
24 changes: 24 additions & 0 deletions gpu4pyscf/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,27 @@ if(BUILD_LIBXC)
CMAKE_CACHE_ARGS -DCMAKE_CUDA_ARCHITECTURES:STRING=${CMAKE_CUDA_ARCHITECTURES}
)
endif()

option(BUILD_DFTD3 "Using DFTD3 for DFT" ON)
if(BUILD_DFTD3)
include(ExternalProject)
ExternalProject_Add(dftd3
GIT_REPOSITORY "https://github.com/dftd3/simple-dftd3"
GIT_TAG v1.0.0
PREFIX ${PROJECT_BINARY_DIR}/deps
INSTALL_DIR ${PROJECT_SOURCE_DIR}/deps
CMAKE_ARGS -DWITH_OpenMP=OFF
)
endif()

option(BUILD_DFTD4 "Using DFTD4 for DFT" ON)
if(BUILD_DFTD4)
include(ExternalProject)
ExternalProject_Add(dftd4
GIT_REPOSITORY "https://github.com/dftd4/dftd4"
GIT_TAG v3.6.0
PREFIX ${PROJECT_BINARY_DIR}/deps
INSTALL_DIR ${PROJECT_SOURCE_DIR}/deps
CMAKE_ARGS -DWITH_OpenMP=OFF
)
endif()
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import subprocess
import re
import glob
import subprocess

from setuptools import setup, find_packages, Extension
from setuptools.command.build_py import build_py
Expand Down Expand Up @@ -87,8 +86,8 @@ def run(self):
else:
self.spawn(cmd)

self.build_dftd('dftd3', 'https://github.com/dftd3/simple-dftd3/releases/download/v1.0.0/dftd3-1.0.0-sdist.tar.gz')
self.build_dftd('dftd4', 'https://github.com/dftd4/dftd4/releases/download/v3.6.0/dftd4-sdist-3.6.0.tar.gz')
#self.build_dftd('dftd3', 'https://github.com/dftd3/simple-dftd3/releases/download/v1.0.0/dftd3-1.0.0-sdist.tar.gz')
#self.build_dftd('dftd4', 'https://github.com/dftd4/dftd4/releases/download/v3.6.0/dftd4-sdist-3.6.0.tar.gz')

super().run()

Expand Down

0 comments on commit 03979e7

Please sign in to comment.