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 <cstdint>
14#include <string>
15#include <stdexcept>
16
17namespace RDKit {
18namespace CIPLabeler {
19
20/**
21 * Defines a descriptor which can be assigned to an atom to indicate the type of
22 * chirality (if there is any). Each descriptor defines its general @{link
23 * Type} which can be useful when comparing centres of different geometry.
24 *
25 */
26enum class Descriptor : uint8_t {
27 NONE, // Unspecified
29 ns, // Other
30 /**
31 * Tetrahedral
32 */
37 /**
38 * Cis/Trans
39 */
44 /* Axial */
49
53};
54
55static std::string to_string(const Descriptor &desc) {
56 switch (desc) {
58 return "NONE";
60 return "UNKNOWN";
61 case Descriptor::ns:
62 return "ns";
63 case Descriptor::R:
64 return "R";
65 case Descriptor::S:
66 return "S";
67 case Descriptor::r:
68 return "r";
69 case Descriptor::s:
70 return "s";
72 return "e";
74 return "z";
75 case Descriptor::E:
76 return "E";
77 case Descriptor::Z:
78 return "Z";
79 case Descriptor::M:
80 return "M";
81 case Descriptor::P:
82 return "P";
83 case Descriptor::m:
84 return "m";
85 case Descriptor::p:
86 return "p";
88 return "SP_4";
90 return "TBPY_5";
92 return "OC_6";
93 }
94 throw std::runtime_error("Unknown descriptor");
95}
96
97} // namespace CIPLabeler
98} // namespace RDKit
static std::string to_string(const Descriptor &desc)
Definition Descriptor.h:55
Std stuff.