Hi Webster,

I am, unfortunately, not familiar enough with the way JDBC works to be able
to help here.
Isn't there some way you can execute the raw SQL command: "set
rdkit.do_chiral_sss=true"?


On Thu, Nov 14, 2019 at 9:41 PM Webster Homer <
webster.ho...@milliporesigma.com> wrote:

> 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 application. The normal way to set up the database connection is via
> JNDI.
>
>
>
> It is not clear how to set the rdkit.do_chiral_sss  variable for the
> search via JDBC.
>
>
>
> This does not work
>
>             Context initCtx = new InitialContext();
>
>             ds = (DataSource) initCtx.lookup("java:/jdbc/rdkit-sss");
>
>             if (ds instanceof BaseDataSource) {  // never true
>
>                BaseDataSource bds = (BaseDataSource)ds;
>
>                bds.setProperty("rdkit.do_chiral_sss",
> structureSearchRequest.isStereoSearch()? "true" : "false");
>
>             } else {
>
>                logger.error("Cannot set RD Kit session variables");
>
>             }
>
>
>
>
> This message and any attachment are confidential and may be privileged or
> otherwise protected from disclosure. If you are not the intended recipient,
> you must not copy this message or attachment or disclose the contents to
> any other person. If you have received this transmission in error, please
> notify the sender immediately and delete the message and any attachment
> from your system. Merck KGaA, Darmstadt, Germany and any of its
> subsidiaries do not accept liability for any omissions or errors in this
> message which may arise as a result of E-Mail-transmission or for damages
> resulting from any unauthorized changes of the content of this message and
> any attachment thereto. Merck KGaA, Darmstadt, Germany and any of its
> subsidiaries do not guarantee that this message is free of viruses and does
> not accept liability for any damages caused by any virus transmitted
> therewith. Click http://www.merckgroup.com/disclaimer to access the
> German, French, Spanish and Portuguese versions of this disclaimer.
> _______________________________________________
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to