apparent inconsistency in pKa's from command line to API

User 870ab5b546

28-07-2009 18:14:28

Hi,


I appear to be getting different pKa values from the command line versus the API.  I have dynamicPka() defined thusly:


    <Plugin ID="dynamicpKa" Class="chemaxon.marvin.calculations.pKaPlugin" JAR="pKaPlugin.jar">
<Param Name="prefix" Value="dynamic"/>
<Param Name="type" Value="acidic"/>
<Param Name="min" Value="-1000"/>
<Param Name="max" Value="1000"/>
</Plugin>

The command line gives me,


[bob@epoch public]$ evaluate -e "dynamicpKa()" "CCC=O"
59.92;15.09;39.98;

Good enough; but with the code below running on the same molecule, I get this result:


2009-07-28 14:04:22 acidic pKa for atom C1: 51.53327188386362
no basic pKa for atom C1
acidic pKa for atom C2: 15.092359249671512
no basic pKa for atom C2
acidic pKa for atom C3: 28.65088850980738
no basic pKa for atom C3
no acidic pKa for atom O4
basic pKa for atom O4: -6.938105699195358

I don't understand why the values are different.  Both the evaluate function and the Java compiler are pointing to the same pointer to JChem 5.2.3.  Can you help?


-- Bob


        molecule = MolImporter.importMol(substrate);
molecule.aromatize(MoleculeGraph.AROM_BASIC);
ChemUtils.stripMetalsNoClone(molecule);
numAtoms = molecule.getAtomCount();
pKaPlugin plugin = new pKaPlugin();
plugin.setMaxIons(8); // default 8
plugin.setBasicpKaLowerLimit(pKaFunctions.SMALLEST_PKA);
plugin.setAcidicpKaUpperLimit(pKaFunctions.LARGEST_PKA);
plugin.setMicropKaCalc(true);
plugin.setpKaPrefixType(pKaPlugin.DYNAMICpKaPREFIX);
plugin.setMolecule(molecule);
boolean runOK = plugin.run();
for (int atmIdx = 0; atmIdx < numAtoms; atmIdx++) {
MolAtom atm = molecule.getAtom(atmIdx);
String atmSymbol = atm.getSymbol();
if (atm.getSymbol().equals("H") && atm.getCharge() == 0)
continue;
boolean bears_H =
(atm.getImplicitHcount() + atm.getExplicitHcount() > 0);
double[] pKaAcidic = (bears_H ?
plugin.getpKaValues(atmIdx, pKaPlugin.ACIDIC)
: null);
double[] pKaBasic =
plugin.getpKaValues(atmIdx, pKaPlugin.BASIC);
double[] bothpKas = new double[] {
(pKaAcidic != null ? pKaAcidic[0] : Double.NaN),
(pKaBasic != null ? pKaBasic[0] : Double.NaN)
};
if (!Double.isNaN(bothpKas[0])) {
System.out.println("acidic pKa for atom " + atmSymbol + (atmIdx + 1)
+ ": " + bothpKas[0]);
} else System.out.println("no acidic pKa for atom " + atmSymbol + (atmIdx + 1));
if (!Double.isNaN(bothpKas[1])) {
System.out.println("basic pKa for atom " + atmSymbol + (atmIdx + 1)
+ ": " + bothpKas[1]);
} else System.out.println("no basic pKa for atom " + atmSymbol + (atmIdx + 1));
} // for each atom in the molecule

ChemAxon e08c317633

29-07-2009 20:21:29

Hi Bob,


We will check this issue, and get back to you soon.


Zsolt

ChemAxon e08c317633

03-08-2009 15:41:06










bobgr wrote:

I don't understand why the values are different. Both the evaluate function and the Java compiler are pointing to the same pointer to JChem 5.2.3. Can you help?



Hi Bob,


The results are different, because in pKaPlugin the pKaPlugin.setMicropKaCalc(boolean) method is set to false by default (it means macro pKa calculation), while in your code  this method is called with true parameter (it means micro pKa calculation). It is possible to use both calculation methods (micro/macro) via Evaluator, or via API.


I modified your code (see the attached pKaTeest.java), the micro/macro mode is a command line parameter:


$ java pKaTest micro "CCC=O"
acidic pKa for atom C1: 51.53327188386362
no basic pKa for atom C1
acidic pKa for atom C2: 15.092359249671512
no basic pKa for atom C2
acidic pKa for atom C3: 28.65088850980738
no basic pKa for atom C3
no acidic pKa for atom O4
basic pKa for atom O4: -6.938105699195358


$ java pKaTest macro "CCC=O"
acidic pKa for atom C1: 59.922339208939
no basic pKa for atom C1
acidic pKa for atom C2: 15.0923592496715
no basic pKa for atom C2
acidic pKa for atom C3: 39.976336397923646
no basic pKa for atom C3
no acidic pKa for atom O4
basic pKa for atom O4: -6.938105699195357


With the following XML config evaluator will use "micro" mode:


<Plugin ID="dynamicpKa" Class="chemaxon.marvin.calculations.pKaPlugin" JAR="pKaPlugin.jar">
    <Param Name="prefix" Value="dynamic"/>
    <Param Name="type" Value="acidic"/>
    <Param Name="mode" Value="micro"/>
    <Param Name="min" Value="-1000"/>
    <Param Name="max" Value="1000"/>
