??NullPointerException in pka calculation??
When I plugin.setMolecule and plugin.run the pka plugin from Java I get a null pointer exception for a very simple molecule: C1Cc2ccccc2Nc3ccccc13 ... after successful processing of 713 predecessors in a sdfile (not that this would matter, it also crashes when i submit the smiles all alone). FRUSTRATION!!
I cannot reproduce this problem. Which version are you using? Are you running cxcalc?
I see, your are using the API, not cxcalc. The version information would still be useful.
You're right, it works without problem if I try to run the pKa property predictor in MSketch, for that matter... it's just the plugin.run() in the API that dies. I'm on jchem 3.0.8 and Java 1.5.
I could not reproduce the crash. I tried the following with Marvin 3.5.4 which is the Marvin in JChem 3.0.8 and with JRE 1.5.0_02:
java pKaTest t.smiles
Could you test this code as well?
Or you can also attach your code and then I can try yours.
If you get any error message / exception stack trace then please include that in your response.
Thank you folks, I got it - crash happened because I had set limitz in my code:
(for if I were to swallow my pka.plugin-designed pills, I'd still use a glass of water instead of H2SO4 or NaOH ;-). Somehow the plugin did not like my oppressive denial of the existence of proteolytic equilibria outside this range. Long live PLO! (the Proton Liberation Organization). By the way, imposing the unpopular limits above also causes a krash with Oc1ccc2ccccc2c1\N=N\c3ccc(cc3)\N=N\c4ccccc4...
Now I could produce this by setting the pKa limits and testing with your second test molecule (t1.smiles):
java pKaTest t1.smiles
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -1
Also crahes from msketch/mview when the limits are set to 1 and 14 resp.
We will investigate this problem. However, the with the first molecule (t.smiles) it worked fine.
Now this is fixed.
The correction will be available in the next major Marvin release (Marvin 4.0).