From f30cea6f6635f7d2943f9382c3bc668999e2e7ae Mon Sep 17 00:00:00 2001 From: lmiq Date: Tue, 27 Jan 2026 06:22:23 -0300 Subject: [PATCH 1/2] adjust loops for reading radius --- app/packmol.f90 | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/app/packmol.f90 b/app/packmol.f90 index badbd67..2708318 100644 --- a/app/packmol.f90 +++ b/app/packmol.f90 @@ -417,8 +417,7 @@ program packmol stop exit_code_input_error end if ival = 2 - do - if (ival > maxkeywords) exit + do while(ival <= maxkeywords) read(keyword(iline_atoms,ival),*,iostat=ioerr) iat if ( ioerr /= 0 ) exit if ( iat > natoms(itype) ) then @@ -440,8 +439,7 @@ program packmol stop exit_code_input_error end if ival = 2 - do - if (ival > maxkeywords) exit + do while(ival <= maxkeywords) read(keyword(iline_atoms,ival),*,iostat=ioerr) iat if ( ioerr /= 0 ) exit if ( iat > natoms(itype) ) then @@ -463,8 +461,7 @@ program packmol stop exit_code_input_error end if ival = 2 - do - if (ival > maxkeywords) exit + do while(ival <= maxkeywords) read(keyword(iline_atoms,ival),*,iostat=ioerr) iat if ( ioerr /= 0 ) exit if ( iat > natoms(itype) ) then @@ -487,8 +484,7 @@ program packmol stop exit_code_input_error end if ival = 2 - do - if (ival > maxkeywords) exit + do while(ival <= maxkeywords) read(keyword(iline_atoms,ival),*,iostat=ioerr) iat if ( ioerr /= 0 ) exit if ( iat > natoms(itype) ) then From 8540d3c634df22cbbe461f5864c9f8065dfc190b Mon Sep 17 00:00:00 2001 From: lmiq Date: Tue, 27 Jan 2026 06:24:51 -0300 Subject: [PATCH 2/2] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b9a8cd..c6abcde 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ packmol changelog Version 21.2.1-DEV -------------- +- ![INFO][badge-info] Avoid looping above `maxkeywords` in input file reading of radii. Version 21.2.0 --------------