Task tutorial

Calculate molecular weight, LogP, and TPSA

Read one SMILES and calculate three common screening descriptors from the same parsed molecule.

You will make

A small, reproducible property report that retains the input SMILES.

Steps

  1. Parse a known SMILES into a molecule object.
  2. Calculate molecular weight, LogP, and TPSA from that object.
  3. Store the original input alongside the calculated values.
mol = chematic.from_smiles("CCO")
weight = mol.mw
logp = mol.logp
tpsa = mol.tpsa

Expected result

Each value is returned for the same molecule. For ethanol, the molecular weight is about 46.07 g/mol.

If it does not work

These are calculated descriptors, not experimental measurements or a clinical prediction. If parsing fails, record the input and error instead of silently dropping the row.

Next action

Read the Python workflow guide