User 7c177bab3b
27-06-2014 11:21:08
Hi
jchem 5.11
I'm trying to generate an image file where the molecule is coloured according to one or more smarts queries.
jcsearch -q 'cc' -q 'CN' -q 'CO' --and --hitColoring -f mrv 'c1ccccc1NCCCO' | molconvert png:setcolors -o output.png
The mrv file contains three separate copies of the molecule and by default molconvert only displays the first.
With the -U option you get three molecules in the one image and the colouring seems to have got confused.
See the attached images.
How can I merge the separate molecule copies into one, preserving the colouring?
Thanks
Stephen
ChemAxon 712bc8fcf4
27-06-2014 12:17:37
HiĀ Stephen,
This is a bug of the molecule merge, we will fix it soon.
Best regards,
MateĀ
ChemAxon 712bc8fcf4
15-07-2014 08:30:18
The bug is fixed and the fix will be available in the 14.7.21 version next week.
User 7c177bab3b
15-07-2014 11:43:15
Thank you.
How can I get this functionality through the API? i.e. run multiple queries and have a molecule coloured with the union of mapped atoms?
This would be more efficient for my workflow than having to call out to the commandline every time.
Stephen
ChemAxon 712bc8fcf4
16-07-2014 09:36:37
You can use the fuse method of the MoleculeGraph class, but it will working only if the molecules contains the same one color.
hit1, hit2 and the hit3 molecules are the results of the queries:
hit1.fuse(hit2);
hit1.fuse(hit3);
hit1 molecule will contains the atoms of the 3 molecules.