Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Oct 2022 16:11:10 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: b24224090206 - main - science/ocean: New port: BSE code for core spectroscopy
Message-ID:  <202210301611.29UGBAHZ079731@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=b242240902068b03523fff9172c406523c2c1a0e

commit b242240902068b03523fff9172c406523c2c1a0e
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-10-30 06:42:24 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-10-30 16:11:07 +0000

    science/ocean: New port: BSE code for core spectroscopy
---
 science/Makefile                              |   1 +
 science/ocean/Makefile                        |  54 +++++++++++
 science/ocean/distinfo                        |   3 +
 science/ocean/files/Makefile.arch             |  29 ++++++
 science/ocean/files/patch-Makefile            |  13 +++
 science/ocean/files/patch-OCEAN2_Makefile     |  11 +++
 science/ocean/files/patch-PREP_src_makefile   |  11 +++
 science/ocean/files/patch-SCREEN_src_makefile |  11 +++
 science/ocean/pkg-descr                       |  10 +++
 science/ocean/pkg-plist                       | 123 ++++++++++++++++++++++++++
 10 files changed, 266 insertions(+)

diff --git a/science/Makefile b/science/Makefile
index c36eec805b91..78747dccd980 100644
--- a/science/Makefile
+++ b/science/Makefile
@@ -201,6 +201,7 @@
     SUBDIR += nlcglib
     SUBDIR += nwchem
     SUBDIR += nwchem-data
+    SUBDIR += ocean
     SUBDIR += octopus
     SUBDIR += openbabel
     SUBDIR += openems
