From 4cb740a0a774e70defe63ac37179c41a5df0bb2a Mon Sep 17 00:00:00 2001 From: Ben Hourahine Date: Tue, 13 Feb 2024 14:45:56 +0000 Subject: [PATCH 1/2] Improve error message for provided SK files --- src/dftbp/dftbplus/parser.F90 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/dftbp/dftbplus/parser.F90 b/src/dftbp/dftbplus/parser.F90 index 222b6a41ea..2a06d651cf 100644 --- a/src/dftbp/dftbplus/parser.F90 +++ b/src/dftbp/dftbplus/parser.F90 @@ -1400,13 +1400,14 @@ subroutine readDFTBHam(node, ctrl, geo, slako, poisson, errStatus) call setUnprocessed(value1) do iSp1 = 1, geo%nSpecies do iSp2 = 1, geo%nSpecies - strTmp = trim(geo%speciesNames(iSp1)) // "-" & - &// trim(geo%speciesNames(iSp2)) + strTmp = trim(geo%speciesNames(iSp1)) // "-" // trim(geo%speciesNames(iSp2)) call init(lStr) call getChildValue(child, trim(strTmp), lStr, child=child2) if (len(lStr) /= len(angShells(iSp1)) * len(angShells(iSp2))) then - call detailedError(child2, "Incorrect number of Slater-Koster & - &files") + write(errorStr, "(A,I0,A,I0)")"Incorrect number of Slater-Koster files for " //& + & trim(strTmp) // ", expected ", len(angShells(iSp1)) * len(angShells(iSp2)),& + & " but recieved ", len(lStr) + call detailedError(child2, errorStr) end if do ii = 1, len(lStr) call get(lStr, strTmp, ii) From c986ed112f67368a2c93940f3d1cae8691f45636 Mon Sep 17 00:00:00 2001 From: Ben Hourahine Date: Thu, 15 Feb 2024 15:11:14 +0000 Subject: [PATCH 2/2] Update src/dftbp/dftbplus/parser.F90 Co-authored-by: Tammo van der Heide --- src/dftbp/dftbplus/parser.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dftbp/dftbplus/parser.F90 b/src/dftbp/dftbplus/parser.F90 index 2a06d651cf..cc97ab9f3b 100644 --- a/src/dftbp/dftbplus/parser.F90 +++ b/src/dftbp/dftbplus/parser.F90 @@ -1406,7 +1406,7 @@ subroutine readDFTBHam(node, ctrl, geo, slako, poisson, errStatus) if (len(lStr) /= len(angShells(iSp1)) * len(angShells(iSp2))) then write(errorStr, "(A,I0,A,I0)")"Incorrect number of Slater-Koster files for " //& & trim(strTmp) // ", expected ", len(angShells(iSp1)) * len(angShells(iSp2)),& - & " but recieved ", len(lStr) + & " but received ", len(lStr) call detailedError(child2, errorStr) end if do ii = 1, len(lStr)