openchemlib 9.23.0 → 9.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3655,6 +3655,60 @@ export declare class SSSearcherWithIndex {
3655
3655
  createIndex(molecule: Molecule): number[];
3656
3656
  }
3657
3657
 
3658
+ export type MCSRingMatchMode =
3659
+ | 'cleaveRings'
3660
+ | 'keepRings'
3661
+ | 'keepAromaticRings';
3662
+
3663
+ export interface MCSOptions {
3664
+ /**
3665
+ * How rings of the fragment are handled when building common substructures.
3666
+ * - `cleaveRings`: rings may be broken, so a partial ring can be part of the result.
3667
+ * - `keepRings`: a ring is only kept if it is entirely part of the common substructure.
3668
+ * - `keepAromaticRings`: same as `keepRings` but restricted to aromatic rings.
3669
+ * @default 'cleaveRings'
3670
+ */
3671
+ ringMatchMode?: MCSRingMatchMode;
3672
+ }
3673
+
3674
+ /**
3675
+ * Computes the maximum common substructure (MCS) between two molecules.
3676
+ */
3677
+ export declare class MCS {
3678
+ /**
3679
+ * Creates a new maximum common substructure finder.
3680
+ */
3681
+ constructor(options?: MCSOptions);
3682
+
3683
+ /**
3684
+ * Sets the pair of molecules to compare. `molecule` should contain at least
3685
+ * as many bonds as `fragment`. If `fragment` contains more than one disconnected
3686
+ * structure, only the biggest one is considered.
3687
+ * @param molecule - the (usually larger) target molecule.
3688
+ * @param fragment - the molecule whose common substructure with `molecule` is searched.
3689
+ */
3690
+ set(molecule: Molecule, fragment: Molecule): void;
3691
+
3692
+ /**
3693
+ * Returns the maximum common substructure as a `Molecule`, or `null` if no
3694
+ * common substructure was found.
3695
+ */
3696
+ getMCS(): Molecule | null;
3697
+
3698
+ /**
3699
+ * Returns the score of the maximum common substructure, defined as the number
3700
+ * of bonds of the MCS divided by the larger bond count of the two input molecules.
3701
+ * `getMCS()` (or `getAllCommonSubstructures()`) must be called first.
3702
+ */
3703
+ getScore(): number;
3704
+
3705
+ /**
3706
+ * Returns all distinct common substructures (the largest first), or `null` if
3707
+ * none was found.
3708
+ */
3709
+ getAllCommonSubstructures(): Molecule[] | null;
3710
+ }
3711
+
3658
3712
  export declare class Transformer {
3659
3713
  constructor(reactant: Molecule, product: Molecule, name: string);
3660
3714
  setMolecule(molecule: Molecule, countMode: number): number;