24 #ifndef OB_TETRANONPLANAR_H 25 #define OB_TETRANONPLANAR_H 144 template <
typename ConfigType>
145 static ConfigType
ToConfig(
const ConfigType &cfg,
unsigned long from_or_towards,
151 "OBTetraNonPlanarStereo::ToConfig : Invalid from in ConfigType struct.",
obError);
154 if (cfg.refs.size() != 3) {
156 "OBTetraNonPlanarStereo::ToConfig : Invalid refs size.",
obError);
161 ConfigType result = cfg;
162 result.from = from_or_towards;
163 result.winding = winding;
170 if (cfg.from != from_or_towards) {
172 for (
int i = 0; i < 3; ++i) {
173 if (cfg.refs.at(i) == from_or_towards) {
174 result.refs[i] = cfg.from;
183 if (winding == cfg.winding)
186 if (view == cfg.view)
190 if (result.refs.size() == 3) {
197 "OBTetraNonPlanarStereo::ToConfig : Parameter id not found in internal refs.",
obError);
203 template <
typename ConfigType>
212 template <
typename ConfigType>
221 template <
typename ConfigType>
for critical errors (e.g., cannot read a file)
Definition: oberror.h:40
OBMessageHandler obErrorLog
Global OBMessageHandler error handler.
Definition: oberror.h:187
static void ChangeView(ConfigType &cfg)
Definition: tetranonplanar.h:213
Clockwise winding.
Definition: stereo.h:131
static void Invert(ConfigType &cfg)
Definition: tetranonplanar.h:222
static void ChangeWinding(ConfigType &cfg)
Definition: tetranonplanar.h:204
Molecule Class.
Definition: mol.h:118
No Ref set (invalid Ref)
Definition: stereo.h:150
static void Permutate(Refs &refs, unsigned int i, unsigned int j)
View
Definition: stereo.h:119
Process molecular stereochemistry information.
AntiClockwise winding (or CounterClockwise)
Definition: stereo.h:132
Base class for all stereochemistry classes.
Definition: stereo.h:321
view from the atom (id parameter) towards the center atom
Definition: stereo.h:121
Winding
Definition: stereo.h:130
Base class for handling and storing non-planar stereochemistry with 4 reference atom ids...
Definition: tetranonplanar.h:91
view from center atom towards the atom (id paramater)
Definition: stereo.h:122
void ThrowError(OBError err, errorQualifier qqualifier=always)
Throw an error with an already-formatted OBError object.
Definition: oberror.cpp:163
Handle error messages, warnings, notices, etc.
static ConfigType ToConfig(const ConfigType &cfg, unsigned long from_or_towards, OBStereo::Winding winding=OBStereo::Clockwise, OBStereo::View view=OBStereo::ViewFrom)
Definition: tetranonplanar.h:145
Global namespace for all Open Babel code.
Definition: alias.h:22