Calculate MW based on structure Edit using MarvinSketch

User fec9e52845

20-08-2013 12:42:39

Hi,


We have using the .Net Application using Marvin and Jchem. We need to calculate  the Molecular weight beased on the structure edit in the MarvinSketch. Please provide the solution for this.


Regards


Siva


 


 

ChemAxon 5433b8e56b

21-08-2013 14:29:18

Hi,


Please see my answer in this topic: https://www.chemaxon.com/forum/ftopic11049.html


Regards,
Istvan 

User fec9e52845

22-08-2013 10:12:23

Hi,


Thanks for quick response. Please provide the Sample code for this approach.


Regards


Siva


 


 

User fec9e52845

03-09-2013 09:01:36

Hi,


Waiting for your response.


 


Regards


Siva

ChemAxon 5433b8e56b

03-09-2013 11:34:02

Hi,


as I wrote in the linked forum topic, you can use the getMol method on the MSketchPane instance in which the structure is being edited, and then call the getExactMass or getMass method on the Molecule which has been returned by the MSketchPane instance.


I can provide a java sample code to do this:


MSketchPane sketch = new MSketchPane();
double mass = sketch.getMol().getExactMass()

If you would like to have an other approach using ElementalAnalyser and the formula of the molecule, you should consult my colleauges in the other topic which is linked before, because I am not really an expert in the chemical calculations topic, since I am working on the editor and rendering part of MarvinSketch and MarvinView. As I see there you have posted a message for my colleague, he will answer you shortly. I think they need some time to evaluate the request and answer, please be patient in the mean time.


Regards,
Istvan