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
- Parse a known SMILES into a molecule object.
- Calculate molecular weight, LogP, and TPSA from that object.
- Store the original input alongside the calculated values.
mol = chematic.from_smiles("CCO")
weight = mol.mw
logp = mol.logp
tpsa = mol.tpsaExpected 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.