Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

GROMACS: included topology files (force-field folders such as min.ff/) are not collected

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

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
25/100
Issue 類型
功能
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
cpp
領域
desktop

研究方向

Start with src/wxgui/mdtools/GromacsInputsPanel.C, where include files are attached one at a time and stored by file name only, and trace how the launch check reports grompp's error. The change needs recursive #include discovery relative to each including file, kept paths in the run directory, and a missing-files state that blocks launch. Done means the tests/gromacs_md case with a nested local force field passes both the launch check and the job script.

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

描述

A GROMACS topology that includes local files, here a force field in a folder next to it, cannot be run:

grompp rejected the inputs, so the job was not submitted.
  command: /usr/bin/gmx grompp -f gromacs.mdp -c conf.gro -r conf.gro -p topol.top ...
Fatal error:
Topology include file "min.ff/forcefield.itp" not found

The topology (a MINFF clay system):

#include "min.ff/forcefield.itp"
#include "Cu2_MMT1.itp"
#include "Cu2_MMT2.itp"
#include "Cu2_MMT3.itp"
#include "min.ff/ions.itp"
#include "min.ff/opc3.itp"

min.ff/ holds about 15 more files, which forcefield.itp includes in turn.

Cause: the GROMACS Inputs panel (src/wxgui/mdtools/GromacsInputsPanel.C) takes only what is attached by hand.

  • Include files are attached one at a time ("Attach an include file").
  • They are stored as auxiliary inputs by file name only, so a relative path such as min.ff/ is lost.
  • Nothing reads the topology's #include lines, and the launch check only reports grompp's error.

Proposed fix

  • On attaching a topology, follow its #include directives recursively, relative to each including file. Honour #ifdef only as far as is needed to find the files: collect every include in either branch.
  • Attach every file that exists, keeping its path relative to the topology (min.ff/forcefield.itp), and recreate those subfolders in the run directory.
  • Skip includes that GROMACS resolves itself: its own force fields under share/gromacs/top or GMXLIB, e.g. amber99sb-ildn.ff/forcefield.itp.
  • Show what was found: list the attached includes in the panel (count and tree), and the ones not found as "missing".
  • Not ready to run until nothing is missing, naming the missing files, so the launch check is not the first place this shows up.
  • Attach folder… as an alternative to attaching files one by one.

Test: a small topology with a local x.ff/forcefield.itp folder and a nested include, run through the launch check and the job script, like the restrained case in tests/gromacs_md (#253).

Workaround until then: use a preprocessed topology (gmx grompp ... -pp processed.top), which has every include expanded; it works since #253.

主要語言
C
星號
10
分支
8
平均合併
21 分鐘
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 摘要。