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: 
The GNU GPL explicitly gives anyone receiving a copy of the software the right to use it for any purpose. That is in direct contradiction to "for research purposes only" and "CAN NOT be used for commercial purposes". So yes, that makes the license as a whole self-contradictory.

You are right that the licenses themselves are not free, but that only restricts making derived works of the license text itself. Just saying "GPL for research purposes only" does not make a derived work in a copyright sense, so the author of this program is free to do so. UPDATE: The GPLv3 text with additional notes should probably be considered a derived work, in which case the authors are violating the copyright of the Free Software Foundation here. That has no bearing on what you can or cannot do however.

As for whether you can restrict the rights listed in the GPL, that depends on who you are. The "you" in the license text is a licensee, i.e. someone who receives a copy of the program under the GPL. Section 10 says that when the licensee gives someone else a copy, that third party automatically gets all the same rights from the copyright owner (the licensor), and the licensee cannot add any other restrictions, e.g. by having the third party sign a contract first.

However, if this author is the copyright holder of the program, then they themselves are not a licensee, and they're not restricted by the GPL. As the copyright holder, they can distribute copies under any terms they like, including "GPL for research purposes only". They would not be distributing their program under the GPL, but that's their choice.

So the author is free to do this. However, restricting the allowed uses does automatically make this software non-[free](https://www.gnu.org/philosophy/free-sw.en.html) and non-[Open Source](https://opensource.org/osd), as well as incompatible with other GPL software, which makes it a pain to use even in an academic setting.
In the United States, you can ignore these alleged restrictions. Those statements are simply notices. They are not binding on you because you have not agreed to them. A notice cannot take away any right you would otherwise have.

A book cannot contain a "license page" that says you may not read the book on Thursdays and have that "license" be enforceable. That's simply not the way copyright works in the United States.

If you own something, you can do anything you want with it unless a law says you can't do it or you agreed not to do it. You own the piece of software and you haven't made any agreements not to do things with it. So that means you can do anything copyright law doesn't say you can't do. You need the copyright holder's permission to do any of those things and the copyright holder can impose conditions *on only those things that you need their permission to do*.

If you have a look at [17 USC 106](https://www.law.cornell.edu/uscode/text/17/106), you'll see things like producing derivative works and distributing copies. And that's why the GPL can put restrictions on producing derivative works and distributing copies.

Now let's look at those restrictions:

> 
>  is for research purposes only. 
> 
> 
> 

Nope, ordinary use is a right of possession in the United States. A copyright holder can't impose requirements on mere use of the work.

> 
>  CAN NOT be used for commercial purposes.
> 
> 
> 

Again, ordinary use is a right of possession, even commercial use unless you're performing the work publicly, which wouldn't apply here.

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

Not a restriction.

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

Not a restriction.

Obviously, you should check with a lawyer. But at least in my non-professional opinion, none of these restrictions are unforceable in the United States unless you agree to them being made enforceable by agreeing to them.