Re: [Rdkit-discuss] Insert mol objects directly into postgres rdkit cartridge column?

2014-03-01 Thread hari jayaram
Hello Riccardo, Adrian , Greg and everyone else, Thank you for all the replies: I like the mol_from_pkl that greg pointed out Thanks for pointers to the razi project ...I had looked at sqlalchemy but decided to go with pure django ORM and then use raw() calls to get the models from the database.

Re: [Rdkit-discuss] Insert mol objects directly into postgres rdkit cartridge column?

2014-02-28 Thread Riccardo Vianello
On Wed, Feb 26, 2014 at 7:26 PM, Adrian Jasiński jasinski.adr...@gmail.comwrote: you can try use razi: Unfortunately, razi is currenly a bit old and unmaintained. Moreover it's based on sqlalchemy and it wouldn't therefore integrate easily with the django database api. One might consider

Re: [Rdkit-discuss] Insert mol objects directly into postgres rdkit cartridge column?

2014-02-26 Thread Greg Landrum
Hi Hari, You can use mol_from_pkl(). Here's a quick demo: In [20]: m = Chem.MolFromSmiles('c1cnccc1') In [21]: pkl = buffer(m.ToBinary()) In [22]: curs.execute('select mol_from_pkl(%s)',(pkl,)) In [23]: curs.fetchone() Out[23]: ('c1ccncc1',) Is that enough to get you started? -greg On Tue,

Re: [Rdkit-discuss] Insert mol objects directly into postgres rdkit cartridge column?

2014-02-26 Thread Adrian Jasiński
you can try use razi: http://razi.readthedocs.org/en/latest/database_creation_tutorial.html pozdrawiam Adrian 2014-02-26 18:34 GMT+01:00 Greg Landrum greg.land...@gmail.com: Hi Hari, You can use mol_from_pkl(). Here's a quick demo: In [20]: m = Chem.MolFromSmiles('c1cnccc1') In [21]:

[Rdkit-discuss] Insert mol objects directly into postgres rdkit cartridge column?

2014-02-25 Thread hari jayaram
Hi , I am a newbie to postgres and the rdkit postgres database cartridge. I have gotten the cartridge installed and can query sub-structure similarity and do other things as documented in the cartridge documentation page. To create a molecule from the cartridge the documentation