Review of the remaining ported basis-set exporters, and the merge order for all seven (#868)

Offen
#1,328 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
25/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
c, cmake, github-actions, perl, python

Rechercherichtung

Start with src/dsm/chemistry/TGBSConfig.C and rdStandardGBS.py, then inspect the six exporter scripts and the named port tests alongside tests/basis/run_tests.py and scripts/parsers/README. First verify the reported Windows command selection, ECP indexing, input decoding, test registration, and stale references. Done means the listed defects are fixed, tests are registered and run, and the merge order preserves the guarded per-code C++ command selection.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

enhancement

Review of cx/868-gbs-gamess, cx/868-gbs-molpro-molcas, cx/868-gbs-legacy-misc, cx/868-gbsdav. As with the earlier branches, every pinned reference was regenerated from the parent commit's Perl and reproduces (gamess 105/105, legacy-misc 60/60, molpro-molcas 56/56 over 40 hash seeds, gbsdav by running its own test against the Perl). Numeric formatting, locale behaviour and option handling match Perl byte-for-byte on every input tried. No branch mentions python3. The ports themselves are sound; what follows is what stands between them and merging.

Must fix before merging

1. cx/868-gbs-legacy-misc breaks Windows basis-set export for every code still using Perl. Its src/dsm/chemistry/TGBSConfig.C hunk replaces the unconditional "perl "" with an unconditional bundled python.exe`, dropping the per-code test the sibling branches have:

-  string command = "perl \"" + ...
+  ecce::fs::path py = ecce::fs::path(Ecce::ecceHome()) / "python" / "python.exe";
+  string pyExe = ecce::fs::exists(py) ? py.string() : string("python.exe");
+  string command = "\"" + pyExe + "\" \"" + ...

So on Windows std2Gaussian-16, std2NWChem, std2ORCA, std2molpro and std2molcas -- all still Perl -- would be handed to python.exe. It also writes ecce::fs:: inline rather than the namespace fs = ecce::fs; alias the other branches use. The Python writers on this branch are byte-faithful; only the C++ hunk is wrong.

2. Unguarded shells[index - 1] (as in #1327): present in wrGamesGBS.py:139, wracesIIGBS.py:106, wrHondoGBS.py:142, wrMeldefGBS.py:155, wrsupermoleculeGBS.py:172, wrtx93GBS.py:39. An ECP with 9+ components gives IndexError and a partial write (583-679 bytes against Perl's 801-1051) with exit 1. Absent from molpro-molcas, which guards it, and from gbsdav. Related, same class: wrGamesGBS.py:126 rows[0] also dies on a shell whose only line carries a Fortran D exponent, which both readers drop and Perl emitted as an empty shell.

3. Non-UTF-8 stdin (#1327 item 2): rdStandardGBS.py is byte-identical across all six exporter branches, so this is one fix in one file. cx/868-gbsdav does not share it -- it opens files encoding='latin-1' and round-trips correctly.

4. Tests registered nowhere. None of these four touches CMakeLists.txt or .github/workflows/, and tests/basis/run_tests.py has an explicit CASES list that is unmodified, so gamess_python_port_test.py, molpro_molcas_port_test.py, legacy_misc_port_test.py and tests/tools/gbsdav_converter_test.py never run. All four pass when run by hand.

5. Stale reference: scripts/parsers/README:91 still lists wrGamesGBS.pm, which the gamess branch deletes. Separately, the new rdStandardGBS.py appears in no paths: frontmatter under docs/claude/, so the grep -rl lookup CLAUDE.md requires finds nothing for it; it belongs in docs/claude/codereg/rdstandardgbs-pms-namebasis-format-used-to-have.md.

The usage-banner divergence from #1327 is NOT present on any of these four.

Merge order

Every exporter branch rewrites the same dump() hunk, so all 12 pairs among the six conflict; cx/868-gbsdav is clean against all of them.

  1. cx/868-gbsdav -- independent and conflict-free.
  2. Fix the stdin decoding once in rdStandardGBS.py, then cx/868-gbs-core, which sets the agreed TGBSConfig.C shape (guarded per-code if, util/Filesystem.H with namespace fs = ecce::fs; inside #ifdef _WIN32).
  3. Then gaussian-modern, gaussian-legacy, molpro-molcas, gamess.
  4. legacy-misc last, and only once its C++ hunk is rewritten in the guarded form.

Resolve each TGBSConfig.C conflict by adding the branch's code names to the single if in core -- never by taking a branch's whole hunk, which is how item 1 would reach main.

Not established

Nothing was compiled and no suite was run. Whether legacy-misc compiles at all without the fs alias is unverified, as is anything about Windows execution: the python.exe path, quoting under cmd.exe, and the runtime form of Ecce::ecceHome(). Perl's hash order is randomised, so for multi-centre outputs sorted-line comparison was used; a pure reordering within one atom block would not have been caught. The molpro test's own atom_order() normalisation sorts blocks before comparing, which could mask an ordering regression inside a block. The 9+ component ECPs and D-exponent-only shells are constructed inputs; whether any shipped basis set in data/admin/basissets can produce them was not checked.

Vorherrschende Sprache
C
Sterne
10
Forks
8
Ø Merge
6 Std. 32 Min.
Gemergte PRs (30 T.)
1

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus FriendsofECCE/ECCE

Alle Issues in FriendsofECCE/ECCE

Ähnliche Issues

Weitere Issues zu C

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.