Becksteinlab / GromacsWrapper

GromacsWrapper wraps system calls to GROMACS tools into thin Python classes (GROMACS 4.6.5 - 2024 supported).
https://gromacswrapper.readthedocs.org
GNU General Public License v3.0
169 stars 53 forks source link

Install problem : Failed to find Gromacs command 'grompp' #42

Closed frchalaoux closed 8 years ago

frchalaoux commented 8 years ago

Hi Oliver,

I have a problem to install GromacsWrapper with Gromacs 5.1.2. When I tried to build the library as below I got an error:

eros-1:GromacsWrapper-develop frchalaoux$ python setup.py build

NOTE: The global configuration file '/Users/frchalaoux/.gromacswrapper.cfg' is missing.
      You can create a basic configuration file from within python:
      >>> import gromacs
      >>> gromacs.config.setup()
NOTE: Some configuration directories are not set up yet
      ['/Users/frchalaoux/.gromacswrapper', '/Users/frchalaoux/.gromacswrapper/qscripts', '/Users/frchalaoux/.gromacswrapper/templates', '/Users/frchalaoux/.gromacswrapper/managers']
      You can create them with the command from within Python
      >>> import gromacs
      >>> gromacs.config.setup()
/Users/frchalaoux/Downloads/GromacsWrapper-develop/gromacs/__init__.py:274: GromacsImportWarning: Some Gromacs commands were NOT found; maybe source GMXRC first? The following are missing:
['a_gridcalc', 'a_ri3dc', 'demux_pl', 'do_dssp', 'editconf', 'eneconv', 'g_anadock', 'g_anaeig', 'g_analyze', 'g_angle', 'g_bar', 'g_bond', 'g_bundle', 'g_chi', 'g_cluster', 'g_clustsize', 'g_confrms', 'g_count', 'g_covar', 'g_current', 'g_density', 'g_densmap', 'g_dielectric', 'g_dih', 'g_dipoles', 'g_disre', 'g_dist', 'g_dyndom', 'g_enemat', 'g_energy', 'g_filter', 'g_flux', 'g_gyrate', 'g_h2order', 'g_hbond', 'g_helix', 'g_helixorient', 'g_kinetics', 'g_lie', 'g_luck', 'g_mdmat', 'g_membed', 'g_mindist', 'g_morph', 'g_msd', 'g_nmeig', 'g_nmens', 'g_nmtraj', 'g_order', 'g_pme_error', 'g_polystat', 'g_potential', 'g_principal', 'g_protonate', 'g_rama', 'g_rdf', 'g_ri3dc', 'g_rms', 'g_rmsdist', 'g_rmsf', 'g_rotacf', 'g_rotmat', 'g_saltbr', 'g_sas', 'g_select', 'g_sgangle', 'g_sham', 'g_sigeps', 'g_sorient', 'g_spatial', 'g_spol', 'g_tcaf', 'g_traj', 'g_tune_pme', 'g_vanhove', 'g_velacc', 'g_wham', 'g_wheel', 'g_x2top', 'genbox', 'genconf', 'genion', 'genrestr', 'gmxcheck', 'gmxdump', 'grompp', 'make_edi', 'make_ndx', 'mdrun', 'mdrun_d', 'mk_angndx', 'pdb2gmx', 'tpbconv', 'trjcat', 'trjconv', 'trjorder', 'xplor2gmx_pl', 'xpm2ps']

  category=GromacsImportWarning)
/Users/frchalaoux/Downloads/GromacsWrapper-develop/gromacs/cbook.py:205: GromacsImportWarning: Failed to define a number of commands in gromacs.cbook. Most likely the Gromacs installation cannot be found --- source GMXRC!
  category=GromacsImportWarning)
/Users/frchalaoux/Downloads/GromacsWrapper-develop/gromacs/__init__.py:288: GromacsImportWarning: Some Gromacs commands were NOT found when importing gromacs.cbook:

**Failed to find Gromacs command 'grompp', maybe its not on PATH or GMXRC must be sourced?**

