OE2DRingDictionary

class OE2DRingDictionary

This class represents OE2DRingDictionary that stores ring system layouts i.e. templates that can be plugged into the 2D coordinate generation system.

See also

The following OEChem TK examples illustrate how to create and utilize user-defined ring layouts:

The following OEDepict TK example shows how to generate a multi-page PDF report of user-defined ring layouts:

Constructors

OE2DRingDictionary() -> OE2DRingDictionary

Default constructor that creates an empty ring template dictionary with default parameters.

OE2DRingDictionary(opts: OE2DRingDictionaryCreatorOptions) -> OE2DRingDictionary

Constructs an empty ring dictionary with the given parameters.

OE2DRingDictionary(filename: str) -> OE2DRingDictionary
OE2DRingDictionary(ims: oemolistream) -> OE2DRingDictionary

Initializes a ring dictionary from a binary file written by the OEWrite2DRingDictionary function.

AddRings

AddRings(mol: Union[OEGraphMol,OEMol,OEQMol]) -> int

Returns the number of ring systems extracted from the given molecule and adds them to the dictionary.

mol

The molecule with 2D coordinates.

By default, the rings are extracted and added to the dictionary by the following rules:

  • A ring system will be added to the dictionary even if a corresponding layout already exists in the built-in ring dictionary i.e. user-defined layout will have higher priority.

  • If a ring system already exists in the given dictionary then the new ring template will be ignored i.e first-come first-register.

  • If a ring system has specified cis/trans bond stereo configuration then two layouts could be added to the ring dictionary: one with the cis/trans bond stereo configuration and one pure carbon skeleton framework without any bond stereo configuration.

The rules above can be altered when the ring dictionary is constructed via the OE2DRingDictionaryCreatorOptions class.

NumRings

NumRings() -> int

Returns the number of rings stored in the dictionary.