Skip to content

Commit

Permalink
bug fix in reading a repeated input keyword (#3304)
Browse files Browse the repository at this point in the history
  • Loading branch information
marci73 committed Mar 7, 2024
1 parent dca71f4 commit 2204749
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/colvar_methods.F
Expand Up @@ -1410,7 +1410,7 @@ SUBROUTINE read_hydronium_colvars(section, colvar, colvar_id, n_oxygens, n_hydro
CALL section_vals_val_get(section, "OXYGENS", n_rep_val=n_var)
ndim = 0
DO k = 1, n_var
CALL section_vals_val_get(section, "OXYGENS", i_vals=iatms)
CALL section_vals_val_get(section, "OXYGENS", i_rep_val=k, i_vals=iatms)
CALL reallocate(i_oxygens, 1, ndim + SIZE(iatms))
i_oxygens(ndim + 1:ndim + SIZE(iatms)) = iatms
ndim = ndim + SIZE(iatms)
Expand All @@ -1420,7 +1420,7 @@ SUBROUTINE read_hydronium_colvars(section, colvar, colvar_id, n_oxygens, n_hydro
CALL section_vals_val_get(section, "HYDROGENS", n_rep_val=n_var)
ndim = 0
DO k = 1, n_var
CALL section_vals_val_get(section, "HYDROGENS", i_vals=iatms)
CALL section_vals_val_get(section, "HYDROGENS", i_rep_val=k, i_vals=iatms)
CALL reallocate(i_hydrogens, 1, ndim + SIZE(iatms))
i_hydrogens(ndim + 1:ndim + SIZE(iatms)) = iatms
ndim = ndim + SIZE(iatms)
Expand Down Expand Up @@ -1487,7 +1487,7 @@ SUBROUTINE read_acid_hydronium_colvars(section, colvar, colvar_id, n_oxygens_wat
CALL section_vals_val_get(section, "OXYGENS_WATER", n_rep_val=n_var)
ndim = 0
DO k = 1, n_var
CALL section_vals_val_get(section, "OXYGENS_WATER", i_vals=iatms)
CALL section_vals_val_get(section, "OXYGENS_WATER", i_rep_val=k, i_vals=iatms)
CALL reallocate(i_oxygens_water, 1, ndim + SIZE(iatms))
i_oxygens_water(ndim + 1:ndim + SIZE(iatms)) = iatms
ndim = ndim + SIZE(iatms)
Expand All @@ -1497,7 +1497,7 @@ SUBROUTINE read_acid_hydronium_colvars(section, colvar, colvar_id, n_oxygens_wat
CALL section_vals_val_get(section, "OXYGENS_ACID", n_rep_val=n_var)
ndim = 0
DO k = 1, n_var
CALL section_vals_val_get(section, "OXYGENS_ACID", i_vals=iatms)
CALL section_vals_val_get(section, "OXYGENS_ACID", i_rep_val=k, i_vals=iatms)
CALL reallocate(i_oxygens_acid, 1, ndim + SIZE(iatms))
i_oxygens_acid(ndim + 1:ndim + SIZE(iatms)) = iatms
ndim = ndim + SIZE(iatms)
Expand All @@ -1507,7 +1507,7 @@ SUBROUTINE read_acid_hydronium_colvars(section, colvar, colvar_id, n_oxygens_wat
CALL section_vals_val_get(section, "HYDROGENS", n_rep_val=n_var)
ndim = 0
DO k = 1, n_var
CALL section_vals_val_get(section, "HYDROGENS", i_vals=iatms)
CALL section_vals_val_get(section, "HYDROGENS", i_rep_val=k, i_vals=iatms)
CALL reallocate(i_hydrogens, 1, ndim + SIZE(iatms))
i_hydrogens(ndim + 1:ndim + SIZE(iatms)) = iatms
ndim = ndim + SIZE(iatms)
Expand Down

0 comments on commit 2204749

Please sign in to comment.