def _cluster_xyz(traj, atom_selection):
	"""
	Prepare input of XYZ coordinates for clustering.

	Parameters
	----------
	traj : mdtraj.core.trajectory.Trajectory object
		Loaded mdtraj trajectory.
	atom_selection : ndarray
		Numpy array (N, ) containing indices of atoms.

	Returns
	-------
	reshaped_xyz : ndarray
		Numpy array (frames, atoms * 3) of reshaped XYZ coordinates.
	"""

	temp = traj.xyz[:, atom_selection]
	frames = temp.shape[0]
	atoms = temp.shape[1]
	reshaped_xyz = temp.reshape((frames, atoms * 3))
	reshaped_xyz = reshaped_xyz.astype("float64")

	return reshaped_xyz