Skip to content

Formatting customization for PWInput #4001

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

jsukpark
Copy link
Contributor

Summary

Add optional keyword argument format_options of type dict, which specifies

  • indent: # of spaces for indentation (defaults to 2)
  • kpoints_crystal_b_indent # of spaces for indentation in K_POINTS card with crystal_b option (defaults to 1)
  • coord_decimals: # of decimal digits for structure information (atomic position coordinates, lattice vector coordinates; defaults to 6)
  • atomic_mass_decimals: # of decimal digits for atomic mass under ATOMIC_SPECIES card (defaults to 4)
  • kpoints_grid_decimals: # of decimal digits for k-point reciprocal lattice coordinate values in K_POINTS card with crystal_b option (defaults to 4)

as keys. The default values are chosen to maintain the same output format as before the change.

This PR aims to close #4000

- Default values set to preserve backwards compatibility
- Preserve indent and max decimal precision
@shyuep shyuep merged commit b7b7389 into materialsproject:master Aug 15, 2024
33 checks passed
@shyuep
Copy link
Member

shyuep commented Aug 15, 2024

Great. Thanks.

@janosh janosh added enhancement A new feature or improvement to an existing one io Input/output functionality labels Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A new feature or improvement to an existing one io Input/output functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable formatting customization for PWInput
3 participants