RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
MolInterchange/details.h
Go to the documentation of this file.
1//
2// Copyright (C) 2018-2022 Greg Landrum
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_MOLINTERCHANGEDETAILS_H_FEB2018
12#define RD_MOLINTERCHANGEDETAILS_H_FEB2018
13#include <GraphMol/Atom.h>
14#include <GraphMol/Bond.h>
16namespace RDKit {
17namespace MolInterchange {
18constexpr int currentMolJSONVersion = 10;
19constexpr int currentRDKitJSONVersion = 11;
23
24static const std::map<std::string, Atom::ChiralType> chilookup = {
25 {"unspecified", Atom::CHI_UNSPECIFIED},
28 {"other", Atom::CHI_OTHER}};
29static const std::map<Atom::ChiralType, std::string> inv_chilookup = {
30 {Atom::CHI_UNSPECIFIED, "unspecified"},
33 {Atom::CHI_OTHER, "other"}};
34
35static const std::map<unsigned int, Bond::BondType> bolookup = {
36 {0, Bond::ZERO}, {1, Bond::SINGLE}, {2, Bond::DOUBLE},
37 {3, Bond::TRIPLE}, {4, Bond::QUADRUPLE}, {17, Bond::DATIVE}};
38static const std::map<Bond::BondType, unsigned int> inv_bolookup = {
39 {Bond::ZERO, 0}, {Bond::SINGLE, 1}, {Bond::DOUBLE, 2},
40 {Bond::TRIPLE, 3}, {Bond::QUADRUPLE, 4}, {Bond::DATIVE, 17}};
41
42static const std::map<std::string, Bond::BondStereo> stereoBondlookup = {
43 {"unspecified", Bond::STEREONONE},
44 {"cis", Bond::STEREOCIS},
45 {"trans", Bond::STEREOTRANS},
46 {"either", Bond::STEREOANY}};
47static const std::map<Bond::BondStereo, std::string> inv_stereoBondlookup = {
48 {Bond::STEREONONE, "unspecified"}, {Bond::STEREOCIS, "cis"},
49 {Bond::STEREOTRANS, "trans"}, {Bond::STEREOZ, "cis"},
50 {Bond::STEREOE, "trans"}, {Bond::STEREOANY, "either"}};
51
52static const std::map<std::string, StereoGroupType> stereoGrouplookup = {
56static const std::map<StereoGroupType, std::string> inv_stereoGrouplookup = {
60
61} // namespace MolInterchange
62} // namespace RDKit
63#endif
Defines the Atom class and associated typedefs.
Defines the class StereoGroup which stores relationships between the absolute configurations of atoms...
@ CHI_OTHER
some unrecognized type of chirality
Definition Atom.h:104
@ CHI_TETRAHEDRAL_CW
tetrahedral: clockwise rotation (SMILES @@)
Definition Atom.h:101
@ CHI_UNSPECIFIED
chirality that hasn't been specified
Definition Atom.h:100
@ CHI_TETRAHEDRAL_CCW
tetrahedral: counter-clockwise rotation (SMILES
Definition Atom.h:102
@ ZERO
Zero-order bond (from.
Definition Bond.h:78
@ QUADRUPLE
Definition Bond.h:61
@ DOUBLE
Definition Bond.h:59
@ TRIPLE
Definition Bond.h:60
@ DATIVE
standard two-electron dative
Definition Bond.h:74
@ SINGLE
Definition Bond.h:58
@ STEREOTRANS
Definition Bond.h:103
@ STEREOE
Definition Bond.h:101
@ STEREOZ
Definition Bond.h:100
@ STEREOCIS
Definition Bond.h:102
@ STEREONONE
Definition Bond.h:96
@ STEREOANY
Definition Bond.h:97
static const std::map< Atom::ChiralType, std::string > inv_chilookup
static const std::map< Bond::BondType, unsigned int > inv_bolookup
constexpr int currentRDKitRepresentationVersion
static const std::map< StereoGroupType, std::string > inv_stereoGrouplookup
constexpr int currentChargeRepresentationVersion
static const std::map< std::string, Atom::ChiralType > chilookup
constexpr int currentQueryRepresentationVersion
static const std::map< std::string, Bond::BondStereo > stereoBondlookup
static const std::map< unsigned int, Bond::BondType > bolookup
static const std::map< Bond::BondStereo, std::string > inv_stereoBondlookup
static const std::map< std::string, StereoGroupType > stereoGrouplookup
Std stuff.