# net charge of a molecule on a given pH

ChemAxon d76e6e95eb

19-01-2008 10:55:47

A question:

I am trying to calculate the net ionic charge of compounds at a particular pH using cxcalc. I was wondering if I could calculate this by first calculating totalchargedensity and then taking the sum of these values. Let me know if you know of a better way of doing this.

ChemAxon d76e6e95eb

19-01-2008 10:59:07

That should be OK, the sum of partial charges (floating point values) should be equal to the net charge of the molecule. Another reasonable alternative could be to calculate the major miscrospecies on that pH and sum the formalCharge values (those are integers). I am not absolutely sure about the performance difference of the two methods, but formal charge calculation must be faster than partial charge calculation.

User 851ac690a0

21-01-2008 09:27:35

Hi,

Yes, formal charge calculation is faster than partial charge calculation.

Here is the code that does the job without partial charge calculation.

 Code: // calculate the major microspecies at pH=7.4 MajorMicrospeciesPlugin plugin = new MajorMicrospeciesPlugin(); plugin.setpH(7.4); plugin.setMolecule(mol); plugin.run(); Molecule msmol = plugin.getMajorMicrospecies(); // get the total (formal) charge of the result molecule msmol.getTotalCharge()

See MajorMicrospeciesPlugin API usage example and MoleculeGraph.getTotalCharge() method.

Jozsi

User 851ac690a0

21-01-2008 17:38:58

Hi,

Alternative method: Formalcharge calculation with partial charge prediction

 Code: // 1st step  : calculate the major microspecies at pH=7.4 MajorMicrospeciesPlugin plugin = new MajorMicrospeciesPlugin(); plugin.setpH(7.4); plugin.setMolecule(mol); plugin.run(); Molecule msmol = plugin.getMajorMicrospecies(); // 2nd step : calculate the partial charge distribution of the major microspecies ChargePlugin chg = new ChargePlugin(); chg.setMolecule(msmol); chg.run();   //3rd step : summarize the partial charge for each atom including the implicit hydrogens as well. double formalCharge = 0; for (int i = 0; i < (msmol.getAtomCount()+msmol.getImplicitHcount()); i++) {    formalCharge += chg.getTotalCharge(i); }

See an additional ChargePlugin example here:

http://www.chemaxon.com/marvin/help/developer/beans/api/chemaxon/marvin/calculations/ChargePlugin.html

Jozsi

User bfdc25e369

15-02-2008 14:39:19

Hi,

how can I use the procedure that is suggested with cxcalc? I manage to calculate the major microspecies at the pH of interest. But how can I extract information on total charge of the major species after that? The command TotalCharge does not seem to work with my version of cxcalc.

Thanks,

Kathrin

User 96f2dd618b

20-02-2008 02:00:28

Hi, I was wondering if there is also a way to calculate this through the Marvin Sketch GUI for molecules that are drawn in the application instead of having to export them and then run the calculation.

-Joseph

ChemAxon e08c317633

20-02-2008 12:32:54

Hi,
 Kathrinfenner wrote: how can I use the procedure that is suggested with cxcalc? I manage to calculate the major microspecies at the pH of interest. But how can I extract information on total charge of the major species after that? The command TotalCharge does not seem to work with my version of cxcalc.
There is no such calculation in cxcalc yet that returns the total charge of a molecule. However you can do the calculation with Chemical Terms Evaluator command line application, that can be used for evaluating Chemical Terms expressions.

To calculate the total charge of a molecule at a specified protonation state use this Chemical Terms expression:

 Code: totalCharge(majorMs("4.0"))

This expression will generate the major microspecies of the input molecule at pH=4.0 first and then calculate its total charge.

Evaluator examples:

 Code: \$ evaluate -e 'totalCharge(majorMs("1.0"))' "NCC1=CC=C(C=C1)C(O)=O" 1 \$ evaluate -e 'totalCharge(majorMs("7.0"))' "NCC1=CC=C(C=C1)C(O)=O" 0 \$ evaluate -e 'totalCharge(majorMs("13.0"))' "NCC1=CC=C(C=C1)C(O)=O" -1

