-round-off <property> <accuracy>
This option allows to round off the values of the given <property> to the given <accuracy>.
The <property> can be X, Y or Z (referring to Cartesian coordinates of atoms), H (referring to box vectors), or any per-atom auxiliary property. If it is defined as "XYZ", then all three coordinates will be rounded off; if it is "AUX", then all auxiliary properties will be rounded off. The <accuracy> should be a positive real number, and can be given using the exponent notation (see examples below).
If a selection was defined (with the option -select
) then the rounding off will affect only the selected atoms.
By default numbers are not rounded off, they are stored as double precision real numbers (i.e. at least 15 significant numbers).
atomsk initial.cfg -round-off x 1e-6 final.cfg
This will read the file initial.cfg
, and round off the X coordinates of all atoms to the sixth decimal number. For instance, if an atom has a X coordinate equal to 112.593725936, it will be rounded off to 112.593726. If an atom has a coordinate 54.329378216, it will be rounded off to 54.329378, and so on. The final result will be saved into final.cfg
.
atomsk initial.cfg -round-off xyz 0.01 final.cfg
This will read the file initial.cfg
, and round off all coordinates (X, Y and Z) of all atoms to the second decimal. The final result will be saved into final.cfg
.
atomsk initial.cfg -round-off energy 1.0e-4 final.cfg
This will read the file initial.cfg
, and round off the auxiliary property called "energy" to the fourth decimal number. The final result will be saved into final.cfg
.
atomsk initial.cfg -round-off AUX 0.001 final.cfg
This will read the file initial.cfg
, and round off all auxiliary properties to the third decimal number. The final result will be saved into final.cfg
.