sulfone pKa

User 870ab5b546

02-06-2015 14:08:00

For C2 of the compound C[C-](N=C)S(=O)(=O)C1=CC=C(C)C=C1, the pKa plugin incorrectly returns no value for the basic pKa. It should return a value of less than 19.


For C11 of the nearly identical compound CC1=CC=C(C=C1)S(=O)(=O)[CH-]N=C, the plugin incorrectly returns an acidic pKa value of 18.3. This is a bug. The basic pKa should be 18.3, and the acidic pKa should be null.


For C11 of the simpler compound CC1=CC=C(C=C1)S(=O)(=O)[CH-], the plugin correctly returns a basic pKa value of 19.7.


Please fix.

ChemAxon d51151248d

04-06-2015 19:27:02

Dear Bob, 


We are investigating this issue, and will get back to you soon with the answer. 


Thanks for your patience. 


Best regards, 


Daniel

ChemAxon d51151248d

20-07-2015 12:48:37

Dear Bob, 


We have investigated this issue abou the pKa calculation. We suggest that you experiment with two options in the plugin: the minimum basic/maximum acidic pKa options, and the static/dynamic setting of the calculator, I put here two pictures of your first two mentioned molecules with the settings -50,50 for min./max. options, and static (first pic.) and dynamic (second pic.) calculations.


Would you please review your comments based on this?


Best regards,


Daniel

User 870ab5b546

20-07-2015 19:37:50

OK, one additional problem: When I go to my pKa calculator using Marvin JS 15.6.29, I get a runtime Java error:


org.apache.jasper.JasperException: An exception occurred processing JSP page /public/pKa.jsp at line 59

56: plugin.setpKaPrefixType(pKaPlugin.DYNAMICpKaPREFIX);
57: plugin.setModel(pKaPlugin.MODEL_LARGE);
58: plugin.setConsiderTautomerization(true);
59: plugin.setMolecule(molecule);
60: plugin.run();
61: } // if use JChem
62: final double[][] allAtomPKs = (useJChem ? null


Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:521)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:430)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

 


root cause


java.lang.RuntimeException: MultiFaceAtom does not have any visible face
chemaxon.struc.graphics.MAtomSetPoint$MultiFaceAtom.getVisible(MAtomSetPoint.java:101)
chemaxon.struc.graphics.MAtomSetPoint.finishCloning(MAtomSetPoint.java:581)
chemaxon.struc.graphics.MElectronContainer.finishCloning(MElectronContainer.java:211)
chemaxon.struc.MDocument.<init>(MDocument.java:349)
chemaxon.struc.MDocument.<init>(MDocument.java:291)
chemaxon.struc.MDocument.cloneDocument(MDocument.java:489)
chemaxon.struc.MDocument.cloneMainMoleculeGraph(MDocument.java:509)
chemaxon.struc.MDocument.cloneMainMolecule(MDocument.java:500)
chemaxon.struc.Molecule.cloneMoleculeWithDocument(Molecule.java:1222)
chemaxon.calculations.Interaction.setMolecule(Interaction.java:71)
chemaxon.calculations.Tautomerization.calcDonorAcceptorSites(Tautomerization.java:1671)
chemaxon.calculations.Tautomerization.initCalc(Tautomerization.java:2233)
chemaxon.calculations.Tautomerization.calculateDACouples(Tautomerization.java:11924)
chemaxon.calculations.Tautomerization.createDACouples(Tautomerization.java:11886)
chemaxon.calculations.CanonicTautomer.calcCanonicalTautomer(CanonicTautomer.java:524)
chemaxon.calculations.Tautomerization.calculateCanonicTau(Tautomerization.java:936)
chemaxon.calculations.Tautomerization.generateCanonicTautomer(Tautomerization.java:869)
chemaxon.calculations.Tautomerization.createCanonicTautomer(Tautomerization.java:814)
chemaxon.marvin.calculations.TautomerizationPlugin.run(TautomerizationPlugin.java:845)
chemaxon.marvin.calculations.pKaPlugin.createModifiedInputMolecule(pKaPlugin.java:703)
chemaxon.marvin.plugin.CalculatorPlugin.setMolecule(CalculatorPlugin.java:966)
chemaxon.marvin.plugin.CalculatorPlugin.setMolecule(CalculatorPlugin.java:906)
chemaxon.marvin.plugin.CalculatorPlugin.setMolecule(CalculatorPlugin.java:884)
chemaxon.marvin.plugin.CalculatorPlugin.setMolecule(CalculatorPlugin.java:867)
org.apache.jsp.public_.pKa_jsp._jspService(pKa_jsp.java:145)


