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.

Basics
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 grogui.pro file which looks like this:

DEPENDPATH += . \
include \
src \
ui \
/usr/include/qwt5
INCLUDEPATH += . \
include \
ui \
/usr/include/qwt5
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

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

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 grogui.pro 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 libqwt.so.1 or libqwt-qt4.so.1 .

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

  • remove lib and .so.* from library filename: libqwt-qt5.so.1 —> qwt-qt4 or libqwt5.so.1.0.1 —> 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 grogui.pro file must looks like this:

DEPENDPATH += . \
include \
src \
ui \
/usr/include/qwt-qt4
INCLUDEPATH += . \
include \
ui \
/usr/include/qwt-qt4
LIBS += -lqwt-qt4

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

qmake

and when it finishes, enter:

make

9. Now test the first run. Enter:

./grogui

Hope you see the program window!





How to compile GroGUI 0.5.x in (K)ubuntu 8.04 and OpenSuse 10.3

11 09 2008

(K)ubuntu 8.04

  1. Use Adept and install these packages: g++, make, libqt4-gui, libqt4-dev, libqwt5-qt4, libqwt5qt4-dev.
  2. Download GromacsGUI .
  3. Extract files.
  4. Go to gui_withplotting directory.
  5. Edit the bold lines of grogui.pro file to be like this:

……

DEPENDPATH += . \
include \
src \
ui \
/usr/include/qwt-qt4

INCLUDEPATH += . \
include \
ui \
/usr/include/qwt-qt4

CONFIG += release
QT += qt3support
LIBS += -lqwt-qt4

……..

6. Now open a terminal in this directory and run these commands:

  • qmake
  • make

7. Now enter:

  • ./grogui

Opensuse 10.3

  1. Use Yast or Smart to install these packages: g++, make, libqt4-gui, libqt4-dev, libqwt5, libqwt5-dev.
  2. Download GromacsGUI .
  3. Extract files.
  4. Go to gui_withplotting directory.
  5. Edit the bold lines of grogui.pro file to be like this:

DEPENDPATH += . \
include \
src \
ui \
/usr/include/qwt5

INCLUDEPATH += . \
include \
ui \
/usr/include/qwt5

CONFIG += release
QT += qt3support
LIBS += -lqwt

6. Now open a terminal in this directory and run these commands:

  • qmake
  • make

7. Now enter:

  • ./grogui




I love dynamics!

10 11 2007

Long time from my last post! Quite busy these days, I actually can not find any free time. Now I am at surgery ward, in which the daily work starts at 6:00 AM until 11:00 AM, and we usually have 12 shifts per month. Besides, work from my thesis, GRE exam, my applications to universities and some minor things (like the lecture I have to present this Monday about diabetics foot) fill any minute amount of free time. However, I see all these businesses as the dynamics of life (although I think the kinetic energy of my dynamics is relatively high!) and like my scientific interests, I love dynamics!

19:30 shanbeh, 19 aban 86





Version 0.5 beta released

20 09 2007

After about one month of development, now the version 0.5 is ready. I also prepared an introduction slideshow which was created using wink.

Not enough time for blogging now… 😉

9:51 AM panjshanbeh, 29 shahrivar 1386.





News

31 08 2007

After about 4 weeks of looking, learning, thinking and writing code, and again looking, learning, thinking and writing code, and again… now I’ve learned Qt enough to find my way. Coming from python world, it was relatively difficult to get accustomed with “new” and “delete” especially when working with raw data! The plotting tool has been more matured. As I said before, I delayed molecular viewer part to the next major release (I hope it to be developed in coming months). Nevertheless, just for my curiosity, I wrote a simple “test” viewer using OpenMOIV and also played a little with BALLView. The results were promising.

Last week, I accidentally found a page in gromacs wiki that listed the gromacs GUIs currently available. There was a program called GmxG listed too. The software is written by Filipe Maia and seems that has not been released yet. I grabbed the code using gromacs cvs and when reviewing the code, I found that what a good GUI is going to be created. It is obvious that Filipe is an experienced programmer, and I hope him to find enough time to complete it (because some parts of code date back to about 2 years ago and about, I think, 60% of work has done, I think his main problem is lack of enough free time!). The GmxG has a molecular viewer using PyMol, an xvg plotter and a statistical analysis section.Because there was no copyright notification in GmxG code, I didn’t use any of it. But the output parser of the code inspired me to write one for my app too, but not for this release. Maybe for version 0.6 .

OK then, enough for now. I am tired now and more tiring days are ahead…!

1:15 AM shanbeh, 10 shahrivar 1386.





Exhausted …

15 08 2007

I have been recently busy with some coding. About 2 weeks ago, while working with GROMACS using my small Gromacs GUI app, I found that it was time to add some new features . I decided to rewrite it all over, but this time in Qt4. Python provides a simplified way to write your code, but I think using C++ with Qt flavor can be a real good alternative.

So the work on new Gromacs GUI version started and it is taking shape slowly. Not perfect yet but satisfying. It has got a simple plot viewer and a built-in console now. I wanted to add a molecular viewer too but I thought there wouldn’t be enough time to implement a good viewer in near future so it would be better to focus on other parts like completion of front-ends for commands. Qt4 is a very good toolkit; not only for GUIs, but also for usual non-GUI applications. It is astonishing!

Now, after 2 weeks, quite tired; but I must say that I enjoyed C++/Qt coding a lot.

Next week the surgery course (of internship stage) will start. OMG… What a busy summer… .

EDIT: I changed my rotation from surgery to psychiatry. The surgery rotation will  start on 22 October.





Fars

20 07 2007

My family currently live in Shiraz, Fars province. A beautiful landscape of Fars from wikipedia.

Fars





So It Starts…

20 07 2007

After some searching about blog providers, I finally chose WordPress over others. And so my blogging experience starts… .

Yesterday, I arrived at my room after about 19 hours of hard work (specially at the Sina hospital)… and then I just fainted 🙂 . It was a very busy day and made me quite tired. Some complex cases (including a man with LBBB heart block who presented symptoms of an MI and a man with an old necrotic ulcer on his leg and probably an osteomyelitis under it) was the way that the day started.

I woke up about 6 hours ago. Thanks God. What a refreshing sleep!

28 Mordad 86