Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Jun 2021 20:01:51 GMT
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: f97053f992b8 - main - science/py-pyscf: New port: Python module for quantum chemistry
Message-ID:  <202106052001.155K1pTd088685@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f97053f992b81383ebc013323ad148dfbce7b6dd

commit f97053f992b81383ebc013323ad148dfbce7b6dd
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2021-06-05 19:59:42 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2021-06-05 20:01:38 +0000

    science/py-pyscf: New port: Python module for quantum chemistry
---
 science/Makefile                                   |  1 +
 science/py-pyscf/Makefile                          | 40 ++++++++++++++++++++++
 science/py-pyscf/distinfo                          |  3 ++
 .../py-pyscf/files/patch-pyscf_lib_CMakeLists.txt  | 22 ++++++++++++
 science/py-pyscf/files/test.py                     |  4 +++
 science/py-pyscf/pkg-descr                         |  6 ++++
 6 files changed, 76 insertions(+)

diff --git a/science/Makefile b/science/Makefile
index 66209aa09188..15122fd8e7a1 100644
--- a/science/Makefile
+++ b/science/Makefile
@@ -276,6 +276,7 @@
     SUBDIR += py-pymol
     SUBDIR += py-pyosf
     SUBDIR += py-pysal
+    SUBDIR += py-pyscf
     SUBDIR += py-pyteomics
     SUBDIR += py-qcelemental
     SUBDIR += py-qcengine
diff --git a/science/py-pyscf/Makefile b/science/py-pyscf/Makefile
new file mode 100644
index 000000000000..ba862012ec8e
--- /dev/null
+++ b/science/py-pyscf/Makefile
@@ -0,0 +1,40 @@
+PORTNAME=	pyscf
+DISTVERSIONPREFIX=	v
+DISTVERSION=	2.0.0a-103
+DISTVERSIONSUFFIX=	-ga81f201c4
+CATEGORIES=	science python
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Python module for quantum chemistry
+
+LICENSE=	BSD2CLAUSE
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+PY_DEPENDS=	${PYNUMPY} \
+		${PYTHON_PKGNAMEPREFIX}scipy>0:science/py-scipy@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}h5py>0:science/py-h5py@${PY_FLAVOR}
+BUILD_DEPENDS=	${PY_DEPENDS} \
+		cmake:devel/cmake \
+		gmake:devel/gmake
+LIB_DEPENDS=	libcint.so:science/libcint \
+		libxc.so:science/libxc \
+		libxcfun.so:science/xcfun
+RUN_DEPENDS=	${PY_DEPENDS}
+
+USES=		fortran blaslapack:openblas compiler:c++11-lang python
+USE_PYTHON=	distutils autoplist
+USE_GITHUB=	yes
+
+POST_PLIST=	fix-plist
+
+post-install:
+	@${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/pyscf/lib/lib*.so
+
+fix-plist:
+	@${REINPLACE_CMD} -e 's|.*pyscf_lib_placeholder.so$$||' ${TMPPLIST}
+
+do-test: install
+	@${PYTHON_CMD} ${FILESDIR}/test.py
+
+.include <bsd.port.mk>
diff --git a/science/py-pyscf/distinfo b/science/py-pyscf/distinfo
new file mode 100644
index 000000000000..b7ec60ae09cc
--- /dev/null
+++ b/science/py-pyscf/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1622919502
+SHA256 (pyscf-pyscf-v2.0.0a-103-ga81f201c4_GH0.tar.gz) = 590c37cf2a206548f3eaec3c8458f034b8e56053e510906e5a9c05ba5d1c0569
+SIZE (pyscf-pyscf-v2.0.0a-103-ga81f201c4_GH0.tar.gz) = 9510408
diff --git a/science/py-pyscf/files/patch-pyscf_lib_CMakeLists.txt b/science/py-pyscf/files/patch-pyscf_lib_CMakeLists.txt
new file mode 100644
index 000000000000..1174b9fb17f1
--- /dev/null
+++ b/science/py-pyscf/files/patch-pyscf_lib_CMakeLists.txt
@@ -0,0 +1,22 @@
+--- pyscf/lib/CMakeLists.txt.orig	2021-06-05 19:22:32 UTC
++++ pyscf/lib/CMakeLists.txt
+@@ -138,7 +138,7 @@ set(C_LINK_TEMPLATE "<CMAKE_C_COMPILER> <CMAKE_SHARED_
+ set(CXX_LINK_TEMPLATE "<CMAKE_CXX_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
+ 
+ include(ExternalProject)
+-option(BUILD_LIBCINT "Using libcint for analytical gaussian integral" ON)
++option(BUILD_LIBCINT "Using libcint for analytical gaussian integral" OFF)
+ option(WITH_F12 "Compling F12 integrals" ON)
+ if(BUILD_LIBCINT)
+ if(NOT EXISTS "${PROJECT_SOURCE_DIR}/deps/include/cint.h")
+@@ -164,8 +164,8 @@ endif()
+ 
+ option(ENABLE_LIBXC "Using libxc for XC functional library" ON)
+ option(ENABLE_XCFUN "Using xcfun for XC functional library" ON)
+-option(BUILD_LIBXC "Download and build libxc library" ON)
+-option(BUILD_XCFUN "Download and build xcfun library" ON)
++option(BUILD_LIBXC "Download and build libxc library" OFF)
++option(BUILD_XCFUN "Download and build xcfun library" OFF)
+ 
+ if(NOT DISABLE_DFT)
+ add_subdirectory(dft)
diff --git a/science/py-pyscf/files/test.py b/science/py-pyscf/files/test.py
new file mode 100644
index 000000000000..89ce2cc2eccf
--- /dev/null
+++ b/science/py-pyscf/files/test.py
@@ -0,0 +1,4 @@
+from pyscf import gto, scf
+mol = gto.M(atom='H 0 0 0; H 0 0 1.2', basis='cc-pvdz')
+mf = scf.RHF(mol)
+mf.kernel()
diff --git a/science/py-pyscf/pkg-descr b/science/py-pyscf/pkg-descr
new file mode 100644
index 000000000000..68196e180664
--- /dev/null
+++ b/science/py-pyscf/pkg-descr
@@ -0,0 +1,6 @@
+PyMOL is a Python-enhanced molecular graphics tool. It excels at
+3D visualization of proteins, small molecules, density, surfaces,
+and trajectories. It also includes molecular editing, ray tracing,
+and movies. Open Source PyMOL is free to everyone!
+
+WWW: https://www.pymol.org/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202106052001.155K1pTd088685>