This problem does not occur with Marvin JS 14.11.10.


Now, here is the code that calculates the pKa values. Note that we always use dynamic pKas, and we use the largest range of pKas that we can. I ran the calculation in JChem mode (instead of in the mode of ACE's modified version) just to make sure that none of my code was messing things up. We are using JChem 15.4.27. 


    final String substrate = request.getParameter("substrate");
final boolean useJChem = true; // "JChem".equals(request.getParameter("method"));
Molecule origMolecule = null;
Molecule molecule = null;
String[] pKas;
String[] pKbs;
final double[] molpKas = {0, 0, 0};
final double[] molpKbs = {0, 0, 0};
final int[] molpKaAtms = {0, 0, 0};
final int[] molpKbAtms = {0, 0, 0};
int numAtoms = 0;
int origNumAtoms = 0;
final NumberFormat numberFormat = NumberFormat.getInstance();
numberFormat.setMaximumFractionDigits(1);
numberFormat.setMinimumFractionDigits(1);
if (substrate != null) {
origMolecule = MolImporter.importMol(substrate);
molecule = MolImporter.importMol(substrate);
origNumAtoms = molecule.getAtomCount();
molecule.aromatize(MoleculeGraph.AROM_BASIC);
ChemUtils.stripMetalsNoClone(molecule);
numAtoms = molecule.getAtomCount();
pKas = new String[numAtoms];
pKbs = new String[numAtoms];
final pKaPlugin plugin = new pKaPlugin();
if (useJChem) {
plugin.setMaxIons(8); // default 8
plugin.setBasicpKaLowerLimit(pKaFunctions.SMALLEST_PKA);
plugin.setAcidicpKaUpperLimit(pKaFunctions.LARGEST_PKA);
plugin.setMicropKaCalc(true);
plugin.setpKaPrefixType(pKaPlugin.DYNAMICpKaPREFIX);
plugin.setModel(pKaPlugin.MODEL_LARGE);
plugin.setConsiderTautomerization(true);
plugin.setMolecule(molecule);
plugin.run();
} // if use JChem
final double[][] allAtomPKs = (useJChem ? null
: pKaFunctions.pKapKbAtoms(molecule));
// if (!useJChem) Utils.alwaysPrint("pKa.jsp: allAtomPKs = ", allAtomPKs);
for (int atmIdx = 0; atmIdx < numAtoms; atmIdx++) {
pKas[atmIdx] = "";
pKbs[atmIdx] = "";
final MolAtom atm = molecule.getAtom(atmIdx);
if (ChemUtils.isMulticenterAtom(atm)
|| ("H".equals(atm.getSymbol()) && atm.getCharge() == 0
&& !"[H][H]".equals(MolString.toString(molecule, Utils.SMILES))))
continue;
final boolean bears_H =
atm.getImplicitHcount() + atm.getExplicitHcount() > 0;
double[] atomPKs = null;
if (useJChem) {
final double[] pKaAcidic = (bears_H ?
plugin.getpKaValues(atmIdx, pKaPlugin.ACIDIC)
: null);
final double[] pKaBasic =
plugin.getpKaValues(atmIdx, pKaPlugin.BASIC);
atomPKs = new double[] {
(pKaAcidic != null ? pKaAcidic[0] : Double.NaN),
(pKaBasic != null ? pKaBasic[0] : Double.NaN)
};
} else atomPKs = allAtomPKs[atmIdx];
if (!Double.isNaN(atomPKs[0])) {
pKas[atmIdx] = numberFormat.format(atomPKs[0]);
} // else Utils.alwaysPrint("no acidic pKa for atom ", atm, atmIdx + 1);
if (!Double.isNaN(atomPKs[1])) {
pKbs[atmIdx] = numberFormat.format(atomPKs[1]);
} // else Utils.alwaysPrint("no basic pKa for atom ", atm, atmIdx + 1);
} // for each atom in the molecule
if (useJChem) {
plugin.getMacropKaValues(pKaPlugin.ACIDIC, molpKas, molpKaAtms);
plugin.getMacropKaValues(pKaPlugin.BASIC, molpKbs, molpKbAtms);
} // if use JChem or ACE method
} else { // substrate is null
pKas = new String[0];
pKbs = new String[0];
} // if substrate is/is not null

ChemAxon d51151248d

21-07-2015 14:05:07

Hi Bob,


Thank you for this bug report. We managed to reproduce it, and will fix it. 


Daniel

User 870ab5b546

15-04-2016 19:37:25

Seeing this exception popping up again in our logs. I don't know whether it's from MarvinSketch or Marvin JS.


Out of frustration, I wrapped the code with a try/catch statement, so we shouldn't see this again in our log, but I thought you should be alerted again. Using JChem 16.2.29.


Apr 13, 2016 11:31:46 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.RuntimeException: MultiFaceAtom does not have any visible face
at chemaxon.struc.graphics.MAtomSetPoint$MultiFaceAtom.getVisible(MAtomSetPoint.java:111)
at chemaxon.struc.graphics.MAtomSetPoint.finishCloning(MAtomSetPoint.java:591)
at chemaxon.struc.graphics.MElectronContainer.finishCloning(MElectronContainer.java:221)
at chemaxon.struc.MDocument.<init>(MDocument.java:350)
at chemaxon.struc.MDocument.<init>(MDocument.java:292)
at chemaxon.struc.MDocument.cloneDocument(MDocument.java:490)
at chemaxon.struc.MDocument.cloneMainMoleculeGraph(MDocument.java:510)
at chemaxon.struc.MDocument.cloneMainMolecule(MDocument.java:501)
at chemaxon.struc.Molecule.cloneMoleculeWithDocument(Molecule.java:1224)
at chemaxon.calculations.Interaction.setMolecule(Interaction.java:71)
at chemaxon.calculations.Tautomerization.calcDonorAcceptorSites(Tautomerization.java:1711)
at chemaxon.calculations.Tautomerization.initCalc(Tautomerization.java:2364)
at chemaxon.calculations.Tautomerization.calculateDACouples(Tautomerization.java:12771)
at chemaxon.calculations.Tautomerization.createDACouples(Tautomerization.java:12733)
at chemaxon.calculations.CanonicTautomer.calcCanonicalTautomer(CanonicTautomer.java:553)
at chemaxon.calculations.Tautomerization.calculateCanonicTau(Tautomerization.java:952)
at chemaxon.calculations.Tautomerization.generateCanonicTautomer(Tautomerization.java:878)
at chemaxon.calculations.Tautomerization.createCanonicTautomer(Tautomerization.java:823)
at chemaxon.marvin.calculations.TautomerizationPlugin.run(TautomerizationPlugin.java:859)
at chemaxon.marvin.calculations.pKaPlugin.createModifiedInputMolecule(pKaPlugin.java:703)
at chemaxon.marvin.plugin.CalculatorPlugin.setMolecule(CalculatorPlugin.java:967)
at chemaxon.marvin.plugin.CalculatorPlugin.setMolecule(CalculatorPlugin.java:907)
at chemaxon.marvin.plugin.CalculatorPlugin.setMolecule(CalculatorPlugin.java:885)
at chemaxon.marvin.plugin.CalculatorPlugin.setMolecule(CalculatorPlugin.java:868)
at com.epoch.chem.pKaFunctions.pKapKbAtoms(pKaFunctions.java:142)
at com.epoch.chem.pKaFunctions.pKapKbAtoms(pKaFunctions.java:101)
at org.apache.jsp.public_.pKa_jsp._jspService(pKa_jsp.java:149)

ChemAxon 5fc3e8d7d0

21-04-2016 08:31:20

Dear Bob,


Thanks for reporting this issue.
Could you send us the input molecule which causes the error (if it is not confidential)?


Best regards,
Laszlo 

User 870ab5b546

21-04-2016 16:26:17

I don't actually have that information. I've now modified the JSP page to log the substrate when the exception is triggered. I'll post the info when I have it.

User 870ab5b546

23-04-2016 18:41:34

Here are some:


Apr 23, 2016 11:59:13 AM org.apache.catalina.core.StandardWrapperValve invoke

INFO: pka.jsp: caught exception while trying to calculate pKas using Marvin JS for substrate:

<cml><MDocument><MChemicalStruct><molecule molID="m1"><atomArray><atom id="a1" y2="2.8116666666666665" x2="-3.9163208781719643" elementType="C" /><atom id="a2" y2="4.351666666666667" x2="-3.9163208781719647" elementType="O" lonePair="2" /><atom id="a3" y2="2.041666666666667" x2="-2.5826417563439285" elementType="C" /><atom id="a4" y2="0.5016666666666669" x2="-2.582641756343929" elementType="C" /><atom id="a5" y2="2.811666666666667" x2="-1.248962634515893" elementType="C" /><atom id="a6" y2="1.2716666666666667" x2="-1.248962634515893" elementType="Cl" lonePair="3" /><atom id="a7" y2="4.351666666666667" x2="-1.2489626345158932" elementType="O" lonePair="2" /><atom id="a8" y2="2.041666666666667" x2="0.08471648731214265" elementType="O" lonePair="2" /><atom id="a9" y2="-0.2683333333333321" x2="-3.916320878171965" elementType="C" /><atom id="a10" y2="0.5016666666666691" x2="-5.25" elementType="C" /><atom id="a11" y2="-0.268333333333334" x2="-1.248962634515894" elementType="C" /><atom id="a12" y2="-0.2683333333333302" x2="-6.583679121828036" elementType="H" /><atom id="a13" y2="2.811666666666667" x2="1.4183956091401783" elementType="C" /><atom id="a14" y2="2.041666666666667" x2="2.7520747309682143" elementType="C" /><atom id="a15" y2="1.2716666666666665" x2="-3.9163208781719643" elementType="C" /><atom id="a16" y2="2.041666666666669" x2="-5.249999999999999" elementType="O" lonePair="3" formalCharge="-1" /></atomArray><bondArray><bond id="b1" order="1" atomRefs2="a1 a3" /><bond id="b2" order="2" atomRefs2="a1 a2" /><bond id="b3" order="1" atomRefs2="a3 a4" /><bond id="b4" order="1" atomRefs2="a3 a5" /><bond id="b5" order="1" atomRefs2="a3 a6" /><bond id="b6" order="2" atomRefs2="a5 a7" /><bond id="b7" order="1" atomRefs2="a4 a9" /><bond id="b8" order="2" atomRefs2="a9 a10" /><bond id="b9" order="1" atomRefs2="a4 a11" /><bond id="b10" order="1" atomRefs2="a13 a14" /><bond id="b11" order="1" atomRefs2="a5 a8" /><bond id="b12" order="1" atomRefs2="a8 a13" /><bond id="b13" order="1" atomRefs2="a1 a15" /><bond id="b14" order="1" atomRefs2="a10 a16" /><bond id="b15" order="1" atomRefs2="a10 a12" /></bondArray></molecule></MChemicalStruct><MElectronContainer id="o1" occupation="0 0" radical="0"><MElectron atomRefs="m1.a2" difLoc="0.0 0.0 0.0" /><MElectron atomRefs="m1.a2" difLoc="0.0 0.0 0.0" /></MElectronContainer><MElectronContainer id="o2" occupation="0 0" radical="0"><MElectron atomRefs="m1.a2" difLoc="0.0 0.0 0.0" /><MElectron atomRefs="m1.a2" difLoc="0.0 0.0 0.0" /></MElectronContainer><MElectronContainer id="o3" occupation="0 0" radical="0"><MElectron atomRefs="m1.a6" difLoc="0.0 0.0 0.0" /><MElectron atomRefs="m1.a6" difLoc="0.0 0.0 0.0" /></MElectronContainer><MElectronContainer id="o4" occupation="0 0" radical="0"><MElectron atomRefs="m1.a6" difLoc="0.0 0.0 0.0" /><MElectron atomRefs="m1.a6" difLoc="0.0 0.0 0.0" /></MElectronContainer><MElectronContainer id="o5" occupation="0 0" radical="0"><MElectron atomRefs="m1.a6" difLoc="0.0 0.0 0.0" /><MElectron atomRefs="m1.a6" difLoc="0.0 0.0 0.0" /></MElectronContainer><MElectronContainer id="o6" occupation="0 0" radical="0"><MElectron atomRefs="m1.a7" difLoc="0.0 0.0 0.0" /><MElectron atomRefs="m1.a7" difLoc="0.0 0.0 0.0" /></MElectronContainer><MElectronContainer id="o7" occupation="0 0" radical="0"><MElectron atomRefs="m1.a7" difLoc="0.0 0.0 0.0" /><MElectron atomRefs="m1.a7" difLoc="0.0 0.0 0.0" /></MElectronContainer><MElectronContainer id="o8" occupation="0 0" radical="0"><MElectron atomRefs="m1.a8" difLoc="0.0 0.0 0.0" /><MElectron atomRefs="m1.a8" difLoc="0.0 0.0 0.0" /></MElectronContainer><MElectronContainer id="o9" occupation="0 0" radical="0"><MElectron atomRefs="m1.a8" difLoc="0.0 0.0 0.0" /><MElectron atomRefs="m1.a8" difLoc="0.0 0.0 0.0" /></MElectronContainer><MElectronContainer id="o10" occupation="0 0" radical="0"><MElectron atomRefs="m1.a16" difLoc="0.0 0.0 0.0" /><MElectron atomRefs="m1.a16" difLoc="0.0 0.0 0.0" /></MElectronContainer><MElectronContainer id="o11" occupation="0 0" radical="0"><MElectron atomRefs="m1.a16" difLoc="0.0 0.0 0.0" /><MElectron atomRefs="m1.a16" difLoc="0.0 0.0 0.0" /></MElectronContainer><MElectronContainer id="o12" occupation="0 0" radical="0"><MElectron atomRefs="m1.a16" difLoc="0.0 0.0 0.0" /><MElectron atomRefs="m1.a16" difLoc="0.0 0.0 0.0" /></MElectronContainer></MDocument></cml>


Apr 23, 2016 11:59:35 AM org.apache.catalina.core.StandardWrapperValve invoke

INFO: pka.jsp: caught exception while trying to calculate pKas using Marvin JS for substrate:

<cml><MDocument><MChemicalStruct><molecule molID="m1"><atomArray><atom id="a1" y2="2.8116666666666665" x2="-3.9163208781719643" elementType="C" /><atom id="a2" y2="4.351666666666667" x2="-3.9163208781719647" elementType="O" lonePair="2" /><atom id="a3" y2="2.041666666666667" x2="-2.5826417563439285" elementType="C" /><atom id="a4" y2="0.5016666666666669" x2="-2.582641756343929" elementType="C" /><atom id="a5" y2="2.811666666666667" x2="-1.248962634515893" elementType="C" /><atom id="a6" y2="1.2716666666666667" x2="-1.248962634515893" elementType="Cl" lonePair="3" /><atom id="a7" y2="4.351666666666667" x2="-1.2489626345158932" elementType="O" lonePair="2" /><atom id="a8" y2="2.041666666666667" x2="0.08471648731214265" elementType="O" lonePair="2" /><atom id="a9" y2="-0.2683333333333321" x2="-3.916320878171965" elementType="C" /><atom id="a10" y2="0.5016666666666691" x2="-5.25" elementType="C" /><atom id="a11" y2="-0.268333333333334" x2="-1.248962634515894" elementType="C" /><atom id="a12" y2="-0.2683333333333302" x2="-6.583679121828036" elementType="H" /><atom id="a13" y2="2.811666666666667" x2="1.4183956091401783" elementType="C" /><atom id="a14" y2="2.041666666666667" x2="2.7520747309682143" elementType="C" /><atom id="a15" y2="1.2716666666666665" x2="-3.9163208781719643" elementType="C" /><atom id="a16" y2="2.041666666666669" x2="-5.249999999999999" elementType="O" lonePair="3" formalCharge="-1" /></atomArray><bondArray><bond id="b1" order="1" atomRefs2="a1 a3" /><bond id="b2" order="2" atomRefs2="a1 a2" /><bond id="b3" order="1" atomRefs2="a3 a4" /><bond id="b4" order="1" atomRefs2="a3 a5" /><bond id="b5" order="1" atomRefs2="a3 a6" /><bond id="b6" order="2" atomRefs2="a5 a7" /><bond id="b7" order="1" atomRefs2="a4 a9" /><bond id="b8" order="2" atomRefs2="a9 a10" /><bond id="b9" order="1" atomRefs2="a4 a11" /><bond id="b10" order="1" atomRefs2="a13 a14" /><bond id="b11" order="1" atomRefs2="a5 a8" /><bond id="b12" order="1" atomRefs2="a8 a13" /><bond id="b13" order="1" atomRefs2="a1 a15" /><bond id="b14" order="1" atomRefs2="a10 a16" /><bond id="b15" order="1" atomRefs2="a10 a12" /></bondArray></molecule></MChemicalStruct><MElectronContainer id="o1" occupation="0 0" radical="0"><MElectron atomRefs="m1.a2" difLoc="0.0 0.0 0.0" /><MElectron atomRefs="m1.a2" difLoc="0.0 0.0 0.0" /></MElectronContainer><MElectronContainer id="o2" occupation="0 0" radical="0"><MElectron atomRefs="m1.a2" difLoc="0.0 0.0 0.0" /><MElectron atomRefs="m1.a2" difLoc="0.0 0.0 0.0" /></MElectronContainer><MElectronContainer id="o3" occupation="0 0" radical="0"><MElectron atomRefs="m1.a6" difLoc="0.0 0.0 0.0" /><MElectron atomRefs="m1.a6" difLoc="0.0 0.0 0.0" /></MElectronContainer><MElectronContainer id="o4" occupation="0 0" radical="0"><MElectron atomRefs="m1.a6" difLoc="0.0 0.0 0.0" /><MElectron atomRefs="m1.a6" difLoc="0.0 0.0 0.0" /></MElectronContainer><MElectronContainer id="o5" occupation="0 0" radical="0"><MElectron atomRefs="m1.a6" difLoc="0.0 0.0 0.0" /><MElectron atomRefs="m1.a6" difLoc="0.0 0.0 0.0" /></MElectronContainer><MElectronContainer id="o6" occupation="0 0" radical="0"><MElectron atomRefs="m1.a7" difLoc="0.0 0.0 0.0" /><MElectron atomRefs="m1.a7" difLoc="0.0 0.0 0.0" /></MElectronContainer><MElectronContainer id="o7" occupation="0 0" radical="0"><MElectron atomRefs="m1.a7" difLoc="0.0 0.0 0.0" /><MElectron atomRefs="m1.a7" difLoc="0.0 0.0 0.0" /></MElectronContainer><MElectronContainer id="o8" occupation="0 0" radical="0"><MElectron atomRefs="m1.a8" difLoc="0.0 0.0 0.0" /><MElectron atomRefs="m1.a8" difLoc="0.0 0.0 0.0" /></MElectronContainer><MElectronContainer id="o9" occupation="0 0" radical="0"><MElectron atomRefs="m1.a8" difLoc="0.0 0.0 0.0" /><MElectron atomRefs="m1.a8" difLoc="0.0 0.0 0.0" /></MElectronContainer><MElectronContainer id="o10" occupation="0 0" radical="0"><MElectron atomRefs="m1.a16" difLoc="0.0 0.0 0.0" /><MElectron atomRefs="m1.a16" difLoc="0.0 0.0 0.0" /></MElectronContainer><MElectronContainer id="o11" occupation="0 0" radical="0"><MElectron atomRefs="m1.a16" difLoc="0.0 0.0 0.0" /><MElectron atomRefs="m1.a16" difLoc="0.0 0.0 0.0" /></MElectronContainer><MElectronContainer id="o12" occupation="0 0" radical="0"><MElectron atomRefs="m1.a16" difLoc="0.0 0.0 0.0" /><MElectron atomRefs="m1.a16" difLoc="0.0 0.0 0.0" /></MElectronContainer></MDocument></cml>


Apr 23, 2016 12:01:45 PM org.apache.catalina.core.StandardWrapperValve invoke

INFO: pka.jsp: caught exception while trying to calculate pKas using Marvin JS for substrate:

<cml><MDocument><MChemicalStruct><molecule molID="m1"><atomArray><atom id="a1" y2="2.8116666666666665" x2="-3.9163208781719643" elementType="C" /><atom id="a2" y2="4.351666666666667" x2="-3.9163208781719647" elementType="O" lonePair="2" /><atom id="a3" y2="2.041666666666667" x2="-2.5826417563439285" elementType="C" /><atom id="a4" y2="0.5016666666666669" x2="-2.582641756343929" elementType="C" /><atom id="a5" y2="2.811666666666667" x2="-1.248962634515893" elementType="C" /><atom id="a6" y2="1.2716666666666667" x2="-1.248962634515893" elementType="Cl" lonePair="3" /><atom id="a7" y2="4.351666666666667" x2="-1.2489626345158932" elementType="O" lonePair="2" /><atom id="a8" y2="2.041666666666667" x2="0.08471648731214265" elementType="O" lonePair="2" /><atom id="a9" y2="-0.2683333333333321" x2="-3.916320878171965" elementType="C" /><atom id="a10" y2="0.5016666666666691" x2="-5.25" elementType="C" /><atom id="a11" y2="-0.268333333333334" x2="-1.248962634515894" elementType="C" /><atom id="a12" y2="-0.2683333333333302" x2="-6.583679121828036" elementType="H" /><atom id="a13" y2="2.811666666666667" x2="1.4183956091401783" elementType="C" /><atom id="a14" y2="2.041666666666667" x2="2.7520747309682143" elementType="C" /><atom id="a15" y2="1.2716666666666665" x2="-3.9163208781719643" elementType="C" /><atom id="a16" y2="2.041666666666669" x2="-5.249999999999999" elementType="O" lonePair="3" formalCharge="-1" /></atomArray><bondArray><bond id="b1" order="1" atomRefs2="a1 a3" /><bond id="b2" order="2" atomRefs2="a1 a2" /><bond id="b3" order="1" atomRefs2="a3 a4" /><bond id="b4" order="1" atomRefs2="a3 a5" /><bond id="b5" order="1" atomRefs2="a3 a6" /><bond id="b6" order="2" atomRefs2="a5 a7" /><bond id="b7" order="1" atomRefs2="a4 a9" /><bond id="b8" order="2" atomRefs2="a9 a10" /><bond id="b9" order="1" atomRefs2="a4 a11" /><bond id="b10" order="1" atomRefs2="a13 a14" /><bond id="b11" order="1" atomRefs2="a5 a8" /><bond id="b12" order="1" atomRefs2="a8 a13" /><bond id="b13" order="1" atomRefs2="a1 a15" /><bond id="b14" order="1" atomRefs2="a10 a16" /><bond id="b15" order="1" atomRefs2="a10 a12" /></bondArray></molecule></MChemicalStruct><MElectronContainer id="o1" occupation="0 0" radical="0"><MElectron atomRefs="m1.a2" difLoc="0.0 0.0 0.0" /><MElectron atomRefs="m1.a2" difLoc="0.0 0.0 0.0" /></MElectronContainer><MElectronContainer id="o2" occupation="0 0" radical="0"><MElectron atomRefs="m1.a2" difLoc="0.0 0.0 0.0" /><MElectron atomRefs="m1.a2" difLoc="0.0 0.0 0.0" /></MElectronContainer><MElectronContainer id="o3" occupation="0 0" radical="0"><MElectron atomRefs="m1.a6" difLoc="0.0 0.0 0.0" /><MElectron atomRefs="m1.a6" difLoc="0.0 0.0 0.0" /></MElectronContainer><MElectronContainer id="o4" occupation="0 0" radical="0"><MElectron atomRefs="m1.a6" difLoc="0.0 0.0 0.0" /><MElectron atomRefs="m1.a6" difLoc="0.0 0.0 0.0" /></MElectronContainer><MElectronContainer id="o5" occupation="0 0" radical="0"><MElectron atomRefs="m1.a6" difLoc="0.0 0.0 0.0" /><MElectron atomRefs="m1.a6" difLoc="0.0 0.0 0.0" /></MElectronContainer><MElectronContainer id="o6" occupation="0 0" radical="0"><MElectron atomRefs="m1.a7" difLoc="0.0 0.0 0.0" /><MElectron atomRefs="m1.a7" difLoc="0.0 0.0 0.0" /></MElectronContainer><MElectronContainer id="o7" occupation="0 0" radical="0"><MElectron atomRefs="m1.a7" difLoc="0.0 0.0 0.0" /><MElectron atomRefs="m1.a7" difLoc="0.0 0.0 0.0" /></MElectronContainer><MElectronContainer id="o8" occupation="0 0" radical="0"><MElectron atomRefs="m1.a8" difLoc="0.0 0.0 0.0" /><MElectron atomRefs="m1.a8" difLoc="0.0 0.0 0.0" /></MElectronContainer><MElectronContainer id="o9" occupation="0 0" radical="0"><MElectron atomRefs="m1.a8" difLoc="0.0 0.0 0.0" /><MElectron atomRefs="m1.a8" difLoc="0.0 0.0 0.0" /></MElectronContainer><MElectronContainer id="o10" occupation="0 0" radical="0"><MElectron atomRefs="m1.a16" difLoc="0.0 0.0 0.0" /><MElectron atomRefs="m1.a16" difLoc="0.0 0.0 0.0" /></MElectronContainer><MElectronContainer id="o11" occupation="0 0" radical="0"><MElectron atomRefs="m1.a16" difLoc="0.0 0.0 0.0" /><MElectron atomRefs="m1.a16" difLoc="0.0 0.0 0.0" /></MElectronContainer><MElectronContainer id="o12" occupation="0 0" radical="0"><MElectron atomRefs="m1.a16" difLoc="0.0 0.0 0.0" /><MElectron atomRefs="m1.a16" difLoc="0.0 0.0 0.0" /></MElectronContainer></MDocument></cml>