Sufficient and necessary conditions for Lyapunov stability of genetic networks with SUM regulatory logic