problem with Units variables when an XYZ file is provided in atomic units
This issue relates to variables "UnitsOutput" and "UnitsXYZFiles"
If the system's structure is provided by using a xyz file in atomic units (unusual but certainly possible), the defaults of the latter variables, that is:
UnitsOutput=atomic UnitsXYZFiles=angstrom_units
will produce wrong results as the code will translate the structure into wrong atomic units. This manifests clearly within PCM calculations. However, in-vacuo calculations might show no evidence of this inconsistency.
If the user wants to provide an XYZ file in atomic units the consistent combination should be:
UnitsOutput=atomic UnitsXYZFiles=octopus_units
I think it is worth to check this and print a clear warning to make the user check for this. Since the code does not know which units are used in the XYZ file it is probably wise to calculate inter-atomic distances to detect unreasonably larges values but I am not sure if this criterion is general enough for all the things that can be done with Octopus.
Furthermore, the units for the velocity files are undefined, and the only method currently bug-free to define velocities is including them in the input file AND use atomic units.
Thanks,
Alain.