Naming multiples files in molconvert -m output

User 70fe4ac955

20-05-2014 20:29:45

hello,


i am converting a file with  many  molecules into a series of files with 3d structures; 1 structure per file.


I'm using the following command:


molconvert sdf:+H –o individual\.sdf
–m –F -3 pH74_output2.mol


As it is the files are just numbered 1 through the last molecule. I was wondering if there was a way to pass the compound ID as the file name?


 


best


Yodi


 

ChemAxon e49cf225c6

21-05-2014 07:07:48

Hello,


 


Afraid not. Molconverter doesn't have such capability. It'd require a small piece of Java code to do it. I don't know wether this solution is OK for you. If so, then I'll provide the code.

User 70fe4ac955

21-05-2014 13:21:34

thanks. I would definitely appreciate the code... and any other advice on Java-Marvin.


It seems like java adds quite a bit of extra capabilities, especially when it comes to formatting. So i'm going to invest some time to figure it out (I've never used java before but i'm familiar with Python, C, R).

ChemAxon d26931946c

23-05-2014 13:19:44

Hi Yodi,


 


see the attached code. Be aware that at this time it simply overwrites the files if there are two molecules with the same name in the input.


Please let us know if you need any further help.


Cheers,


Peter