Expand description
SDF (structure-data format) compound files, read into a table: one row per record,
with the molecule’s name, its atom and bond counts, and every data item
(> <FIELD>) as a column.
A record is a molfile header (name, program, comment, counts line), the connection
table up to M END, then data items, and ends at $$$$. The connection table is
passed over line by line and never held. The reader takes the file a piece at a
time; a line, a value and the number of fields are bounded.
Structs§
- Field
Column - What one data field’s values were, for its type.
- SdfReader
- Reads an SDF file a piece at a time.
- Stats
- What reading noticed.
Constants§
- BATCH_
ROWS - Rows held before a batch is handed over.
- BATCH_
TEXT - Text held before a batch is handed over, whatever its rows. Each cell counts too, empty or not: every field is a column in every row, so a file of thousands of fields would otherwise hold gigabytes of empty cells in one batch.
- CORE
- The columns every SDF table starts with.
- MAX_
LINE - The longest line kept; the rest of a longer one is cut off.
- MAX_
NAME - The longest field name.
- MAX_
VALUE - The longest value kept, its lines together; the rest is cut off.
Functions§
- detail
- The SDF tab of the Info panel: the counts and each field’s type and coverage.
- item_
name - The field a data item header names: what is between
<and>, or else the first word after the>(> DT12). - looks_
like - Whether the first bytes look like an SDF file: a counts line (
V2000orV3000) on the fourth line, orM ENDfollowed by a data item or$$$$.