Technical Support Forum Index
Technical Support Forum
Access ChemAxon scientists and developers here. For registration and login issues contact website support.
Exact mass calculation
To watch this topic for replies  Register (enables digests) or give email address:
Reply to topic
Display posts from previous:   
    View previous topic :: View next topic    
Author Message
guest

Joined: 24 Jun 2004
Posts: 57

View user's profile

Back to top
Link to postPosted: Wed Jul 14, 2004 4:34 pmPost subject: Exact mass calculation Reply with quote

How do I use Marvin to find the exact mass of the most abundant isotope of an atom?
Gyuri
ChemAxon personnel
Joined: 21 May 2004
Posts: 1127

View user's profile

Back to top
Link to postPosted: Wed Jul 14, 2004 5:22 pmPost subject: Reply with quote

The most abundant isotope can be detemined with the getMostFrequentNaturalIsotope function of the PeriodicSystem class. This class is not yet in the APIDoc, but available from in the struc package. Its parameter is the atomic number and returns the mass number of the most abundant isotope of the given atom. Then you can call the getMass function of the same class to have the exact mass number of that isotope. For example (nitrogen):

Code:
getMass(7, getMostFrequentNaturalIsotope(7));


will return 14.003074005


It seems, however, that you want to calculate the exact mass of a molecule using the mass of the most frequent isotopes. This is often needed for MS molecule and fragment ion calculations.

We have the ElementalAnalyser plugin which directly calculates the exact mass. Just call its exactMass function and you will get the desired value. http://www.chemaxon.com/marvin/doc/api/chemaxon/marvin/calculations/ElementalAnalyserPlugin.html

So you probably do not have to access the PeriodicSystem class, since ElementalAnalyser offers the required functionality for you (even taking care of implicit hydrogens).
guest

Joined: 24 Jun 2004
Posts: 57

View user's profile

Back to top
Link to postPosted: Wed Jul 14, 2004 5:25 pmPost subject: Reply with quote

From the url you gave me, I couldn't find exactMass method from class ElementalAnalyserPlugin.
Gyuri
ChemAxon personnel
Joined: 21 May 2004
Posts: 1127

View user's profile

Back to top
Link to postPosted: Wed Jul 14, 2004 5:46 pmPost subject: Reply with quote

The exact mass calculation can be accessed through our general plugin mechanism. Enclosed please find an example code and a SMILES molecule.

Code:
java ElemAnalTest test.smiles
OC(=O)C1=CNC=C1 111.032


Getting the result from the plugin is not very user friendly at the moment, therefore we will add some nice functions to this plugin so that exact mass could be get by a call to ElementalAnalyserPlugin.exactMass(). This will be available in the next Marvin release coming out soon.

I hope this will help. Some more plugin usage examples can be found
in the API headers of some plugin classes, see:
http://www.chemaxon.hu/forum/ftopic124.html


The ElementalAnalyserPlugin class is our example plugin demonstrating how developers can create their own plugins. It embeds the ElementalAnalyser class, which actually has the exactMass function.
We decided to make this embedded class directly available in the next release, so the plugin layer will not be needed if you want to access the exact mass calculation (and some other useful functions) from code. The corresponding plugin will still be there as a free sample plugin.



 Filename: test.smiles    Filesize: 17 Bytes    Downloaded: 1120 Time(s)
 Description:  sample molecule in SMILES format for the test application

 Filename: ElemAnalTest.java    Filesize: 1.21 KB    Downloaded: 1150 Time(s)
 Description:  test Java application for calling exact mass calculation via the general plugin interface
Reply to topic
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 can download files in this forum