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 as Z.

  • args – Other numpy.ndarray (ndim>=1) to add where it’s assumed the zero axis is with respect to R. For example, if we have atomic forces the array shape would be (n, 3) where n is the number of atoms in the structure.

  • precision (int, optional) – Number of decimal points for printing array data. Defaults to 13.

Returns:

The XYZ string for a single structure. This does not include the number of atoms

Return type:

str