How to modify the precision of numbers in export_file()

Quote from Yifan Wang on September 16, 2019, 9:50 pmHi all,
I was trying to convert lammps data file to lammps dump file using OVITO. However, neither GUI (Export file) nor Python scripting (export_file()) provides the options to modify the precision and format of numbers in the output dump file, for example "%20.17e".
Does anyone have an idea how I can modify the precision of numbers?
Thanks,
Yifan
Hi all,
I was trying to convert lammps data file to lammps dump file using OVITO. However, neither GUI (Export file) nor Python scripting (export_file()) provides the options to modify the precision and format of numbers in the output dump file, for example "%20.17e".
Does anyone have an idea how I can modify the precision of numbers?
Thanks,
Yifan

Quote from Alexander Stukowski on September 17, 2019, 7:55 amHi Yifan,
While Ovito 2.9 didn't provide an option for this, Ovito 3.0.0 allows you to specify the floating-point output precision for the LAMMPS dump format. You can either control it in the export options dialog that pops up after you've selected the output filename, or by passing the 'precision' keyword argument to the export_file() Python function.
-Alex
Hi Yifan,
While Ovito 2.9 didn't provide an option for this, Ovito 3.0.0 allows you to specify the floating-point output precision for the LAMMPS dump format. You can either control it in the export options dialog that pops up after you've selected the output filename, or by passing the 'precision' keyword argument to the export_file() Python function.
-Alex

Quote from Yifan Wang on September 19, 2019, 9:02 pmThanks Alex! The changes you made in ovito 3.0.0 are exactly what I wanted to have. Fantastic job!
Thanks Alex! The changes you made in ovito 3.0.0 are exactly what I wanted to have. Fantastic job!
新的OVITO微信频道!
New for our users in China: OVITO on WeChat
Official OVITO WeChat channel operated by Foshan Diesi Technology Co., Ltd.
