Table¶
- class hoomd.write.Table(trigger, logger, output=stdout, header_sep='.', delimiter=' ', pretty=True, max_precision=10, max_header_len=None)¶
Write delimiter separated values to a stream.
- Parameters:
trigger (hoomd.trigger.trigger_like) – The trigger to determine when to run the Table backend.
logger (hoomd.logging.Logger) – The logger to query for output.
Tablesupports only'scalar'and'string'logger categories.output (
file-likeobject , optional) – A file-like object to output the data from, defaults to standard out. The object must havewriteandflushmethods and amodeattribute. Examples includesys.stdout,sys.stderrand the return value ofopen().header_sep (
str, optional) – String to use to separate names in the logger’s namespace, defaults to'.'. For example, if logging the total energy of anhoomd.md.pair.LJpair force object, the default header would bemd.pair.LJ.energy.delimiter (
str, optional) – String used to separate elements in the space delimited file, defaults to' '.pretty (
bool, optional) – Flags whether to attempt to make output prettier and easier to read (defaults toTrue).max_precision (
int, optional) – If pretty is not set, then this controls the maximum precision to use when writing numerical values, defaults to 10.max_header_len (
int, optional) –If not
None(the default), limit the outputted header names to lengthmax_header_len. When notNone, names are grabbed from the most specific to the least. For example, if set to 7 the namespace ‘hoomd.md.pair.LJ.energy’ would be set to ‘energy’.Note
At a minimum, the complete most specific part of the namespace will be used regardless of this setting.
Use
Tableto write scalar and stringhoomd.logging.Loggerquantities to standard out or to a file.Warning
When logger quantities include strings with spaces, the default space delimiter will result in files that are not machine readable.
Example:
logger = hoomd.logging.Logger(categories=["scalar", "string"]) table = hoomd.write.Table( trigger=hoomd.trigger.Periodic(10_000), logger=logger, )
Members inherited from
AutotunedObject:- property kernel_parameters¶
Kernel parameters.
Read more...
- property is_tuning_complete¶
Check if kernel parameter tuning is complete.
Read more...
- tune_kernel_parameters()¶
Start tuning kernel parameters.
Read more...
Members inherited from
TriggeredOperation:- trigger¶
The trigger to activate this operation.
Read more...
Members defined in
Table:- logger¶
The logger to query for output.
Tablesupports only'scalar'and'string'logger categories (read-only).Example:
logger = table.logger
- Type:
- output¶
A file-like object to output the data from. The object must have
writeandflushmethods and amodeattribute (read-only).Example:
output = table.output
- Type:
file-likeobject
- header_sep¶
String to use to separate names in the logger’s namespace (read-only).
Example:
header_sep = table.header_sep
- Type:
- delimiter¶
String used to separate elements in the space delimited file (read-only).
Example:
delimiter = table.delimiter
- Type:
- pretty¶
Flags whether to attempt to make output prettier and easier to read (read-only).
Example:
pretty = table.pretty
- Type:
- max_precision¶
If pretty is not set, then this controls the maximum precision to use when writing numerical values (read-only).
Example:
max_precision = table.max_precision
- Type:
int, optional
- max_header_len¶
Limits the outputted header names to length
max_header_lenwhen notNone(read-only).Example:
max_header_len = table.max_header_len
- Type:
- min_column_width¶
The minimum allowed column width (read-only).
Example:
min_column_width = table.min_column_width
- Type:
- write()¶
Write out data to
self.output.Writes a row from given
hoomd.logging.Loggerobject data.Example:
table.write()