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 */
25enum 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 */
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
54static std::string to_string(const Descriptor &desc) {
55 switch (desc) {
57 return "NONE";
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";
71 return "e";
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";
87 return "SP_4";
89 return "TBPY_5";
91 return "OC_6";
92 }
93 throw std::runtime_error("Unknown descriptor");
94}
95
96} // namespace CIPLabeler
97} // namespace RDKit
static std::string to_string(const Descriptor &desc)
Definition Descriptor.h:54
Std stuff.
bool rdvalue_is(const RDValue_cast_t)