Nonperturbative dynamical-group approach to the charmonium potential