Your Molecular Formula

 
List of allowed groups

FWHM:
Resolution:
Apply Gaussian:
 
Reference version:

FWHM = ΔM
(Peak Full Width at Half-Maximum)

Resolution = M / ΔM

 
 

Python Examples

Retrieving information for a molecular formula

#!/usr/bin/python
# Requires Python 2.6 or higher
# for 2.5 and lower, install and use simplejson instead of json
import urllib, urllib2
import json

ccurl = 'http://www.chemcalc.org/chemcalc/mf'

# Define a molecular formula string
mf = 'C10H20Cl2'

# Define the parameters and send them to Chemcalc
params = {'mf': mf,'isotopomers':'jcamp,xy'}
response = urllib2.urlopen(ccurl, urllib.urlencode(params))

# Read the output and convert it from JSON into a Python dictionary
jsondata = response.read()
data = json.loads(jsondata)

print data
#!/usr/bin/python
# Requires Python 3.x
import urllib.request, urllib.parse
import json

ccurl = 'http://www.chemcalc.org/chemcalc/mf'

# Define a molecular formula string
mf = 'C100H100'

# Define the parameters and send them to Chemcalc
params = {'mf': mf,'isotopomers':'jcamp,xy'}
response = urllib.request.urlopen(ccurl, urllib.parse.urlencode(params).encode('utf-8'))

# Read the output and convert it from JSON into a Python dictionary
jsondata = response.read()
data = json.loads(jsondata.decode('utf-8'))

print data

Find possible molecular formula for a specific monoisotopic mass

#!/usr/bin/python
import urllib, urllib2
import json

chemcalcURL = 'http://www.chemcalc.org/chemcalc/em'

# Define a molecular formula string
mfRange = 'C0-100H0-100N0-10O0-10'
# target mass
mass = 300

# Define the parameters and send them to Chemcalc
# other options (mass tolerance, unsaturation, etc.
params = {'mfRange': mfRange,'monoisotopicMass': mass}
response = urllib2.urlopen(chemcalcURL, urllib.urlencode(params))

# Read the output and convert it from JSON into a Python dictionary
jsondata = response.read()
data = json.loads(jsondata)

print data