Issue with Reading .gro File in Ovito Python Scripting – Unexpected Comma Shift

Hello Ovito community,

I hope this message finds you well. I am currently facing an issue while attempting to read a .gro file using Ovito’s Python scripting interface. In the process, I have observed that, upon reading the file, the comma appears to shift one position to the right, as illustrated in the attached image.

Data File (box : 5.46925 5.46925 5.46925):

Ovito output:

I’m puzzled by this unexpected behavior and would appreciate any insights or guidance on why this might be happening. Has anyone encountered a similar problem before? If so, what steps were taken to resolve it?

Your assistance in resolving this matter would be greatly appreciated. Thank you in advance for your time and expertise.

Best regards,
Martín.

Hi Martín,

OVITO’s GRO file reader performs an automatic unit conversion from nanometers to Angstroms (multiplying everything x10). That’s because the atomic coordinates and cell vectors in .gro files are given in nanometer units but most other atomistic file formats typically use Angstrom units. Most default values in OVITO (e.g. atomic display radii) are based on Angstrom units.

Thanks for the quick response! Your explanation about the unit conversion in OVITO’s GRO file reader makes perfect sense. I appreciate your help in resolving my query.