RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
Stereo.h
Go to the documentation of this file.
1//
2// Copyright (C) 2016 Novartis Institutes for BioMedical Research
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#pragma once
12#include "StructChecker.h"
13#include "Utilites.h"
14
15namespace RDKit {
16namespace StructureCheck {
17
18// ??? stereo parity
19static const int ODD = 1;
20static const int EVEN = 2;
21static const int UNMARKED = 3;
22
23static const int ALLENE_PARITY = -2;
24static const int ILLEGAL_REPRESENTATION = -1;
25static const int UNDEFINED_PARITY = 0;
26static const int ODD_PARITY = 1;
27static const int EVEN_PARITY = 2;
28static inline int INVERT_PARITY(int p) { return ((p) == 0 ? (0) : (3 - (p))); }
29
30// bond color:
31static const int CIS = 1;
32static const int TRANS = 2;
33
34// return codes for DubiousStereochemistry()
35static const int EITHER_BOND_FOUND = 1;
36static const int STEREO_BOND_AT_NON_STEREO_ATOM = 2;
37static const int ZEROED_Z_COORDINATES = 4;
38static const int CONVERTED_TO_2D = 8;
39/* DubiousStereochemistry:
40 * Checks if there is some ill-defined stereochemistry in the
41 * molecule *mp. The function returns a bit set integer which defines
42 * the problems encountered.
43 */
45
46/* FixDubious3DMolecule:
47 * Checks if the structure has 3D coordinates and/or flat sp3-carbons with
48 * stereo-bonds and
49 * converts the designation to 2D, clearing away any Z-component of the
50 * coordinates.
51 * Real 3D structures without stereo designations go through untouched.
52 */
54
55// Removes ill-defined stereodescriptors.
57
58/*
59 * Checks if all potential stereocenters are either completely undefined
60 * or attributed with hashes and wedges according to MDL rules.
61 */
63
64/*
65 * Checks if any two atoms in *mp come closer than 10% of the
66 * average bond length or if an atom is too close the line
67 * between two bonded atoms.
68 */
70
71/*
72 * Computes the stereo parity of atom number iatom in *mp relative
73 * to its numbering. The immediate neighbours are defined by *nbp
74 * to speed up processing.
75 */
77 const Neighbourhood &nbp);
78
79/*
80 * Sets the color field of the defined double bonds in *mp to CIS,
81 * TRANS, or NONE depending on the ligands with the lowest numbering[].
82 * It returns the number of defined double bonds found.
83 */
85 const ROMol &mol, const std::vector<RDGeom::Point3D> &points,
86 const std::vector<unsigned> &numbering, std::vector<unsigned> &bondColor);
87} // namespace StructureCheck
88} // namespace RDKit
Contains the public API of the StructChecker.
RWMol is a molecule class that is intended to be edited.
Definition RWMol.h:32
#define RDKIT_STRUCTCHECKER_EXPORT
Definition export.h:505
static const int ODD_PARITY
Definition Stereo.h:26
static const int STEREO_BOND_AT_NON_STEREO_ATOM
Definition Stereo.h:36
static const int CIS
Definition Stereo.h:31
RDKIT_STRUCTCHECKER_EXPORT int CisTransPerception(const ROMol &mol, const std::vector< RDGeom::Point3D > &points, const std::vector< unsigned > &numbering, std::vector< unsigned > &bondColor)
static const int ALLENE_PARITY
Definition Stereo.h:23
static const int ILLEGAL_REPRESENTATION
Definition Stereo.h:24
static const int TRANS
Definition Stereo.h:32
RDKIT_STRUCTCHECKER_EXPORT int AtomParity(const ROMol &mol, unsigned iatom, const Neighbourhood &nbp)
RDKIT_STRUCTCHECKER_EXPORT void RemoveDubiousStereochemistry(RWMol &mol)
RDKIT_STRUCTCHECKER_EXPORT int DubiousStereochemistry(RWMol &mol)
static const int ZEROED_Z_COORDINATES
Definition Stereo.h:37
RDKIT_STRUCTCHECKER_EXPORT bool CheckStereo(const ROMol &mol)
RDKIT_STRUCTCHECKER_EXPORT bool AtomClash(RWMol &mol, double clash_limit)
RDKIT_STRUCTCHECKER_EXPORT int FixDubious3DMolecule(RWMol &mol)
static const int EITHER_BOND_FOUND
Definition Stereo.h:35
static const int EVEN
Definition Stereo.h:20
static const int EVEN_PARITY
Definition Stereo.h:27
static const int UNDEFINED_PARITY
Definition Stereo.h:25
static const int ODD
Definition Stereo.h:19
static const int CONVERTED_TO_2D
Definition Stereo.h:38
static const int UNMARKED
Definition Stereo.h:21
static int INVERT_PARITY(int p)
Definition Stereo.h:28
Std stuff.
bool rdvalue_is(const RDValue_cast_t)