Project

General

Profile

Feature #1458

Always write output from genion

Added by Anders Gabrielsson over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Category:
analysis tools
Target version:
Difficulty:
uncategorized
Close

Description

Whenever genion finds "No ions to add." no output gro is written.
This can make scripting more difficult as the user has to check whether the output file was written or not.

I suggest the behaviour of genion (and possibly other tools) to be changed to always write output files for all valid inputs even if trivial.
Alternatively, add an option to force output even if the output only duplicates input.

Associated revisions

Revision 914ccbe7 (diff)
Added by Erik Lindahl over 3 years ago

Always write output from genion

To facilitate scripting we now copy the input conformation
and write it to the output, even if no ions are to be added.

Refs #1458.

Change-Id: I3e467169e30bc7448758c2d506ca35f49b001b50

History

#1 Updated by Mark Abraham over 3 years ago

Anders Gabrielsson wrote:

Whenever genion finds "No ions to add." no output gro is written.
This can make scripting more difficult as the user has to check whether the output file was written or not.

I suggest the behaviour of genion (and possibly other tools) to be changed to always write output files for all valid inputs even if trivial.
Alternatively, add an option to force output even if the output only duplicates input.

What genion workflow are you using that can fail to add ions and still be useful without needing to parse a stranger error condition later?

#2 Updated by Anders Gabrielsson over 3 years ago

Mark Abraham wrote:

What genion workflow are you using that can fail to add ions and still be useful without needing to parse a stranger error condition later?

I use "-neutral" to add counter-ions. Not very exotic usage, I think? ;)

So, if genion finds the system to be already neutral, no ions will be added (which makes perfect sense) but also no out.gro is written.
In other words, the system is perfectly fine which is why the issue arises in the first place!
It might seem silly to neutralise an already neutral system, but as pointed out in the first post this might well happen in an automated system setup workflow.

A third suggestion for improved behaviour would be to return with an error in these cases to signal that genion bailed before writing any output.

#3 Updated by Mark Abraham over 3 years ago

OK. There's "failed to add ions" from some error condition, and "failed to add ions" because the system already makes sense. You're right that the latter should not impede automation.

#4 Updated by Gerrit Code Review Bot over 3 years ago

Gerrit received a related patchset '1' for Issue #1458.
Uploader: Erik Lindahl ()
Change-Id: I3e467169e30bc7448758c2d506ca35f49b001b50
Gerrit URL: https://gerrit.gromacs.org/3489

#5 Updated by Erik Lindahl over 3 years ago

  • Tracker changed from Bug to Feature
  • Status changed from New to Fix uploaded
  • Target version changed from 4.6.x to 5.0

Not a bug, so we won't change anything in 4.6, but I've uploaded this feature for 5.0.

However, in general it is a bad idea to merely neutralize the system - that will usually mean having only having 2-3 ions, which in turn leads to horrible sampling fluctuations. Unless you really know what you are doing, you should add a physiologically relevant salt concentration with the -conc option.

#6 Updated by Erik Lindahl over 3 years ago

  • Status changed from Fix uploaded to Resolved

#7 Updated by Erik Lindahl over 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF