RDKit: CanonicalizeStereoGroups.h Source File

| RDKit Open-source cheminformatics and machine learning.

Loading...
Searching...
No Matches
CanonicalizeStereoGroups.h
Go to the documentation of this file.
1//
2// Copyright (C) 2002-2024 RDKit contributors
3//
4// @@ All Rights Reserved @@
5// This file is part of the RDKit.
6// The contents are covered by the terms of the BSD license
7// which is included in the file license.txt, found at the root
8// of the RDKit source tree.
9//
10#include <RDGeneral/export.h>
11#ifndef RD_CANONICALIZESTEROGROUPS_H
12#define RD_CANONICALIZESTEROGROUPS_H
13
14#include <string>
15#include <vector>
16#include <memory>
17#include <cstdint>
18#include <limits>
19
20namespace RDKit {
21
22 enum class StereoGroupAbsOptions {
23 OnlyIncludeWhenOtherGroupsExist =
24 0, // when stereo groups are canonicalized, ABS groups are added only
25 // when other Stereo Groups are added this prevents a mol from having
26 // JUST an ABS stereo group
27 NeverInclude, // Abs groups are never included, Just AND and OR groups after
28 // stereo group canonicalization
29 AlwaysInclude // when stereo groups are canonicalized, ABS groups are added
30 // only when other Stereo Groups are added this prevents a mol
31 // from having JUST an ABS stereo group
32};
33
34 class RigorousEnhancedStereoException : public std::runtime_error {
35 public:
36 explicit RigorousEnhancedStereoException(std::string message)
37 : std::runtime_error(message) {};
38};
39
40 RDKIT_SMILESPARSE_EXPORT void canonicalizeStereoGroups(
41 std::unique_ptr<ROMol> &mol,
42 StereoGroupAbsOptions outputAbsoluteGroups =
43 StereoGroupAbsOptions::OnlyIncludeWhenOtherGroupsExist,
44 unsigned int maxStereoGroups = 12);
45
46} // namespace RDKit
47
48#endif
RDKit::RigorousEnhancedStereoException::RigorousEnhancedStereoException
RigorousEnhancedStereoException(std::string message)
Definition CanonicalizeStereoGroups.h:36
export.h
RDKIT_SMILESPARSE_EXPORT
#define RDKIT_SMILESPARSE_EXPORT
Definition export.h:537
RDKit
Std stuff.
Definition Abbreviations.h:19
RDKit::StereoGroupAbsOptions
StereoGroupAbsOptions
Definition CanonicalizeStereoGroups.h:22
RDKit::StereoGroupAbsOptions::OnlyIncludeWhenOtherGroupsExist
@ OnlyIncludeWhenOtherGroupsExist
Definition CanonicalizeStereoGroups.h:23
RDKit::StereoGroupAbsOptions::NeverInclude
@ NeverInclude
Definition CanonicalizeStereoGroups.h:27
RDKit::StereoGroupAbsOptions::AlwaysInclude
@ AlwaysInclude
Definition CanonicalizeStereoGroups.h:29
RDKit::canonicalizeStereoGroups
RDKIT_SMILESPARSE_EXPORT void canonicalizeStereoGroups(std::unique_ptr< ROMol > &mol, StereoGroupAbsOptions outputAbsoluteGroups=StereoGroupAbsOptions::OnlyIncludeWhenOtherGroupsExist, unsigned int maxStereoGroups=12)