Get Compound 3D Structure
pubchem_get_compound_3d_structureRetrieve the default 3D conformer of a PubChem compound by CID, including atomic coordinates and bonds. Output as JSON or raw SDF for docking or rendering.
Instructions
Get a compound's default 3D conformer — atomic coordinates and bonds — for one CID. format="json" (default) returns parsed atoms and bonds the model can reason over directly; format="sdf" returns the raw V2000 SDF text for passthrough to docking, rendering, or conformer tools. Optionally lists alternate conformer IDs. Not every compound has computed 3D coordinates (large molecules, mixtures, and some salts do not).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cid | Yes | PubChem Compound ID. Resolve from name/SMILES with pubchem_search_compounds. | |
| format | No | Output format. "json" (default) returns parsed atoms and bonds. "sdf" returns the raw V2000 SDF text for passthrough to other tools. | json |
| maxAtoms | No | Cap the atoms returned in the format="json" preview. atomCount always reports the full total; omitted rows are disclosed via the truncated/shownAtoms enrichment. Defaults to the first 200 atoms. | |
| maxBonds | No | Cap the bonds returned in the format="json" preview. bondCount always reports the full total; omitted rows are disclosed via the truncated/shownBonds enrichment. Defaults to the first 200 bonds. | |
| includeRawSdf | No | For format="sdf", return the complete raw V2000 SDF even when it exceeds the safe line cap. Default false: an SDF longer than 500 lines is line-capped with disclosure. No effect when format="json". | |
| includeAlternateConformerIds | No | List the IDs of additional computed conformers beyond the default. Adds one extra API call. Default: false. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cid | Yes | PubChem Compound ID. | |
| sdf | No | Raw V2000 SDF text. Populated when format="sdf". | |
| atoms | No | Parsed atoms. Populated when format="json". | |
| bonds | No | Parsed bonds. Populated when format="json". | |
| notice | No | Guidance naming which lists were capped and how to widen them. | |
| atomCap | No | The atom cap applied (explicit maxAtoms or the safe default), when the atom list was capped. | |
| bondCap | No | The bond cap applied (explicit maxBonds or the safe default), when the bond list was capped. | |
| atomCount | Yes | Number of atoms in the conformer. | |
| bondCount | Yes | Number of bonds in the conformer. | |
| truncated | No | True when the atom list, bond list, or raw SDF was capped below its total. atomCount/bondCount always report the full totals. | |
| shownAtoms | No | Atoms returned after the cap, when fewer than atomCount. Raise maxAtoms for more. | |
| shownBonds | No | Bonds returned after the cap, when fewer than bondCount. Raise maxBonds for more. | |
| conformerId | No | Default (primary) conformer ID. Present when includeAlternateConformerIds is set. | |
| shownSdfLines | No | SDF lines returned when format="sdf" and the raw text was line-capped. Set includeRawSdf for the full record. | |
| alternateConformerIds | No | Conformer IDs beyond the default. Present when includeAlternateConformerIds is set and alternates exist. |