I hope you are all well.
I am Rosa Hawlader, a second-year mechanical engineering student at York University.
For the past couple of days, I have been trying to install gromacs-2020.2 onto my Ubuntu Terminal. However, I am running into many errors/problems. I have posted about this before but I do not think anyone will be able to help me unless I state what steps I am taking exactly. Below I have written all the command I am using to install gromacs-2020.2 onto my Ubuntu terminal.
- sudo apt-get install cmake
- sudo apt-get install libfftw3-dev
- sudo wget ftp://ftp.gromacs.org/pub/gromacs/gromacs-2020.2.tar.gz
- sudo tar xvzf gromacs-2020.2.tar.gz
- sudo cd gromacs-2020.2
- sudo mkdir build
- sudo cd build
- sudo cmake … -DGMX_GPU=OFF -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON -DCMAKE_INSTALL_PREFIX=/opt/gromacs-2020.1/
- sudo make check
- sudo make -j 4
- sudo make install
- sudo source /opt/gromacs-2020.1/bin/GMXRC
With that in mind, please note that I am very inexperienced with both Ubuntu (I have used Windows my whole life) and gromacs which I did not know about until a few months ago. This leaves a lot of room for me to make many mistakes during this installation process. If you see any errors please do point them out. Any help is appreciated.
As for why I am using Ubuntu and gromaces, I am currently researching the aggregation of asphaltenes in crude oil and to do that I need to run several MD simulation which where gromacs ad Ubuntu come into play.
I have installed for gromacs-2020.2 on to my Ubuntu terminal. (Please see images attached to the post)
However, when I tried to run my simulations with the 2020.2 version, the terminal could not find the gmx with sudo, however it did recognize the gmx by itself but that was not enough since Ubuntu requires sudo to access and write into file.
Once again, I ran the sudo gmx mdrun … command line and received a suggestion from Ubuntu to install gromacs using sudo apt-get gromacs, which changed my gromacs-2020.2 version to . (Please see images attached to the email)
First, you should run without sudo. Why did you install it in /opt? If you really new user, please follow the quick installation guide in gromacs page. It is a safe and easy way.
Second, you should export your path of gmx in .bashrc.
There is a .bashrc file in your home directory.
you can open it using gedit, nano or vi editors.
for example: Open brand new Terminal window:
This command opens your .bashrc file. Then, at the end of this file, you can specify your gmx path as follows:
I hope these steps could help you. Good luck.
Again, I must emphasize that if you need
sudo to carry out routine commands, something is wildly wrong with your setup. If you are unable to write files in your own home filesystem, you’ve messed up permissions somewhere (perhaps due to routine and inappropriate use of
sudo?) and this is not a GROMACS issue.
Thank you for you response. I am looking into this issue right now.
Thank you very much. I will try this.
instead of “sudo gmx”, try typing the full path to your newly buld binaries, as far as I can tell this should be: “~/gromacs-2020.2/build/bin/gmx insert-molecule…”
Thank you for you reply. I have resolveed the issue.
Could you reply with how you resolved the issue exactly?
Then if someone encounters a similar issue in the future, they have the suggested actions plus how it was actually resolved to refer too. The thread becomes much more useful for those in the future.