Gromacs is installed in /usr/local/gromacs and in bin directory everything seems to be present:

eros-1:site-packages frchalaoux$ ls /usr/local/gromacs/bin/
GMXRC           GMXRC.csh       demux.pl        gmx-completion-gmx.bash xplor2gmx.pl
GMXRC.bash      GMXRC.zsh       gmx         gmx-completion.bash

Before to build, I sourced GMXRC and exported the gromacs/bin path to $PATH

Oliver have you any idea about this problem ?

FR.

orbeckst commented 8 years ago

I think the problem is that the current version of GW still assumes Gromacs 4.6.x instead of Gromacs 5.1.x --- see #26 and the docs http://gromacswrapper.readthedocs.org/en/develop/gromacs/core/config.html#gromacs-tools-and-scripts .

Basically, change your .gromacswrapper.cfg file to look similar to the following where you prefix new commands with gmx: so that GromacsWrapper will look for gmx commandname when you list gmx:commandname in the cfg file:

[DEFAULT]
managerdir = %(configdir)s/managers
templatesdir = %(configdir)s/templates
qscriptdir = %(configdir)s/qscripts
configdir = ~/.gromacswrapper

[Logging]
loglevel_file = DEBUG
loglevel_console = INFO
logfilename = gromacs.log

[Gromacs]
release = 5.1.1
tools = 
        gmx:cluster    gmx:dyndom      gmx:mdmat      gmx:principal  gmx:select     gmx:wham    gmx:mdrun
        gmx:do_dssp    gmx:clustsize   gmx:enemat                    gmx:protonate              gmx:wheel
        gmx:editconf   gmx:confrms     gmx:energy     gmx:mindist    gmx:rama       gmx:sham    gmx:x2top   gmx:mk_angndx
        gmx:eneconv    gmx:covar       gmx:filter     gmx:morph      gmx:rdf        gmx:sigeps  gmx:pdb2gmx
        gmx:anadock    gmx:current     gmx:gyrate     gmx:msd                       gmx:sorient gmx:genconf
        gmx:anaeig     gmx:density     gmx:h2orde     gmx:nmeig      gmx:rms        gmx:spatial gmx:genion
        gmx:analyze    gmx:densmap     gmx:hbond      gmx:nmens      gmx:rmsdist    gmx:spol    gmx:genrestr  gmx:trjcat
        gmx:angle      gmx:dielectric  gmx:helix      gmx:nmtraj     gmx:rmsf       gmx:tcaf    gmx:gmxcheck  gmx:trjconv
        gmx:bar                        gmx:helixorient  gmx:order    gmx:rotacf     gmx:traj    gmx:gmxdump   gmx:trjorder
        gmx:dipoles                    gmx:pme_error  gmx:rotmat     gmx:tune_pme   gmx:grompp    
        gmx:bundle     gmx:disre       gmx:lie        gmx:polystat   gmx:saltbr     gmx:vanhove gmx:make_edi  gmx:xpm2ps
        gmx:chi                                       gmx:potential                 gmx:velacc  gmx:make_ndx
        gmx:convert-tpr  gmx:solvate  gmx:insert-molecules
        gmx:gangle       gmx:sasa     gmx:distance

groups = tools

Note: The above settings are not really tested; I only used GW with Gromacs 5.0.x. I would very much appreciate a PR to update the default GromacWrapper cfg file so that we can ship Gromacs 5.1.x ready (see #26).

Update: added missing tools = line to the cfg example... otherwise it won't work at all. Sorry. — @orbeckst, 2016-04-08

orbeckst commented 8 years ago

Btw, maybe @dotsdl can chime in with a working 5.1.x configuration?

orbeckst commented 8 years ago

43 now seems to be the same as this problem.

orbeckst commented 8 years ago

Picking up from #43: @frchalaoux can you please post

  1. your .gromacswrapper.cfg
  2. show the exact name and path of grompp by showing the output of

    source GMXRC 
    which grompp
frchalaoux commented 8 years ago

@orbeckst Hi, 1/ source GMXRC

2/$ which gmx_mpi /site/tl/app/x86_64/discovery/academic/gromacs/5.0.4/icc-2015_mkl_openmpi-1.8.5_plumed-2.1.3-sp-AVX2/bin/gmx_mpi

3/ $ which gmx_mpi grompp /usr/bin/which: no gmx_mpi grompp in (/site/tl/app/x86.....)

4/ which grompp /usr/bin/which: no grompp in (/site/tl/app/x86_64/

5/ I attache my cfg file with a pdf extension you will ahave to change to cfg gromacswrapper.pdf

FR.

orbeckst commented 8 years ago

Thanks, the problem is that your "gmx" command is actually called "gmx_mpi". GW has no idea how to deal with this at the moment.

Can you please open an issue "allow use of Gromacs 5.1.x gmx_mpi command instead of gmx"?

Thanks, Oliver

On 8 Apr, 2016, at 01:30, frchalaoux wrote:

@orbeckst Hi, 1/ source GMXRC

2/$ which gmx_mpi /site/tl/app/x86_64/discovery/academic/gromacs/5.0.4/icc-2015_mkl_openmpi-1.8.5_plumed-2.1.3-sp-AVX2/bin/gmx_mpi

3/ $ which gmx_mpi grompp /usr/bin/which: no gmx_mpi grompp in (/site/tl/app/x86.....)

4/ which grompp /usr/bin/which: no grompp in (/site/tl/app/x86_64/

5/ I attache my cfg file with a pdf extension you will ahave to change to cfg gromacswrapper.pdf

FR.

� You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub

Oliver Beckstein * orbeckst@gmx.net skype: orbeckst * orbeckst@gmail.com

dotsdl commented 8 years ago

For what it's worth, here's my working 5.1.1 config:

[DEFAULT]
configdir = ~/.gromacswrapper
qscriptdir = %(configdir)s/qscripts
templatesdir = %(configdir)s/templates
managerdir = %(configdir)s/managers

[Gromacs]
tools = 
    gmx:cluster     gmx:dyndom      gmx:mdmat       gmx:principal  gmx:select   gmx:wham        gmx:mdrun               gmx:convert-tpr
    gmx:do_dssp     gmx:clustsize   gmx:enemat      gmx:protonate  gmx:gangle   gmx:wheel       gmx:mdrun_d             gmx:trjcat
    gmx:editconf    gmx:confrms     gmx:energy      gmx:mindist    gmx:rama     gmx:sham        gmx:x2top               gmx:trjconv
    gmx:eneconv     gmx:covar       gmx:filter      gmx:morph      gmx:rdf      gmx:sigeps      gmx:solvate             gmx:pdb2gmx
    gmx:anadock     gmx:current     gmx:gyrate      gmx:msd        gmx:sorient  gmx:genconf     gmx:insert-molecules
    gmx:anaeig      gmx:density     gmx:h2order     gmx:nmeig      gmx:rms      gmx:spatial     gmx:genion      
    gmx:analyze     gmx:densmap     gmx:hbond       gmx:nmens      gmx:rmsdist  gmx:spol        gmx:genrestr    
    gmx:angle       gmx:dielectric  gmx:helix       gmx:nmtraj     gmx:rmsf     gmx:tcaf        gmx:check       
    gmx:bar         gmx:helixorient gmx:order       gmx:rotacf     gmx:traj     gmx:dump        gmx:trjorder
    gmx:dipoles     gmx:kinetics    gmx:pme_error   gmx:rotmat     gmx:tune_pme gmx:grompp      gmx:mk_angndx
    gmx:bundle      gmx:disre       gmx:lie         gmx:polystat   gmx:saltbr   gmx:vanhove     gmx:make_edi    
    gmx:chi         gmx:distance    gmx:potential   gmx:sas        gmx:velacc   gmx:make_ndx    gmx:xpm2ps

groups = tools
release = 5.1.1

[Logging]
logfilename = gromacs.log
loglevel_console = INFO
loglevel_file = DEBUG