diff --git a/scripts/utility/decorator.py b/scripts/utility/decorator.py new file mode 100644 index 00000000..66b9e064 --- /dev/null +++ b/scripts/utility/decorator.py @@ -0,0 +1,26 @@ +from functools import wraps + +def cache(func): + """ + A decorator for lazy evaluation off true function + """ + saved = {} + + @wraps(func) + def newfunc(*args): + if args in saved: + return saved[args] + + result = func(*args) + saved[args] = result + return result + return newfunc + + +class classproperty(object): + + def __init__(self, fget): + self.fget = fget + + def __get__(self, owner_self, owner_cls): + return self.fget(owner_cls) diff --git a/src/CAS_SD/Makefile b/src/CAS_SD/Makefile deleted file mode 100644 index bfcd2493..00000000 --- a/src/CAS_SD/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -IRPF90 = irpf90 #-a -d -FC = gfortran -FCFLAGS= -O2 -ffree-line-length-none -I . -NINJA = ninja -AR = ar -RANLIB = ranlib - -SRC= -OBJ= -LIB= - -include irpf90.make -export - -irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile - $(IRPF90) diff --git a/src/CID/Makefile b/src/CID/Makefile deleted file mode 100644 index bfcd2493..00000000 --- a/src/CID/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -IRPF90 = irpf90 #-a -d -FC = gfortran -FCFLAGS= -O2 -ffree-line-length-none -I . -NINJA = ninja -AR = ar -RANLIB = ranlib - -SRC= -OBJ= -LIB= - -include irpf90.make -export - -irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile - $(IRPF90) diff --git a/src/CID_SC2_selected/Makefile b/src/CID_SC2_selected/Makefile deleted file mode 100644 index bfcd2493..00000000 --- a/src/CID_SC2_selected/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -IRPF90 = irpf90 #-a -d -FC = gfortran -FCFLAGS= -O2 -ffree-line-length-none -I . -NINJA = ninja -AR = ar -RANLIB = ranlib - -SRC= -OBJ= -LIB= - -include irpf90.make -export - -irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile - $(IRPF90) diff --git a/src/CID_selected/Makefile b/src/CID_selected/Makefile deleted file mode 100644 index bfcd2493..00000000 --- a/src/CID_selected/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -IRPF90 = irpf90 #-a -d -FC = gfortran -FCFLAGS= -O2 -ffree-line-length-none -I . -NINJA = ninja -AR = ar -RANLIB = ranlib - -SRC= -OBJ= -LIB= - -include irpf90.make -export - -irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile - $(IRPF90) diff --git a/src/CIS/Makefile b/src/CIS/Makefile deleted file mode 100644 index bfcd2493..00000000 --- a/src/CIS/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -IRPF90 = irpf90 #-a -d -FC = gfortran -FCFLAGS= -O2 -ffree-line-length-none -I . -NINJA = ninja -AR = ar -RANLIB = ranlib - -SRC= -OBJ= -LIB= - -include irpf90.make -export - -irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile - $(IRPF90) diff --git a/src/CISD/Makefile b/src/CISD/Makefile deleted file mode 100644 index bfcd2493..00000000 --- a/src/CISD/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -IRPF90 = irpf90 #-a -d -FC = gfortran -FCFLAGS= -O2 -ffree-line-length-none -I . -NINJA = ninja -AR = ar -RANLIB = ranlib - -SRC= -OBJ= -LIB= - -include irpf90.make -export - -irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile - $(IRPF90) diff --git a/src/CISD_SC2_selected/Makefile b/src/CISD_SC2_selected/Makefile deleted file mode 100644 index bfcd2493..00000000 --- a/src/CISD_SC2_selected/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -IRPF90 = irpf90 #-a -d -FC = gfortran -FCFLAGS= -O2 -ffree-line-length-none -I . -NINJA = ninja -AR = ar -RANLIB = ranlib - -SRC= -OBJ= -LIB= - -include irpf90.make -export - -irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile - $(IRPF90) diff --git a/src/CISD_selected/Makefile b/src/CISD_selected/Makefile deleted file mode 100644 index bfcd2493..00000000 --- a/src/CISD_selected/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -IRPF90 = irpf90 #-a -d -FC = gfortran -FCFLAGS= -O2 -ffree-line-length-none -I . -NINJA = ninja -AR = ar -RANLIB = ranlib - -SRC= -OBJ= -LIB= - -include irpf90.make -export - -irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile - $(IRPF90) diff --git a/src/DDCI_selected/Makefile b/src/DDCI_selected/Makefile deleted file mode 100644 index bfcd2493..00000000 --- a/src/DDCI_selected/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -IRPF90 = irpf90 #-a -d -FC = gfortran -FCFLAGS= -O2 -ffree-line-length-none -I . -NINJA = ninja -AR = ar -RANLIB = ranlib - -SRC= -OBJ= -LIB= - -include irpf90.make -export - -irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile - $(IRPF90) diff --git a/src/DensityFit/.gitignore b/src/DensityFit/.gitignore new file mode 100644 index 00000000..7ac9fbf6 --- /dev/null +++ b/src/DensityFit/.gitignore @@ -0,0 +1,5 @@ +IRPF90_temp/ +IRPF90_man/ +irpf90.make +irpf90_entities +tags \ No newline at end of file diff --git a/src/Determinants/Makefile b/src/Determinants/Makefile deleted file mode 100644 index bfcd2493..00000000 --- a/src/Determinants/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -IRPF90 = irpf90 #-a -d -FC = gfortran -FCFLAGS= -O2 -ffree-line-length-none -I . -NINJA = ninja -AR = ar -RANLIB = ranlib - -SRC= -OBJ= -LIB= - -include irpf90.make -export - -irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile - $(IRPF90) diff --git a/src/FCIdump/Makefile b/src/FCIdump/Makefile deleted file mode 100644 index bfcd2493..00000000 --- a/src/FCIdump/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -IRPF90 = irpf90 #-a -d -FC = gfortran -FCFLAGS= -O2 -ffree-line-length-none -I . -NINJA = ninja -AR = ar -RANLIB = ranlib - -SRC= -OBJ= -LIB= - -include irpf90.make -export - -irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile - $(IRPF90) diff --git a/src/Full_CI/Makefile b/src/Full_CI/Makefile deleted file mode 100644 index bfcd2493..00000000 --- a/src/Full_CI/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -IRPF90 = irpf90 #-a -d -FC = gfortran -FCFLAGS= -O2 -ffree-line-length-none -I . -NINJA = ninja -AR = ar -RANLIB = ranlib - -SRC= -OBJ= -LIB= - -include irpf90.make -export - -irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile - $(IRPF90) diff --git a/src/Hartree_Fock/Makefile b/src/Hartree_Fock/Makefile deleted file mode 100644 index bfcd2493..00000000 --- a/src/Hartree_Fock/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -IRPF90 = irpf90 #-a -d -FC = gfortran -FCFLAGS= -O2 -ffree-line-length-none -I . -NINJA = ninja -AR = ar -RANLIB = ranlib - -SRC= -OBJ= -LIB= - -include irpf90.make -export - -irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile - $(IRPF90) diff --git a/src/Integrals_Monoelec/Makefile b/src/Integrals_Monoelec/Makefile deleted file mode 100644 index bfcd2493..00000000 --- a/src/Integrals_Monoelec/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -IRPF90 = irpf90 #-a -d -FC = gfortran -FCFLAGS= -O2 -ffree-line-length-none -I . -NINJA = ninja -AR = ar -RANLIB = ranlib - -SRC= -OBJ= -LIB= - -include irpf90.make -export - -irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile - $(IRPF90) diff --git a/src/MOGuess/Makefile b/src/MOGuess/Makefile deleted file mode 100644 index bfcd2493..00000000 --- a/src/MOGuess/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -IRPF90 = irpf90 #-a -d -FC = gfortran -FCFLAGS= -O2 -ffree-line-length-none -I . -NINJA = ninja -AR = ar -RANLIB = ranlib - -SRC= -OBJ= -LIB= - -include irpf90.make -export - -irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile - $(IRPF90) diff --git a/src/MP2/Makefile b/src/MP2/Makefile deleted file mode 100644 index bfcd2493..00000000 --- a/src/MP2/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -IRPF90 = irpf90 #-a -d -FC = gfortran -FCFLAGS= -O2 -ffree-line-length-none -I . -NINJA = ninja -AR = ar -RANLIB = ranlib - -SRC= -OBJ= -LIB= - -include irpf90.make -export - -irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile - $(IRPF90) diff --git a/src/MRCC/Makefile b/src/MRCC/Makefile deleted file mode 100644 index bfcd2493..00000000 --- a/src/MRCC/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -IRPF90 = irpf90 #-a -d -FC = gfortran -FCFLAGS= -O2 -ffree-line-length-none -I . -NINJA = ninja -AR = ar -RANLIB = ranlib - -SRC= -OBJ= -LIB= - -include irpf90.make -export - -irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile - $(IRPF90) diff --git a/src/Molden/Makefile b/src/Molden/Makefile deleted file mode 100644 index bfcd2493..00000000 --- a/src/Molden/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -IRPF90 = irpf90 #-a -d -FC = gfortran -FCFLAGS= -O2 -ffree-line-length-none -I . -NINJA = ninja -AR = ar -RANLIB = ranlib - -SRC= -OBJ= -LIB= - -include irpf90.make -export - -irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile - $(IRPF90) diff --git a/src/QmcChem/Makefile b/src/QmcChem/Makefile deleted file mode 100644 index bfcd2493..00000000 --- a/src/QmcChem/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -IRPF90 = irpf90 #-a -d -FC = gfortran -FCFLAGS= -O2 -ffree-line-length-none -I . -NINJA = ninja -AR = ar -RANLIB = ranlib - -SRC= -OBJ= -LIB= - -include irpf90.make -export - -irpf90.make: $(filter-out IRPF90_temp/%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile - $(IRPF90) diff --git a/src/Utils/constants.include.F b/src/Utils/constants.include.F new file mode 100644 index 00000000..632dc50b --- /dev/null +++ b/src/Utils/constants.include.F @@ -0,0 +1,10 @@ +integer, parameter :: max_dim = 255 +integer, parameter :: SIMD_vector = 32 + +double precision, parameter :: pi = dacos(-1.d0) +double precision, parameter :: sqpi = dsqrt(dacos(-1.d0)) +double precision, parameter :: pi_5_2 = 34.9868366552d0 +double precision, parameter :: dfour_pi = 4.d0*dacos(-1.d0) +double precision, parameter :: dtwo_pi = 2.d0*dacos(-1.d0) +double precision, parameter :: inv_sq_pi = 1.d0/dsqrt(dacos(-1.d0)) +double precision, parameter :: inv_sq_pi_2 = 0.5d0/dsqrt(dacos(-1.d0))