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

未關閉
#1,328 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
25/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
c, cmake, github-actions, perl, python

研究方向

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.

由索引模型根據 Issue 內容生成。

描述

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.

主要語言
C
星號
10
分支
8
平均合併
6 小時 32 分鐘
30 天內合併 PR
1

環境準備

這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

FriendsofECCE/ECCE 的其他 Issue

查看 FriendsofECCE/ECCE 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。