How to compile GromacsGUI 0.5.x

11 09 2008

This is a mini-howto for compiling GromacsGUI mainly for those who may have not worked with compiling stuff before, or want to test the software in linux distributions other than (k)ubuntu 8.04 and OpenSuse 10.3 for which I explained exact steps.

1. For compiling GromacsGUI, you need both Qt4 (>4.3.x) and Qwt (>5.x) and their devel packages.

2. Use your distribution package manager to install these packages. They are usually called like these: libqt4, libqt4-dev, libqwt5-qt4 and libqwt5-qt4-dev.

You should also have make and g++ installed. If you don’t have them, install them too.

3. Now download GromacsGUI and extract the downloaded file. You should have two directories now: grogui_noplotting and gui_withplotting .

4. We will try to compile GroGUI with plotting support (gui_withplotting) so go to this directory. Then you have to tell the compiler where it can find Qt and Qwt files. We do this using file which looks like this:

include \
src \
ui \
include \
ui \
LIBS += -lqwt

These three entries are most important ones which specifies the locations of Qt and Qwt files. We will edit the bold items accordingly.

5. When you install Qt and Qwt using a package manager, they are usually installed in your PATH. PATH is a series of directories that linux searches to find a specified program. You can see your PATH by typing this in a terminal and hitting Return key:

echo $PATH

and you will see something like this


You can use your package manager to check where Qt4 and Qwt5 files are installed. For example, in adept click on package name, then push “Details” button then go to “Installed Files” tab.

6. There is usually no problem with Qt4 and it is installed correctly. However for Qwt5, installation names are different among different distributions so we have to edit for “Qwt lib name and include files path”.

lib files are usually installed in /usr/lib or /usr/local/lib . Go to these directories and look for something that has libqwt in its name like or .

Now, you must use this name in “LIBS +=” section of file in this way:

  • remove lib and .so.* from library filename: —> qwt-qt4 or —> qwt5
  • add a -l to at the beginning of library name: qwt-qt4
  • now type this name in front of “LIBS +=” field: LIBS += -lqwt-qt4

7. Now you must locate the pah of Qwt5 include files. You can use your package manager to find out where they are installed. Usually they are installed in /usr/include or /usr/local/include . Look for a directory name that contains “qwt”. Like /usr/include/qwt-qt4 or /usr/include/qwt5 . It contains files like qwt_abstract_scale_draw.h and qwt_plot_item.h .

Now replace the lines shown in bold above in “DEPENDPATH +=” and “INCLUDEPATH += entries”. For example if our include path is /usr/include/qwt-qt4 our file must looks like this:

include \
src \
ui \
include \
ui \
LIBS += -lqwt-qt4

8. Now save your file. Open a terminal directory and enter:


and when it finishes, enter:


9. Now test the first run. Enter:


Hope you see the program window!

About these ads



2 responses

2 04 2009

Ayyo! Why not make a rpm and deb package… it is so troublsome? Why not use autoconf and automake or a shell script to generate makefile? Generating a qmake project file by hand is the last thing that an end-user should do. How will you manage when the project grows?

12 05 2009
Manoj Rajagopalan

Some users may need to use qmake-qt4 instead of qmake.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

%d bloggers like this: