Skip to content

Conversation

@andthum
Copy link
Owner

@andthum andthum commented Sep 8, 2022

Change Default of --every Option of submit_gmx_analyses_lintf2_ether.py

Type of Change

  • Bug fix.
  • New feature.
  • Code refactoring.
  • Dependency update.
  • Documentation update.
  • Maintenance.
  • Other: Description.
  • Non-breaking (backward-compatible) change.
  • Breaking (non-backward-compatible) change.

Proposed Changes

Change default of the --every option from 1 to 0.

The value of the --every option is parsed to the -dt option of the submitted Gromacs tools. In the Gromacs documentation (https://manual.gromacs.org/documentation/2018-current/onlinehelp/gmx-trjconv.html) it says about the -dt option:

Only write/use frame when t MOD dt = first time (ps)

However, when -dt is set to 1 and the spacing between frames is less than 1 ps, not every frame is processed, although t MOD 1 should be 0 for all (integer) values of t. When setting -dt 0, every frame is processed (although t MOD 0 should not be defined. However, 0 is the default value for -dt according to the docs).

PR Checklist

  • I followed the guidelines in the Developer's Guide.
  • New/changed code is properly tested.
  • New/changed code is properly documented.
  • New/changed features are tracked in CHANGELOG.rst.
  • The CI workflow is passing.

Change default of the --every option from 1 to 0.

The value of the --every option is parsed to the -dt option of the
submitted Gromacs tools.  In the Gromacs documentation
(https://manual.gromacs.org/documentation/2018-current/onlinehelp/gmx-trjconv.html)
it says about the -dt option:

> Only write/use frame when t MOD dt = first time (ps)

However, when -dt is set to 1 and the spacing between frames is less
than 1 ps, not every frame is processed, although t MOD 1 should be 0
for all (integer) values of t.  When setting -dt 0, every frame is
processed (although t MOD 0 should not be defined.  However, 0 is the
default value for -dt according to the docs).
@github-actions github-actions bot added breaking Breaking changes bugfix Pull requests that fix a bug major Change that results in a new major version labels Sep 8, 2022
@andthum andthum merged commit 158897f into main Sep 8, 2022
@andthum andthum deleted the fix/submit_gmx_analyses/every-default branch September 8, 2022 13:31
andthum added a commit that referenced this pull request Mar 15, 2023
Change the default value of the `--every` option from 0 to 1.

The value of the `--every` option is passed to the `-dt` option of the
submitted Gromacs tools that support this option.  The default value was
set to 0 in PR #74
(#74),
because `gmx trjconv` did not process all frames when `-dt` was set to 1
and the spacing between trajectory frames was less than 1 ps.

However, it now turned out that the other Gromacs tools only process the
first frame when `-dt` is set to 0.  Therefore, we reset the default
value for `--every` (i.e. `-dt`) to 1.

In a following commit, we will replace the `-dt` option for `gmx
trjconv` with `-skip`, which should be more robust (see
https://www.mail-archive.com/gmx-users@gromacs.org/msg35903.html and
https://www.mail-archive.com/gmx-users@gromacs.org/msg06868.html).
andthum added a commit that referenced this pull request Jun 22, 2023
…and `--dt`

Replace the `--every` option ("read every n-th frame from the
trajectory") by a `--skip` and `--dt` option.  The new options mirror
the `-skip` and `-dt` options of Gromacs analysis tools and therefore
should by less confusing.

Related to pull request 119
(#119) and pull
request 74 (#74).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Breaking changes bugfix Pull requests that fix a bug major Change that results in a new major version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants