- It relied on an external library, aalib
- aalib doesn't seem to be available on Windows (at least not in a way I can use with MSVC)
- aalib is really aimed at bitmap depiction as ASCII, and I'm interested in vectors (lines)
It didn't work quite so well for text pasted directly into this blog as the aspect ratio was quite high (i.e. low resolution in the y direction), but once I hit upon adding style="line-height:100%" to the pre tag it was much improved:
obabel -:c1cc(C(=O)Cl)ccc1 -oascii -xw60 -xa1.6 O | | | | | | | | | | |_| __ _/ \__ __/ \__ _/ \__ __/ \_ _/ \_ _/ __ \__ __/ \__ __/ __/ \__ Cl \_/ __/ \__ | _/ | | | | | | | | | | | | | | | | | | | | | | | | | __ | |_ \__ _ \__ \__ __/ \__ \_ _/ \_ __/ \__ __/ \__/I've added an output option to help tune the aspect ratio (-xs). Also, multimolecule output is supported, and a fun pastime is to watch ASCII depictions of large libraries fly by at the command line.
That one looks really great!
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteA similar functionality has been present for quite some time in the Cactvs Chemoinformatics Toolkit. Its ASCII rendering module optionally supports color, and allows the use of Unicode characters for double bonds, so that it can display more compact renderings.
ReplyDeleteExample: http://www.xemistry.com/asciiimg.png.
You see a practical use in the MySQL UDF extension for interactive structure queries.