Her parents regularly tell her (as do both grandparents) how proud they are of her but she does not believe them.Never seems to count does it?

It can take a lifetime to build confidence in a child, but takes two minutes from their piers to completely destroy it.... and it can be so very difficult to build it back up.
Medically and psychiatrically she will hopefully get the help needed.
As much as parents love their children, give them their life and full trust and are there through thick and thin, alas teenagers in particular find them too close to often share with, (as terribly sad as this is) it's difficult for someone to know your fears, worries and problems and then sit and have dinner with them making small talk, it is why as wonderful as many parents are, their children just do not turn to them or give them any
full honesty. A parent hasn't failed, it is just the way it is..........
Grandparents on the other hand, can find at times like this that a teenager will open up to them more, as you are not 'sat at that dinning table' afterwards.
It may be a good idea if during the holidays she can come and stay with you? Give her parents a rest and also give her that all important 'one on one' away from her brother, so that she feels important, she can listen to your stories and more importantly if you can try to get her interested in a hobby or something you like doing which you can reel her into enjoying. Just as we do with dogs, (sorry for the analogy, but they are similar when adolescents) you need to distract from the raging hormones and all the chemical imbalances it brings, distract from the thoughts of s*xual awareness and feeling that she does not belong anywhere, and we do that by re-focusing.
Between you and her parents find her something to focus on, I used sports and cadets for my boys, they too have always been A students, but they need more at this vital time. Musical instruments, sports, cadets, horse riding, dancing, dogs

etc, etc, all the effort we put into young children often we let it go when they become teenagers, but they need hobbies just as much, if not more......... try to re-focus her and it will help her along with the medical help she will get.
No-one is to blame for things like this, adolescence is a bad time for many and parents and grandparents can feel so helpless. I hope things turn around.