</Plugin>


I hope this helps.


Zsolt

User 2a0e083f40

04-09-2009 07:26:17

I have been evaluating the speciation of ibandronic acid, and your results differ considerably from those I obtain with ACDLabs pKa calculator, which I think is well-respected (CAS uses it.)


 


Why do you think this is?  How does the zwitterionic nature of the compound affect this?  Marvin predicts more species than does ACDLabs.

User 851ac690a0

04-09-2009 11:01:30

Hi,


 


Why do you think this is?  How does the
zwitterionic nature of the compound affect this?  Marvin predicts more
species than does ACDLabs.



 


I don't have experimental value for this molecule. I attached Marvin's pKa.The difference is not so significant as you say.


At higher pH values at least 3-4 negative "O" atoms will be present in the zwitterionic form.


 


Jozsi

User 2a0e083f40

04-09-2009 13:26:29

The difference is pretty significant for my applications.  If you feed the ACDLabs pKa values into a speciation program, the peak concentrations for the singly-ionized form differ by an entire pH unit from Marvin's.


How does the program "know" when to select the zwitterionic form?  One textbook says that there is only one observable pKa for each proton, which is a composite of both theoretical forms.

User 851ac690a0

07-09-2009 07:42:25

Hi,


 


The species ditribution as function of pH attached on the first figure. Mouse pointer shows the "-1" charged curve. This is a zwitterion as can be seen on the left side structure with charged atoms -1,-1,+1.


Calculation of these curves are based on the predicted intrinsic pka values.


 


On the second figure I plotted the "charge-pH" curve.


The gross charge is "-1"  approx. between pH (2.5, 5.0) .  You need get a plateau  on the "pH-species distribution" curve. No sharp peak exist.


 


 


 


Jozsi

User 2a0e083f40

07-09-2009 15:20:13

We are trying to develop an accurate speciation for this compound.  Can you help with a few questions?


1.  What are the calculated pKas for each proton?


2.  Is the pKa for a zwitterion different from that of a "normal" form?  I read that experimentally there can be only one pKa, which is a composite of zwitterion and normal forms. Specifically, is the pKa for the (-1,-1,+1) form different from that of the (-1) form?  Or the (+1, -1) form different from the neutral free acid?


3.  Is the curve on the far left representative of the protonated (+1) acid?


So far, the peak distribution for the -1 species varies by a pH unit depending on which program you use.

User 851ac690a0

07-09-2009 17:25:35

Hi,


 



1.  What are the calculated pKas for each proton?


I attached the picture of the calculated pKa (apparent) above,previously.


 


2.  Is the pKa for a zwitterion different from that of a "normal"
form?  I read that experimentally there can be only one pKa, which is a
composite of zwitterion and normal forms. Specifically, is the pKa for
the (-1,-1,+1) form different from that of the (-1) form?  Or the (+1,
-1) form different from the neutral free acid?


 


 


Their apparent pKa is the same. 


Their intrinsic pKa ,however,will change from microspecies to microspecies.


You need to see clearly what is the difference between the apparent and the intrinsic pKa value.


In Marvin you can calculate both the apparent and the intrinsic pKa values.


 


3.  Is the curve on the far left representative of the protonated (+1) acid?


Yes.


So far, the peak distribution for the -1 species varies by a pH unit depending on which program you use.



No,no....  They differ because the calculated apparent pKa values are not the same in the two programs.


 


On the other hand you can not talk about a single ionized species with charge of "-1", because this form can not exist in the pH (0-14) range in detectable amount. 


You can only talk about species which have gross charge of "-1".


 


 


Jozsi


 

User 2a0e083f40

07-09-2009 18:59:45

Thank you.


I guess my question would then be: Is it possible to calculate speciation based on gross charge?  In other words, how can I say "At pH 2.0 the neutral acid will be .210 of the total species, and the -1 charged species will comprise .781 (an example) of the total species?"


I see the gross charge chart, which is very helpful, but can I generate the underlying data?


Our aim is to determine how much of this compound is ionized in the stomach.


Another way to ask the question is:  What pKa values should I import into an independent speciation calculator?  The ones that appear next to the protons in question?  These are the ones that differ from the pKas yielded by other pKa calculation programs.  If we determine the pKas experimentally, is this Marvin's prediction of the results?

User 851ac690a0

08-09-2009 07:16:23

Hi,


 


Is it possible to calculate
speciation based on gross charge? 


No.


 



I see the gross charge chart, which is very helpful, but can I generate the underlying data?


You can create your own gross charge-pH curve from the pKa values available for you.


 


Our aim is to determine how much of this compound is ionized in the stomach.

Another way to ask the question is:  What pKa values should I import
into an independent speciation calculator? 


Apparent.


 


The ones that appear next
to the protons in question? 


Yes.


 These are the ones that differ from the
pKas yielded by other pKa calculation programs.


Yes.


 


If we determine the
pKas experimentally, is this Marvin's prediction of the results?



Such kind of input not availble in Marvin.


 


So in stomach you need to consider the next type of microspecies:


Meaning of the "-1" gross charge is a (-1,-1,+1) type microspecies 


Meaning of the "0" gross charge   is a (-1,+1) type microspecies


Meaning of the "+1" gross charge  is a (+1) type microspecies


 


 


Jozsi


 

User 2a0e083f40

08-09-2009 07:50:42

Thank you.