diff --git a/science/ocean/Makefile b/science/ocean/Makefile
new file mode 100644
index 000000000000..877ba1b7cd66
--- /dev/null
+++ b/science/ocean/Makefile
@@ -0,0 +1,54 @@
+PORTNAME=	ocean
+DISTVERSIONPREFIX=	v
+DISTVERSION=	3.0.0
+CATEGORIES=	science
+PKGNAMESUFFIX=	-spectroscopy-code
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	BSE code for core spectroscopy
+WWW=		https://github.com/times-software/OCEAN
+
+LICENSE=	BSD3CLAUSE
+LICENSE_FILE=	${WRKSRC}/License
+
+LIB_DEPENDS=	libfftw3.so:math/fftw3 \
+		libopenblas.so:math/openblas
+RUN_DEPENDS=	abinit>0:science/abinit \
+		quantum-espresso>0:science/quantum-espresso
+
+USES=		fortran gmake localbase perl5 shebangfix
+USE_PERL5=	run
+
+SHEBANG_GLOB=	*.pl
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	times-software
+GH_PROJECT=	${PORTNAME:tu}
+
+MAKE_ARGS=	MPIFC=${MPIFC} MPI_HOME=${MPI_HOME}
+
+BINARY_ALIAS=	make=${GMAKE}
+
+OPTIONS_SINGLE=		MPI
+OPTIONS_SINGLE_MPI=	MPICH OPENMPI
+OPTIONS_DEFAULT=	OPENMPI
+
+MPICH_USES=		mpi:mpich
+
+OPENMPI_USES=		mpi:openmpi
+
+post-extract:
+	# copy in the Makefile.arch file
+	@${LN} -s ${FILESDIR}/Makefile.arch ${WRKSRC}/
+	# set execution flag on all *.pl files
+	@${FIND} ${WRKSRC} -name "*.pl" | ${XARGS} ${CHMOD} +x
+
+post-patch:
+	# patch the bash path (but run_examples.pl is currently dysfunctional, according to README)
+	@${REINPLACE_CMD} -i '' -e 's|#!/bin/bash|#!${LOCALBASE}/bin/bash|' ${WRKSRC}/EXAMPLE/run_examples.pl
+
+post-install:
+	# strip binaries
+	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/*.x
+
+.include <bsd.port.mk>
diff --git a/science/ocean/distinfo b/science/ocean/distinfo
new file mode 100644
index 000000000000..69c22896acb9
--- /dev/null
+++ b/science/ocean/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1667070680
+SHA256 (times-software-OCEAN-v3.0.0_GH0.tar.gz) = 9e05979504b2831c24690f384340f70e49e523b0bcbe439a884260908630f61b
+SIZE (times-software-OCEAN-v3.0.0_GH0.tar.gz) = 8045439
diff --git a/science/ocean/files/Makefile.arch b/science/ocean/files/Makefile.arch
new file mode 100644
index 000000000000..1c6c1d23d2a5
--- /dev/null
+++ b/science/ocean/files/Makefile.arch
@@ -0,0 +1,29 @@
+
+
+MPIFORT=${MPIFC}
+OPTIONS=-I${LOCALBASE}/include ${FCFLAGS}
+
+# enables fortran preprocessor
+OPTIONS += -cpp
+
+# Currently the bse solver needs MPI and BLAS
+OPTIONS += -DBLAS -DMPI
+
+# Some installations of MPI don't have latest calls
+# ( MPI_IALLREDUCE, etc. )
+OPTIONS += -D__OLD_MPI
+
+OPTIONS += -fallow-argument-mismatch
+
+OPTIONS += -ffree-line-length-512
+
+OPTIONS += -D__FFTW3
+FFTWI = -I$(PREFIX)/include/
+FFTWL = -L$(PREFIX)/lib/ -lfftw3
+
+BLAS = -L$(PREFIX) -lopenblas
+
+# Install Directory
+INSTDIR = $(DESTDIR)$(PREFIX)/bin
+
+MPI_LDFLAGS=	-L${MPI_HOME}/lib
diff --git a/science/ocean/files/patch-Makefile b/science/ocean/files/patch-Makefile
new file mode 100644
index 000000000000..a035879ec530
--- /dev/null
+++ b/science/ocean/files/patch-Makefile
@@ -0,0 +1,13 @@
+--- Makefile.orig	2022-10-30 02:03:01 UTC
++++ Makefile
+@@ -36,8 +36,8 @@ clean:
+ 
+ install:
+ 	mkdir -p $(INSTDIR)
+-	cp $(SCRIPTS) $(AUX) $(INSTDIR)
+-	cp $(AUX_EXE) $(INSTDIR)
++	#cp $(SCRIPTS) $(AUX) $(INSTDIR)
++	#cp $(AUX_EXE) $(INSTDIR)
+ 	cd Common;       make install
+ 	cd DFT;          make install
+ 	cd PREP;         make install
diff --git a/science/ocean/files/patch-OCEAN2_Makefile b/science/ocean/files/patch-OCEAN2_Makefile
new file mode 100644
index 000000000000..2513e8e84ccc
--- /dev/null
+++ b/science/ocean/files/patch-OCEAN2_Makefile
@@ -0,0 +1,11 @@
+--- OCEAN2/Makefile.orig	2022-10-30 02:16:56 UTC
++++ OCEAN2/Makefile
+@@ -35,7 +35,7 @@ OCEAN_constants.o: OCEAN_constants.f90 AI_kinds.o 
+ 	$(MPIFORT) $(FLAGS) -c -o OCEAN_constants.o OCEAN_constants.f90
+ 
+ ocean.x: $(OCEANOBJS)
+-	$(MPIFORT) $(LDFLAGS) -o ocean.x $(OCEANOBJS) $(FFTWL)  $(BLAS) $(OPENMP) $(FFTWL)
++	$(MPIFORT) $(MPI_LDFLAGS) $(LDFLAGS) -o ocean.x $(OCEANOBJS) $(FFTWL)  $(BLAS) $(OPENMP) $(FFTWL)
+ 
+ o_spect.x: o_spect.f90 AI_kinds.o gamfcn.o OCEAN_constants.o 
+ 	$(MPIFORT) $(FLAGS) -o o_spect.x o_spect.f90 AI_kinds.o gamfcn.o OCEAN_constants.o ../CNBSE/zcain/zobj/fancyvector.o
diff --git a/science/ocean/files/patch-PREP_src_makefile b/science/ocean/files/patch-PREP_src_makefile
new file mode 100644
index 000000000000..753efac6d0aa
--- /dev/null
+++ b/science/ocean/files/patch-PREP_src_makefile
@@ -0,0 +1,11 @@
+--- PREP/src/makefile.orig	2022-10-30 02:22:15 UTC
++++ PREP/src/makefile
+@@ -43,7 +43,7 @@ ocean_prep.o: ../../Modules/ai_kinds.mod ../../Modules
+ 
+ 
+ ocean_prep.x: $(OBJS)
+-	$(MPIFORT) $(OPTIONS) -o ocean_prep.x $(OBJS) $(MODOBJS) $(FFTWL) $(BLAS) $(FFTWL)
++	$(MPIFORT) $(MPI_LDFLAGS) $(OPTIONS) -o ocean_prep.x $(OBJS) $(MODOBJS) $(FFTWL) $(BLAS) $(FFTWL)
+ 
+ 
+ clean:
diff --git a/science/ocean/files/patch-SCREEN_src_makefile b/science/ocean/files/patch-SCREEN_src_makefile
new file mode 100644
index 000000000000..9236465e8b4d
--- /dev/null
+++ b/science/ocean/files/patch-SCREEN_src_makefile
@@ -0,0 +1,11 @@
+--- SCREEN/src/makefile.orig	2022-10-30 02:27:41 UTC
++++ SCREEN/src/makefile
+@@ -99,7 +99,7 @@ screen_driver.o: screen_driver.f90 ../../Modules/ai_ki
+                  screen_chi_driver.mod screen_centralpotential.mod ../../Modules/screen_opf.mod ../../Modules/screen_timekeeper.mod
+ 
+ screen_driver.x: $(OBJS)
+-	$(MPIFORT) $(OPTIONS) -o screen_driver.x $(OBJS) $(MODOBJS) $(FFTWL) $(BLAS) $(FFTWL)
++	$(MPIFORT) $(MPI_LDFLAGS) $(OPTIONS) -o screen_driver.x $(OBJS) $(MODOBJS) $(FFTWL) $(BLAS) $(FFTWL)
+ 
+ 
+ clean:
diff --git a/science/ocean/pkg-descr b/science/ocean/pkg-descr
new file mode 100644
index 000000000000..89fcca99d61c
--- /dev/null
+++ b/science/ocean/pkg-descr
@@ -0,0 +1,10 @@
+OCEAN is BSE code for core spectroscopy.
+
+OCEAN is a code for calculating near-edge x-ray spectra using the Bethe-Salpeter
+equation (BSE) is briefly reviewed. The code is capable of calculating UV/Vis,
+near-edge x-ray absorption or non-resonant scattering, and resonant inelastic
+x-ray scattering, requiring only the structure of the material as input.
+Improved default behavior and reduced input requirements are detailed as well as
+new capabilities, such as incorporation of final-state-dependent broadening,
+finite-temperature dependence, and flexibility in the density-functional theory
+exchange-correlation potentials.
diff --git a/science/ocean/pkg-plist b/science/ocean/pkg-plist
new file mode 100644
index 000000000000..8035af3c1fd3
--- /dev/null
+++ b/science/ocean/pkg-plist
@@ -0,0 +1,123 @@
+bin/ABIdriver.pl
+bin/AbinitDriver.pl
+bin/EvenQuadHalf.txt
+bin/OBF_screen_multi.pl
+bin/OBF_wfn.pl
+bin/OCEANcompare.pl
+bin/ONCVPSP-PBE-PDv0.4-standard.json
+bin/ONCVPSP-PBE-PDv0.4-stringent.json
+bin/ONCVPSP-PBEsol-PDv0.4-standard.json
+bin/ONCVPSP-PBEsol-PDv0.4-stringent.json
+bin/ONCVPSP-PW-PDv0.4-standard.json
+bin/ONCVPSP-PW-PDv0.4-stringent.json
+bin/Pquadrature
+bin/QEdriver.pl
+bin/avec.x
+bin/avg.x
+bin/builder.x
+bin/bvecs.pl
+bin/cainmultip.x
+bin/cks.x
+bin/cnbse.pl
+bin/cnbse_mpi.pl
+bin/conugtoux.x
+bin/core_shift.pl
+bin/defaults.h
+bin/defaults.pl
+bin/dendip.pl
+bin/dft.pl
+bin/dotter.x
+bin/dressximunu.x
+bin/edges.pl
+bin/exciton_plot.x
+bin/extractPsp.pl
+bin/fhi2eric.x
+bin/gauss16
+bin/getnval.x
+bin/gvecs2.pl
+bin/hfk.x
+bin/hqp
+bin/inputDatabase.pl
+bin/jdftx_dendip.pl
+bin/jdftx_density.x
+bin/jdftx_energy.x
+bin/kgen2.x
+bin/lqp
+bin/makeacell.x
+bin/makeatompp.x
+bin/makecoords.x
+bin/melcalc.x
+bin/meljtv.x
+bin/mkrbfile_mult.x
+bin/mkximunu.x
+bin/mpi_avg.x
+bin/nbse.pl
+bin/nelectron.x
+bin/o_spect.x
+bin/ocean.pl
+bin/ocean.x
+bin/ocean_prep.x
+bin/ofermi.pl
+bin/oparse.h
+bin/oparse.json
+bin/oparse.type.json
+bin/opf.pl
+bin/orthog.x
+bin/par_ab2.pl
+bin/par_dendip.pl
+bin/par_ocean.pl
+bin/parse
+bin/parse.pl
+bin/parseJSON.pl
+bin/pawsetup.x
+bin/photon.pl
+bin/pp.pl
+bin/prep.pl
+bin/projectVxc.pl
+bin/projectW.pl
+bin/pspDatabase.pl
+bin/psp_parser.pl
+bin/qe2rhoofr.pl
+bin/qe62band.pl
+bin/qe_data_file.pl
+bin/qe_dendip.pl
+bin/qeband.pl
+bin/rhoofg.x
+bin/rixs.pl
+bin/rixs_plane.x
+bin/rscombine.x
+bin/screen.pl
+bin/screen_driver.x
+bin/setup2.x
+bin/shifted_conugtoux.x
+bin/spec_average.x
+bin/specpnt
+bin/specpnt.10
+bin/specpnt.11
+bin/specpnt.12
+bin/specpnt.13
+bin/specpnt.14
+bin/specpnt.15
+bin/specpnt.16
+bin/specpnt.17
+bin/specpnt.18
+bin/specpnt.19
+bin/specpnt.20
+bin/specpnt.21
+bin/specpnt.22
+bin/specpnt.23
+bin/specpnt.24
+bin/specpnt.5
+bin/specpnt.6
+bin/specpnt.7
+bin/specpnt.8
+bin/specpnt.9
+bin/spect_range.pl
+bin/sphpts
+bin/structure.pl
+bin/upf2shirley.pl
+bin/val_exciton_plot.x
+bin/validate_opts.pl
+bin/vhommod.x
+bin/wfconvert.x
+bin/xipps.x



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