Calculate MW based on the Molecule Formula throw the error

User fec9e52845

21-08-2013 07:13:36

Hi,


We have using the .NET API Application. Using the ElementalAnalyser  to calculate the MW based on MF as input  then it is throwing the Invalid formula: C39H49ClN4O2.2(HCl) or C38[C14]H49ClN4O2.


Please find sample code below.


ElementalAnalyser ws = new ElementalAnalyser();


ws.setMolecule("C39H49ClN4O2.2(HCl)"); or ws.setMolecule("C38[C14]H49ClN4O2");


double Mass1 = ws.mass();


As per our requirement need to calculate the MW based on formula , formula like isotopes (contains either () or [ ] or non isotopes.


Please provide the solution for this or any other approach is available


Regards
Siva

ChemAxon 5433b8e56b

21-08-2013 14:27:10

Hi,


you can get the Molecule from an MSketchPane with the help of the getMol() method and you will get back a Molecule object which you can set to the ElementalAnalyzer via the setMolecule(MoleculeGraph) method instead of generating the formula and then parsing that again.


I suggest to use this approach, which is much more cheaper in calculation time, and much more safer, and avoids import and export issues.


Regards,
Istvan 

User fec9e52845

22-08-2013 09:17:51

Hi,


Thanks for quick response, As per our Requirement , we have directly passing the Molecule formula not getting Molecule from an MSketchPane. So we have using the element analyser and throwing the  error when using the formula like isotopes (contains either () or [ ] or non isotopes.


Please provide the solution or any other approach for this Requirement with example.


Regards


Siva

ChemAxon 5433b8e56b

22-08-2013 19:54:44

Hi,


I am moving this topic to the Calculator Plugin related support topic, my colleagues will be able to give you a more specific answer.


For the first sight, I see a problem with the formulas, the Elemental Analysis plugin accepts the isotope in thi folloing form: C38[14C]H49ClN4O2 instead of C38[C14]H49ClN4O2. And from the code I am seeing that it does not accept the () brackets at all in the formula.


This seems a bug for me, since when Marvin generates the formula for a Repeating Unit SGroup it puts () type brackets to mark the repetition.


My colleagues will track this issue down, and will provide you a solution, if there is any.


Thank you for your patience in the mean time!


Regards,
Istvan 

ChemAxon 5fc3e8d7d0

28-08-2013 10:00:56

Dear Siva,

The Istvan's answer is correct. The Elemental Analysis plugin accepts the isotope only in the [14C] form.
The another example (C39H49ClN4O2.2(HCl)) throws an exception because the plugin doesn't support formulas, which contains () brackets.

We will investigate it, but we have a workaround for this problem. Use the following form: C39H49ClN4O2.HCl.HCl

Best regards,
Laszlo

User fec9e52845

03-09-2013 09:07:43

Hi,


We have using the dynamic data , So we dont know the which Formula is passing as a input and it is contain isotopes (either () or [ ] or non isotopes).


Please provide the solution for this problem as soon as possible. it is great helpful for us.


Regards


Siva


 


 

ChemAxon 5fc3e8d7d0

11-09-2013 09:26:32

Hi,

We have fixed this issue. The new setMolecule() method also supports formulas like C39H49ClN4O2.2(HCl). It will be available in version 6.1.

Best regards,
Laszlo

User fec9e52845

12-09-2013 09:41:09

Hi,


Thanks for quick response. please provide the link and steps to download the version 6.1.


Currently we have using 6.0 version.


Regards


Siva

ChemAxon d51151248d

13-09-2013 08:07:08

Dear Siva,


You can download version 6.1.0 from the following link :


http://www.chemaxon.com/download/marvin/for-end-users/


Best regards,


                       Daniel

User fec9e52845

26-11-2013 13:38:12










danielszisz wrote:

Dear Siva,


You can download version 6.1.0 from the following link :


http://www.chemaxon.com/download/marvin/for-end-users/


Best regards,


                       Daniel




Hi,


As per our requirement the MW always will show 4 digit precision value. when calcualte the data using Jchem.dll.


Could please help us any option or method to show 4 (198.2345) digit precision value.


 


Regards


Siva

ChemAxon d51151248d

28-11-2013 11:03:06

Dear Siva, 


The number of decimal digits computed by the Elemental Analysis Plugin depends on the atomic masses stored in the elements.zip. You have to modifiy those values (give them as e.g. 123.4567) to get the MW in 4 decimal digits.


That customized file should be placed under user_home/.chemaxon on your machine.


See the following forum topic that is about the same issue: https://www.chemaxon.com/forum/ftopic10781.html


I hope it helps.


Daniel 

User fec9e52845

28-11-2013 11:30:33

Hi,


We have own periodic table in the customized file should be placed under user_home/.chemaxon on mymachine.


But in the server placed in the user_home/.chemaxon  place then when try to updated dynamically or read and show the page. the folde provide to us for not authorized folder.


Please provide me help on this.. it should a common place and accessable to all. we have using only for chemaxon dll alone for calculation. Any other option or location placed this file and access to all.


 


Regards


Siva

ChemAxon d51151248d

29-11-2013 08:17:38

Dear Siva, 


We understand your problem, but as not being an issue of the Calculator Plugins, our team can't give you further help. Your problem is related to either IT or server configuration. We sent your message to the Marvin and the Core team also; they may have other ideas how to solve this problem.


Daniel 

User fec9e52845

23-01-2014 12:30:19

Hi,


We have using the ElementalAnalyser to calculate the weight based on the formula. We get the molecule weight  “524.448” for “C27H27[2H]3Cl2O6" this formula Using your Periodic table. We need to get the Entire Value of M.W without any round off like 524.4479853


Find the Example 1 of using our code.


ElementalAnalyser ws = new ElementalAnalyser();


ws.setMolecule("C27H27[2H]3Cl2O6");


string Formula2 = ws.formula();


double Mass4 = ws.mass();


When we manually calculate based on the your Periodic table value the M.W is 524.4479853. But Element analyzer provide the M.W is 524.448


 


C27      -->    324.2889


H27     -->       27.21438


[2H]3  -->       6.042305334


Cl2     -->       70.906


O6      -->       95.9964


 


Total  -->  524.4479853


 


Example 2 :


 


We get the molecule weight  538.576 for “C27H29F3O6S "” this formula. When we manually calculate based on the your Periodic table value the M.W is 524.4479853 . But Element analyzer provide the M.W is 538.576


 


C27      -->     324.2889









H29     -->     29.23026



F3  -->         56.9952096


O6     -->         95.9964


S      -->           32.065 


Total  -->  538.5757696


 


Example 3:


We get the molecule weight for 528.4664 for “C26[13C]H27[2H]3[37Cl]2O6” this formula and weight for 652.8346 for “C31H30[3H]9N4O8. K”. For those example element analyzer provide the 4 digit precision.


 


We need to get the entire calculation value without any round off. Because some of the formula will showing 3 digit round-off and some of the formula 4 digit formula precision.


 


Please help to get the entire Molecule weight without any round off based on the formula. This is high priority issue for us. Please help asap.


 


Regards


Siva

ChemAxon d51151248d

23-01-2014 14:08:28

Dear Siva, 


Unfortunately the number of decimal digits can't be set via the Elemental Analysis Plugin API. The number of digits of the MW is determined by the smallest number of decimal digits of the element weights in the molecule. So e.g. if you have a molecule with a Cl atom with an element weight of 2 decimal digits, the molecular weight will also have two decimal digits.


I also recalculated the second example you gave first with the plugin and then manually using the atomic values in the Periodic Table, and I got  538.5757696 in both cases. 


I hope this helps, 


Daniel