string_xyz_arrays
#
- mbgdml.utils.string_xyz_arrays(Z, R, *args, precision=10)[source]#
Create string of array data in XYZ format for a single structure.
- Parameters:
Z (
numpy.ndarray
, int, ndim=1) – Atomic numbers of all atoms in the system.R (
numpy.ndarray
, float, ndim=2) – Cartesian coordinates of all atoms in the same order asZ
.args – Other
numpy.ndarray
(ndim>=1) to add where it’s assumed the zero axis is with respect toR
. For example, if we have atomic forces the array shape would be(n, 3)
wheren
is the number of atoms in the structure.precision (
int
, optional) – Number of decimal points for printing array data. Defaults to13
.
- Returns:
The XYZ string for a single structure. This does not include the number of atoms
- Return type: