pka plugin in .net environment

User 37df300f74

06-07-2007 13:19:25

Hi:


I tried to run pka plugin under .net environment and what I got is just 0.0, but the same codes copied to java and generated the meaning number. Any idea about this difference and do I miss something here? To be consistent, I use the sample code in your pka API document for marvin 4.1.6





Thanks

ChemAxon aa7c50abf8

06-07-2007 14:18:19

Hi,





It should make no difference if it is called from Java or .NET.





BTW, what is the status of this problem: http://www.chemaxon.com/forum/viewpost11319.html&highlight=#11319 ? We've received no feedback. Has it been satisfactorily solved?





Thanks


Peter

User 37df300f74

06-07-2007 14:37:13

Yeh, in theory there should be the same, but I use the same code on both java and C#. Java give me some double number but C# output blank 0.0 for the whole set of molecules.

ChemAxon aa7c50abf8

06-07-2007 14:40:56

Does logp give meaningful results for the same set of molecules in the same C# environment?

User 37df300f74

06-07-2007 14:43:08

logP and logD are fine

ChemAxon aa7c50abf8

09-07-2007 15:30:14

Passing arrays as IN/OUT parameters to methods like in the following example will, unfortunately, not work with JNBridge:


Code:
       double[] acidic_pka = new double[3];


       int[] acidic_indices = new int[3];


       plugin.getSortedValues(pKaPlugin.ACIDIC, acidic_pka, acidic_indices);



JNBridge passes arrays by value (as opposed to by reference) from .NET to Java. Consequently, the Java side manipulates a copy of the array that has been created on the .NET side, not the .NET array itself: changes made to the array on the Java side will not be propagated back to the .NET side.





In such cases, an alternative solution has to be found. E.g. the pka plugin may have alternative methods which return the results required as the method's return value. You may also try the chemaxon.jep.Evaluator class, which accepts various calculation functions including pka.





If you can tell me exactly which values you need, I can help you find out which alternatives are available for calculating those particular values.





Thanks


Peter

User 37df300f74

09-07-2007 15:36:26

Thanks peter:





I am basically trying to get most acidic pka and basic pkb for a series of imported molecules. It would be great if you can provide some alternative, otherwise I might need to create some java proxy and convert it to C# dll through jnbridge.





All the best,


Hongzhou

ChemAxon e08c317633

10-07-2007 12:14:05

Hi,





I have attached a code example that shows how you can calculate the strongest acidic and strongest basic pKa values with pKaPlugin without using
Code:
public void getSortedValues(int pkatype, double[] values, int[] indices)
method.





Note: all calculated values are pKa values, not pKb.





Usage:
Code:
java pKaPluginTest mol.mrv


Strongest acidic pKa = 1.0114645749915687,  atom index = 9


Strongest basic pKa = 9.455490367748205,  atom index = 15






I have attached also the test file (mol.mrv).


I hope this helps.





Best regards,


Zsolt

User 37df300f74

10-07-2007 13:29:46

Hi Zsolt:





That do the trick. Thanks a lot for your help,





Hongzhou