[Rdkit-discuss] rdkit cartridge stereo search is inconsistent

2019-11-14 Thread Webster Homer
I have a database which contains these three molecules. N[C@H](Cc1ccc(B(O)O)cc1)C(=O)O N[C@@H](Cc1ccc(B(O)O)cc1)C(=O)O NC(Cc1ccc(B(O)O)cc1)C(=O)O It seems that the exact search does not respect the rdkit.do_chiral_sss # select * from rdk.mols where m@=

[Rdkit-discuss] RD Kit Cartridge setting do_chiral_sss flag with Java JDBC

2019-11-14 Thread Webster Homer
I'm trying to understand how to set the rdkit.do_chiral_sss in Java. I would like to call RD Kit structure search from a Java application. However the way RD Kit depends upon setting some values in Postgresql via SET seems to be hard to do using JDBC. I am using JBoss Wildfly to host the

Re: [Rdkit-discuss] numpy array to bit vector

2019-11-14 Thread Thomas Evangelidis
Great, thank you! Btw, does RDKit offer any scalar vector similarity functions apart from the bit vector similarities? On Thu, 14 Nov 2019 at 16:48, Greg Landrum wrote: > Yep, that's about 7x faster than what I came up with. > Thanks Maciek! > > -greg > > > On Thu, Nov 14, 2019 at 4:35 PM

Re: [Rdkit-discuss] numpy array to bit vector

2019-11-14 Thread Greg Landrum
Yep, that's about 7x faster than what I came up with. Thanks Maciek! -greg On Thu, Nov 14, 2019 at 4:35 PM Maciek Wójcikowski wrote: > Hi Thomas, > > You could also use SetBitsFromList() method: > >> bv.SetBitsFromList(np.where(ar)[0].tolist()) >> > > > Pozdrawiam, | Best regards, >

Re: [Rdkit-discuss] numpy array to bit vector

2019-11-14 Thread Maciek Wójcikowski
Hi Thomas, You could also use SetBitsFromList() method: > bv.SetBitsFromList(np.where(ar)[0].tolist()) > Pozdrawiam, | Best regards, Maciek Wójcikowski mac...@wojcikowski.pl czw., 14 lis 2019 o 16:28 Greg Landrum napisał(a): > Hi Thomas, > > There may be more efficient ways to do

Re: [Rdkit-discuss] numpy array to bit vector

2019-11-14 Thread Greg Landrum
Hi Thomas, There may be more efficient ways to do this, but here's something that works (and isn't the slowest thing I came up with): def np_to_bv(fv): bv = DataStructs.ExplicitBitVect(len(fv)) for i,v in enumerate(fv): if v: bv.SetBit(i) return bv -greg On Thu,

Re: [Rdkit-discuss] numpy array to bit vector

2019-11-14 Thread Thomas Evangelidis
Greetings, I am opening this old thread again for someone to answer my initial question this time, which was "How do I convert numpy.ndarray objects to rdkit.DataStructs.ExplicitBitVect objects?". At the time I asked the question I circumvented the problem by calculating Tanimoto similarities