Technical Support Forum Index
Technical Support Forum
Access ChemAxon scientists and developers here. For registration and login issues contact website support.

Support Ticket System is replacing forum

This forum was converted into a searchable archive. You cannot add posts here any more. For support please use our new Ticket System.

Create your first ticket
net charge of a molecule on a given pH
To watch this topic for replies  Register (enables digests) or give email address:
This topic is locked: you cannot edit posts or make replies.
Display posts from previous:   
    View previous topic :: View next topic    
Author Message
Gyorgy
ChemAxon personnel
Joined: 21 May 2004
Posts: 1159

View user's profile

Back to top
Link to postPosted: Sat Jan 19, 2008 11:55 amPost subject: net charge of a molecule on a given pH Reply with quote

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.


Last edited by Gyorgy on Wed Oct 08, 2008 11:35 am; edited 1 time in total
Gyorgy
ChemAxon personnel
Joined: 21 May 2004
Posts: 1159

View user's profile

Back to top
Link to postPosted: Sat Jan 19, 2008 11:59 amPost subject: Reply with quote

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.
Jozsef
ChemAxon personnel
Joined: 25 May 2004
Posts: 568

View user's profile

Back to top
Link to postPosted: Mon Jan 21, 2008 10:27 amPost subject: Reply with quote

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
Jozsef
ChemAxon personnel
Joined: 25 May 2004
Posts: 568

View user's profile

Back to top
Link to postPosted: Mon Jan 21, 2008 6:38 pmPost subject: Reply with quote

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
Kathrin

Joined: 13 Feb 2008
Posts: 3

View user's profile

Back to top
Link to postPosted: Fri Feb 15, 2008 3:39 pmPost subject: Calculation of charge at certain pH using cxcalc Reply with quote

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
Joseph

Joined: 20 Mar 2007
Posts: 2

View user's profile

Back to top
Link to postPosted: Wed Feb 20, 2008 3:00 amPost subject: net charge of a molecule on a given pH using Marvin Sketch Reply with quote

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
Zsolt
ChemAxon personnel
Joined: 11 Jan 2006
Posts: 1163

View user's profile

Back to top
Link to postPosted: Wed Feb 20, 2008 1:32 pmPost subject: Re: Calculation of charge at certain pH using cxcalc Reply with quote

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
Zsolt
ChemAxon personnel
Joined: 11 Jan 2006
Posts: 1163

View user's profile

Back to top
Link to postPosted: Wed Feb 20, 2008 1:49 pmPost subject: Re: net charge of a molecule on a given pH using Marvin Sket Reply with quote

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
Joseph

Joined: 20 Mar 2007
Posts: 2

View user's profile

Back to top
Link to postPosted: Thu Feb 28, 2008 3:13 amPost subject: using evaluate to display SMILES Reply with quote

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.
Zsolt
ChemAxon personnel
Joined: 11 Jan 2006
Posts: 1163

View user's profile

Back to top
Link to postPosted: Thu Feb 28, 2008 11:58 amPost subject: Re: using evaluate to display SMILES Reply with quote

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
Gonzalo

Joined: 28 Jul 2008
Posts: 6

View user's profile

Back to top
Link to postPosted: Tue Oct 07, 2008 5:50 pmPost subject: Calculation of average charge of a molecule at a given pH Reply with quote

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.
Thanks in advance,
Gonzalo
Zsolt
ChemAxon personnel
Joined: 11 Jan 2006
Posts: 1163

View user's profile

Back to top
Link to postPosted: Wed Oct 08, 2008 12:49 pmPost subject: Reply with quote

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
Gonzalo

Joined: 28 Jul 2008
Posts: 6

View user's profile

Back to top
Link to postPosted: Wed Oct 08, 2008 6:26 pmPost subject: Reply with quote

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.

Thanks again for your help.
Gonzalo
Zsolt
ChemAxon personnel
Joined: 11 Jan 2006
Posts: 1163

View user's profile

Back to top
Link to postPosted: Thu Oct 09, 2008 10:44 amPost subject: Reply with quote

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
Gonzalo

Joined: 28 Jul 2008
Posts: 6

View user's profile

Back to top
Link to postPosted: Thu Oct 09, 2008 11:39 amPost subject: Reply with quote

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.
Zsolt
ChemAxon personnel
Joined: 11 Jan 2006
Posts: 1163

View user's profile

Back to top
Link to postPosted: Fri Oct 10, 2008 4:42 pmPost subject: Reply with quote

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
>  <CHARGE_DISTRIBUTION>
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
This topic is locked: you cannot edit posts or make replies.
Page 1 of 1


To watch this topic for replies   Register (enables digests) or give email address  
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum