molconvert - bash error

User 6d32993cd2

02-08-2016 19:20:10

Hi,


When I try to use molconvert, it throws this error: "bash: molconvert: command not found". I have set the path to my PATH, still it is throwing me this error. Can you help me to figure out why I'm unable to use molconvert.


Thanks,


CJ

ChemAxon cbb451ac1e

03-08-2016 13:46:19

Dear CJ,


We had a similar request in the past. Below is the solution. 


The molconvert application is located in the bin directory of Marvin Beans package. If you set Marvin Beans with installer, probably it is located somewhere here: $HOME/ChemAxon/MarvinBeans/bin (where $HOME is your home directory on your linux system, e.g.: /home/tamas). 
If the above directory is enumerated in the system PATH variable, you can access this application from everywhere in your Linux system without any prefix. 
If not, you have to give its relative or absolute path to be able to access it. 
If you are not familiar with modifying the PATH variable, I recommend the following options to launch application: 
I. Enter into the bin directory of Marvin Beans and give its the application's relative path. 











Code:
cd $HOME/ChemAxon/MarvinBeans/bin 
./molconvert


II. An alternative way is giving the absolute path of the application: 











Code:
$HOME/ChemAxon/MarvinBeans/bin/molconvert

User 6d32993cd2

03-08-2016 18:22:45

Hello Kniesz,


Thank you! I had issues with setting the PATH variable and "molconvert" is working now.


It works fine when I run from terminal, but when I execute it from the shell script, it says no such file.


I checked the permissions of the files, changed locations and tried. From shell script, if I try to access just the "molconvert", it executes. same way, if I check the path of file, it is fine. But when I execute the whole command, it throws "no such file" error.


My Script


"molconvert -3 mol2 "$sourceFile" -o "$destFile".mol2"

User 6d32993cd2

03-08-2016 20:26:09

Hi,


It was a silly mistake! My script worked when I executed my command without quotes..


Thanks!


CJ