diff --git a/src/appl/rbiotransform90/lodcslBio.f90 b/src/appl/rbiotransform90/lodcslBio.f90 index b871bdd18..c7a8b4c70 100644 --- a/src/appl/rbiotransform90/lodcslBio.f90 +++ b/src/appl/rbiotransform90/lodcslBio.f90 @@ -18,6 +18,7 @@ SUBROUTINE LODCSLBio(NCORE,IGG) !...Translated by Pacific-Sierra Research 77to90 4.3E 13:07:22 2/14/04 !...Modified by Charlotte Froese Fischer ! Gediminas Gaigalas 10/05/17 +!...Modified by Julian Chan 8/16/19 !----------------------------------------------- ! M o d u l e s !----------------------------------------------- @@ -187,6 +188,7 @@ SUBROUTINE LODCSLBio(NCORE,IGG) 3 CONTINUE NCF = NCF + 1 ! + 1 CONTINUE ! New Line READ (21, '(A)', IOSTAT=IOS) RECORD !********************************************************************** !blk* @@ -204,12 +206,29 @@ SUBROUTINE LODCSLBio(NCORE,IGG) ! Read in the occupations (q) of the peel shells; stop with a ! message if an error occurs ! + IF(INDEX(RECORD,'(')/=0) THEN ! New Line CALL PRSRCN (RECORD, NCORE, IOCC, IERR) IF (IERR /= 0) GO TO 26 + go to 1 ! New Line + ENDIF ! New Line + +! +! Read the X, J, and (sign of) P quantum numbers +! + IF(INDEX(RECORD,'+')/=0 .OR. INDEX(RECORD,'-')/=0)THEN + IF (IOS /= 0) THEN + WRITE (ISTDE, *) 'LODCSL: Expecting intermediate ', & + 'and final angular momentum' + WRITE (ISTDE, *) 'quantum number and final parity ', & + 'specification;' + GO TO 26 + ENDIF + go to 2 + ENDIF ! ! Read the J_sub and v quantum numbers ! - READ (21, '(A)', IOSTAT=IOS) RECORD + IF (IOS /= 0) THEN WRITE (ISTDE, *) 'LODCSL: Expecting subshell quantum', & ' number specification;' @@ -218,22 +237,14 @@ SUBROUTINE LODCSLBio(NCORE,IGG) LOC = LEN_TRIM(RECORD) CALL PARSJL (1, NCORE, RECORD, LOC, IQSUB, NQS, IERR) IF (IERR /= 0) GO TO 26 -! -! Read the X, J, and (sign of) P quantum numbers -! - READ (21, '(A)', IOSTAT=IOS) RECORD - IF (IOS /= 0) THEN - WRITE (ISTDE, *) 'LODCSL: Expecting intermediate ', & - 'and final angular momentum' - WRITE (ISTDE, *) 'quantum number and final parity ', & - 'specification;' - GO TO 26 - ENDIF + GO TO 1 + ! ! Allocate additional storage if necessary ! !CFF It is possible that this should be moved to "3 Continue" ! where NCF is incremented + 2 CONTINUE IF (NCF > NCFD) THEN NEWSIZ = NCFD + NCFD/2 CALL RALLOC (IQA, NNNW, NEWSIZ, 'IQA', 'LODCSL') diff --git a/src/appl/rbiotransform90_mpi/lodcslBio.f90 b/src/appl/rbiotransform90_mpi/lodcslBio.f90 index b871bdd18..c7a8b4c70 100644 --- a/src/appl/rbiotransform90_mpi/lodcslBio.f90 +++ b/src/appl/rbiotransform90_mpi/lodcslBio.f90 @@ -18,6 +18,7 @@ SUBROUTINE LODCSLBio(NCORE,IGG) !...Translated by Pacific-Sierra Research 77to90 4.3E 13:07:22 2/14/04 !...Modified by Charlotte Froese Fischer ! Gediminas Gaigalas 10/05/17 +!...Modified by Julian Chan 8/16/19 !----------------------------------------------- ! M o d u l e s !----------------------------------------------- @@ -187,6 +188,7 @@ SUBROUTINE LODCSLBio(NCORE,IGG) 3 CONTINUE NCF = NCF + 1 ! + 1 CONTINUE ! New Line READ (21, '(A)', IOSTAT=IOS) RECORD !********************************************************************** !blk* @@ -204,12 +206,29 @@ SUBROUTINE LODCSLBio(NCORE,IGG) ! Read in the occupations (q) of the peel shells; stop with a ! message if an error occurs ! + IF(INDEX(RECORD,'(')/=0) THEN ! New Line CALL PRSRCN (RECORD, NCORE, IOCC, IERR) IF (IERR /= 0) GO TO 26 + go to 1 ! New Line + ENDIF ! New Line + +! +! Read the X, J, and (sign of) P quantum numbers +! + IF(INDEX(RECORD,'+')/=0 .OR. INDEX(RECORD,'-')/=0)THEN + IF (IOS /= 0) THEN + WRITE (ISTDE, *) 'LODCSL: Expecting intermediate ', & + 'and final angular momentum' + WRITE (ISTDE, *) 'quantum number and final parity ', & + 'specification;' + GO TO 26 + ENDIF + go to 2 + ENDIF ! ! Read the J_sub and v quantum numbers ! - READ (21, '(A)', IOSTAT=IOS) RECORD + IF (IOS /= 0) THEN WRITE (ISTDE, *) 'LODCSL: Expecting subshell quantum', & ' number specification;' @@ -218,22 +237,14 @@ SUBROUTINE LODCSLBio(NCORE,IGG) LOC = LEN_TRIM(RECORD) CALL PARSJL (1, NCORE, RECORD, LOC, IQSUB, NQS, IERR) IF (IERR /= 0) GO TO 26 -! -! Read the X, J, and (sign of) P quantum numbers -! - READ (21, '(A)', IOSTAT=IOS) RECORD - IF (IOS /= 0) THEN - WRITE (ISTDE, *) 'LODCSL: Expecting intermediate ', & - 'and final angular momentum' - WRITE (ISTDE, *) 'quantum number and final parity ', & - 'specification;' - GO TO 26 - ENDIF + GO TO 1 + ! ! Allocate additional storage if necessary ! !CFF It is possible that this should be moved to "3 Continue" ! where NCF is incremented + 2 CONTINUE IF (NCF > NCFD) THEN NEWSIZ = NCFD + NCFD/2 CALL RALLOC (IQA, NNNW, NEWSIZ, 'IQA', 'LODCSL') diff --git a/src/appl/rcsfinteract90/lodcsl_CSF.f90 b/src/appl/rcsfinteract90/lodcsl_CSF.f90 index d79d27ad5..340fe9ef2 100644 --- a/src/appl/rcsfinteract90/lodcsl_CSF.f90 +++ b/src/appl/rcsfinteract90/lodcsl_CSF.f90 @@ -11,6 +11,9 @@ SUBROUTINE LODCSL_CSF(NCFD,CSF_Number,NCORE,NPEEL,NEXT_CSF) ! Written by G. Gaigalas NIST, December 2015 * ! * !*********************************************************************** +! +!...Modified by Julian Chan 8/16/19 +! !----------------------------------------------- ! M o d u l e s !----------------------------------------------- @@ -75,6 +78,7 @@ SUBROUTINE LODCSL_CSF(NCFD,CSF_Number,NCORE,NPEEL,NEXT_CSF) ! 3 CONTINUE ! + 1 CONTINUE !New line READ (20, '(A)', IOSTAT=IOS) RECORD IF (RECORD(1:2) == ' *') THEN NEXT_CSF = .FALSE. @@ -86,25 +90,16 @@ SUBROUTINE LODCSL_CSF(NCFD,CSF_Number,NCORE,NPEEL,NEXT_CSF) ! Read in the occupations (q) of the peel shells; stop with a ! message if an error occurs ! + IF(INDEX(RECORD,'(')/=0) THEN ! New Line CALL PRSRCN (RECORD, NCORE, IOCC, IERR) IF (IERR /= 0) GO TO 26 -! -! Read the J_sub and v quantum numbers -! - READ (20, '(A)', IOSTAT=IOS) RECORD - IF (IOS /= 0) THEN - WRITE (ISTDE, *) 'LODCSL_CSF: Expecting subshell quantum', & - ' number specification;' - GO TO 26 - ENDIF - C_quant(NCF) = RECORD - LOC = LEN_TRIM(RECORD) - CALL PARSJL (1, NCORE, RECORD, LOC, IQSUB, NQS, IERR) - IF (IERR /= 0) GO TO 26 + go to 1 ! New Line + ENDIF ! New Line + ! ! Read the X, J, and (sign of) P quantum numbers ! - READ (20, '(A)', IOSTAT=IOS) RECORD + IF(INDEX(RECORD,'+')/=0 .OR. INDEX(RECORD,'-')/=0)THEN IF (IOS /= 0) THEN WRITE (ISTDE, *) 'LODCSL_CSF: Expecting intermediate ', & 'and final angular momentum' @@ -129,9 +124,25 @@ SUBROUTINE LODCSL_CSF(NCFD,CSF_Number,NCORE,NPEEL,NEXT_CSF) ENDIF END DO ENDIF + GO TO 2 !New line + ENDIF !New line +! +! Read the J_sub and v quantum numbers +! + IF (IOS /= 0) THEN + WRITE (ISTDE, *) 'LODCSL_CSF: Expecting subshell quantum', & + ' number specification;' + GO TO 26 + ENDIF + C_quant(NCF) = RECORD + LOC = LEN_TRIM(RECORD) + CALL PARSJL (1, NCORE, RECORD, LOC, IQSUB, NQS, IERR) + IF (IERR /= 0) GO TO 26 + GO TO 1 ! New line ! ! Zero out the arrays that store packed integers ! + 2 CONTINUE !New line DO I = 1,NNNW IQA(I,NCF) = 0 JQSA(I,1,NCF) = 0 diff --git a/src/appl/rcsfinteract90/lodcsl_MR.f90 b/src/appl/rcsfinteract90/lodcsl_MR.f90 index 2c2036bef..347d88cd9 100644 --- a/src/appl/rcsfinteract90/lodcsl_MR.f90 +++ b/src/appl/rcsfinteract90/lodcsl_MR.f90 @@ -11,6 +11,9 @@ SUBROUTINE LODCSL_MR(NCORE,NPEEL,NCFD,NEXT_BLOCK) ! Written by G. Gaigalas NIST, December 2015 * ! * !*********************************************************************** +! +!...Modified by Julian Chan 8/16/19 +! !----------------------------------------------- ! M o d u l e s !----------------------------------------------- @@ -83,6 +86,7 @@ SUBROUTINE LODCSL_MR(NCORE,NPEEL,NCFD,NEXT_BLOCK) 3 CONTINUE NCF = NCF + 1 ! + 1 CONTINUE READ (21, '(A)', IOSTAT=IOS) RECORD IF (RECORD(1:2) == ' *') THEN NBLOCK = NBLOCK + 1 @@ -98,25 +102,16 @@ SUBROUTINE LODCSL_MR(NCORE,NPEEL,NCFD,NEXT_BLOCK) ! Read in the occupations (q) of the peel shells; stop with a ! message if an error occurs ! + IF(INDEX(RECORD,'(')/=0) THEN ! New Line CALL PRSRCN (RECORD, NCORE, IOCC, IERR) IF (IERR /= 0) GO TO 26 -! -! Read the J_sub and v quantum numbers -! - IF (IOS /= 0) THEN - WRITE (ISTDE, *) 'LODCSL: Expecting subshell quantum', & - ' number specification;' - GO TO 26 - ENDIF - READ (21, '(A)', IOSTAT=IOS) RECORD - C_quant(NCF) = RECORD - LOC = LEN_TRIM(RECORD) - CALL PARSJL (1, NCORE, RECORD, LOC, IQSUB, NQS, IERR) - IF (IERR /= 0) GO TO 26 + go to 1 ! New Line + ENDIF ! New Line + ! ! Read the X, J, and (sign of) P quantum numbers ! - READ (21, '(A)', IOSTAT=IOS) RECORD + IF(INDEX(RECORD,'+')/=0 .OR. INDEX(RECORD,'-')/=0)THEN IF (IOS /= 0) THEN WRITE (ISTDE, *) 'LODCSL: Expecting intermediate ', & 'and final angular momentum' @@ -128,9 +123,25 @@ SUBROUTINE LODCSL_MR(NCORE,NPEEL,NCFD,NEXT_BLOCK) WRITE(22,'(A)') TRIM(C_shell(NCF)) WRITE(22,'(A)') TRIM(C_quant(NCF)) WRITE(22,'(A)') TRIM(C_coupl(NCF)) + GO TO 2 !New line + ENDIF !New line +! +! Read the J_sub and v quantum numbers +! + IF (IOS /= 0) THEN + WRITE (ISTDE, *) 'LODCSL: Expecting subshell quantum', & + ' number specification;' + GO TO 26 + ENDIF + C_quant(NCF) = RECORD + LOC = LEN_TRIM(RECORD) + CALL PARSJL (1, NCORE, RECORD, LOC, IQSUB, NQS, IERR) + IF (IERR /= 0) GO TO 26 + GO TO 1 ! New line ! ! Zero out the arrays that store packed integers ! + 2 CONTINUE DO I = 1,NNNW IQA(I,NCF) = 0 JQSA(I,1,NCF) = 0 diff --git a/src/appl/rmcdhf90/lodcsh2GG.f90 b/src/appl/rmcdhf90/lodcsh2GG.f90 index 4275ce83e..714f95842 100644 --- a/src/appl/rmcdhf90/lodcsh2GG.f90 +++ b/src/appl/rmcdhf90/lodcsh2GG.f90 @@ -33,6 +33,7 @@ SUBROUTINE LODCSH2GG(NFILE, NCORE, JB) !...Translated by Pacific-Sierra Research 77to90 4.3E 12:13:05 2/14/04 !...Modified by Charlotte Froese Fischer ! Gediminas Gaigalas 10/05/17 +!...Modified by Julian Chan 8/16/19 !----------------------------------------------- ! M o d u l e s !----------------------------------------------- @@ -122,6 +123,7 @@ SUBROUTINE LODCSH2GG(NFILE, NCORE, JB) !GG NCF = NCF + 1 !GGGG ! + 1 CONTINUE !New line READ (NFILE, '(A)', IOSTAT=IOS) STR !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -145,12 +147,30 @@ SUBROUTINE LODCSH2GG(NFILE, NCORE, JB) ! Read in the occupations (q) of the peel shells; stop with a ! message if an error occurs ! + IF(INDEX(STR,'(')/=0) THEN ! New Line CALL PRSRCN (STR, NCORE, IOCC, IERR) IF (IERR /= 0) GO TO 28 + go to 1 ! New Line + ENDIF ! New Line + +! +! Read the X, J, and (sign of) P quantum numbers +! + IF(INDEX(STR,'+')/=0 .OR. INDEX(STR,'-')/=0)THEN + IF (IOS /= 0) THEN + WRITE (ISTDE, *) MYNAME//': Expecting intermediate ', & + 'and final angular momentum' + WRITE (ISTDE, *) 'quantum number and final parity ', & + 'specification;' + GO TO 26 + ENDIF + GO TO 2 !New line + ENDIF !New line + ! ! Read the J_sub and v quantum numbers ! - READ (nfile,'(A)',IOSTAT = IOS) str + IF (IOS /= 0) THEN WRITE (ISTDE, *) MYNAME//': Expecting subshell quantum', & ' number specification;' @@ -159,20 +179,12 @@ SUBROUTINE LODCSH2GG(NFILE, NCORE, JB) LOC = LEN_TRIM(STR) CALL PARSJL (1, NCORE, STR, LOC, IQSUB, NQS, IERR) IF (IERR /= 0) GO TO 27 -! -! Read the X, J, and (sign of) P quantum numbers -! - READ (nfile,'(A)',IOSTAT = IOS) str - IF (IOS /= 0) THEN - WRITE (ISTDE, *) MYNAME//': Expecting intermediate ', & - 'and final angular momentum' - WRITE (ISTDE, *) 'quantum number and final parity ', & - 'specification;' - GO TO 26 - ENDIF + GO TO 1 ! New line + ! ! Zero out the arrays that store packed integers ! + 2 CONTINUE IQA(:NNNW,NCF) = 0 !GG JQSA(:NNNW,1,NCF) = 0 !GG JQSA(:NNNW,2,NCF) = 0 diff --git a/src/appl/rmcdhf90_mpi/lodcsh2GG.f90 b/src/appl/rmcdhf90_mpi/lodcsh2GG.f90 index 4275ce83e..714f95842 100644 --- a/src/appl/rmcdhf90_mpi/lodcsh2GG.f90 +++ b/src/appl/rmcdhf90_mpi/lodcsh2GG.f90 @@ -33,6 +33,7 @@ SUBROUTINE LODCSH2GG(NFILE, NCORE, JB) !...Translated by Pacific-Sierra Research 77to90 4.3E 12:13:05 2/14/04 !...Modified by Charlotte Froese Fischer ! Gediminas Gaigalas 10/05/17 +!...Modified by Julian Chan 8/16/19 !----------------------------------------------- ! M o d u l e s !----------------------------------------------- @@ -122,6 +123,7 @@ SUBROUTINE LODCSH2GG(NFILE, NCORE, JB) !GG NCF = NCF + 1 !GGGG ! + 1 CONTINUE !New line READ (NFILE, '(A)', IOSTAT=IOS) STR !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -145,12 +147,30 @@ SUBROUTINE LODCSH2GG(NFILE, NCORE, JB) ! Read in the occupations (q) of the peel shells; stop with a ! message if an error occurs ! + IF(INDEX(STR,'(')/=0) THEN ! New Line CALL PRSRCN (STR, NCORE, IOCC, IERR) IF (IERR /= 0) GO TO 28 + go to 1 ! New Line + ENDIF ! New Line + +! +! Read the X, J, and (sign of) P quantum numbers +! + IF(INDEX(STR,'+')/=0 .OR. INDEX(STR,'-')/=0)THEN + IF (IOS /= 0) THEN + WRITE (ISTDE, *) MYNAME//': Expecting intermediate ', & + 'and final angular momentum' + WRITE (ISTDE, *) 'quantum number and final parity ', & + 'specification;' + GO TO 26 + ENDIF + GO TO 2 !New line + ENDIF !New line + ! ! Read the J_sub and v quantum numbers ! - READ (nfile,'(A)',IOSTAT = IOS) str + IF (IOS /= 0) THEN WRITE (ISTDE, *) MYNAME//': Expecting subshell quantum', & ' number specification;' @@ -159,20 +179,12 @@ SUBROUTINE LODCSH2GG(NFILE, NCORE, JB) LOC = LEN_TRIM(STR) CALL PARSJL (1, NCORE, STR, LOC, IQSUB, NQS, IERR) IF (IERR /= 0) GO TO 27 -! -! Read the X, J, and (sign of) P quantum numbers -! - READ (nfile,'(A)',IOSTAT = IOS) str - IF (IOS /= 0) THEN - WRITE (ISTDE, *) MYNAME//': Expecting intermediate ', & - 'and final angular momentum' - WRITE (ISTDE, *) 'quantum number and final parity ', & - 'specification;' - GO TO 26 - ENDIF + GO TO 1 ! New line + ! ! Zero out the arrays that store packed integers ! + 2 CONTINUE IQA(:NNNW,NCF) = 0 !GG JQSA(:NNNW,1,NCF) = 0 !GG JQSA(:NNNW,2,NCF) = 0 diff --git a/src/appl/rtransition90/lodcslm.f90 b/src/appl/rtransition90/lodcslm.f90 index 98e540833..94bb8fe59 100644 --- a/src/appl/rtransition90/lodcslm.f90 +++ b/src/appl/rtransition90/lodcslm.f90 @@ -13,6 +13,7 @@ SUBROUTINE LODCSLM(NCORE) !...Translated by Pacific-Sierra Research 77to90 4.3E 07:21:55 1/ 6/07 !...Modified by Charlotte Froese Fischer ! Gediminas Gaigalas 10/05/17 +!...Modified by Julian Chan 8/16/19 !----------------------------------------------- ! M o d u l e s !----------------------------------------------- @@ -164,6 +165,7 @@ SUBROUTINE LODCSLM(NCORE) 3 CONTINUE NCF = NCF + 1 ! + 1 CONTINUE !New line READ (21, '(A)', IOSTAT=IOS) RECORD !********************************************************************** !blk* @@ -177,12 +179,30 @@ SUBROUTINE LODCSLM(NCORE) ! Read in the occupations (q) of the peel shells; stop with a ! message if an error occurs ! + IF(INDEX(RECORD,'(')/=0) THEN ! New Line CALL PRSRCN (RECORD, NCORE, IOCC, IERR) IF (IERR /= 0) GO TO 26 + go to 1 ! New Line + ENDIF ! New Line + +! +! Read the X, J, and (sign of) P quantum numbers +! + IF(INDEX(RECORD,'+')/=0 .OR. INDEX(RECORD,'-')/=0)THEN + IF (IOS /= 0) THEN + WRITE (6, *) 'LODCSL: Expecting intermediate' + WRITE (6, *) ' and final angular momentum' + WRITE (6, *) ' quantum number and final parity' + WRITE (6, *) ' specification;' + GO TO 26 + ENDIF + GO TO 2 !New line + ENDIF !New line + ! ! Read the J_sub and v quantum numbers ! - READ (21, '(A)', IOSTAT=IOS) RECORD + IF (IOS /= 0) THEN WRITE (6, *) 'LODCSL: Expecting subshell quantum' WRITE (6, *) ' number specification;' @@ -191,20 +211,12 @@ SUBROUTINE LODCSLM(NCORE) LOC = LEN_TRIM(RECORD) CALL PARSJL (1, NCORE, RECORD, LOC, IQSUB, NQS, IERR) IF (IERR /= 0) GO TO 26 -! -! Read the X, J, and (sign of) P quantum numbers -! - READ (21, '(A)', IOSTAT=IOS) RECORD - IF (IOS /= 0) THEN - WRITE (6, *) 'LODCSL: Expecting intermediate' - WRITE (6, *) ' and final angular momentum' - WRITE (6, *) ' quantum number and final parity' - WRITE (6, *) ' specification;' - GO TO 26 - ENDIF + GO TO 1 ! New line + ! ! Allocate additional storage if necessary ! + 2 CONTINUE ! New line IF (NCF > NCFD) THEN NEWSIZ = NCFD + NCFD/2 CALL RALLOC (IQA, NNNW, NEWSIZ, 'IQA', 'LODCSLM') diff --git a/src/appl/rtransition90_mpi/lodcslm.f90 b/src/appl/rtransition90_mpi/lodcslm.f90 index 91075afe1..40f771467 100644 --- a/src/appl/rtransition90_mpi/lodcslm.f90 +++ b/src/appl/rtransition90_mpi/lodcslm.f90 @@ -13,6 +13,7 @@ SUBROUTINE LODCSLM(NCORE) !...Translated by Pacific-Sierra Research 77to90 4.3E 07:21:55 1/ 6/07 !...Modified by Charlotte Froese Fischer ! Gediminas Gaigalas 10/05/17 +!...Modified by Julian Chan 8/16/19 !----------------------------------------------- ! M o d u l e s !----------------------------------------------- @@ -63,7 +64,7 @@ SUBROUTINE LODCSLM(NCORE) ! ! Entry message ! -! WRITE (6, *) 'Loading Configuration Symmetry List File ...' +! WRITE (6, *) 'Loading Configuration Symmetry List File ...' ! ! Get the list of subshells ! @@ -103,8 +104,8 @@ SUBROUTINE LODCSLM(NCORE) ! IF (NW > 1) THEN CALL CONVRT (NW, RECORD, LENTH) -! WRITE (6, *) ' there are '//RECORD(1:LENTH)//& -! ' relativistic subshells;' + WRITE (6, *) ' there are '//RECORD(1:LENTH)//& + ' relativistic subshells;' ELSE WRITE (6, *) ' there is 1 relativistic subshell;' ENDIF @@ -164,6 +165,7 @@ SUBROUTINE LODCSLM(NCORE) 3 CONTINUE NCF = NCF + 1 ! + 1 CONTINUE !New line READ (21, '(A)', IOSTAT=IOS) RECORD !********************************************************************** !blk* @@ -177,12 +179,30 @@ SUBROUTINE LODCSLM(NCORE) ! Read in the occupations (q) of the peel shells; stop with a ! message if an error occurs ! + IF(INDEX(RECORD,'(')/=0) THEN ! New Line CALL PRSRCN (RECORD, NCORE, IOCC, IERR) IF (IERR /= 0) GO TO 26 + go to 1 ! New Line + ENDIF ! New Line + +! +! Read the X, J, and (sign of) P quantum numbers +! + IF(INDEX(RECORD,'+')/=0 .OR. INDEX(RECORD,'-')/=0)THEN + IF (IOS /= 0) THEN + WRITE (6, *) 'LODCSL: Expecting intermediate' + WRITE (6, *) ' and final angular momentum' + WRITE (6, *) ' quantum number and final parity' + WRITE (6, *) ' specification;' + GO TO 26 + ENDIF + GO TO 2 !New line + ENDIF !New line + ! ! Read the J_sub and v quantum numbers ! - READ (21, '(A)', IOSTAT=IOS) RECORD + IF (IOS /= 0) THEN WRITE (6, *) 'LODCSL: Expecting subshell quantum' WRITE (6, *) ' number specification;' @@ -191,20 +211,12 @@ SUBROUTINE LODCSLM(NCORE) LOC = LEN_TRIM(RECORD) CALL PARSJL (1, NCORE, RECORD, LOC, IQSUB, NQS, IERR) IF (IERR /= 0) GO TO 26 -! -! Read the X, J, and (sign of) P quantum numbers -! - READ (21, '(A)', IOSTAT=IOS) RECORD - IF (IOS /= 0) THEN - WRITE (6, *) 'LODCSL: Expecting intermediate' - WRITE (6, *) ' and final angular momentum' - WRITE (6, *) ' quantum number and final parity' - WRITE (6, *) ' specification;' - GO TO 26 - ENDIF + GO TO 1 ! New line + ! ! Allocate additional storage if necessary ! + 2 CONTINUE ! New line IF (NCF > NCFD) THEN NEWSIZ = NCFD + NCFD/2 CALL RALLOC (IQA, NNNW, NEWSIZ, 'IQA', 'LODCSLM') @@ -440,8 +452,8 @@ SUBROUTINE LODCSLM(NCORE) IF (JQS(3,I,J) /= JQS(3,I,NCF)) GO TO 17 END DO DO I = 1, NOPEN - 1 -! WRITE (6, *) I -! WRITE (6, *) JCUP(I,J), JCUP(I,NCF) +! WRITE (6, *) I +! WRITE (6, *) JCUP(I,J), JCUP(I,NCF) IF (JCUP(I,J) /= JCUP(I,NCF)) GO TO 17 END DO END DO @@ -519,8 +531,8 @@ SUBROUTINE LODCSLM(NCORE) ! All done; report ! CALL CONVRT (NCF, RECORD, LENTH) -! WRITE (6, *) ' there are '//RECORD(1:LENTH)//' relativistic CSFs;' -! WRITE (6, *) ' ... load complete;' + WRITE (6, *) ' there are '//RECORD(1:LENTH)//' relativistic CSFs;' + WRITE (6, *) ' ... load complete;' ! ! Debug printout ! diff --git a/src/lib/lib9290/lodcsh2.f90 b/src/lib/lib9290/lodcsh2.f90 index 865b00782..1172d64ee 100644 --- a/src/lib/lib9290/lodcsh2.f90 +++ b/src/lib/lib9290/lodcsh2.f90 @@ -29,6 +29,9 @@ SUBROUTINE LODCSH2(NFILE, NCORE, JB) !...Translated by Pacific-Sierra Research 77to90 4.3E 12:13:05 2/14/04 !...Modified by Charlotte Froese Fischer ! Gediminas Gaigalas 10/05/17 +!*********************************************************************** +!...Modified by Julian Chan 8/12/19 +!...Please refer to the document: lodcsh2doc.docx for details on changes made !----------------------------------------------- ! M o d u l e s !----------------------------------------------- @@ -50,6 +53,8 @@ SUBROUTINE LODCSH2(NFILE, NCORE, JB) USE iq_I USE jqs_I USE jcup_I + USE itjpo_I + USE ispar_I IMPLICIT NONE !----------------------------------------------- ! D u m m y A r g u m e n t s @@ -111,7 +116,9 @@ SUBROUTINE LODCSH2(NFILE, NCORE, JB) NCF = 0 3 CONTINUE NCF = NCF + 1 +! Read each line of the file ! + 1 CONTINUE READ (NFILE, '(A)', IOSTAT=IOS) STR !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -121,18 +128,38 @@ SUBROUTINE LODCSH2(NFILE, NCORE, JB) IF (IOS .EQ. 0 .AND. str(1:2) .EQ. ' *' .AND. jb .EQ. LOADALL) & READ (nfile, '(A)', IOSTAT = IOS) str !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - +! +! Determine what kind of line we have; +! If line isn't * and isn't EOF, then determine the type of line +! Else we've reached end of block or EOF +! +! IF (IOS==0 .AND. STR(1:2)/=' *') THEN ! ! Read in the occupations (q) of the peel shells; stop with a ! message if an error occurs ! + IF(INDEX(STR,'(')/=0) THEN CALL PRSRCN (STR, NCORE, IOCC, IERR) IF (IERR /= 0) GO TO 28 + go to 1 + ENDIF +! +! Read the X, J, and (sign of) P quantum numbers +! + IF(INDEX(STR,'+')/=0 .OR. INDEX(STR,'-')/=0)THEN + IF (IOS /= 0) THEN + WRITE (ISTDE, *) MYNAME//': Expecting intermediate ', & + 'and final angular momentum' + WRITE (ISTDE, *) 'quantum number and final parity ', & + 'specification;' + GO TO 26 + ENDIF + go to 2 + ENDIF ! ! Read the J_sub and v quantum numbers ! - READ (nfile,'(A)',IOSTAT = IOS) str IF (IOS /= 0) THEN WRITE (ISTDE, *) MYNAME//': Expecting subshell quantum', & ' number specification;' @@ -141,21 +168,12 @@ SUBROUTINE LODCSH2(NFILE, NCORE, JB) LOC = LEN_TRIM(STR) CALL PARSJL (1, NCORE, STR, LOC, IQSUB, NQS, IERR) IF (IERR /= 0) GO TO 27 -! -! Read the X, J, and (sign of) P quantum numbers -! - READ (nfile,'(A)',IOSTAT = IOS) str - IF (IOS /= 0) THEN - WRITE (ISTDE, *) MYNAME//': Expecting intermediate ', & - 'and final angular momentum' - WRITE (ISTDE, *) 'quantum number and final parity ', & - 'specification;' - GO TO 26 - ENDIF + go to 1 ! ! Zero out the arrays that store packed integers ! - IQA(:NNNW,NCF) = 0 + 2 CONTINUE + IQA(:NNNW,NCF) = 0 JQSA(:NNNW,1,NCF) = 0 JQSA(:NNNW,2,NCF) = 0 JQSA(:NNNW,3,NCF) = 0 @@ -379,11 +397,10 @@ SUBROUTINE LODCSH2(NFILE, NCORE, JB) ! 17 CONTINUE NREC = NREC + 3 - GO TO 3 ! - ELSE ! the record just read is either ' *' or EOF, marking - ! the end of a block or end of the file + ELSE ! the record just read is either ' *' or EOF, marking + ! the end of a block or end of the file ! ! There is always at least one CSF ! @@ -406,6 +423,7 @@ SUBROUTINE LODCSH2(NFILE, NCORE, JB) WRITE (ISTDE, *) MYNAME//': ncf=', NCF, 'ncfblock=', NCFBLOCK STOP ENDIF + ! ! Check if any subshell is empty; eliminate it from the ! list if this is the case; issue a message @@ -429,11 +447,25 @@ SUBROUTINE LODCSH2(NFILE, NCORE, JB) ! NCOREL = 0 NCOREL = SUM(NKJ(:NCORE)+1) -! NELEC = NCOREL+NPEEL IF (NCOREL + NPEEL /= NELEC) THEN WRITE (ISTDE, *) MYNAME//': nelec not equal to that in lodcsh' STOP ENDIF + + IF (LDBPA(1)) THEN + WRITE (*, *) 'From LODCSL:' + DO I = 1, NCF + WRITE (*, *) 'CSF ', I + WRITE (*, *) 'ITJPO: ', ITJPO(I) + WRITE (*, *) 'ISPAR: ', ISPAR(I) + WRITE (*, *) 'IQ: ', (IQ(J,I),J=1,NW) + WRITE (*, *) 'JQS(1): ', (JQS(1,J,I),J=1,NW) + WRITE (*, *) 'JQS(2): ', (JQS(2,J,I),J=1,NW) + WRITE (*, *) 'JQS(3): ', (JQS(3,J,I),J=1,NW) + WRITE (*, *) 'JCUP: ', (JCUP(J,I),J=1,NW - 1) + END DO + ENDIF + WRITE (6,*)'There are ',NCF,' relativistic CSFs... load complete;' RETURN ! diff --git a/src/lib/lib9290/lodcsl.f90 b/src/lib/lib9290/lodcsl.f90 index 721b2a8c9..b580cc638 100644 --- a/src/lib/lib9290/lodcsl.f90 +++ b/src/lib/lib9290/lodcsl.f90 @@ -18,6 +18,7 @@ SUBROUTINE LODCSL(NCORE) !...Translated by Pacific-Sierra Research 77to90 4.3E 13:07:22 2/14/04 !...Modified by Charlotte Froese Fischer ! Gediminas Gaigalas 10/05/17 +!...Modified by Julian Chan 8/16/19 !----------------------------------------------- ! M o d u l e s !----------------------------------------------- @@ -173,6 +174,7 @@ SUBROUTINE LODCSL(NCORE) 3 CONTINUE NCF = NCF + 1 ! + 1 CONTINUE ! New line READ (21, '(A)', IOSTAT=IOS) RECORD !********************************************************************** !blk* @@ -190,12 +192,29 @@ SUBROUTINE LODCSL(NCORE) ! Read in the occupations (q) of the peel shells; stop with a ! message if an error occurs ! + IF(INDEX(RECORD,'(')/=0) THEN ! New Line CALL PRSRCN (RECORD, NCORE, IOCC, IERR) IF (IERR /= 0) GO TO 26 + go to 1 ! New Line + ENDIF ! New Line + +! +! Read the X, J, and (sign of) P quantum numbers +! + IF(INDEX(RECORD,'+')/=0 .OR. INDEX(RECORD,'-')/=0)THEN + IF (IOS /= 0) THEN + WRITE (ISTDE, *) 'LODCSL: Expecting intermediate ', & + 'and final angular momentum' + WRITE (ISTDE, *) 'quantum number and final parity ', & + 'specification;' + GO TO 26 + ENDIF + GO TO 2 !New line + ENDIF !New line + ! ! Read the J_sub and v quantum numbers ! - READ (21, '(A)', IOSTAT=IOS) RECORD IF (IOS /= 0) THEN WRITE (ISTDE, *) 'LODCSL: Expecting subshell quantum', & ' number specification;' @@ -204,22 +223,14 @@ SUBROUTINE LODCSL(NCORE) LOC = LEN_TRIM(RECORD) CALL PARSJL (1, NCORE, RECORD, LOC, IQSUB, NQS, IERR) IF (IERR /= 0) GO TO 26 -! -! Read the X, J, and (sign of) P quantum numbers -! - READ (21, '(A)', IOSTAT=IOS) RECORD - IF (IOS /= 0) THEN - WRITE (ISTDE, *) 'LODCSL: Expecting intermediate ', & - 'and final angular momentum' - WRITE (ISTDE, *) 'quantum number and final parity ', & - 'specification;' - GO TO 26 - ENDIF + GO TO 1 ! New line + ! ! Allocate additional storage if necessary ! !CFF It is possible that this should be moved to "3 Continue" ! where NCF is incremented + 2 CONTINUE ! New line IF (NCF > NCFD) THEN NEWSIZ = NCFD + NCFD/2 CALL RALLOC (IQA, NNNW, NEWSIZ, 'IQA', 'LODCSL') diff --git a/src/lib/lib9290/setcsll.f90 b/src/lib/lib9290/setcsll.f90 index 2b4ef1555..9a7c5bdf0 100644 --- a/src/lib/lib9290/setcsll.f90 +++ b/src/lib/lib9290/setcsll.f90 @@ -9,6 +9,7 @@ SUBROUTINE SETCSLL(NUNIT, NAME, NBLKIN, NBLOCK, NCFBLK, NCFTOT, IDBLK) !...Translated by Pacific-Sierra Research 77to90 4.3E 10:50:34 2/14/04 !...Modified by Charlotte Froese Fischer ! Gediminas Gaigalas 10/05/17 +!...Modified by Julian Chan 8/12/19 !----------------------------------------------- ! I n t e r f a c e B l o c k s !----------------------------------------------- @@ -29,11 +30,12 @@ SUBROUTINE SETCSLL(NUNIT, NAME, NBLKIN, NBLOCK, NCFBLK, NCFTOT, IDBLK) !----------------------------------------------- INTEGER :: I, NCSF, IOS, IERR LOGICAL :: FOUND - CHARACTER :: STR*15, CH*2, LINE3*200 + CHARACTER :: STR*15, CH*2, LINE3*200, ID*8 !----------------------------------------------- ! Locals ! Look for + Print *, 'Entering SETCSLL' INQUIRE(FILE=NAME, EXIST=FOUND) IF (.NOT.FOUND) THEN @@ -71,8 +73,11 @@ SUBROUTINE SETCSLL(NUNIT, NAME, NBLKIN, NBLOCK, NCFBLK, NCFTOT, IDBLK) IOS = 0 DO WHILE(IOS == 0) - READ (NUNIT, '(1A2)', IOSTAT=IOS) CH - IF (CH==' *' .OR. IOS/=0) THEN + READ (NUNIT, '(A)', IOSTAT=IOS) LINE3 + IF (INDEX(LINE3,'(')/=0) THEN + READ (NUNIT, '(A)', IOSTAT=IOS) LINE3 + ENDIF + IF (INDEX(LINE3,'*')/=0 .OR. IOS/=0) THEN !.. a new block has been found NBLOCK = NBLOCK + 1 WRITE (6, *) 'Block ', NBLOCK, ', ncf = ', NCSF @@ -81,15 +86,16 @@ SUBROUTINE SETCSLL(NUNIT, NAME, NBLKIN, NBLOCK, NCFBLK, NCFTOT, IDBLK) WRITE (6, *) 'Maximum allowed is ', NBLKIN STOP ENDIF - I = LEN_TRIM(LINE3) - IDBLK(NBLOCK) = LINE3(I-4:I) + IDBLK(nblock) = ID NCFBLK(NBLOCK) = NCSF NCSF = 0 IF (IOS == 0) CYCLE ELSE - READ (NUNIT, *) - READ (NUNIT, '(A)') LINE3 - NCSF = NCSF + 1 + IF(INDEX(LINE3,'+')/=0 .OR. INDEX(LINE3,'-')/=0)THEN + NCSF = NCSF + 1 + I = LEN_TRIM(LINE3) + ID = LINE3(I-4:I) + ENDIF ENDIF END DO @@ -97,5 +103,7 @@ SUBROUTINE SETCSLL(NUNIT, NAME, NBLKIN, NBLOCK, NCFBLK, NCFTOT, IDBLK) NCFTOT = SUM(NCFBLK(:NBLOCK)) + WRITE(*,*) 'NCFBLK NBLOCK',NCFBLK(1),NCFBLK(2),NCFBLK(3),NBLOCK + RETURN END SUBROUTINE SETCSLL diff --git a/src/tool/rcsfsplit.f90 b/src/tool/rcsfsplit.f90 index ac8c3b59a..82d84be6e 100644 --- a/src/tool/rcsfsplit.f90 +++ b/src/tool/rcsfsplit.f90 @@ -4,12 +4,12 @@ program rcsfsplit implicit none integer :: i, j, k, n, nlayer, norb, norblayer, nsymmetrymatch, norbcomp, ncsf, nwrite, ncount -integer :: jr, jl, pos, ncsflist(50) -character(len=200) :: string1, string2, string3, name +integer :: ios, jr, jl, pos, ncsflist(50) +character(len=100) :: string, name character(len=1500) :: orbitalstring character(len=3) :: orb(300),orbital(25),orbcomp(300) character(len=4) :: orbrel(300) -character(len=200) :: orbitallayer,label(50) +character(len=100) :: orbitallayer,label(50) write(*,*) 'RCSFSPLIT' write(*,*) 'Splits a list name.c of CSFs into a number of lists with CSFs that ' @@ -29,11 +29,11 @@ program rcsfsplit ! Read five first line save line four containing the string of orbitals -read(36,'(a)') string1 -read(36,'(a)') string1 -read(36,'(a)') string1 +read(36,'(a)') string +read(36,'(a)') string +read(36,'(a)') string read(36,'(a)') orbitalstring -read(36,'(a)') string1 +read(36,'(a)') string ! Number of orbitals @@ -110,12 +110,12 @@ program rcsfsplit end do rewind(36) - read(36,'(a)') string1 - write(48+k,'(a)') trim(string1) - read(36,'(a)') string1 - write(48+k,'(a)') trim(string1) - read(36,'(a)') string1 - write(48+k,'(a)') trim(string1) + read(36,'(a)') string + write(48+k,'(a)') trim(string) + read(36,'(a)') string + write(48+k,'(a)') trim(string) + read(36,'(a)') string + write(48+k,'(a)') trim(string) read(36,'(a)') orbitalstring ! Find out and write the orbitals for this layer in relativistic notation @@ -139,36 +139,31 @@ program rcsfsplit end if end do write(48+k,'(a)') trim(orbitalstring) - read(36,'(a)') string1 - write(48+k,'(a)') trim(string1) + read(36,'(a)') string + write(48+k,'(a)') trim(string) +! Modified by cff 09/03/19 for shorter format ncsf = 0 + read(36,'(a)') string do - read(36,'(a)',end=99) string1 - if (string1(2:2).eq.'*') then - write(48+k,'(a)') trim(string1) - read(36,'(a)') string1 - end if - read(36,'(a)') string2 - read(36,'(a)') string3 - ! A CSF should be kept if there are no complementary orbitals in the string - +! string here is always a configuration n = 0 do i = 1,norbcomp - n = index(trim(string1),orbcomp(i)) + n = index(trim(string),orbcomp(i)) if (n.ne.0) exit end do - if (n.eq.0) then - write(48+k,'(a)') trim(string1) - write(48+k,'(a)') trim(string2) - write(48+k,'(a)') trim(string3) - ncsf = ncsf + 1 - end if + if (n.eq.0) write(48+k,'(a)') trim(string) + Do + read(36,'(a)', end=99) string + if (index(string, '(') .ne. 0) exit + if (n.eq.0) then + write(48+k,'(a)') trim(string) + if (scan(string, '+-') .ne. 0) ncsf= ncsf+1 + end if + end do end do - 99 continue - ncsflist(k) = ncsf end do