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.
From the information given, this is a case of **dual licensing**

<https://en.wikipedia.org/wiki/Multi-licensing>

Some answers confuse this. What you can **not** do is release code under the GPL and then add restrictions to its use. The GPL forbids that.

However what you **can** do is release the code under different licenses for different purposes. In such case, outside research purposes, the GPL does not apply because the code was not relased under the GPL for such purposes.