From 39074f75b6f9982503651d03b250fc02bdf4ad3e Mon Sep 17 00:00:00 2001 From: Sylvain Tricot Date: Wed, 9 Feb 2022 19:08:22 +0100 Subject: [PATCH] Fixed some minor bugs. Fixed some bugs. The correlation expansion version now compiles! The shared object is imported in the calculator.py module. --- src/msspec/calculator.py | 7 +++++-- src/msspec/spec/fortran/Makefile | 8 ++++++-- src/msspec/spec/fortran/memalloc/allocation.f | 2 ++ .../spec/fortran/phd_ce_noso_nosp_nosym/coefpq.f | 2 +- .../spec/fortran/phd_ce_noso_nosp_nosym/gaunt_st.f | 2 +- .../fortran/phd_ce_noso_nosp_nosym/main_phd_ns_ce.f | 13 ++++++++----- 6 files changed, 23 insertions(+), 11 deletions(-) diff --git a/src/msspec/calculator.py b/src/msspec/calculator.py index ca18df4..83312f0 100644 --- a/src/msspec/calculator.py +++ b/src/msspec/calculator.py @@ -17,8 +17,8 @@ # along with this msspec. If not, see . # # Source file : src/msspec/calculator.py -# Last modified: Mon, 27 Sep 2021 17:49:48 +0200 -# Committed by : sylvain tricot +# Last modified: Wed, 09 Feb 2022 19:08:22 +0100 +# Committed by : Sylvain Tricot """ @@ -97,6 +97,7 @@ from msspec.spec.fortran import _eig_mi from msspec.spec.fortran import _eig_pw from msspec.spec.fortran import _phd_mi_noso_nosp_nosym from msspec.spec.fortran import _phd_se_noso_nosp_nosym +from msspec.spec.fortran import _phd_ce_noso_nosp_nosym from msspec.spec.fortran import _comp_curves from msspec.utils import get_atom_index @@ -405,6 +406,8 @@ class _MSCALCULATOR(Calculator): do_spec = _phd_se_noso_nosp_nosym.run elif self.global_parameters.algorithm == 'inversion': do_spec = _phd_mi_noso_nosp_nosym.run + elif self.global_parameters.algorithm == 'correlation': + do_spec = _phd_ce_noso_nosp_nosym.run else: LOGGER.error("\'{}\' spectroscopy with \'{}\' algorithm is not " "an allowed combination.".format(self.global_parameters.spectroscopy, diff --git a/src/msspec/spec/fortran/Makefile b/src/msspec/spec/fortran/Makefile index ad5e58f..01228ea 100644 --- a/src/msspec/spec/fortran/Makefile +++ b/src/msspec/spec/fortran/Makefile @@ -1,6 +1,6 @@ -.PHONY: all phd_se phd_mi eig_mi eig_pw comp_curve clean +.PHONY: all phd_se phd_mi phd_ce eig_mi eig_pw comp_curve clean -all: phd_se phd_mi eig_mi eig_pw comp_curve +all: phd_se phd_mi phd_ce eig_mi eig_pw comp_curve phd_se: @+$(MAKE) -f phd_se_noso_nosp_nosym.mk all @@ -8,6 +8,9 @@ phd_se: phd_mi: @+$(MAKE) -f phd_mi_noso_nosp_nosym.mk all +phd_ce: + @+$(MAKE) -f phd_ce_noso_nosp_nosym.mk all + eig_mi: @+$(MAKE) -f eig_mi.mk all @@ -20,6 +23,7 @@ comp_curve: clean:: @+$(MAKE) -f phd_se_noso_nosp_nosym.mk $@ @+$(MAKE) -f phd_mi_noso_nosp_nosym.mk $@ + @+$(MAKE) -f phd_ce_noso_nosp_nosym.mk $@ @+$(MAKE) -f eig_mi.mk $@ @+$(MAKE) -f eig_pw.mk $@ @+$(MAKE) -f comp_curve.mk $@ diff --git a/src/msspec/spec/fortran/memalloc/allocation.f b/src/msspec/spec/fortran/memalloc/allocation.f index 11ebe7e..84aea9d 100644 --- a/src/msspec/spec/fortran/memalloc/allocation.f +++ b/src/msspec/spec/fortran/memalloc/allocation.f @@ -25,6 +25,8 @@ USE OUTUNITS_MOD USE PARCAL_MOD USE PARCAL_A_MOD + USE CORREXP_MOD + USE GAUNT_C_MOD USE Q_ARRAY_MOD USE RELADS_MOD USE RELAX_MOD diff --git a/src/msspec/spec/fortran/phd_ce_noso_nosp_nosym/coefpq.f b/src/msspec/spec/fortran/phd_ce_noso_nosp_nosym/coefpq.f index 04413c8..ca093dc 100644 --- a/src/msspec/spec/fortran/phd_ce_noso_nosp_nosym/coefpq.f +++ b/src/msspec/spec/fortran/phd_ce_noso_nosp_nosym/coefpq.f @@ -13,7 +13,7 @@ C C H.-F. Zhao 2007 C USE DIM_MOD - USE Q_ARRAY + USE Q_ARRAY_MOD C INTEGER NAT,NGR C diff --git a/src/msspec/spec/fortran/phd_ce_noso_nosp_nosym/gaunt_st.f b/src/msspec/spec/fortran/phd_ce_noso_nosp_nosym/gaunt_st.f index 5e963ec..3302bcf 100644 --- a/src/msspec/spec/fortran/phd_ce_noso_nosp_nosym/gaunt_st.f +++ b/src/msspec/spec/fortran/phd_ce_noso_nosp_nosym/gaunt_st.f @@ -14,11 +14,11 @@ C This is the double precision version where the values are stored C C Last modified : 14 May 2009 C - IMPLICIT DOUBLE PRECISION (A-H,O-Z) C USE DIM_MOD USE LOGAMAD_MOD USE GAUNT_C_MOD + IMPLICIT DOUBLE PRECISION (A-H,O-Z) C INTEGER LMAX_T C diff --git a/src/msspec/spec/fortran/phd_ce_noso_nosp_nosym/main_phd_ns_ce.f b/src/msspec/spec/fortran/phd_ce_noso_nosp_nosym/main_phd_ns_ce.f index ca0b771..e1670ea 100644 --- a/src/msspec/spec/fortran/phd_ce_noso_nosp_nosym/main_phd_ns_ce.f +++ b/src/msspec/spec/fortran/phd_ce_noso_nosp_nosym/main_phd_ns_ce.f @@ -577,8 +577,9 @@ C ELSEIF(IFTHET_A.EQ.1) THEN c CALL PLOTFD_A(A,LMAX_A,ITL_A,NL1_A,NAT2_A,NE_A) ENDIF - WRITE(IUO1,57) - STOP + WRITE(IUO1,57) +CST STOP + GO TO 999 C 8 IF(IBAS.EQ.0) THEN C @@ -1325,7 +1326,8 @@ c ENDIF C IF((ISOM.NE.0).OR.(NFICHLEC.EQ.1)) CLOSE(IUO1) IF(ISOM.NE.0) CLOSE(IUO2) - STOP +CST STOP + GO TO 999 C 1 WRITE(IUO1,60) STOP @@ -1392,7 +1394,8 @@ C C 3 FORMAT(5(5X,I4)) 7 FORMAT(3X,F9.4,1X,F9.4,5X,F12.9,5X,F12.9) - 9 FORMAT(3X,F9.4,1X,F9.4,5X,E12.6,5X,E12.6) +CST 9 FORMAT(3X,F9.4,1X,F9.4,5X,E12.6,5X,E12.6) + 9 FORMAT(3X,F9.4,1X,F9.4,E18.6,5X,E18.6) 17 FORMAT(12X,'ATOM NUMBER ',I4,10X,'CORRESPONDING TRANSLATIONS ', 1': (',I3,',',I3,',',I3,')') 18 FORMAT(' ',/) @@ -1694,4 +1697,4 @@ C 1 ' ATOMS >>>>>>>>>>',/,10X,'<<<<<<<<<< ATOMS ',I4, 2 ' AND ',I4,' ARE IDENTICAL >>>>>>>>>>') C - END + 999 END