def xyz_with_ports(self, arrnx3):
        """Set the positions of the particles in the Compound, including the Ports.

        Parameters
        ----------
        arrnx3 : np.ndarray, shape=(n,3), dtype=float
            The new particle positions

        """
        if not self.children:
            if not arrnx3.shape[0] == 1:
                raise ValueError(
                    'Trying to set position of {} with more than one'
                    'coordinate: {}'.format(
                        self, arrnx3))
            self.pos = np.squeeze(arrnx3)
        else:
            for atom, coords in zip(
                self._particles(
                    include_ports=True), arrnx3):
                atom.pos = coords