<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def run_qpoints(self, q_points, with_eigenvectors=False, with_group_velocities=False, with_dynamical_matrices=False, nac_q_direction=None):
 """Phonon calculations on q-points. Parameters q_points: array_like or float, optional q-points in reduced coordinates. dtype='double', shape=(q-points, 3) with_eigenvectors: bool, optional Eigenvectors are stored by setting True. Default False. with_group_velocities : bool, optional Group velocities are calculated by setting True. Default is False. with_dynamical_matrices : bool, optional Calculated dynamical matrices are stored by setting True. Default is False. nac_q_direction : array_like q=(0,0,0) is replaced by q=epsilon * nac_q_direction where epsilon is infinitsimal for non-analytical term correction. This is used, e.g., to observe LO-TO splitting, """


        if self._dynamical_matrix is None:
            msg = ("Dynamical matrix has not yet built.")
            raise RuntimeError(msg)

        if with_group_velocities:
            if self._group_velocity is None:
                self._set_group_velocity()
            group_velocity = self._group_velocity
        else:
            group_velocity = None

        self._qpoints = QpointsPhonon(
            np.reshape(q_points, (-1, 3)),
            self._dynamical_matrix,
            nac_q_direction=nac_q_direction,
            with_eigenvectors=with_eigenvectors,
            group_velocity=group_velocity,
            with_dynamical_matrices=with_dynamical_matrices,
            factor=self._factor)