File: details.h

package info (click to toggle)
rdkit 202503.1-4
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 220,160 kB
  • sloc: cpp: 399,240; python: 77,453; ansic: 25,517; java: 8,173; javascript: 4,005; sql: 2,389; yacc: 1,565; lex: 1,263; cs: 1,081; makefile: 578; xml: 229; fortran: 183; sh: 105
file content (63 lines) | stat: -rw-r--r-- 2,575 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//
//  Copyright (C) 2018-2022 Greg Landrum
//
//   @@ All Rights Reserved @@
//  This file is part of the RDKit.
//  The contents are covered by the terms of the BSD license
//  which is included in the file license.txt, found at the root
//  of the RDKit source tree.
//
#include <RDGeneral/export.h>
#ifndef RD_MOLINTERCHANGEDETAILS_H_FEB2018
#define RD_MOLINTERCHANGEDETAILS_H_FEB2018
#include <GraphMol/Atom.h>
#include <GraphMol/Bond.h>
#include <GraphMol/StereoGroup.h>
namespace RDKit {
namespace MolInterchange {
constexpr int currentMolJSONVersion = 10;
constexpr int currentRDKitJSONVersion = 11;
constexpr int currentRDKitRepresentationVersion = 2;
constexpr int currentChargeRepresentationVersion = 10;
constexpr int currentQueryRepresentationVersion = 10;

static const std::map<std::string, Atom::ChiralType> chilookup = {
    {"unspecified", Atom::CHI_UNSPECIFIED},
    {"cw", Atom::CHI_TETRAHEDRAL_CW},
    {"ccw", Atom::CHI_TETRAHEDRAL_CCW},
    {"other", Atom::CHI_OTHER}};
static const std::map<Atom::ChiralType, std::string> inv_chilookup = {
    {Atom::CHI_UNSPECIFIED, "unspecified"},
    {Atom::CHI_TETRAHEDRAL_CW, "cw"},
    {Atom::CHI_TETRAHEDRAL_CCW, "ccw"},
    {Atom::CHI_OTHER, "other"}};

static const std::map<unsigned int, Bond::BondType> bolookup = {
    {0, Bond::ZERO},   {1, Bond::SINGLE},    {2, Bond::DOUBLE},
    {3, Bond::TRIPLE}, {4, Bond::QUADRUPLE}, {17, Bond::DATIVE}};
static const std::map<Bond::BondType, unsigned int> inv_bolookup = {
    {Bond::ZERO, 0},   {Bond::SINGLE, 1},    {Bond::DOUBLE, 2},
    {Bond::TRIPLE, 3}, {Bond::QUADRUPLE, 4}, {Bond::DATIVE, 17}};

static const std::map<std::string, Bond::BondStereo> stereoBondlookup = {
    {"unspecified", Bond::STEREONONE},
    {"cis", Bond::STEREOCIS},
    {"trans", Bond::STEREOTRANS},
    {"either", Bond::STEREOANY}};
static const std::map<Bond::BondStereo, std::string> inv_stereoBondlookup = {
    {Bond::STEREONONE, "unspecified"}, {Bond::STEREOCIS, "cis"},
    {Bond::STEREOTRANS, "trans"},      {Bond::STEREOZ, "cis"},
    {Bond::STEREOE, "trans"},          {Bond::STEREOANY, "either"}};

static const std::map<std::string, StereoGroupType> stereoGrouplookup = {
    {"abs", StereoGroupType::STEREO_ABSOLUTE},
    {"and", StereoGroupType::STEREO_AND},
    {"or", StereoGroupType::STEREO_OR}};
static const std::map<StereoGroupType, std::string> inv_stereoGrouplookup = {
    {StereoGroupType::STEREO_ABSOLUTE, "abs"},
    {StereoGroupType::STEREO_AND, "and"},
    {StereoGroupType::STEREO_OR, "or"}};

}  // namespace MolInterchange
}  // namespace RDKit
#endif