RDKit: Descriptor.h Source File

| RDKit Open-source cheminformatics and machine learning.

Loading...
Searching...
No Matches
Descriptor.h
Go to the documentation of this file.
1//
2//
3// Copyright (C) 2020 Schrödinger, LLC
4//
5// @@ All Rights Reserved @@
6// This file is part of the RDKit.
7// The contents are covered by the terms of the BSD license
8// which is included in the file license.txt, found at the root
9// of the RDKit source tree.
10//
11#pragma once
12
13#include <string>
14#include <stdexcept>
15
16namespace RDKit {
17namespace CIPLabeler {
18
19/**
20 * Defines a descriptor which can be assigned to an atom to indicate the type of
21 * chirality (if there is any). Each descriptor defines its general @{link
22 * Type} which can be useful when comparing centres of different geometry.
23 *
24 */
25 enum class Descriptor {
26 NONE, // Unspecified
27 UNKNOWN,
28 ns, // Other
29 /**
30 * Tetrahedral
31 */
32 R,
33 S,
34 r,
35 s,
36 /**
37 * Cis/Trans
38 */
39 seqTrans,
40 seqCis,
41 E,
42 Z,
43 /* Axial */
44 M,
45 P,
46 m,
47 p,
48
49 SP_4,
50 TBPY_5,
51 OC_6
52};
53
54 static std::string to_string(const Descriptor &desc) {
55 switch (desc) {
56 case Descriptor::NONE:
57 return "NONE";
58 case Descriptor::UNKNOWN:
59 return "UNKNOWN";
60 case Descriptor::ns:
61 return "ns";
62 case Descriptor::R:
63 return "R";
64 case Descriptor::S:
65 return "S";
66 case Descriptor::r:
67 return "r";
68 case Descriptor::s:
69 return "s";
70 case Descriptor::seqTrans:
71 return "e";
72 case Descriptor::seqCis:
73 return "z";
74 case Descriptor::E:
75 return "E";
76 case Descriptor::Z:
77 return "Z";
78 case Descriptor::M:
79 return "M";
80 case Descriptor::P:
81 return "P";
82 case Descriptor::m:
83 return "m";
84 case Descriptor::p:
85 return "p";
86 case Descriptor::SP_4:
87 return "SP_4";
88 case Descriptor::TBPY_5:
89 return "TBPY_5";
90 case Descriptor::OC_6:
91 return "OC_6";
92 }
93 throw std::runtime_error("Unknown descriptor");
94}
95
96} // namespace CIPLabeler
97} // namespace RDKit
RDKit::CIPLabeler
Definition CIPLabeler.h:27
RDKit::CIPLabeler::Descriptor
Descriptor
Definition Descriptor.h:25
RDKit::CIPLabeler::Descriptor::s
@ s
Definition Descriptor.h:35
RDKit::CIPLabeler::Descriptor::Z
@ Z
Definition Descriptor.h:42
RDKit::CIPLabeler::Descriptor::OC_6
@ OC_6
Definition Descriptor.h:51
RDKit::CIPLabeler::Descriptor::E
@ E
Definition Descriptor.h:41
RDKit::CIPLabeler::Descriptor::P
@ P
Definition Descriptor.h:45
RDKit::CIPLabeler::Descriptor::r
@ r
Definition Descriptor.h:34
RDKit::CIPLabeler::Descriptor::S
@ S
Definition Descriptor.h:33
RDKit::CIPLabeler::Descriptor::M
@ M
Definition Descriptor.h:44
RDKit::CIPLabeler::Descriptor::UNKNOWN
@ UNKNOWN
Definition Descriptor.h:27
RDKit::CIPLabeler::Descriptor::seqTrans
@ seqTrans
Definition Descriptor.h:39
RDKit::CIPLabeler::Descriptor::m
@ m
Definition Descriptor.h:46
RDKit::CIPLabeler::Descriptor::SP_4
@ SP_4
Definition Descriptor.h:49
RDKit::CIPLabeler::Descriptor::p
@ p
Definition Descriptor.h:47
RDKit::CIPLabeler::Descriptor::TBPY_5
@ TBPY_5
Definition Descriptor.h:50
RDKit::CIPLabeler::Descriptor::NONE
@ NONE
Definition Descriptor.h:26
RDKit::CIPLabeler::Descriptor::R
@ R
Definition Descriptor.h:32
RDKit::CIPLabeler::Descriptor::seqCis
@ seqCis
Definition Descriptor.h:40
RDKit::CIPLabeler::Descriptor::ns
@ ns
Definition Descriptor.h:28
RDKit::CIPLabeler::to_string
static std::string to_string(const Descriptor &desc)
Definition Descriptor.h:54
RDKit
Std stuff.
Definition Abbreviations.h:19