SMILES to Formula, Molar Mass & Properties
Formula, molar mass, exact mass, rings and H-bond counts from SMILES, MOL or XYZ.
How it works
Paste a SMILES string, a MOL/SDF block or XYZ coordinates and get the molecular formula, the molar mass from the IUPAC standard atomic weights with its uncertainty, the exact (monoisotopic) mass, ring and aromatic-ring counts, hydrogen-bond donors and acceptors, rotatable bonds, a canonical SMILES, a 2-D structure drawing and a MOL file. Part of the Proofline math notebook and its Molecule Lab.
- The structure is read by Proofline’s own parsers: SMILES (OpenSMILES subset), MDL MOL/SDF V2000 (first record) or XYZ (bonds from covalent radii, double bonds guessed from valences). Hydrogens that are not written follow the SMILES valence rules; Kekulé rings with six π electrons are perceived as aromatic.
- Molar mass = Σ atoms × CIAAW standard atomic weight, with the combined uncertainty (the same calculation as the molar-mass tool). The exact mass adds the most abundant isotope of every element (AME2020) and corrects ions by the electron mass.
- Rings are the smallest set of smallest rings (bonds − atoms + parts of them). H-bond donors and acceptors use Lipinski’s counting (O–H and N–H bonds; all N and O atoms). Rotatable bonds are single, non-ring bonds between two atoms that each have another heavy neighbour.
- The canonical SMILES ranks atoms by their element, connections and charges, refined over the neighbours until stable; ties are broken one at a time. The MOL file has 2-D coordinates from Proofline’s layout and a Kekulé structure for aromatic rings.
Counts follow simple published rules (Lipinski) and are not predictions of drug-likeness; stereochemistry is not handled. Nothing here is advice on handling chemicals safely.
Sources
- C. A. James et al.: OpenSMILES specification (version 1.0) (Blue Obelisk)
- CIAAW: Abridged standard atomic weights of the elements (latest table) (IUPAC Commission on Isotopic Abundances and Atomic Weights)
- M. Wang, W. J. Huang, F. G. Kondev, G. Audi, S. Naimi: The AME 2020 atomic mass evaluation (II), Chinese Physics C 45 (2021) 030003 (IOP Publishing)
- C. A. Lipinski, F. Lombardo, B. W. Dominy, P. J. Feeney: Experimental and computational approaches to estimate solubility and permeability in drug discovery and development settings, Adv. Drug Deliv. Rev. 23 (1997) 3–25 (Elsevier)
- BIOVIA: CTFile Formats (MDL MOL/SDF V2000 connection tables) (Dassault Systèmes BIOVIA)
Part of Proofline
-
Proofline Math notebook
Solve, graph, test and visualise in one notebook — with data, findings and a report.
Related tools
- SMILES to 3D Coordinates (XYZ) with Force-Field Minimisation – Approximate 3-D structure from SMILES: XYZ and MOL with bond lengths, angles and energy.
- Molar Mass & Composition Calculator – Molar mass with uncertainty, mass % per element and the empirical formula from percentages.
- Chemical Equation Balancer & Stoichiometry – Balance any reaction or redox equation exactly, then find the limiting reagent and yields.
- Interactive Periodic Table & Property Trends – Periodic table heatmaps of electronegativity, radius, ionisation energy and more, with trends.
How to get a formula, molar mass and properties from SMILES
Paste a SMILES string, MOL block or XYZ file and get the molecular formula, molar and exact mass, rings, hydrogen-bond counts and a canonical SMILES.
What it is for
SMILES is the compact way chemists write structures as text: CCO is ethanol, c1ccccc1 is benzene, CC(=O)Oc1ccccc1C(=O)O is aspirin. This tool reads such a string — or a MOL/SDF block from a drawing program, or XYZ coordinates from a calculation — and tells you what the molecule is made of. You get the molecular formula in Hill order, the molar mass from the IUPAC standard atomic weights with its uncertainty, the exact (monoisotopic) mass used in mass spectrometry, the number of rings and aromatic rings, hydrogen-bond donors and acceptors, rotatable bonds, a canonical SMILES, a 2-D drawing and a MOL file to download.
Hydrogens you leave out are added by the SMILES valence rules, so CCO really means CH3–CH2–OH. Kekulé rings such as C1=CC=CC=C1 are recognised as aromatic.
Worked example
Aspirin, CC(=O)Oc1ccccc1C(=O)O, comes out as C₉H₈O₄ with a molar mass of 180.16 ± 0.02 g/mol and an exact mass of 180.0423 u. It has 13 heavy atoms, one ring (aromatic), 1 hydrogen-bond donor (the acid OH), 4 acceptors (all four oxygens) and 3 rotatable bonds. The canonical SMILES is the same string you typed.
Caffeine written as CN1C=NC2=C1C(=O)N(C(=O)N2C)C gives C₈H₁₀N₄O₂, 194.19 ± 0.02 g/mol, exact mass 194.0804 u, two rings (a five- and a six-membered one), no donors and six acceptors. Its canonical SMILES, CN1C(=O)c2c(ncn2C)N(C)C1=O, marks the five-membered imidazole ring as aromatic.
Charges work too: the glycine zwitterion [NH3+]CC(=O)[O-] is C₂H₅NO₂ with 75.067 ± 0.005 g/mol and 3 donors, because the NH₃⁺ group carries three N–H bonds.
How to read the result
The molar mass is the same calculation as the molar-mass calculator: the sum of the standard atomic weights, rounded to the first digit of its combined uncertainty. The exact mass instead adds the mass of the most abundant isotope of each element (¹²C, ¹H, ¹⁶O …) and is the value a high-resolution mass spectrometer reports for the main peak.
H-bond donors count O–H and N–H bonds; acceptors count every nitrogen and oxygen atom. This is Lipinski's simple counting rule, so it is a quick screening figure, not a chemical judgement about every lone pair. Rings is the size of the smallest set of smallest rings; naphthalene has 2, cubane 5.
The canonical SMILES is built from atom ranks that depend only on the structure, so OCC and C(O)C both become CCO. Use it to compare molecules or as a clean key in a spreadsheet.
Tips and common mistakes
- Elements outside B, C, N, O, P, S, F, Cl, Br and I need square brackets:
[Na+],[Fe+2],[Si]. - Lowercase letters mean aromatic atoms. A pyrrole nitrogen carries its hydrogen in brackets:
c1cc[nH]c1. - Ring numbers must close:
C1CCis an error that names the open ring. - Stereo marks (
@,/,\) are accepted but not used; mirror images get the same result. - A dot separates parts of a salt:
[Na+].[Cl-]gives the formula of the whole salt and a note about the two parts.
FAQ
Why does the exact mass differ from the molar mass?
The molar mass averages over the natural mix of isotopes; the exact mass uses only the most common isotope of each element. For aspirin that is 180.16 versus 180.0423.
Which file formats can I paste?
SMILES, MOL or SDF in the V2000 format (the first record of an SD file) and XYZ coordinates. For XYZ files the bonds are worked out from the distances between atoms.
Does it predict whether a molecule is drug-like?
No. It reports Lipinski's counts, but it does not compute logP or judge drug-likeness, and it gives no advice on handling chemicals.
Is this the same engine as in Proofline?
Yes. The Molecule Lab and the Molecule properties cell of the Proofline notebook use exactly this calculation.
Guide last updated:
For scripts and AI agents
- JSON API:
POST https://prooflinesmilesinfo.usefulweb.app/api/v1/calculate(same calculation as this page) - Interface description: OpenAPI 3.1 · AI guide: llms.txt
- MCP server (Streamable HTTP):
https://prooflinesmilesinfo.usefulweb.app/mcp· tool nameproofline_smiles_info
Example request
curl -s -X POST https://prooflinesmilesinfo.usefulweb.app/api/v1/calculate \
-H 'content-type: application/json' \
-d '{"structure":"CC(=O)Oc1ccccc1C(=O)O"}'