COSMolKit Tools

Loading browser workspace

Back to tools

Molecular properties calculator

Calculate commonly used molecular descriptors from SMILES locally in your browser.

COSMolKit 0.2.12 / Rust / WASM
CANONICAL STRUCTURECC(=O)Oc1ccccc1C(=O)O
Molecular structure preview
FormulaC9H8O4
Molecular weight180.159
g/mol
Exact mass180.04226
Da
Heavy atoms13
atoms
H-bond donors1
HBD
H-bond acceptors3
HBA
Topological polar surface area63.60
Rotatable bonds2
strict
Crippen logP1.310
logP
Formal charge0
e
BROWSER-LOCAL DESCRIPTORS

Calculate molecular properties from SMILES

COSMolKit parses the SMILES and calculates molecular formula, average molecular weight, monoisotopic exact mass, heavy atom count, hydrogen-bond donors and acceptors, TPSA, strict rotatable bonds, Crippen logP, and total formal charge without uploading the molecule.

PYTHON BACKEND

Calculate the same descriptors in Python

The Python package exposes the same COSMolKit descriptor implementations used by this browser tool.

COSMolKit Python 0.2.12
molecular_properties.py
from cosmolkit import (
    Molecule, calc_crippen_descriptors, calc_exact_mol_wt,
    calc_mol_formula, calc_mol_wt, calc_num_hba, calc_num_hbd,
    calc_num_rotatable_bonds, calc_tpsa,
)

mol = Molecule.from_smiles("CCO")
logp, _ = calc_crippen_descriptors(mol)

properties = {
    "formula": calc_mol_formula(mol),
    "molecular_weight": calc_mol_wt(mol),
    "exact_mass": calc_exact_mol_wt(mol),
    "heavy_atoms": sum(a.atomic_num() != 1 for a in mol.atoms()),
    "hbd": calc_num_hbd(mol),
    "hba": calc_num_hba(mol),
    "tpsa": calc_tpsa(mol),
    "rotatable_bonds": calc_num_rotatable_bonds(mol, mode="strict"),
    "logp": logp,
    "formal_charge": sum(a.formal_charge() for a in mol.atoms()),
}
print(properties)

COSMolKit Tools

Loading browser workspace