Some aspects of GromacsWrapper can be determined globally. The corresponding flags Flag are set in the environment (think of them like environment variables). They are accessible through the pseudo-dictionary gromacs.environment.flags.
The entries appear as ‘name’-‘value’ pairs. Flags check values and illegal ones raise a ValueError. Documentation on all flags can be obtained with
print gromacs.environment.flags.doc()
capture_output = False
Select if Gromacs command output is always captured.
>>> flags['capture_output'] = FalseBy default a GromacsCommand will direct STDOUT and STDERR output from the command itself to the screen (through /dev/stdout and /dev/stderr). When running the command, this can be changed with the keywords stdout and stderr as described in gromacs.core and Command.
If this flag is set to True then by default STDOUT and STDERR are captured as if one had set
stdout=False, stderr=FalseExplicitly setting stdout and/or stderr overrides the behaviour described above.
If set to the special keyword "file"` then the command writes to the file whose name is given by ``flags['capture_output_filename']. This file is over-written for each command. In this way one can investigate the output from the last command (presumably because it failed). STDOUT and STDERR are captured into this file by default. STDERR is printed first and then STDOUT, which does not necessarily reflect the order of output one would see on the screen.
The default is False.
capture_output_filename = ‘gromacs_captured_output.txt’
Name of the file that captures output if ``flags[‘capture_output’] = “file”
>>> flags['capture_output_filename'] = 'gromacs_captured_output.txt'This is an experimental feature. The default is ‘gromacs_captured_output.txt’.
Global registry of flags. Acts like a dict for item access.
There are a number flags defined that influence how MDAnalysis behaves. They are accessible through the pseudo-dictionary
The entries appear as ‘name’-‘value’ pairs. Flags check values and illegal ones raise a ValueError. Documentation on all flags can be obtained with
print gromacs.environment.flags.__doc__
New flags are added with the Flags.register() method which takes a new Flag instance as an argument.
For developers: Initialize Flags registry with a list of Flag instances.
Shows doc strings for all flags.
A Flag, essentially a variable that knows its default and legal values.
Create a new flag which will be registered with FLags.
newflag = Flag(name,default,mapping,doc)
Arguments : |
|
---|