Examples show the total charge calculation of the major microspecies of 4-(aminomethyl)benzoic acid at pH 1.0, 7.0 and 13.0.

If you prefer graphical interface over command line, then check this post.

Regards,

Zsolt

ChemAxon e08c317633

20-02-2008 12:49:15

 jwoodcock wrote: Hi, I was wondering if there is also a way to calculate this through the Marvin Sketch GUI for molecules that are drawn in the application instead of having to export them and then run the calculation.
No, unfortunately exactly this can not be done with Marvin Sketch GUI. Check isoelectric point plugin, it calculates gross charge distribution of a molecule as function of pH. See the attached screenshot.

Regards,

Zsolt

User 96f2dd618b

28-02-2008 02:13:52

I have implemented the method using evaluate, but I can't seem to figure out how to get it to output a tab delimited list that will have the canonical SMILES strings in one field and the charge in the other.

I have tried using the command line: evaluate -x smiles -e 'totalCharge()' test.smiles

So far this does not produce any results.

ChemAxon e08c317633

28-02-2008 10:58:22

 jwoodcock wrote: I have implemented the method using evaluate, but I can't seem to figure out how to get it to output a tab delimited list that will have the canonical SMILES strings in one field and the charge in the other.
Unfortunately this can not be done with Evaluator command line tool. I recommend you to use the Marvin API. I have attached a code example (SmilesAndCharge.java) that will do the job.

Usage:
 Code: \$ java SmilesAndCharge test.smiles CC(=O)OC(CC([O-])=O)C[N+](C)(C)C   0 OC1C=CC=C(C1O)C([O-])=O   -1 CC(O)C[NH3+]   1 NCC(=O)COP(O)(O)=O   0 [O-][N+](=O)C1=CC(=C(Cl)C=C1)[N+]([O-])=O   0 CCN1C=NC2=C(N)N=CN=C12   0 CCC(C)(O)C(O)C([O-])=O   -1 OC1C(O)C(O)C(OP(O)(O)=O)C(O)C1O   0 NC1=NC2=C(NC(CN2)CN(C=O)C2=CC=C(C=C2)C(=O)NC(CCC([O-])=O)C([O-])=O)C(O)=N1   -2 ClCCCl   0
 Quote: I have tried using the command line: evaluate -x smiles -e 'totalCharge()' test.smiles So far this does not produce any results.
You have to specify a boolean expression after the "-e" option, e.g.:

 Code: \$ evaluate -x smiles -e 'totalCharge() != 0' test.smiles OC1C=CC=C(C1O)C([O-])=O CC(O)C[NH3+] CCC(C)(O)C(O)C([O-])=O NC1=NC2=C(NC(CN2)CN(C=O)C2=CC=C(C=C2)C(=O)NC(CCC([O-])=O)C([O-])=O)C(O)=N1

The output contains all molecules having total charge different from zero in smiles format.

Regards,

Zsolt

User 67328ba256

07-10-2008 16:50:18

Hi,

I'm trying to compute the average change of a molecule at a given pH, that is, the weighted sum of charges of all the microspecies of that molecule at the given pH (the weight for each microspecies would be the fraction of the molecule at the ionization state of the corresponding microspecies).

I've seen that you have that information in the curve data that you get when you compute the isoelectric point in MarvinView. Unfortunately I want this calculation for a sdf file with lots of molecules, so I can't afford manually copying and pasting all those data from MarvinView.

I tried cxcalc isoelectricpoint, but in that case I only get the isoelectric point, not the desired average charge at a given pH.

Any idea on how to compute this? I guess it's probably trivial, but I'm new to ChemAxon software.

Gonzalo

ChemAxon e08c317633

08-10-2008 11:49:40

Hi,

There is no such calculation in cxcalc yet that can return exactly the data you require.

