Silicon is an important material and many empirical interatomic potentials have been developed for atomistic simulations of it. Among them, the Tersoff potential and its variants are the most popular ones. However, all the existing Tersoff-like potentials fail to reproduce the experimentally measured thermal conductivity of diamond silicon. Here we propose a modified Tersoff potential and develop an efficient open source code called GPUGA (graphics processing units genetic algorithm) based on the genetic algorithm and use it to fit the potential parameters against energy, virial and force data from quantum density functional theory calculations. This potential, which is implemented in the efficient open source GPUMD (graphics processing units molecular dynamics) code, gives significantly improved descriptions of the thermal conductivity and phonon dispersion of diamond silicon as compared to previous Tersoff potentials and at the same time well reproduces the elastic constants. Furthermore, we find that quantum effects on the thermal conductivity of diamond silicon at room temperature are non-negligible but small: Using classical statistics underestimates the thermal conductivity by about 10% as compared to using quantum statistics.