Wednesday, April 8, 2009

How to install GROMACS on windows vista 64

1. Download cygwin from http://www.cygwin.com/
a. click on the link to "install from internet" and run the installer
b. when you get the dialog that asks you what packages to install expand and select "gdn" "gdb" and "make"
c. follow the rest of the installation instructions

EDIT: this website has a pictorial guide to install the packages with cygwin. I forgot to mention they are all under Developer, so expand that first.

EDIT: also install the tcsh package

http://www.eecg.utoronto.ca/~aamodt/ece242/cygwin.html

2. Next you are going to need the GROMACS source code. You can get it here.
a. download and save the file someplace handy

3. Next you need FFTW. There are pre-compiled dlls for Windows, but I would recommend not using them unless you know how to set the path variables. The easiest way is to grab fftw-3.2.1.tar.gz . Again, save this someplace handy.

4. create a folder someplace (C:\FFTW) and extract FFTW to it.

5. start cygwin and change the directory to your FFTW folder: cd c:\fftw

6. type: ./configure --enable-threads --enable-sse --enable-float

7. then: make

8. then: make install

9. now create a folder for gromacs (C:\gromacs) and extract the distribution there. There should be a few folders like admin, src, etc.

10. in the cygwin console, change your directory to the gromacs folder: cd c:\gromacs

11. type: ./configure --enable-shared LDFLAGS='-L/usr/local/lib'

12. then: make (this took a couple of hours to run through)

13. then: make install

14. make links

15. make clean

when you get your prompt back in cygwin (or from a fresh session change your directory to c:\gromacs) type: luck

to test if you have access to gromacs. You should get something like:

gcq#93: "Pretend That You're Hercule Poirot" (TeX)

Also note I really haven't tested anything else yet, so this could all end up to be bogus. However if you're not really a computer guy, all bringing your ibook to dinner "in case you need to compile something" like me, then you may find this a good start. I'll update as necessary.

P.S. I like 7-zip for all my extracting needs. Let me know of any problems or mistakes with the above.

63 comments:

thaoula said...

Hi Tom,

Found your great post about installing Gromacs on Vista.

Got a stupid question. I have download the Cygwin setup and I have found gdb and make. However, I cannot find gdn.

When I start cygwin and run the ./configure command I get several errors (sed: command not found, expr: command not found)

What is gdn? Are the above errors releated to gdn?

Thanks in advance.

Kind Regards,
Tarek

Tom said...

Hi,

Thanks!


this website has a pictorial guide to install the packages with cygwin. I forgot to mention they are all under Developer, so expand that first.

http://www.eecg.utoronto.ca/~aamodt/ece242/cygwin.html

I've also added this to the post, forgot to last night.

Jérôme said...

Hi Tom,

thank you so much for your tutorial, I'm not very confortable with Linux compilation and I'm still not done with the installation (still compiling Gromacs...) but your tutorial is very clear!

I just have something to say about Cygwin distribution: I first installed Cygwin from usherbrooke.ca but I was unable to find all the required packages, so I switched to uwaterloo.ca and the installation went fine.

I know it's not your mistake but I wanted to warn potential new users like me of this "problem". Unless I missed something... ;-)

Cheers,
Jerome

Makoto said...

Dear Tom:

My search about "GROMACS on cygwin" hit your blog and I'd like to ask about that.

I'd trid to compile gromacs-3.3.3 and also gromacs-4.0.4 with cygwin on windows-XP box.

Even configure with --enable-shared (like as you), there were no DLLs (cygwin shared libraries) at all in the both versions.

Please give me any infometion to get proper DLLs and sheared version of gromacs on cygwin (it is easy on linux).

Thank you for advance.

Regards.

Makoto.

Tom said...

Hi Makoto,

I'm don't know what you did, so I don't know what went wrong. Did you install all the cygwin packages?

Tom

Makoto said...

Hi Tom:

Thank you for your reply.
And sorry for sortage in my info.

What I did was almost the same as in your instructuins (install CYGWIN, FFTW, GROMSCS).
Actually I'd got GROMACS binary and
it correctry runs.
The problem was just the GROMACS was not shared library version I'd expected (since I'd configured with
--enable-shared).
The GROMACS binary set lacks DLLs and the total size was very big
(over 100MB. I shoud minimize it to use it on some course).
So, my question was just how to get the shared library version with DLLs (like cyggmx-4.dll, cygmd-4.dll etc.).

