Script for converting ChemAxon binary fingerprint to decimal

User a8e6cc7b1c

16-02-2007 19:20:49

Script for converting ChemAxon binary fingerprint to decimal form








Purpose: some of the JChem programs such as "ward" are using only the decimal form of ChamAxon fingerprint. In case when someone got a ChemAxon fingerprint file in binary form then ther's no need to regenerate the fingerprint file to decimal form since with that script it can be directly converted to the required decimal form.





The program was written in ANSI C on Linux platform.








command line syntax on Linux:





./bin2decCAFP inputbinaryfpfile n > outputfile





All of the arguments are obligatory:





inputbinaryfpfile: name of the input ChemAxon Fingerprint file (which is in binary form)


n: length of the ChemAxon fingerprint (can be anything if it's the multiple of 32 except zero ;) )





The output without redirection is written to the standard output so one can pipe it to i.e. ward script and so on but in this redirection form (works only in Linux / Unix) the result is written in the file (in the command line above: outputfile).





example:





./bin2decCAFP fpinbin 2048 > fpoutdec





compilation on Linux:





g++ bin2decCAFP.c -o bin2decCAFP -Wall








the version of my compiler:





gcc version 4.1.2 20061007 (prerelease) (Debian 4.1.1-16)








(the compilation should be the same with gcc but I haven't checked it yet:


gcc bin2decCAFP.c -o bin2decCAFP -Wall)








Gergely Zahoranszky





alias zahoo