support for D and T in formula

User 8688ffe688

25-03-2008 02:21:06

Could you please add the support for common isotope alias i.e. D and T? Presently the call to from MoleculeGraph.getFormula() represents D as H. We have tested other chemical drawing tools and they display formula with D (ISIS Draw, ACD Labs sketch, Chemdraw).

ChemAxon d76e6e95eb

25-03-2008 13:41:25

Please call the "isotopeFormula()" method of the ElementalAnalyser class. It will calculate the isotopic formula with D and T symbols by default.

User 8688ffe688

26-03-2008 08:09:27

We would like to see the alias i.e. D not [2H] which is more common in the other chemical drawing packages.

ChemAxon d76e6e95eb

26-03-2008 10:54:07

That's fine. The isotopeFormula() function of the ElementalAnalyser class just produces the formula using the D symbol as you wish it. That's the default behaviour.





MoleculeGraph.getFormula calculates the chemical formula and it does not distinguish isotopes. No isotopeFormula function is avaliable in the MoleculeGraph class, but there is the ElementalAnalyser class for this purpose.

ChemAxon d76e6e95eb

26-03-2008 12:40:24

Just one remark. This functionality appeared first in version 5.0, maybe you have an older version...

User 8688ffe688

27-03-2008 00:29:12

What is the call to do this doing the jchem oracle cartridge? I tried jcf_evaluate(smiles,'isotopeformula') but this did not work.

ChemAxon a3d59b832c

27-03-2008 09:15:04

You are right, that should be it, but it still uses the old default. We will fix it in the next minor release, 5.0.3., which is due in the middle of April.

ChemAxon d76e6e95eb

27-03-2008 09:23:25

Oh, are you calling the cartridge function? Now I understand. Unfortunately, the default behavior of the plugin (accessed by the cartridge) is different from the default behavior of the ElementalAnalyser class. We will change the default of the plugin as Szabolcs said and then it will work as you expect. We will provide an optional parameter for the plugin to generate the the old-style deuterium and tritium representation as well.

ChemAxon aa7c50abf8

27-03-2008 09:41:55

One minor remark about JChem Cartridge-related syntax:





jcf_evaluate returns number. For Chemical Terms expressions evaluating to strings, the jcf_evaluate_x function is available. Example:





Code:
select jcf_evaluate_x(structure, 'chemTerms:isotopeformula') from mytable