MDAnalysis / mdanalysis

MDAnalysis is a Python library to analyze molecular dynamics simulations.
https://mdanalysis.org
Other
1.32k stars 651 forks source link

Allow use-defined precision in XYZWriter #4775

Open ChiahsinChu opened 3 weeks ago

ChiahsinChu commented 3 weeks ago

Is your feature request related to a problem?

I found a loss of precision when writing XYZ files with XYZWriter (which should be 10.5f), which might be a problem if the absolute values of data are small.

Describe the solution you'd like

I would like to make the precision as a user-defined variable, as what XTCWriter have implemented.

Additional context

A possible implementation and the corresponding UT in https://github.com/MDAnalysis/mdanalysis/pull/4771