Gromacs-2020.2 installation errors

Dear friends,

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.

Command lines:

  1. sudo apt-get install cmake
  2. sudo apt-get install libfftw3-dev
  3. sudo wget ftp://ftp.gromacs.org/pub/gromacs/gromacs-2020.2.tar.gz
  4. sudo tar xvzf gromacs-2020.2.tar.gz
  5. sudo cd gromacs-2020.2
  6. sudo mkdir build
  7. sudo cd build
  8. sudo cmake … -DGMX_GPU=OFF -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON -DCMAKE_INSTALL_PREFIX=/opt/gromacs-2020.1/
  9. sudo make check
  10. sudo make -j 4
  11. sudo make install
  12. 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.

what is your problem?

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:

gedit .bashrc

This command opens your .bashrc file. Then, at the end of this file, you can specify your gmx path as follows:
such as
export PATH=/usr/local/gromacs/bin:$PATH

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.

Dear Justin,

Thank you for you response. I am looking into this issue right now.

Dear Mijiddorj,

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…”

Hello,

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.