Exporting results from plugins to C++ file

User f564ccf382

23-05-2006 11:37:03

I have written my own java code which takes in a MOLECULE in string format, e.g. c1ccccc1. Then, its logP, molecular weight, number of H-bond acceptors etc are calculated using the plugins. How can I EXPORT these results to a C++ file.? The molecule is created in TEST.cpp , which includes the following code;





system("cd /root/ChemAxon/MarvinBeans/lib/ ; java chemaxon.marvin.calculations.My_MolCalculator_Two >> /home/ChemaxonTest.txt")





In the above code segment, My_MolCalculator_Two includes all the plugin code. When I run the above code fragment on the command line it works fine. But, I want to pass back the results via the code itself.





I would appreciate any help or advice concerning this probken.





Regards,


Miriam

ChemAxon a3d59b832c

25-05-2006 07:39:55

Why not read the output file from your C++ program?





Here is a link to get you started:


http://www.cplusplus.com/doc/tutorial/files.html





Szabolcs

User f564ccf382

25-05-2006 15:39:24

Hi Szabolcs,





Thanks for replying to my question.


I was trying to do that but, the file was empty. When I went through my code again I found the problem. I had closed the file too late within the code.





Regards,


Miriam