Chances of you getting anything in 5 seconds is very slim.
I think you left out a word, though - her grinding on your what? Were you clothed at the time? Was she?
Assuming that her butt was grinding on your genitals for 5 minutes and you were both naked, there is a risk of transmission of herpes type 2, HPV and syphilis, as these are all transmitted by genital skin-to-skin contact.
Syphilis is uncommon, and she'd have had to have a sore in order to transmit it. I wouldn't worry much about this. If you decide to test for anything, you can ask for this to be included, but that's more for peace of mind than actual risk.
You can get herpes type 2 whether she had a sore or not, though the chances are less if she didn't. You can ask your doctor for a type specific IgG herpes blood test. Most people will test positive by 6 weeks, though some will take up to 4 months.
HPV can take months to show up, if you get a strain that presents with genital warts. Many strains won't give you any symptoms. If you haven't been vaccinated for HPV, you should talk to your doctor about it. There is no test for men, though if you have receptive anal sex, you can get an anal pap smear done that may show it.
As far as gonorrhea, chlamydia, NGU and HIV- it's really unlikely that 5 seconds of unprotected penetration would transmit anything. I wouldn't worry, but if you want to test, you can test for the first 3 at 5 days, and HIV at 28 days using a 4th generation DUO test.
Overall, I wouldn't worry.