// This example shows how to calculate the fingerprints // of molecules streamed in as a smiles // --- std inclusions : #include #include // --- morpho inclusions : #include #include #include // --- boost inclusions : #include int main() { using namespace std; using namespace morpho::cdl; while( !cin.eof() ) { nail_juice<> j; get_juice_from_stream(cin, j, 0, smiles_formatT()); // check if the mol in non empty : if (!j.good()) continue; // get the molecule : molecule<> m(j); // parameter to the fingerprint calculation : unsigned int max_path_lenght = 7; unsigned int fp_size = 1024; // calculate the fingerprint : boost::dynamic_bitset<> fingerprint = generate_fingerprint(m,max_path_lenght,fp_size); // now stream the FP out : std::string str_bitset; boost::to_string(fingernail,str_bitset); cout << str_bitset << endl; } return 0; }