Kind Regards.

Makoto.

Tom said...

I am stumped here, sorry. I feel pretty bad, but I don't know a solution to your problem.

Makoto said...

Hi Tom:

Thanks a lot for your reply.

I'd post the same query to the GROMACS-uses ML.
There was a commnet that said the shared libraly version can not build on cygwin.

I'll try to hack a bit more.

Thanks anyway.

Cheers.

Makoto.

Bio+ Info : Query + Solutions said...

Hi
will u please tell me the exact procedure to install Gromacs on Windows Xp platform & do tell me the step by step procedure for doing Molecular dynamics simulation through gromacs on windows Xp platform using cygwin

Tom said...

The posted process should work for XP.

As for the step for step process, I recommend looking at:

http://tunicata.techfak.uni-bielefeld.de/TOBIX/tutorials/gromacs/online/getting_started.html

Tom

Hassan said...

thanks Tom

Hassan said...

Hey Tom if in near future I m facing any type of problem regarding Gromacs or any other bioinformatics stuff, may i feel free to ask u?

Tom said...

sure

Hassan said...

Hi
do anyone please tell me how to predict glycosylation sites in a any protein sequence

Hassan said...

Hi Tom
Dear i am really sorry to bother u, but its very urgent actually my Prof. has asked me to submit him the report ASAP. Dear Please tell me the steps to install gromacs on UBUNTU linux, just do remember I am very much new for UBUNTU/linux. Please help me Dear. I'll be greatly Thankful to you. Dear if possible just email me step by step procedure at hassanbeg@gmail.com. Please do remember to mail me. Its really very-2 urgent.

Tom said...

Hi,

Try:

# apt-get install gromacs

This is how I did it last time on a ubuntu image on Amazon's cloud.

Also there are tutorials on the net, especially for linux

http://www.gromacs.org/index.php?title=Download_%26_Installation/Installation_Instructions


Good luck

Tom

FelicitasVeritas said...

Hi Tom! Firstly, thanks so much for this post! I've been playing with gromacs on Vista 64 for the past several days.

My question is, how do I now install and use an MPI?

Thanks!

Tom said...

Hi,

Thanks! For MPI installation I recommend you check out Dr. Damian Allis' post: Compiling Single-Precision And Double-Precision GROMACS 3.3.3 With OpenMPI 1.2.6 Under OSX 10.5 (Leopard)

http://www.somewhereville.com/?p=112

I know is says OSX, but the same basic ideas apply. Good Luck.

Tom

Soulstormer said...

hey tom,
Thankx for this post, found it really helpful. i have a question-
performance wise, is there any difference running gromacs in cygwin and gromacs in fedora? do we get similar results or different results?

Tom said...

Sure, no problem.

I'm not sure on the performance question; I assume you mean speed wise though. My hunch is it would be a little faster on a linux native deck because you don't have the extra, if tiny, cygwin layer between the code and the metal, but I don't have any data to support this.

Siddharth said...

Hey Tom,
The post is really helpfull.

Suhaila S. said...

Hi Tom,

Thanks for this. Really help me a lot! =)

Satchmo said...

Hey Tom,
Sorry to bother you, but when I tried to run configure for fftw 3.2.1 I get a couple syntax errors, and I'm not totally clear on how I could fix them. The errors I get are:

./ configure: line 14: $'\r': command not found
./configure: line 25: syntax error near unexpected token '$'in\r''
'/configure: line 25: ' case '(set -o) 2>/dev/null' in

Background:
Install base level cygwin with gcc compilers for c, c++, fortran etc. and I also could not find the gdn file in the Devel section of the install, what exactly is its function?

I really hope you can help me with this, I can't wait to give GROMACS a try :D

Tom said...

Yeah, I encountered this too if i remember right. It comes from the different way DOS and UNIX files are formatted. Right now your files are in a DOS format and they need to be in UNIX.

You can convert them:

http://www.vasudevaservice.com/documentation/how-to/converting_dos_and_unix_text_files

