diff --git a/.github/workflows/makefile.yml b/.github/workflows/makefile.yml index ac78b4c..bdabe34 100644 --- a/.github/workflows/makefile.yml +++ b/.github/workflows/makefile.yml @@ -16,7 +16,7 @@ jobs: - name: Compile and install dependencies run: | sudo apt-get update - sudo apt-get -y install wget git build-essential liblapack-dev libblas-dev libgsl0-dev autotools-dev automake libtool gfortran python2 gawk libeigen3-dev libgmp-dev libboost-all-dev libarpack2-dev + sudo apt-get -y install wget git build-essential liblapack-dev libblas-dev libgsl0-dev autotools-dev automake libtool gfortran python2 gawk libeigen3-dev libgmp-dev libboost-all-dev libarpack2-dev libopenblas-dev # Define ENV Variables export WORKDIR=$PWD/dependencies export PATH=$PATH:$WORKDIR/bin diff --git a/Makefile b/Makefile index 4214895..8c49e87 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,6 @@ default:: doc:: cd $(TOPDIR)/doc && doxygen Doxyfile - install:: bin/lowdin bin/lowdin.x mkdir -p $(PREFIX)/.lowdin2 cp -rf $(TOPDIR)/bin/lowdinvars.sh $(TOPDIR) @@ -27,8 +26,10 @@ install:: bin/lowdin bin/lowdin.x $(SED) -i 's|COMPILATION_DATE|$(shell date)|g' $(TOPDIR)/lowdinvars.sh cp -rf $(TOPDIR)/lowdinvars.sh $(PREFIX)/.lowdin2/ cp -rf lib $(PREFIX)/.lowdin2/ + cp -rf utilities/erkale/build/erkale/basis $(PREFIX)/.lowdin2/lib/erkaleBasis mkdir -p $(PREFIX)/.lowdin2/bin cp -rf $(TOPDIR)/bin/*.x $(PREFIX)/.lowdin2/bin + cp -rf utilities/erkale/erkale/bin/erkale_fchkpt utilities/erkale/erkale/bin/erkale_loc $(PREFIX)/.lowdin2/bin cp -rf $(TOPDIR)/bin/lowdin $(TOPDIR) $(SED) -i 's|PREFIX|$(PREFIX)|g' $(TOPDIR)/lowdin cp -rf $(TOPDIR)/lowdin $(PREFIX)/lowdin2 @@ -38,7 +39,7 @@ install:: bin/lowdin bin/lowdin.x uninstall:: bin/lowdin bin/lowdin.x rm -rf $(PREFIX)/.lowdin2 rm -rf $(PREFIX)/lowdin2 - + clean:: for dir in $(SUBDIRS); \ do \ diff --git a/bin/lowdinvars.sh b/bin/lowdinvars.sh index 57c1125..5e98456 100755 --- a/bin/lowdinvars.sh +++ b/bin/lowdinvars.sh @@ -21,6 +21,11 @@ then export LOWDIN_DATA fi +if [ -z "$LOWDIN_DATA/erkaleBasis" ] +then + export ERKALE_LIBRARY="$LOWDIN_DATA/erkaleBasis" +fi + if [ -z "$PATH" ] then PATH="$LOWDIN_HOME/bin:$LOWDIN_HOME/utils:" diff --git a/configure b/configure index 26a1a9d..e7512d7 100755 --- a/configure +++ b/configure @@ -32,6 +32,8 @@ usage(){ echo "" } +TOPDIR=`pwd` + ########################################### # SET DEFAULTS ########################################### @@ -40,6 +42,7 @@ FLAGS="1" PREFIX="/usr/local" SCRATCH='/scratch' CUDAFLAGS="no" +COMP_ERKALE="yes" CXX="g++" CC="gcc" CFLAGS="-g -O2 -fopenmp -D gfortran" @@ -111,13 +114,15 @@ else LIBINT_LIBS=`awk '{if($1 == "LIBINT_LIBS" ) {for(i=3;i<=NF;i++) printf "%s ", $i}}' CONFIG` LIBXC_LIBS=`awk '{if($1 == "LIBXC_LIBS" ) {for(i=3;i<=NF;i++) printf "%s ", $i}}' CONFIG` CUDA_LIBS=`awk '{if($1 == "CUDA_LIBS" ) {for(i=3;i<=NF;i++) printf "%s ", $i}}' CONFIG` + COMP_ERKALE=`awk '{if($1 == "COMP_ERKALE" ) {for(i=3;i<=NF;i++) printf "%s ", $i}}' CONFIG` + # ALL_LIBS=`awk '{if($1 == "ALL_LIBS" ) {for(i=3;i<=NF;i++) printf "%s ", $i}}' CONFIG` fi ############################################################################### # OPTIONS FOR FORTRAN COMPILER ############################################################################### - echo "Fortran Compiler command? [$FC]" + echo "Fortran Compiler command? gfortran(default) or ifort [$FC]" read FCOMP if [ "$FCOMP" = "" ] ; then @@ -157,7 +162,6 @@ else fi CUDAFLAGS=$FCUDAFLAGS - addflagsCuda="" @@ -234,7 +238,7 @@ else ############################################################################### # SPECIFIC INSTALLATION DIRECTORIES ############################################################################### - echo "Installation directory? [$PREFIX]" + echo "Installation directory? default=/usr/local [$PREFIX]" read BINDIR if [ "$BINDIR" = "" ] ; then @@ -243,6 +247,17 @@ else PREFIX=$BINDIR + ############################################################################### + # ADDITIONAL UTILITIES + ############################################################################### + echo "Compile erkale? (for orbital localization and embedding): yes(default)/no [$COMP_ERKALE]" + read ERKALE + + if [ "$ERKALE" != "no" ] ; then + COMP_ERKALE="yes" + fi + + fi ############################################################################### # SAVING OPTIONS @@ -268,13 +283,22 @@ echo "LIBXC_LIBS = $LIBXC_LIBS" >> CONFIG echo "CUDA_LIBS = $CUDA_LIBS" >> CONFIG echo "ALL_LIBS = $ALL_LIBS" >> CONFIG echo "SED = $SED" >> CONFIG +echo "COMP_ERKALE = $COMP_ERKALE" >> CONFIG +############################################################################### +# Compile Erkale +############################################################################### +if [ "$COMP_ERKALE" = "yes" ] ; then + cd $TOPDIR/utilities/erkale + ./compileForLowdin.sh + cd $TOPDIR +fi + ############################################################################### # Generate makefiles ############################################################################### -TOPDIR=`pwd` SRCDIR="src utilities" SUBDIRS="core ints DFT scf integralsTransformation MBPT PT CalcProp aduw gepol cosmo output CI NOCI MM molden2aim jadamilu" diff --git a/src/output/Output.f90 b/src/output/Output.f90 index 63463cb..4687379 100644 --- a/src/output/Output.f90 +++ b/src/output/Output.f90 @@ -63,7 +63,7 @@ program Output_ allocate(outputs_instance(1) ) call OutputBuilder_constructor( outputs_instance(1), 1, & - "fchkFile", "ALL") + "FCHKFILE", "ALL") call OutputBuilder_buildOutput(outputs_instance(1)) call OutputBuilder_show(outputs_instance(1)) diff --git a/src/output/OutputBuilder.f90 b/src/output/OutputBuilder.f90 index ec8e55b..e09be51 100644 --- a/src/output/OutputBuilder.f90 +++ b/src/output/OutputBuilder.f90 @@ -208,6 +208,7 @@ subroutine OutputBuilder_constructor(this, ID, & auxY=0.0 auxZ=0.0 auxStep=0.0 + auxReal=0.0 if( present(offsetX)) auxX=offsetX if( present(offsetY)) auxY=offsetY @@ -321,7 +322,7 @@ subroutine OutputBuilder_constructor(this, ID, & end if if(auxStep .gt. 0.0 .and. this%cubeSize .gt. 0.0) this%pointsPerDim(1:3)=int((this%cubeSize*2.0)/auxStep) - + if( present(center) ) auxReal=sum(center*center) if(auxReal .gt. 0.0) this%point1%values=center diff --git a/src/scf/OrbitalLocalizer.f90 b/src/scf/OrbitalLocalizer.f90 index 006ab89..16c33fa 100644 --- a/src/scf/OrbitalLocalizer.f90 +++ b/src/scf/OrbitalLocalizer.f90 @@ -145,7 +145,7 @@ subroutine OrbitalLocalizer_erkaleLocal(speciesID,densityMatrix,fockMatrix,orbit close(30) - call system("erkale_loc_omp erkale.local") + call system("erkale_loc erkale.local") !!Convert erkale chk files to lowdin fchk files open(unit=30, file="erkale.write", status="replace", form="formatted")