Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 22, 2025

This PR adds comprehensive parameter documentation for the GROMACS variant in model_devi_args, addressing the placeholder implementation that previously had an empty parameter list and "TODO: add doc" documentation.

Changes Made

Added model_devi_gromacs_args() function

Created a new function following the established pattern of model_devi_lmp_args() and model_devi_amber_args() that includes:

  • model_devi_jobs - Standard job configuration (reused from existing model_devi_jobs_args())
  • model_devi_dt - Timestep for MD simulation (required parameter)
  • gromacs_settings - Dictionary containing 11 GROMACS-specific file and processing parameters:
    • File settings: mdp_filename, topol_filename, conf_filename, index_filename, type_filename
    • Processing settings: ndx_filename, ref_filename, deffnm, maxwarn, traj_filename, group_name

Updated GROMACS variant documentation

  • Replaced empty parameter list [] with proper model_devi_gromacs_args() call
  • Added comprehensive documentation explaining requirements (GromacsWrapper>=0.8.0, DeePMD-kit v2+)
  • Updated usage instructions (command should be path to gmx executable)

Parameter alignment with implementation

All documented parameters match the actual usage in dpgen/generator/run.py:

  • Parameters extracted from jdata["gromacs_settings"] with proper defaults
  • Reflects the actual file structure required by the _make_model_devi_native_gromacs() function
  • Maintains backward compatibility with existing configurations

Before/After

Before:

Argument("gromacs", dict, [], doc="TODO: add doc"),

After:

Argument("gromacs", dict, model_devi_gromacs_args(), doc=doc_gromacs),

Now users have full parameter validation and documentation when configuring GROMACS model deviation tasks, bringing it in line with the LAMMPS and Amber engines.

Testing

  • All existing tests pass, including the GROMACS-specific test suite
  • Argument structure validates correctly with dargs
  • Integration with main arginfo system confirmed working
  • Linting passes with zero issues

Fixes #771.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Copilot Copilot AI changed the title [WIP] [Documentation] add model_devi Variant gromacs [Documentation] Add model_devi Variant gromacs with complete parameter specification Aug 22, 2025
@Copilot Copilot AI requested a review from njzjz August 22, 2025 15:27
Copilot finished work on behalf of njzjz August 22, 2025 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Documentation] add model_devi Variant gromacs
2 participants