Using MolConvert to generate images - Need help starting!

User cae34764c0

18-11-2012 23:21:09

Hello everyone, 


I'm a Java novice although I have some reasonable experience with Python so I was hoping I could work this out on my own... Sadly not though. 


I'm trying to use the MolConverter 'command line tool' to output a few jpeg's / pngs from some /mol files I have. 


Sadly - I don't even know where to begin. I got to the stage of running the convert.sh file in the example folder and now I can get the help commands from the terminal when I type: 'convert'. 


However, I try something like convert filename.mol output.png but get:


convert: missing an image filename `output.png'.


Or various other errors... Not got anything to work yet!


Also, I'm slightly alarmed that I've gone wrong as the offical help page says you use the command as:


molconvert [options] outformat[:exportoptions] [files...]


Which is different to what I type ('convert'). 


Please... could anyone help me get on the first rung?

ChemAxon 5433b8e56b

19-11-2012 09:25:48

Hi,


yes you should use the molconvert command, convert could be something else installed on your system.


you can use simply molconvert -o output.jpg jpg molfile.mol it will export the image with the default image export options, or you can specify the export options after the format name for example this way:


molconvert -o output.jpg "jpg:H_all,anum" molfile.mol which will export the image with all implicit hydrogens visible, and with visible atom indexes. You can find the image export options documented here.


I hope this helps, if you have any further questions, please do not hesitate to ask.


Regards,
Istvan

ChemAxon b124dd5f17

19-11-2012 13:27:14

We just opened our blog and this topic may be relevant: http://www.chemaxon.com/blog/convert-chemical-file-formats-in-python-using-jchem-web-services/


Alex

User cae34764c0

14-04-2013 09:59:24

Many thanks for these replies. 


I understand how to use MolConvert I just don't believe I have managed to install it correctly.  It's not overly clear how I would go about doing this and I can't find the instructions here on ChemAxon. 


Could someone point me in the right direction?

ChemAxon 25dcd765a3

15-04-2013 09:52:10

I guess you have installed MarvinBeans, so you have "molconvert" command line. You will also need java.


If you have all of these you can run 'molconvert' command line which prints out some kind of help.



> bin/molconvert
Molecule File Converter, version 5.6.0.1, (C) 1999-2011 ChemAxon Ltd.
Licenses of additionally used third party programs can be found in license.html
Online version: http://www.chemaxon.com/marvin/license.html
Usage: molconvert [options] outformat[:export-opts] [files...]
Converts the specified files to another format.
.....

Does this works for you?


If so we can step forward, if not let's figure out whwre is the problem.

User 62a30b7ebc

06-07-2013 02:32:23

Gretings, 


 


Having problems running command line molconvert on Mac OS X 10.8.4.


One help file mentioned to put the bin folder of Marvin Beans into the PATH to run the command line options. Can you please clarify. 


D2s works from Marvin View but not terminal. I intend to run a batch pdf d2s job.


Typing molconvert in terminal gives no result, it is not available from terminal 


 


java -version java version "1.6.0_51" Java(TM) SE Runtime Environment (build 1.6.0_51-b11-457-11M4509) Java HotSpot(TM) 64-Bit Server VM (build 20.51-b01-457, mixed mode)

downloaded marvinbeans-6-1.0.2-macos.dmg 

 











> bin/molconvert
Molecule File Converter, version 5.6.0.1, (C) 1999-2011 ChemAxon Ltd.
Licenses of additionally used third party programs can be found in license.html
Online version: http://www.chemaxon.com/marvin/license.html
Usage: molconvert [options] outformat[:export-opts] [files...]
Converts the specified files to another format.
.....

Does this works for you?


If so we can step forward, if not let's figure out whwre is the problem.


ChemAxon a202a732bf

08-07-2013 06:58:03

Hi Anna,


you need to set the path only if you want to run molconvert from any directory. If you change directory to the directory of your installed Marvin application, then you should be able to run the molconvert script by typing


bin/molconvert

By setting the path with the command


export PATH=$PATH:/Applications/ChemAxon/Marvin/bin 

(here you should define the bin directory of your marvin application), you can use molconvert  from any directory.


Best regards,


Zsuzsa

User 62a30b7ebc

11-07-2013 06:52:24

Working great on my Mac system. When I use the 64-bit linux installer with Java the molconvert and marvin beans installs as seen by typing molconvert, but the license manager doesn't. I can pull up molconvert, but can't run it.


I put the license file in the ChemAxon folder no go


I put the license file in root/.chemaxon/ it worked, but then got the following error and empty sdf files from pdf after entering in bash:



for i in *.pdf;  do molconvert sdf $i -o $i.sdf;  done


 


Error:


0778-7367-70-25.PMC3523021.pdf: error: /home/bigdeb/.i4j_jres/1.6.0_41/lib/i386/xawt/libmawt.so: libXext.so.6: cannot open shared object file: No such file or directory



Any suggestions? 


 


 

ChemAxon 25dcd765a3

11-07-2013 08:49:42

Hi,


Lets try step by step:


1) Go to the directory where your molconvert file located.
 type:
 ./molconvert 


Is this prints out "Molecule File Converter, version ..." ?


 


2) Still in this directory, try to convert pdf to sdf:
./molconvert sdf something.pdf -o something.sdf


Is something.sdf created? Can you view the result with mview?


3) Let's try the 1) point in any directory.


4) Let's try the 2) in any directory.


 


Please let me know the results and error output if any.


 


If the 4) point works then we can move to the bash script.

User 62a30b7ebc

11-07-2013 13:55:00


I typed

export PATH=$PATH:/Applications/ChemAxon/MarvinBeans/bin 

at the command line and typing molconvert at any directory gives me options also if in MarvinBeans/bin.


It will convert and gives an empty sdf file, with no content.

ChemAxon 25dcd765a3

12-07-2013 08:51:11

If I understand right, your answers to my questions:


1) yes


2) File something.sdf is created but the file size is 0. You did not get any error message.


3) yes


4) File something.sdf is created but the file size is 0. You did not get any error message.


 


Could you please confirm.


 


If 2) does not work we start focusing the problem there.

User 62a30b7ebc

13-07-2013 03:16:14

You are correct. 

User 62a30b7ebc

13-07-2013 03:16:46

The file is of size zero

ChemAxon 25dcd765a3

15-07-2013 15:37:27

Hmm, it is very strange that you don't get any output nor error just a file which size is zero.


What do you get if you type


molconvert mol -s "CCC"


We should figure out if it is a plain license issue. (License file should be at your $HOME/.chemaxon/ directory.)