Dear Gabriele, On Tue, Aug 21, 2012 at 5:29 PM, Gabriele Menna <[email protected]> wrote: > > I'm wondering how to load a RDKit::RWMol inside a Postgres database, in the > 'structures' fields of a table created using the following command: > > CREATE TABLE molecules(id SERIAL, name TEXT, structure MOL, rdkit_fp BFP); > > I'm working in C++, using the 2012.06.1 version of RDKit. > > I get a molecule from a mol2 file. Then I serialize it, using the > MolPickler::pickleMol() function. I cannot figure out how to load the > resulting > std::string into the database: postgres cartridge always tries to handle the > string as a Smiles code, every attempt to load it as a raw molecule as failed, > so far! > > Can anyone provide me with an hint?
The current version of the cartridge does not support loading (or exporting) molecules as RDKit pickles. It should be pretty easy for me to add this capability though, so I will look into it. In the meantime, the best bet is to generate a SMILES string for the molecule (or mol block if you want to keep the atomic coordinates) and pass that along to the database. Best, -greg ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Rdkit-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

