Skip to content

Formatting in dump file #84

@mphoward

Description

@mphoward

The formatting in a dump file is hard-coded:

elif key in ("position", "velocity"):
fmt = "{:.8f}"
else:
fmt = "{:f}"

but does not match what is currently specified as the default by dump modify:

https://docs.lammps.org/dump_modify.html

I think we should change the default format string for floats to be :g for consistency. In addition, it might be nice to add an option to set a format string for keys in the schema if the user wants to override this default behavior.

There is likely a similar issue with the data file, but LAMMPS is less clear about what formatting it uses. We might consider addressing that in a separate issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions