[gmx-users] do_dssp Installation instructions in case you have errors

Mark Abraham Mark.Abraham at anu.edu.au
Mon Dec 14 22:05:49 CET 2009

Kirill Bessonov wrote:
> I had seen people having trouble with do_dssp and that Error line 471 
> error.
> Fatal error:
> Failed to execute command: /usr/local/bin/dssp -na ddS7CWeR dd48KVro /dev/null 2> /dev/null
> So I would like to spill some light on the issue and make documentation 
> better to understand after hours fiddling with source code.

Why did you spend hours looking at the source code? The documentation in 
do_dssp -h clearly specifies the need to set the executable name in the 
environment variable DSSP. The documentation and the error message upon 
non-existence of the path to DSSP could be improved such that it is not 
specific to C-shell.

> If you have this error this means that dssp executable was not found 
> even though the PATH was set correctly (i.e. DSSP path variable)

It's not a path variable - you've made a wrong assumption.

> If you look at the source code the fexist funciton checks if there is 
> any file in directory and returns true, so if you have any file there 
> the code will run through and fail on line:
> sprintf(dssp,"%s %s %s %s > /dev/null %s",
>       dptr,bDoAccSurf?"":"-na",pdbfile,tmpfile,bVerbose?"":"2> /dev/null");
> where dssp is the buffer of charcters and dptr is the pointer to the 
> dssp executable file (not the folder!)
> And that is the main source of errors, improper definition of directory 
> pointer to the executable.

That's not the mistake. The "mistake" is GROMACS only checking for 
existence of the contents of DSSP and assuming the user has read the 
documentation. If the user erroneously specifies a path which exists, 
the check succeeds. It could/should check for existence, being 
executable, not being a directory, being non-zero size, not being a Unix 
virus, not being an alias for "sudo rm -rf /", etc. but one can't 
protect the user from everything :-)


> Solution: To correct this mistake add to the path the name of the dssp 
> exectutable.
> E.g. if you named it dssp and put it in your home folder. Add to 
> .bash_profile
> DSSP=/home/dssp   (where dssp is not a FOLDER but name of executable)
> If you named executable dsspmbi
> DSSP=/home/dsspmbi   (and again dsspmbi is the name of executable)
> This will define the location of dssp executable properly and you would 
> not see any weird complicated errors coming up.
> Hope it helps

More information about the gromacs.org_gmx-users mailing list