Or the easiest way would probably be to delete everything and start over. Do you use 7zip or windows to unpack the files? I think 7zip keeps the correct formatting and that is how I solved it. There is also a tar tool in cygwin that can unpack them.

Tom

Tom said...

oh yeah, about the gdn package:

other people have commented that they couldn't find all the packages on some of the cygwin download sites. Word on the street is the one at uwaterloo.ca has them all.

amir said...

Dear Tom,
Im fairly new to Cygwin, openmpi,Etc. Im trying to install openmpi via the package i got from its website. My problem is that the openmpi configuration goes smooth , but the "make" and "make install" goes horribly wrong enters folders then exits saying that there is nothing to build ... Can you please somehow give me instructions as to how to install openmpi with Cygwin? I've searched all over the web and even Dr. Damian Allis' post (http://www.somewhereville.com/?p=112) but Im still very confused and frustrated.
Thanks alot,
Amir

Tom said...

I encountered a similar problem when installing fftw, and it was because of how I extracted fftw to my fftw folder. I used 7-zip for the extraction. Fftw comes in a .tar.gz. I had to do two extractions (one for the gz and one for the tar) and ended up with something like C:/FFTW/FFTW with the second folder containing all the files including the make file. Make sure this isn't the case for you. If so, you have to change your directory down one more level, or cut all the files from the second FFTW folder and paste them into the first. This should put the make file in the proper place.

ashish j said...

HEllo Tom,
I am Ashish, I want to install Gromacs on windows XP and on VISTA, but I am unable to process it, i went through some of your steps mentioned above but all went wrong, so i request you to please guide me how can i start fresh installation on windows as I don't know Linux so please let me know, on my e mail please, ie. ashishfeb13@gmail.com,
Thanks in advance.


Ashish

Tom said...

without knowing what you did, what steps failed and what the results were, there's nothing I can add other than "see above"

amir said...

Dear Tom,
The extraction of openmpi wasn't the problem... I have sent you an email of what the cygwin's output was. Please Help me out.
Thanks,
Amir

Hassan said...
This comment has been removed by the author.
Hassan said...
This comment has been removed by the author.
Hassan said...

Hi Tom I m running gromacs 4.0 on windows, I am getting following error when I am giving "genbox –cp fws.pdb –cs spc216.gro –o fws_b4em.pdb –p fws.top" command


Fatal error:
Program genbox, VERSION 4.0
Source code file: gmx_genbox.c, line: 744
Undefined solute box.
Create one with editconf or give explicit -box command line option
Please help me out dear
If possible please send me .mdps files and complete steps by step procedure for working on gromacs

Tom said...

"Create one with editconf or give explicit -box command line option"

I believe this tells you how to solve the problem. You will receive a great amount of satisfaction if you solve it yourself. However I understand a hero often needs assistance on his journey. There for I will offer this:

http://manual.gromacs.org/current/online/genbox.html

amir said...

Dear Tom,
I've decided to build gromacs on Cent OS (linux) as I wasn't able to build openmpi via cygwin. unfortunately when I try to configure gromacs (./configure --enable-mpi) i get some out puts and then:
checking for int... yes
checking size of int... configure: error: cannot compute sizeof (int). If i remove the --enable-mpi everyhtng goes well... What should i do considering that i need to run gromacs parallel.
Thanks,
Amir

Tom said...

Hi Amir,

I'm sorry. I don't know how to help.

Good Luck

amin said...

Hello Tom,

Just wanted to say thank you for your blog. If it wasn't for your step-by-step guide, it would have been extremely difficult to do this.

Thanks

Tom said...

Thanks, but sometimes I wish I could help more.

Tom

amin said...

Dear Tom,

I was wondering whether GROMACS on CYGWIN is less capable than GROMACS run on LINUX? i.e. concerning its speed and its ability to simulate larger macromolecules.
Also, I have searched lots about GROMACS (I have most the manuals) but could you introduce a good reference or a professor who works mainly GROMACS in drug design and protein simulation.
I know this is quite an irregular question but I would be very grateful and I'd benefit a lot from your experiences.

Thank you for all your help.

Amin

Tom said...

Hi Amin,

Thanks for the comment, but I don't know the answer to either of these questions. I said in the comments before that I thought gmx running on Linux might be a little faster, but I didn't have anything to support that statement. I don't know any reference other than the documentation you already have, sorry.

Tom

Bern said...

Hi Tom,

Your post is linked as a resource for installing Gromacs in Windows. It is a good start.

I am having problems installing serial Gromacs with Windows 7. I got Cygwin, installed the packages mentioned in your blog under Devel inluding gcc and gcc-f77. I got fftw-3.2.1 and did it succesfully with Cygwin. I downloaded gromacs-4.0.7. But when I try to run $ ./configure --enable-shared LDFLAGS="-L/usr/local/lib" what appears is an error: C++ preprocessor "/lib/cpp" fails sanity check.

I did another configure run with the line $ ./configure --enable-shared LDFLAGS="-L/usr/local/lib" CPPFLAGS="-I/usr/local/include". Again, I get the same error.

How to I correct the problem. Thanks. Bee

Tom said...

there should be a log file, config.log, that tells you more. Also just past preprocessor "/lib/cpp" fails sanity check into google. There is a lot of info.

Best of luck,

Tom

MAJID said...

Dear Tom,

Thanks to your nice blog, I have apparently installed the cygwin, and Gromacs successfully. However, As you said, we need to install "tcsh" package. Now, I installed cygwin 1.7, but I couldn't find "tcsh" in any mirror. Is it supposed to be in development package? I do have a a file named "tclsh". Could it be the same thing?

Thanks,
Majid

MAJID said...

Just to clarify my previous comment, I was trying to run gromacs after following all the steps in your blog. I was following the instructions given on http://tunicata.techfak.uni-bielefeld.de/TOBIX/tutorials/gromacs/online/getting_started.html. And in the first step it asks you to start C shell with tcsh command, which I am unable to find.

Thanks for your time,
Majid

MAJID said...

Dear Tom,

I have figured out my earlier problem, but I am facing a new one.

While trying to run the gromacs demo, I realized that its not present in cygwin folder. When I go into cygwin/usr/local/gromacs, I only see bin, include and lib folders. Could you tell me how can I fix that problem? Can I reinstall gromacs?

Thanks,
Majid

Tom said...

You do not have a shared folder then?

C:\cygwin\usr\local\gromacs\share\gromacs\tutor

Don't reinstall just yet, but I'm not sure what the problem is. Make sure the folder is not hidden, and keep looking around. If you don't find it, email me.

Tom

MAJID said...

Yes, the problem is that I don't see "share" folder in D:\cygwin\usr\local\gromacs-4.5.3
And I am installing it on windows 7.

Thanks,
Majid

Manshant said...

Hi Tom
I am a student and i want to learn GROMACS. I am not able to follow the instructions or may be i missed something.
Can u help me out with something that is easy to use. I have installed fedora13 on my system n have installed fftw, gromacs too.
Do not know how to operate GROMACS.

Any link that has commands to operate GROMACS, then plz send me.

Tom said...

in linux, just type
sudo apt-get install gromacs

to install gromacs, read this too
http://www.gromacs.org/Documentation/Manual

MH said...

Hi Tom,

I am trying to install Gromacs-4.5.4 in windows vista. Everything went all right untill make command of Gromacs. Make command was running more than 2 hours, but in the end, I got the following error:
Creating library file: .libs/libgmx.dll.a
collect2: ld returned 1 exit status
make[3]: *** [libgmx.la] Error 1
make[3]: Leaving directory `/cygdrive/d/softwares/bioinformatics/gromacs-4.5.4/s
rc/gmxlib'
make[2]: *** [install-recursive] Error 1

I have tried doing uninstalltion and re-installation of cygwin. How should I deal with this error. Needless to say that I can't proceed further.

Will really appreciate your comment.

Regards
Monisha

georg.zeplin said...

Hello Tom,

having the same problem as MH, I have found an additional warning of the make that may help solving the problem:

"*** Warning: This system can not link to static lib archive /usr/local/lib/libfftw3f.la.
*** I have the capability to make that library automatically link in when
*** you link to this library. But I can only do this if you have a
*** shared version of the library, which you do not appear to have."


After that warning there is a bunch of warnings, with unresolves symbols like:
.libs/gmx_fft_fftw3.o:gmx_fft_fftw3.c:(.text+0x2a7): undefined reference to `_fftwf_execute_dft_c2r'
I don't know pretty much on compiling, but the error seems to be related to fftw. I have tried fftw 3.2.2 and gromacs 4.5.4.

Best, Georg

georg.zeplin said...

Hi,

if anyone is having the same problem as MH and did with gromacs 4.5.4 under Vista: Configuring gromacs with --disable-shared instead of --enable-shared solved the problem for me, although this consumes some more memory than building the DLL.

Best, Georg

@lt3REg0 said...

Hi

I am trying to install gromacs on windows but the ./configure for gromacs says that it is not able to find libraries for fftw3...I clearly installed fftw properly ...please help

thanks in advance

mahesh

Nabil said...

hi
i am trying to install gromacs on vista 32.
do you think it will work?

Nabil said...

Hi again
how can i install gromacs on win XP?
thank's a lot

Tom said...

Yes, you can do both. Also I'm not going to maintain this thread anymore. In the future I recommend you use gromacs on linux. It is very easy to install and there is a lot more documentation for it.

Nabil said...

hi Tom,
Thanks
i have installed it but unfortunately, it did not work properly.
As you said i need to install it in Linux.

Nabil said...

Hi
I am installing Gromacs in Ubuntu 10.10
using fftw-3.0.1 and Gromacs-3.3.1 on my Advent 4211. Who can help me please to not obtain the message '***No targets specified and no makefile found. Stop' in the install of Gromacs at 'make' stage as mentionned below.

Procedure:
FFTW for Linux
1. cd fftw-3.0.1
2. ./configure --enable-float --enable-threads
3. make
4. su (Type in your root password and hit the enter button)
in this step i have used sudo because i did not know how to get root password.
5. make install

Now to do the double precision version, we need to clean up the tree.

1. make distclean
2. ./configure --enable-threads
3. make
4. make install

So now we have FFTW package installed on our system.

Install Gromacs-3.3.1

1. cd gromacs-3.3.1

2. ./configure --disable-float (For double precision)
3. make (here my problem. i receive:
***No targets specified and no makefile found. Stop)
4. sudo -s (This is for Mac)
su (This is for Linux)
5. make install

Nabil said...

Hi
I am installing Gromacs in Ubuntu 10.10
using fftw-3.0.1 and Gromacs-3.3.1 on my Advent 4211. Who can help me please to not obtain the message '***No targets specified and no makefile found. Stop' in the install of Gromacs at 'make' stage as mentionned below.

Procedure:
FFTW for Linux
1. cd fftw-3.0.1
2. ./configure --enable-float --enable-threads
3. make
4. su (Type in your root password and hit the enter button)
in this step i have used sudo because i did not know how to get root password.
5. make install

Now to do the double precision version, we need to clean up the tree.

1. make distclean
2. ./configure --enable-threads
3. make
4. make install

So now we have FFTW package installed on our system.

Install Gromacs-3.3.1

1. cd gromacs-3.3.1

2. ./configure --disable-float (For double precision)
3. make (here my problem. i receive:
***No targets specified and no makefile found. Stop)
4. sudo -s (This is for Mac)
su (This is for Linux)
5. make install

sandhiya said...

Thank you for the info. It sounds pretty user friendly. I guess I’ll pick one up for fun. thank u Window Installation Melbourne

Aparajeo said...

Hi,
I am using Windows 7 and have followed the given instructions for installing Gromacs but while opening the Cygwin Terminal an error is occuring - could not load icon from '/Cygwin-Terminal.ico'

ImSharmaNitin said...
This comment has been removed by the author.
ImSharmaNitin said...

i am using windows7 64 bit machine

downloaded fftw-3.3.3-dll64, unzipped in folder C:\Packages\fftw

cd /cygdrive/c/Packages/fftw

./configure --prefix=/cygdrive/c/Packages/fftw --enable-float

ERROR -bash: ./configure: No such file or directory

Then i tried
./configure --enable-threads --enable-sse --enable-float


ERROR -bash: ./configure: No such file or directory

what can be done