Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef OB_CISTRANS_H
00025 #define OB_CISTRANS_H
00026
00027 #include <openbabel/stereo/tetraplanar.h>
00028 #include <vector>
00029
00030 namespace OpenBabel {
00031
00034
00075 class OBAPI OBCisTransStereo : public OBTetraPlanarStereo
00076 {
00077 public:
00098 #ifndef SWIG
00099 struct OBAPI Config
00100 {
00105 Config() : begin(OBStereo::NoRef), end(OBStereo::NoRef), shape(OBStereo::ShapeU),
00106 specified(true)
00107 { }
00116 Config(unsigned long _begin, unsigned long _end, const OBStereo::Refs &_refs,
00117 OBStereo::Shape _shape = OBStereo::ShapeU) : begin(_begin), end(_end),
00118 refs(_refs), shape(_shape), specified(true)
00119 { }
00184 bool operator==(const Config &other) const;
00190 bool operator!=(const Config &other) const
00191 {
00192 return !(*this == other);
00193 }
00194
00199 unsigned long begin, end;
00200 OBStereo::Refs refs;
00201 OBStereo::Shape shape;
00202 bool specified;
00203
00204
00205 };
00206 #endif
00207
00210 OBCisTransStereo(OBMol *mol);
00214 virtual ~OBCisTransStereo();
00215
00218
00222 OBStereo::Type GetType() const { return OBStereo::CisTrans; }
00230 bool IsValid() const;
00231
00235 #ifndef SWIG
00236 void SetConfig(const Config &config);
00240 Config GetConfig(OBStereo::Shape shape = OBStereo::ShapeU) const;
00245 Config GetConfig(unsigned long start,
00246 OBStereo::Shape shape = OBStereo::ShapeU) const;
00247 #endif
00248
00254 bool operator==(const OBCisTransStereo &other) const;
00260 bool operator!=(const OBCisTransStereo &other) const
00261 {
00262 return !(*this == other);
00263 }
00265
00266
00267
00268
00269 OBGenericData* Clone(OBBase *mol) const;
00270
00271
00273
00274
00301 bool IsOnSameAtom(unsigned long id1, unsigned long id2) const;
00305 bool IsTrans(unsigned long id1, unsigned long id2) const;
00309 bool IsCis(unsigned long id1, unsigned long id2) const;
00314 unsigned long GetTransRef(unsigned long id) const;
00319 unsigned long GetCisRef(unsigned long id) const;
00321
00322 private:
00323 Config m_cfg;
00324
00325 unsigned long GetCisOrTransRef(unsigned long id, bool getcisref) const;
00326 };
00328
00329 }
00330
00331 #ifndef SWIG
00332 namespace std {
00333
00336
00353 OBAPI ostream& operator<<(ostream &out, const OpenBabel::OBCisTransStereo &ct);
00368 OBAPI ostream& operator<<(ostream &out, const OpenBabel::OBCisTransStereo::Config &cfg);
00369
00371
00372 }
00373 #endif // Not SWIG
00374
00375 #endif
00376