write_structure_library
Write a list of small molecules as one file: SDF (V2000 or V3000), each record named and, optionally, carrying its canonical SMILES and RDKit descriptors as data fields; or SMILES or CXSMILES, one record a line followed by its name. Written as RDKit's SDWriter, MolToSmiles and MolToCXSmiles write it; a structure RDKit cannot read is left out and its index returned.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| names | No | a name per structure, in the same order (the SDF title line, the SMILES second column). | |
| _files | No | The project: record references shaped like _subject. Their records become library documents a tool names in sequences/parts/document; a trace or alignment is found by file name. | |
| format | No | the file format. Values: sdf (SDF), sdf-v3000 (SDF V3000), smiles (SMILES), cxsmiles (CXSMILES). | sdf |
| _subject | No | The record to act on: exactly one of sequence, accession (+source), sample (an id from list_samples) or file ({name, text} or {name, base64}); record_index picks one record of several. | |
| molecules | Yes | the structures: one SMILES or molfile per entry. | |
| with_properties | No | SDF only: add canonical_smiles and the RDKit descriptors to each record as data fields. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | the file | |
| unread | Yes | 0-based indices of the entries RDKit could not read, left out of the file | |
| summary | Yes | how many structures were written, of how many given, and which were left out |