Problem with NaN charges on hydrogens from ChargePlugin

User 8c68bb23cf

12-02-2009 18:09:54

Hi,





I use ChargePlugin to compute partial charges, and in my situation it returns NaN for any hydrogen. And it occurs not just for "implicit" hydrogens, but for any, including those in hydroxyl and amino groups.





I imported the relevant library, and essentially recycled the code example from the developers' section of this site. The structures contain explicit hydrogens and are read from mol2 or sdf formatted files, as opposed to the SMILES string in the example. The example, apparently, doesn't even attempt to compute charges on hydrogens and also generates charges only for heavy atoms.





When I use the desktop version (MarvinSpace or View) with the implicit hydrogen charge option enabled, I actually get the charges. How is this option enabled in the code? I didn't find anything in the API.





I'm using version 5.0.2.1.





Thank you for any suggestions








Sasha

User 851ac690a0

17-02-2009 21:31:09

Hi,








Charge of implicit hydrogens can be obtained with this function:





"getResultantImplicitHCharge(int index)".





Where the "index" is refer to any atom which may connected with one or more  hydrogen atoms.








See the attached picture.


Does this help you?











Jozsi

User 8c68bb23cf

18-02-2009 22:07:04

Thank you, Jozsi.





I understand the mechanism you are referring to.. I wonder if there is a way to get the charges on all atoms, with all charges already assigned, without having to call the implicit hydrogens method. Since I'm trying to use the plugin with another Java application that does structure loading and display, translating indices of the implicit hydrogens can be rather painful. It becomes fairly hard to determine, which atom in the ChemAxon data structure corresponds to which in the data structure of my application.








As a side note, it might be useful to have this all-atom charge calculation available, with charges assigned to each atom according to its index (unless I missed it somewhere in the API). Frankly, the only people that ignore "implicit" hydrogens are those doing molecular mechanics (although I'm sure it simplifies the charge calculation quite a bit).








Also, for some reason, ALL hydrogens are considered "implicit" by the plugin - even those in amino and hydroxyl groups. And that can't be correct from any point of view..





I guess, this simplistic approach accounts for the difference in calculated charges between ChemAxon's plugin and commercial software.. Generally, the plugin seems to generate much smallercharges. For example, if you try it for an anion of acetic acid, there is no way that ChargePlugin can produce a total -1 charge on the structure. The oxygens are assigned only -0.2, while in reality it's closer to -0.8.. You get the idea...





So, while access to the charges of implicit hydrogens may be resolved, there is a bigger problem with the algorithm itself, unfortunately. And the results produced by ChargePlugin are qualitative at best..








Cheers














Sasha

User 851ac690a0

19-02-2009 10:24:36

Hi,





Ok. I have understood what is the problem. I ask plugin developers what can be done.








Jozsi

User 8c68bb23cf

19-02-2009 17:22:39

Thanks, Jozsi





I hope the developers at ChemAxon will have a chance to look into it.





Best regards,














Sasha

User 851ac690a0

19-02-2009 19:23:41

Hi,





I am a developer at Chemaxon.





And I am sure that many other Chemaxon's developers  read your problem.





We are going to back to you as soon as possible.

















Jozsi

ChemAxon e08c317633

20-02-2009 16:03:26

Hi,





Do you use the  code example from here: http://www.chemaxon.com/jchem/doc/api/chemaxon/marvin/calculations/ChargePlugin.html?





If you do, then delete this line from your code:





Code:
plugin.setpH(7.4);






If pH is set, then all explicit hydrogens are removed before the microspecies at the given pH is generated.





I hope this helps,


Zsolt