vibesketch.document.rgfile¶
R-group files: R-group cores and their definitions in one V3000 molfile (#90).
The format is the CTfile V3000 R-group query (BIOVIA, “CTfile Formats”,
chapter “Rgroup query”): the root connection table, whose R-group atoms
are R# with RGROUPS=(1 n), followed by one block per definition:
M V30 BEGIN RGROUP 1
M V30 RLOGIC 2 1 1-3
M V30 BEGIN CTAB
... one connection table per member, its attachment points ATTCHPT=1 ...
M V30 END CTAB
M V30 END RGROUP
RLOGIC gives the R-group this one requires (0 for none), whether
unsubstituted positions are hydrogen (rest-H) and the occurrence. RDKit
reads and writes each connection table, but not the RGROUP blocks, which
this module adds and splits off (maintainer decisions, 2026-10-24).
Functions
|
|
|
The root molecule and the definitions of an R-group file. |
|
|
Classes
|
One R-group's definition: its members and its logic. |
Exceptions
The R-group blocks of a molfile could not be read. |
- class vibesketch.document.rgfile.Definition(number, members=<factory>, occurrence='', rest_h=False, if_then=0)[source]¶
Bases:
objectOne R-group’s definition: its members and its logic.
- exception vibesketch.document.rgfile.RgfileUnreadable[source]¶
Bases:
ValueErrorThe R-group blocks of a molfile could not be read.
- vibesketch.document.rgfile.read_rgfile(text)[source]¶
The root molecule and the definitions of an R-group file.
RDKit reads the root and each member; its
R#atoms keep their numbers and the members’ATTCHPTtheir attachment points.- Parameters:
text (str)
- Return type:
tuple[Any, list[Definition]]
- vibesketch.document.rgfile.rgfile(root, definitions)[source]¶
rootand the RGROUP blocks ofdefinitionsas one V3000 molfile.- Parameters:
root (Any)
definitions (list[Definition])
- Return type: