Task tutorial
Validate SMILES input before an analysis
Check a pasted molecular string before showing a structure or calculating properties, so an invalid input gets a clear next step.
You will make
A small local input check that distinguishes a usable SMILES string from a syntax error.
Steps
- Open the browser molecular analysis page.
- Enter a known valid SMILES such as CCO and run the analysis.
- Replace it with an incomplete value such as C1CC, then confirm that the page explains the failure instead of returning an invented result.
Valid: CCO
Invalid: C1CCExpected result
CCO produces a structure and descriptor values. The incomplete ring expression produces a visible input error.
If it does not work
A syntax error means that the text cannot be parsed as the structure you intended. It does not establish whether a successfully parsed compound is safe, purchasable, or experimentally valid.