The charge distribution data shown on the IsoelectricPointPlugin result display can be retrieved with cxcalc, but pH can not be set.

 Code: \$ cxcalc pi -t chargedistr "C[C@H](N)C(O)=O" id   Charge 1   0.00     1.00   0.50     0.99   1.00     0.98   1.50     0.94   2.00     0.84   2.50     0.62   3.00     0.34   3.50     0.14   4.00     0.05   4.50     0.02   5.00     0.01   5.50     0.00   6.00     0.00   6.50    -0.00   7.00    -0.00   7.50    -0.01   8.00    -0.03   8.50    -0.10   9.00    -0.25   9.50    -0.51  10.00    -0.77  10.50    -0.91  11.00    -0.97  11.50    -0.99  12.00    -1.00  12.50    -1.00  13.00    -1.00  13.50    -1.00  14.00    -1.00

We will add an option to set the pH in a future release.

I hope this helps.

Zsolt

User 67328ba256

08-10-2008 17:26:50

Thanks, Zsolt. It will be good to have that option in next release of cxcalc.

And what about adding to MarvinView the option to save the plugin calculations in additional columns of the window? I mean, at this moment you open a sdf file with MarvinView, and then the only thing you can do (AFAIK) is open one structure and calculate one property for it (e.g. isoelectric point). But it would be great if you could (a) select multiple structures and get that property calculated for ALL the selected structures, and (b) be able to add those properties as new columns in MarvinView. Then you could save the whole thing as a new sdf file containing the calculated properties. I think that could be quite useful for QSAR studies.

Gonzalo

ChemAxon e08c317633

09-10-2008 09:44:33

 gonzcolm wrote: Thanks, Zsolt. It will be good to have that option in next release of cxcalc.
This option will be added in Marvin 5.2.
 Quote: And what about adding to MarvinView the option to save the plugin calculations in additional columns of the window? I mean, at this moment you open a sdf file with MarvinView, and then the only thing you can do (AFAIK) is open one structure and calculate one property for it (e.g. isoelectric point). But it would be great if you could (a) select multiple structures and get that property calculated for ALL the selected structures, and (b) be able to add those properties as new columns in MarvinView. Then you could save the whole thing as a new sdf file containing the calculated properties. I think that could be quite useful for QSAR studies.
MarvinView is a viewer, so we do not plan to add such feature to it.

Check Instant JChem, it can do this. Here is a flash animation that shows how it can be done with IJC: http://www.chemaxon.com/anim/ijc/chemterms/chemterms.html.

Zsolt

User 67328ba256

09-10-2008 10:39:24

Thanks, Zsolt. I'll use InstantJChem instead.

Just to finish with my question, could you please confirm that the isoelectric point titration curve with cxcalc you describe above can't be saved within an additional tag in an sdf format file? I've tried different options but haven't been able to do it.

ChemAxon e08c317633

10-10-2008 15:42:24

It can be saved to SDFile tag.

 Code: cxcalc -S -t CHARGE_DISTRIBUTION -o mol_chargedistr.sdf pi -t chargedistr "C[C@H](N)C(O)=O"

The command above generates an SDFile (mol_chargedistr.sdf) with charge distribution data in CHARGE_DISTRIBUTION SDF fields:

 Code: Marvin  10100817382D            6  5  0  0  1  0            999 V2000     0.1105    0.4125    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0     0.8250    0.0000    0.0000 C   0  0  2  0  0  0  0  0  0  0  0  0     0.8250   -0.8250    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0     1.5395    0.4125    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0     1.5395    1.2375    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0     2.2539   -0.0000    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0   1  2  1  0  0  0  0   2  3  1  1  0  0  0   2  4  1  0  0  0  0   4  5  1  0  0  0  0   4  6  2  0  0  0  0 M  END >  0.00     1.00   0.50     0.99   1.00     0.97   1.50     0.90   2.00     0.75   2.50     0.49   3.00     0.23   3.50     0.09   4.00     0.03   4.50     0.01   5.00     0.00   5.50     0.00   6.00    -0.00   6.50    -0.00   7.00    -0.00   7.50    -0.01   8.00    -0.03   8.50    -0.10   9.00    -0.25   9.50    -0.51  10.00    -0.77  10.50    -0.91  11.00    -0.97  11.50    -0.99  12.00    -1.00  12.50    -1.00  13.00    -1.00  13.50    -1.00  14.00    -1.00 \$\$\$\$

I hope this helps,

Zsolt