Draw a structure
drawDraw a chemical structure or reaction as a publication-style figure (ChemDraw-like skeletal formula) with the Lone Pair editor's renderer. Give SMILES, reaction SMILES, InChI, a molfile, a ChemDraw file, or a compound name with name=true. Refused, with the reason, instead of drawn wrongly: SMILES that cannot be read, aromatic rings that cannot alternate single and double bonds, and atoms with too many bonds (unless as_written). The result carries drawing (Lone Pair JSON to pass to edit_drawing or back in as input) and notes (anything changed on reading or lost in the format). The SVG and PNG hold the drawing inside them, so they reopen for editing at lonepair.app.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "draw"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dpi | No | PNG resolution, 300 by default; 600 for print. | |
| name | No | Set to true when `input` is a compound name (e.g. "aspirin") rather than a structure. The name is sent to PubChem to find the structure; this is the only network call the server makes. Default false. | |
| input | No | The structure as text: SMILES, reaction SMILES (reactants>agents>products), InChI, a molfile, RXN, SD file, CDXML, CML or Marvin text, or a Lone Pair drawing (the JSON from an earlier result, or the SVG text of an earlier figure). | |
| style | No | Journal style. acs = ACS Document 1996 (default), rsc = RSC, nature = Nature Reviews, slides = heavier lines for slides. | |
| format | No | png (default; returned as an image), svg (returned as text), pdf or eps (returned as base64 in `data_base64`). | |
| opaque | No | White background instead of transparent (SVG, PNG). Default false. | |
| as_written | No | Draw atoms that have too many bonds instead of refusing the structure. Default false. |