Question: So I used a piece of software which claims to be open source and is licensed under "GPL for research purposes only". 

As far as I know, GPL 2 and 3 are not themselves free, in sense that you can't change them and still call them GPL. 

Also, as far as I remember, they don't allow developers to restrict the rights granted by them. Cases such as GPL, GPL or GPL + exceptions, or GPL or another license are possible, but GPL with some rights is removed is not allowed.

Given the above, is the idea of licensing code under "GPL for research purposes only" self-contradictory?

UPDATE:
Do to some website restructuring, I could not find the original page where the research purposes only quote comes from. However, the program itself has a license.txt with GPLv3 in it, and following additional notes appended at the end or the regular GPLv3 text:

```
ADDITIONAL NOTES 
<TheProject> is for research purposes only.  
<TheProject> CAN NOT be used for commercial purposes.
<TheProject> SHOULD NOT be used for medical purposes.  
The authors  WILL NOT be responsible for using <TheProject> in medical conditions.

```

Answer: 
Basically yes to everything you say, although politically it may get complicated. Section 10 of the GPL v3 forbids *any* further restrictions your rights under the license:

> 
> You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License.
> 
> 
> 

"For research purposes only" is exactly the sort of term this is targeting. In theory, if a program is claimed to be distributed under the GPL v3 and does contain an additional restriction you can remove that restriction via the wording in Section 7:

> 
> If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term.
> 
> 
> 

So therefore you could try and distribute the code under the GPL without any further restrictions.

Looking at the specific terms you've mentioned:

> 
> <TheProject> is for research purposes only.  
> 
>  <TheProject> CAN NOT be used for commercial purposes.
> 
> 
> 

These are both attempts to put additional restrictions on a piece of GPL licensed software. Section 7 means I can remove them, so they have no effect.

> 
>  SHOULD NOT be used for medical purposes.
> 
> 
> 

This is fine. I'm allowed to give any kind of hint I like about code, so long as it isn't an attempt to actually restrict people's rights.

> 
> The authors WILL NOT be responsible for using in medical conditions.
> 
> 
> 

And again, this is fine - but almost certainly redundant given the much more extensive wordings in Section 15 and 16 of the GPL.
Searching for the term "GPL for research purposes only" shows a number of hits that shed a somewhat different light on the matter.

It seems that there is quite a bit of GPL'ed software in the academic medical world. Such software is generally not approved for regular medical use by the regulating agencies. Even if it was, any modification would render the regulatory approval invalid.

The GPL may grant you specific rights, including the right to use the software for medical purposes, but this grant cannot overrule regulatory obligations or other laws. The grant originates in, and is restricted to copyright law.

Note that you can replace "medical" with "aviation" or similar fields.