Skip to content

All types of whitespace characters used for delineation are not correctly parsed in input files#406

Merged
agoetz merged 1 commit intomasterfrom
grad_ext_charge
Mar 5, 2025
Merged

All types of whitespace characters used for delineation are not correctly parsed in input files#406
agoetz merged 1 commit intomasterfrom
grad_ext_charge

Conversation

@vtripath65
Copy link
Copy Markdown
Collaborator

When locating blocks in put file, previously a tab was not being considered as a space.

Now, if a line contains only tabs and/or spaces its considered an empty line.

The issues in the test set related to external charges with a tab at the end of the file as a newline is now fixed.

@ohearnk ohearnk changed the title locating blocks in input file improved. Tabs are now accounted for in… Input files do not correctly parse all types of whitespace characters Mar 5, 2025
@ohearnk ohearnk added the bug Something isn't working label Mar 5, 2025
@ohearnk ohearnk added this to the QUICK-25.03 milestone Mar 5, 2025
@ohearnk ohearnk changed the title Input files do not correctly parse all types of whitespace characters All types of whitespace characters are not correctly parsed in input files Mar 5, 2025
@ohearnk
Copy link
Copy Markdown
Collaborator

ohearnk commented Mar 5, 2025

To summarize, it was discovered by @vtripath65 and @agoetz that tab characters are present and not correctly parsed in the following inputs for gradient tests:

  • test/grad_naip_meoh_libxc_pbeh_def2svp.in
  • test/grad_naip_meoh_libxc_pbeh_sto3g.in
  • test/grad_ncnaip_b3lyp_631gss.in
  • test/grad_ncnaip_b3lyp_sto3g.in
  • test/grad_rpsb_meoh_rhf_321g.in
  • test/grad_rpsb_meoh_rhf_sto3g.in

This mistake leads to the number of number of external point charges being incorrect, which also leads to issues with point charge gradients (which were being computed for non-existent point charges).

This also is the underlying bug which is causing the gradient test failures in #403.

Lastly, note it is likely advisable to replace the routines in src/subs with more modern and widely tested alternatives in order to avoid future issues like this one. The community-driven Fortran standard library project might be a good choice if it covers all the routines used in QUICK.

@ohearnk ohearnk requested review from agoetz and ohearnk March 5, 2025 16:13
@ohearnk ohearnk changed the title All types of whitespace characters are not correctly parsed in input files All types of whitespace characters used for delineation are not correctly parsed in input files Mar 5, 2025
Copy link
Copy Markdown
Collaborator

@agoetz agoetz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks.

@agoetz agoetz merged commit 140d51f into master Mar 5, 2025
76 checks passed
@ohearnk ohearnk deleted the grad_ext_charge branch March 5, 2025 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants