openchemlib-utils
    Preparing search index...

    Function toVisualizerMolfile

    • Convert a molecule to a molfile object compatible with the visualizer.

      Parameters

      • molecule: Molecule

        The molecule to convert.

      • Optionaloptions: {
            atomMapNo?: boolean;
            collapseHydrogens?: boolean;
            customAtomLabel?: boolean;
            diastereotopic?: boolean;
            heavyAtomHydrogen?: boolean;
        } = {}

        Options to control atom highlighting and grouping.

        • OptionalatomMapNo?: boolean

          If true, group atoms by their atom map number. Atoms with no map number (0) are excluded from highlighting.

        • OptionalcollapseHydrogens?: boolean

          If true, remove explicit hydrogens from the molfile. Implies heavyAtomHydrogen.

        • OptionalcustomAtomLabel?: boolean

          If true, group atoms by their custom atom label. Atoms with no custom label are excluded from highlighting.

        • Optionaldiastereotopic?: boolean

          If true, group atoms by diastereotopic IDs.

        • OptionalheavyAtomHydrogen?: boolean

          If true, copy each hydrogen's highlight label to its parent heavy atom. When used with diastereotopic, implicit hydrogens are added internally to compute their diastereotopic IDs.

      Returns { _atoms: object; _highlight: any[]; type: string; value: string }

      A molfile object with highlight and atom mapping information.