Periodic solutions for the generalized anisotropic Lennard-Jones Hamiltonian