Thanks for your consult at DoctorSpring.com.
The morning after pill is more than 95 % effective in preventing a pregnancy if taken within 24 hours. If taken within 72 hours of unprotected sex, it is more than 80 % effective, so you have a good chance of preventing pregnancy, unless you have already ovulated.
Regarding sodium valproate, it is absolutely safe to take it with emergency contraceptives. Please read the following link - it will help
There is no known interaction with Ritalin also. So do not worry on that score.
Please feel free to discuss further.