Open Babel  3.0
generic.h
Go to the documentation of this file.
1 /**********************************************************************
2 generic.h - Handle generic data classes. Custom data for atoms, bonds, etc.
3 
4 Copyright (C) 1998-2001 by OpenEye Scientific Software, Inc.
5 Some portions Copyright (C) 2001-2010 by Geoffrey R. Hutchison
6 
7 This file is part of the Open Babel project.
8 For more information, see <http://openbabel.org/>
9 
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation version 2 of the License.
13 
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18 ***********************************************************************/
19 
20 #ifndef OB_GENERIC_H
21 #define OB_GENERIC_H
22 
23 #include <openbabel/babelconfig.h>
24 
25 #include <string>
26 #include <vector>
27 #include <map>
28 
30 #include <openbabel/obutil.h>
31 #include <openbabel/base.h>
32 
33 namespace OpenBabel
34 {
35 
36  // Forward declarations
37  class OBBase;
38  class OBAtom;
39  class OBBond;
40  class OBMol;
41  class OBRing;
42 
45  class OBAPI OBCommentData : public OBGenericData
46  {
47  protected:
48  std::string _data;
49  public:
50  OBCommentData();
52  virtual OBGenericData* Clone(OBBase* /*parent*/) const{return new OBCommentData(*this);}
53 
54  OBCommentData& operator=(const OBCommentData &src);
55 
56  void SetData(const std::string &data)
57  { _data = data; Trim(_data); }
58  void SetData(const char *d)
59  {_data = d; Trim(_data); }
60  const std::string &GetData() const
61  { return(_data); }
62  virtual const std::string &GetValue() const
63  { return(_data); }
64  };
65 
69  class OBAPI OBExternalBond
70  {
71  int _idx;
72  OBAtom *_atom;
73  OBBond *_bond;
74  public:
75  OBExternalBond(): _idx(0), _atom(NULL), _bond(NULL) {}
76  OBExternalBond(OBAtom *,OBBond *,int);
79 
80  int GetIdx() const { return(_idx); }
81  OBAtom *GetAtom() const { return(_atom); }
82  OBBond *GetBond() const { return(_bond); }
83  void SetIdx(int idx) { _idx = idx; }
84  void SetAtom(OBAtom *atom) { _atom = atom; }
85  void SetBond(OBBond *bond) { _bond = bond; }
86  };
87 
90  class OBAPI OBExternalBondData : public OBGenericData
91  {
92  protected:
93  std::vector<OBExternalBond> _vexbnd;
94  public:
96 
97  //Copying is not used and too much work to set up
98  virtual OBGenericData* Clone(OBBase* /*parent*/) const{return NULL;}
99 
100  void SetData(OBAtom*,OBBond*,int);
101  std::vector<OBExternalBond> *GetData()
102  {
103  return(&_vexbnd);
104  }
105  };
106 
112  class OBAPI OBPairData : public OBGenericData
113  {
114  protected:
115  std::string _value;
116  public:
117  OBPairData();
118  virtual OBGenericData* Clone(OBBase* /*parent*/) const
119  {return new OBPairData(*this);}
120  void SetValue(const char *v) { _value = v; }
121  void SetValue(const std::string &v) { _value = v; }
122  virtual const std::string &GetValue() const
123  { return(_value); }
124  };
125 
128  // More detailed description in generic.cpp
129  template <class ValueT>
130  class OBPairTemplate : public OBGenericData // Note: no OBAPI should be used
131  {
132  protected:
133  ValueT _value;
134  public:
136  OBGenericData("PairData", OBGenericDataType::PairData) {};
137  virtual OBGenericData* Clone(OBBase* /*parent*/) const
138  {return new OBPairTemplate<ValueT>(*this);}
139  void SetValue(const ValueT t) { _value = t; }
140  virtual const ValueT &GetGenericValue() const { return(_value); }
141  };
142 
149 
153  class OBAPI OBSetData : public OBGenericData
154  {
155  protected:
156  std::vector<OBGenericData *> _vdata;
157  public:
158  OBSetData() : OBGenericData("SetData", OBGenericDataType::SetData) {}
159  virtual OBGenericData* Clone(OBBase* /*parent*/) const{return new OBSetData(*this);}
160 
163  {
164  if(d)
165  {
166  _vdata.push_back(d);
167  }
168  }
169 
171  void SetData(std::vector<OBGenericData *> &vdata)
172  {
173  _vdata = vdata;
174  }
175 
177  OBGenericData *GetData(const char *s)
178  {
179  std::vector<OBGenericData*>::iterator i;
180 
181  for (i = _vdata.begin();i != _vdata.end();++i)
182  if ((*i)->GetAttribute() == s)
183  return(*i);
184 
185  return(NULL);
186  }
187 
189  OBGenericData *GetData(const std::string &s)
190  {
191  std::vector<OBGenericData*>::iterator i;
192 
193  for (i = _vdata.begin();i != _vdata.end();++i)
194  if ((*i)->GetAttribute() == s)
195  return(*i);
196 
197  return(NULL);
198  }
199 
201  virtual const std::vector<OBGenericData *> &GetData() const //now virtual and const
202  {
203  return(_vdata);
204  }
205 
207  std::vector<OBGenericData*>::iterator GetBegin()
208  {
209  return _vdata.begin();
210  }
211 
213  std::vector<OBGenericData*>::iterator GetEnd()
214  {
215  return _vdata.end();
216  }
217 
220  {
221  std::vector<OBGenericData*>::iterator i;
222  for (i = _vdata.begin();i != _vdata.end();++i)
223  if (*i == gd)
224  {
225  delete *i;
226  _vdata.erase(i);
227  break; // Done, don't do anything more, since iterator is invalid
228  }
229  }
230 
231  }; // OBSetData
232 
236  class OBAPI OBVirtualBond : public OBGenericData
237  {
238  protected:
239  unsigned int _bgn;
240  unsigned int _end;
241  unsigned int _ord;
242  int _stereo;
243  public:
244  OBVirtualBond();
245  virtual OBGenericData* Clone(OBBase* /*parent*/) const{return new OBVirtualBond(*this);}
246  OBVirtualBond(unsigned int, unsigned int, unsigned int,int stereo=0);
247  unsigned int GetBgn() { return(_bgn); }
248  unsigned int GetEnd() { return(_end); }
249  unsigned int GetOrder() { return(_ord); }
250  int GetStereo() { return(_stereo); }
251  };
252 
255  class OBAPI OBRingData : public OBGenericData
256  {
257  protected:
258  std::vector<OBRing*> _vr;
259  public:
260  OBRingData();
261  OBRingData(const OBRingData &);
262  // When copying a molecule, don't copy the RingData. Why not? Well,
263  // if you do, you'll end up with two RingDatas because one will already
264  // exist due to Kekulize() in EndModify() in operator= in OBMol. Having
265  // more than one RingData causes problems as one of them can become invalid
266  // and cause segfaults.
267  virtual OBGenericData* Clone(OBBase* /*parent*/) const{return NULL;}
268  ~OBRingData();
269 
270  OBRingData &operator=(const OBRingData &);
271 
272  void SetData(std::vector<OBRing*> &vr)
273  {
274  _vr = vr;
275  }
276  void PushBack(OBRing *r)
277  {
278  _vr.push_back(r);
279  }
280  std::vector<OBRing*> &GetData()
281  {
282  return(_vr);
283  }
284 
285  std::vector<OBRing*>::iterator BeginRings()
286  { return(_vr.begin()); }
287  std::vector<OBRing*>::iterator EndRings()
288  { return(_vr.end()); }
289  OBRing *BeginRing(std::vector<OBRing*>::iterator &i);
290  OBRing *NextRing(std::vector<OBRing*>::iterator &i);
291  };
292 
297  class OBAPI OBUnitCell: public OBGenericData
298  {
299  public:
305  Rhombohedral ,
307  Cubic};
308 
309 
310  protected:
311  matrix3x3 _mOrtho;// Orthogonal matrix of column vectors
312  matrix3x3 _mOrient;// Orientation matrix
314  std::string _spaceGroupName;
317  public:
319  OBUnitCell();
320  OBUnitCell(const OBUnitCell &);
321  virtual OBGenericData* Clone(OBBase* /*parent*/) const
322  {return new OBUnitCell(*this);}
324 
325  OBUnitCell &operator=(const OBUnitCell &);
326 
336  void SetData(const double a, const double b, const double c,
337  const double alpha, const double beta, const double gamma);
345  void SetData(const vector3 v1, const vector3 v2, const vector3 v3);
346 
352  void SetData(const matrix3x3 m);
353 
355  void SetOffset(const vector3 v1);
356 
359  void SetSpaceGroup(const SpaceGroup* sg) { _spaceGroup = sg; }
360 
364  void SetSpaceGroup(const std::string sg) { _spaceGroup = SpaceGroup::GetSpaceGroup (sg);
365  _spaceGroupName = sg; }
366 
372  void SetSpaceGroup(const int sg) { _spaceGroup = SpaceGroup::GetSpaceGroup (sg); }
373 
375  void SetLatticeType(const LatticeType lt) { _lattice = lt; }
376 
379  void FillUnitCell(OBMol *);
380 
382 
384  double GetA();
385  double GetA() const;
387  double GetB();
388  double GetB() const;
390  double GetC();
391  double GetC() const;
393  double GetAlpha();
394  double GetAlpha() const;
396  double GetBeta();
397  double GetBeta() const;
399  double GetGamma();
400  double GetGamma() const;
402  vector3 GetOffset();
403  vector3 GetOffset() const;
404 
406  const SpaceGroup* GetSpaceGroup() { return(_spaceGroup); }
407  const SpaceGroup* GetSpaceGroup() const { return(_spaceGroup); }
408 
410  const std::string GetSpaceGroupName() { return(_spaceGroupName); }
411  const std::string GetSpaceGroupName() const { return(_spaceGroupName); }
412 
414  LatticeType GetLatticeType( int spacegroup );
415  LatticeType GetLatticeType( int spacegroup ) const;
416 
418  LatticeType GetLatticeType();
419  LatticeType GetLatticeType() const;
420 
422  std::vector<vector3> GetCellVectors();
423  std::vector<vector3> GetCellVectors() const;
432  matrix3x3 GetCellMatrix();
433  matrix3x3 GetCellMatrix() const;
440  matrix3x3 GetOrthoMatrix();
441  matrix3x3 GetOrthoMatrix() const;
451  matrix3x3 GetOrientationMatrix();
452  matrix3x3 GetOrientationMatrix() const;
459  matrix3x3 GetFractionalMatrix();
460  matrix3x3 GetFractionalMatrix() const;
461 
468  vector3 FractionalToCartesian(vector3 frac);
469  vector3 FractionalToCartesian(vector3 frac) const;
476  vector3 CartesianToFractional(vector3 cart);
477  vector3 CartesianToFractional(vector3 cart) const;
478 
482  vector3 WrapCartesianCoordinate(vector3 cart);
483  vector3 WrapCartesianCoordinate(vector3 cart) const;
488  vector3 WrapFractionalCoordinate(vector3 frac);
489  vector3 WrapFractionalCoordinate(vector3 frac) const;
490 
492  int GetSpaceGroupNumber( std::string name = "" );
493  int GetSpaceGroupNumber( std::string name = "" ) const;
495  double GetCellVolume();
496  double GetCellVolume() const;
497  };
498 
504  class OBAPI OBConformerData: public OBGenericData
505  {
506  protected:
508  std::vector<unsigned short> _vDimension;
510  std::vector<double> _vEnergies;
512  std::vector< std::vector< vector3 > > _vForces;
514  std::vector< std::vector< vector3 > > _vVelocity;
516  std::vector< std::vector< vector3 > > _vDisplace;
518  std::vector<std::string> _vData;
519 
520  public:
521  OBConformerData();
523  virtual OBGenericData* Clone(OBBase* /*parent*/) const{return new OBConformerData(*this);}
525 
526  OBConformerData &operator=(const OBConformerData &);
527 
528  void SetDimension(std::vector<unsigned short> vd) { _vDimension = vd; }
529  void SetEnergies(std::vector<double> ve) { _vEnergies = ve; }
530  void SetForces(std::vector< std::vector< vector3 > > vf) {_vForces = vf;}
531  void SetVelocities(std::vector< std::vector< vector3 > > vv)
532  { _vVelocity = vv; }
533  void SetDisplacements(std::vector< std::vector< vector3 > > vd)
534  { _vDisplace = vd; }
535  void SetData(std::vector<std::string> vdat) { _vData = vdat; }
536 
537  std::vector<unsigned short> GetDimension() { return _vDimension; }
538  std::vector<double> GetEnergies() { return _vEnergies; }
539  std::vector< std::vector< vector3 > > GetForces() {return _vForces; }
540  std::vector< std::vector< vector3 > > GetVelocities()
541  {return _vVelocity;}
542  std::vector< std::vector< vector3 > > GetDisplacements()
543  {return _vDisplace;}
544  std::vector<std::string> GetData() { return _vData; }
545 
546  };
547 
552  class OBAPI OBSymmetryData: public OBGenericData
553  {
554  protected:
555  std::string _spaceGroup;
556  std::string _pointGroup;
557  public:
558  OBSymmetryData();
560  virtual OBGenericData* Clone(OBBase* /*parent*/) const{return new OBSymmetryData(*this);}
562 
563  OBSymmetryData &operator=(const OBSymmetryData &);
564 
565  void SetData(std::string pg, std::string sg = "")
566  { _pointGroup = pg; _spaceGroup = sg; }
567  void SetPointGroup(std::string pg) { _pointGroup = pg; }
568  void SetSpaceGroup(std::string sg) { _spaceGroup = sg; }
569 
570  std::string GetPointGroup() { return _pointGroup; }
571  std::string GetSpaceGroup() { return _spaceGroup; }
572  };
573 
577  class OBAPI OBTorsion
578  {
579  friend class OBMol;
580  friend class OBTorsionData;
581 
582  protected:
583  std::pair<OBAtom*,OBAtom*> _bc;
585  std::vector<triple<OBAtom*,OBAtom*,double> > _ads;
586 
587  OBTorsion(): _bc((OBAtom *)NULL, (OBAtom *)NULL) { }
588  //protected for use only by friend classes
589  OBTorsion(OBAtom *, OBAtom *, OBAtom *, OBAtom *);
590 
591  std::vector<quad<OBAtom*,OBAtom*,OBAtom*,OBAtom*> > GetTorsions();
592 
593  public:
594  OBTorsion(const OBTorsion &);
596 
597  OBTorsion& operator=(const OBTorsion &);
598 
599  void Clear();
600  bool Empty() { return(_bc.first == 0 && _bc.second == 0); }
601 
602  bool AddTorsion(OBAtom *a,OBAtom *b, OBAtom *c,OBAtom *d);
603  bool AddTorsion(quad<OBAtom*,OBAtom*,OBAtom*,OBAtom*> &atoms);
604 
605  bool SetAngle(double radians, unsigned int index = 0);
606  bool SetData(OBBond * /*bond*/) { return false; }
607 
608  bool GetAngle(double &radians, unsigned int index =0);
611  unsigned int GetBondIdx();
612  size_t GetSize() const { return _ads.size(); }
613 
616  std::pair<OBAtom*,OBAtom*> GetBC()
617  {
618  return(_bc);
619  }
622  std::vector<triple<OBAtom*,OBAtom*,double> > GetADs()
623  {
624  return(_ads) ;
625  }
626 
627  bool IsProtonRotor();
628  };
629 
634  class OBAPI OBTorsionData : public OBGenericData
635  {
636  friend class OBMol;
637 
638  protected:
639  std::vector<OBTorsion> _torsions;
640 
641  OBTorsionData();
642  OBTorsionData(const OBTorsionData &);
643 
644  public:
645  OBTorsionData &operator=(const OBTorsionData &);
646 
648  virtual OBGenericData* Clone(OBBase* /*parent*/) const
649  {return new OBTorsionData(*this);}
650 
651  void Clear();
652 
655  std::vector<OBTorsion> GetData() const
656  {
657  return _torsions;
658  }
659 
662  size_t GetSize() const
663  {
664  return _torsions.size();
665  }
666 
667  void SetData(OBTorsion &torsion);
668 
669  bool FillTorsionArray(std::vector<std::vector<unsigned int> > &torsions);
670  };
671 
674  class OBAPI OBAngle
675  {
676  friend class OBMol;
677  friend class OBAngleData;
678 
679  protected:
680 
681  //member data
682 
684  std::pair<OBAtom*,OBAtom*> _termini;
685  double _radians;
686 
687  //protected member functions
688 
689  OBAngle(); //protect constructor for use only by friend classes
690  OBAngle(OBAtom *vertex,OBAtom *a,OBAtom *b);
691 
693  void SortByIndex();
694 
695  public:
696 
697  OBAngle(const OBAngle &);
699  {
700  _vertex = NULL;
701  }
702 
703  OBAngle &operator = (const OBAngle &);
704  bool operator ==(const OBAngle &);
705 
706  void Clear();
707 
710  double GetAngle() const
711  {
712  return(_radians);
713  }
716  void SetAngle(double angle)
717  {
718  _radians = angle;
719  }
720  void SetAtoms(OBAtom *vertex,OBAtom *a,OBAtom *b);
721  void SetAtoms(triple<OBAtom*,OBAtom*,OBAtom*> &atoms);
722 
723  };
724 
727  class OBAPI OBAngleData : public OBGenericData
728  {
729  friend class OBMol;
730 
731  protected:
732  std::vector<OBAngle> _angles;
733 
734  OBAngleData();
735  OBAngleData(const OBAngleData &);
737 
738  std::vector<OBAngle> GetData() const
739  {
740  return(_angles);
741  }
742 
743  public:
744  OBAngleData &operator =(const OBAngleData &);
745  virtual OBGenericData* Clone(OBBase* /*parent*/) const
746  {return new OBAngleData(*this);}
747 
748  void Clear();
749  unsigned int FillAngleArray(int **angles, unsigned int &size);
750  bool FillAngleArray(std::vector<std::vector<unsigned int> > &angles);
751 
752  void SetData(OBAngle &);
755  size_t GetSize() const
756  {
757  return _angles.size();
758  }
759  };
760 
761 
765  {
766  protected:
767  std::map<int, OBAtom*> _serialMap;
768 
769  public:
770 
772  OBGenericData("obSerialNums", OBGenericDataType::SerialNums)
773  {}
774 
776  {
777  _serialMap = cp._serialMap;
778  }
781  virtual OBGenericData* Clone(OBBase* /*parent*/) const
782  {return new OBSerialNums(*this);}
783 
784  std::map<int,OBAtom*> &GetData() { return _serialMap; }
785  void SetData(std::map<int,OBAtom*> &sm) { _serialMap = sm; }
786 
787  };
788 
791  class OBAPI OBVibrationData: public OBGenericData
792  {
793  protected:
795  std::vector< std::vector< vector3 > > _vLx;
796 
798  std::vector<double> _vFrequencies;
799 
801  std::vector<double> _vIntensities;
802 
804  std::vector<double> _vRamanActivities;
805 
806  public:
807  OBVibrationData(): OBGenericData("VibrationData", OBGenericDataType::VibrationData){};
808  virtual ~OBVibrationData() {}
809  virtual OBGenericData* Clone(OBBase*) const
810  {return new OBVibrationData(*this);}
811 
812  OBVibrationData & operator=(const OBVibrationData &);
813 
814  void SetData(const std::vector< std::vector< vector3 > > & lx,
815  const std::vector<double> & frequencies,
816  const std::vector<double> & intensities);
817  void SetData(const std::vector< std::vector< vector3 > > &,
818  const std::vector<double> &,
819  const std::vector<double> &,
820  const std::vector<double> &);
821 
822  std::vector< std::vector< vector3 > > GetLx() const
823  { return this->_vLx; }
824  std::vector<double> GetFrequencies() const
825  { return this->_vFrequencies; }
826  std::vector<double> GetIntensities() const
827  { return this->_vIntensities; }
828  std::vector<double> GetRamanActivities() const
829  { return this->_vRamanActivities; }
830 
831  unsigned int GetNumberOfFrequencies() const;
832 };
833 
836  class OBAPI OBDOSData: public OBGenericData
837  {
838  protected:
840  double _fermi;
841 
843  std::vector<double> _vEnergies;
844 
846  std::vector<double> _vDensities;
847 
849  std::vector<double> _vIntegration;
850 
851  public:
852  OBDOSData(): OBGenericData("DOSData", OBGenericDataType::DOSData){};
853  virtual ~OBDOSData() {}
854  virtual OBGenericData* Clone(OBBase*) const
855  {return new OBDOSData(*this);}
856 
857  OBDOSData & operator=(const OBDOSData &);
858 
859  void SetData(double,
860  const std::vector<double> &,
861  const std::vector<double> &,
862  const std::vector<double> &);
863 
864  double GetFermiEnergy() const
865  { return this->_fermi; }
866  std::vector<double> GetEnergies() const
867  { return this->_vEnergies; }
868  std::vector<double> GetDensities() const
869  { return this->_vDensities; }
870  std::vector<double> GetIntegration() const
871  { return this->_vIntegration; }
872  };
873 
877  class OBAPI OBOrbital
878  {
879  friend class OBOrbitalData;
880  protected:
881  double _energy;
882  double _occupation;
883  std::string _mullikenSymbol;
884  public:
885  void SetData(double energy, double occupation = 2.0, std::string symbol = "A")
886  { _energy = energy; _occupation = occupation; _mullikenSymbol = symbol; }
887 
888  double GetEnergy() const { return _energy; }
889  double GetOccupation() const { return _occupation; }
890  std::string GetSymbol() const { return _mullikenSymbol; }
891  };
892 
895  class OBAPI OBOrbitalData: public OBGenericData
896  {
897  public:
898  OBOrbitalData(): OBGenericData("OrbitalData", OBGenericDataType::ElectronicData),
899  _alphaHOMO(0), _betaHOMO(0), _openShell(false) {};
900  virtual ~OBOrbitalData() {}
901  virtual OBGenericData* Clone(OBBase*) const
902  {return new OBOrbitalData(*this);}
903 
904  OBOrbitalData & operator=(const OBOrbitalData &);
905 
906  void SetAlphaOrbitals(std::vector<OBOrbital> orbitalList)
907  { _alphaOrbitals = orbitalList; }
908  void SetBetaOrbitals(std::vector<OBOrbital> orbitalList)
909  { _betaOrbitals = orbitalList; }
910  void SetHOMO(int alpha, int beta = 0)
911  { _alphaHOMO = alpha; _betaHOMO = beta; }
912  void SetOpenShell(bool openShell)
913  { _openShell = openShell; }
914 
915  bool IsOpenShell() { return _openShell; }
916 
917  unsigned int GetAlphaHOMO() { return _alphaHOMO; }
918  unsigned int GetBetaHOMO() { return _betaHOMO; }
919  std::vector<OBOrbital> GetAlphaOrbitals() { return _alphaOrbitals; }
920  std::vector<OBOrbital> GetBetaOrbitals() { return _betaOrbitals; }
921 
924  void LoadClosedShellOrbitals(std::vector<double> energies, std::vector<std::string> symmetries, unsigned int alphaHOMO);
926  void LoadAlphaOrbitals(std::vector<double> energies, std::vector<std::string> symmetries, unsigned int alphaHOMO);
928  void LoadBetaOrbitals(std::vector<double> energies, std::vector<std::string> symmetries, unsigned int betaHOMO);
929 
930  protected:
931  std::vector<OBOrbital> _alphaOrbitals;
932  std::vector<OBOrbital> _betaOrbitals;
933  unsigned int _alphaHOMO;
934  unsigned int _betaHOMO;
935  bool _openShell;
936  };
937 
941  {
942  protected:
944  std::vector<double> _vWavelengths;
945 
947  std::vector<double> _vForces;
948 
950  std::vector<double> _vEDipole;
951 
953  std::vector<double> _vRotatoryStrengthsVelocity;
954 
956  std::vector<double> _vRotatoryStrengthsLength;
957 
958  public:
959  OBElectronicTransitionData(): OBGenericData("ElectronicTransitionData", OBGenericDataType::ElectronicTransitionData) {}
961  virtual OBGenericData* Clone(OBBase*) const
962  {return new OBElectronicTransitionData(*this);}
963 
965 
966  void SetData(const std::vector<double> & wavelengths,
967  const std::vector<double> & forces);
968 
969  void SetEDipole(const std::vector<double> &);
970  void SetRotatoryStrengthsVelocity(const std::vector<double> &);
971  void SetRotatoryStrengthsLength(const std::vector<double> &);
972 
973  std::vector<double> GetWavelengths() const
974  { return this->_vWavelengths; }
975  std::vector<double> GetForces() const
976  { return this->_vForces; }
977  std::vector<double> GetEDipole() const
978  { return this->_vEDipole; }
979  std::vector<double> GetRotatoryStrengthsVelocity() const
980  { return this->_vRotatoryStrengthsVelocity; }
981  std::vector<double> GetRotatoryStrengthsLength() const
982  { return this->_vRotatoryStrengthsLength; }
983 };
984 
987  class OBAPI OBRotationData: public OBGenericData
988  {
989  public:
990  enum RType{UNKNOWN, ASYMMETRIC, SYMMETRIC, LINEAR};
991  OBRotationData(): OBGenericData("RotationData", OBGenericDataType::RotationData){}
992  virtual ~OBRotationData(){};
993  virtual OBGenericData* Clone(OBBase*) const
994  {return new OBRotationData(*this);}
995  void SetData(RType RotorType, std::vector<double> RotationalConstants, int SymmetryNumber)
996  {
997  RotConsts = RotationalConstants;
998  type = RotorType;
999  SymNum = SymmetryNumber;
1000  }
1001 
1003  std::vector<double> GetRotConsts()const{ return RotConsts; }
1004 
1005  int GetSymmetryNumber()const{ return SymNum; }
1006  RType GetRotorType()const { return type; }
1007 
1008  protected:
1009  std::vector<double> RotConsts;
1010  int SymNum;
1012  };
1013 
1017  class OBAPI OBVectorData: public OBGenericData
1018  {
1019  public:
1020  OBVectorData(): OBGenericData("VectorData", OBGenericDataType::VectorData){}
1021  virtual ~OBVectorData(){};
1022  virtual OBGenericData* Clone(OBBase*) const
1023  {return new OBVectorData(*this);}
1024  void SetData(double x, double y, double z)
1025  { _vec = vector3(x, y, z); }
1026  void SetData(vector3 data)
1027  { _vec = data; }
1029  { return _vec; }
1030 
1031  protected:
1033  };
1034 
1038  class OBAPI OBMatrixData: public OBGenericData
1039  {
1040  public:
1041  OBMatrixData(): OBGenericData("MatrixData", OBGenericDataType::MatrixData){}
1042  virtual ~OBMatrixData(){};
1043  virtual OBGenericData* Clone(OBBase*) const
1044  {return new OBMatrixData(*this);}
1045  void SetData(matrix3x3 data)
1046  { _matrix = data; }
1048  { return _matrix; }
1049 
1050  protected:
1052  };
1053 
1057  class OBAPI OBFreeGridPoint
1058  {
1059  protected:
1060  double _x,_y,_z,_V;
1061 
1062  public:
1064  OBFreeGridPoint(double x,double y,double z,double V) { _x = x; _y = y; _z = z; _V = V; }
1066  double GetX() { return _x; }
1067  double GetY() { return _y; }
1068  double GetZ() { return _z; }
1069  double GetV() { return _V; }
1070  void SetX(double x) { _x = x; }
1071  void SetY(double y) { _y = y; }
1072  void SetZ(double z) { _z = z; }
1073  void SetV(double V) { _V = V; }
1074  };
1075 
1077  typedef std::vector<OBFreeGridPoint*>::iterator OBFreeGridPointIterator;
1078 
1082  class OBAPI OBFreeGrid: public OBGenericData
1083  {
1084  protected:
1085  std::vector<OBFreeGridPoint*> _points;
1086  public:
1087 
1089  {
1090  }
1091 
1093  {
1094  //delete _points;
1095  }
1096 
1097  int NumPoints()
1098  {
1099  return (int)_points.size();
1100  }
1101 
1102  void AddPoint(double x,double y,double z, double V)
1103  {
1104  _points.push_back(new OpenBabel::OBFreeGridPoint(x,y,z,V));
1105  }
1106 
1107  OBFreeGridPointIterator BeginPoints()
1108  {
1109  return _points.begin();
1110  }
1111 
1112  OBFreeGridPointIterator EndPoints()
1113  {
1114  return _points.begin() + NumPoints();
1115  }
1116 
1117  OBFreeGridPoint *BeginPoint(OBFreeGridPointIterator &i)
1118  {
1119  i = _points.begin();
1120  return((i == _points.end()) ? (OBFreeGridPoint*)NULL : (OBFreeGridPoint*)*i);
1121  }
1122 
1123  OBFreeGridPoint *NextPoint(OBFreeGridPointIterator &i)
1124  {
1125  ++i;
1126  return((i == _points.end()) ? (OBFreeGridPoint*)NULL : (OBFreeGridPoint*)*i);
1127  }
1128 
1129  void Clear();
1130 
1131  };
1132 
1133  class OBAPI OBPcharge: public OBGenericData
1134  {
1135  protected:
1136  std::vector<double> _PartialCharge;
1137  public:
1140 
1142  {
1143  return (int)_PartialCharge.size();
1144  }
1145 
1146  void AddPartialCharge(std::vector<double> q)
1147  {
1148  _PartialCharge = q;
1149  }
1150 
1151  std::vector<double> GetPartialCharge()
1152  {
1153  return _PartialCharge;
1154  }
1155  };
1156 
1158  typedef std::vector<OBGenericData*>::iterator OBDataIterator;
1159 
1160 } //end namespace OpenBabel
1161 
1162 #endif // OB_GENERIC_H
1163 
std::vector< double > GetWavelengths() const
Definition: generic.h:973
OBFreeGridPoint * NextPoint(OBFreeGridPointIterator &i)
Definition: generic.h:1123
std::vector< double > GetRamanActivities() const
Definition: generic.h:828
std::string GetSymbol() const
Definition: generic.h:890
virtual OBGenericData * Clone(OBBase *) const
Definition: generic.h:648
OBTorsion()
Definition: generic.h:587
static const SpaceGroup * GetSpaceGroup(char const *name)
Definition: spacegroup.cpp:372
Definition: generic.h:306
OBPairTemplate()
Definition: generic.h:135
void SetSpaceGroup(const int sg)
Definition: generic.h:372
Definition: generic.h:1133
std::vector< double > _vDensities
Density of corresponding energy level (number of states / unit cell)
Definition: generic.h:846
Used to store the SSSR set (filled in by OBMol::GetSSSR())
Definition: generic.h:255
double _fermi
Fermi energy (eV) as shown in _vEnergies.
Definition: generic.h:840
unsigned int GetOrder()
Definition: generic.h:249
double _z
Definition: generic.h:1060
void AddData(OBGenericData *d)
Add an OBGenericData element to the set.
Definition: generic.h:162
void SetOpenShell(bool openShell)
Definition: generic.h:912
virtual OBGenericData * Clone(OBBase *) const
Definition: generic.h:901
virtual OBGenericData * Clone(OBBase *) const
Definition: generic.h:159
OBAtom * _vertex
Definition: generic.h:683
OBSerialNums(const OBSerialNums &cp)
Definition: generic.h:775
virtual OBGenericData * Clone(OBBase *) const
Definition: generic.h:137
~OBExternalBond()
Definition: generic.h:78
double _radians
Definition: generic.h:685
void SetData(std::vector< std::string > vdat)
Definition: generic.h:535
void AddPoint(double x, double y, double z, double V)
Definition: generic.h:1102
virtual ~OBRotationData()
Definition: generic.h:992
vector3 _vec
3D vector to be stored
Definition: generic.h:1032
virtual ~OBVectorData()
Definition: generic.h:1021
void SetData(const char *d)
Definition: generic.h:58
Used to hold all angles in a molecule as generic data for OBMol.
Definition: generic.h:727
LatticeType
Definition: generic.h:300
OBFreeGridPoint()
Definition: generic.h:1063
Used to store a comment string (can be multiple lines long)
Definition: generic.h:45
bool Empty()
Definition: generic.h:600
Vibrational modes, frequencies, etc.
Definition: base.h:126
std::vector< std::vector< vector3 > > GetDisplacements()
Definition: generic.h:542
std::vector< double > GetDensities() const
Definition: generic.h:868
Base class for generic data.
Definition: base.h:188
~OBPcharge()
Definition: generic.h:1139
double GetV()
Definition: generic.h:1069
std::vector< double > GetForces() const
Definition: generic.h:975
std::vector< OBGenericData * > _vdata
Definition: generic.h:156
std::string _pointGroup
Definition: generic.h:556
Matrix data (i.e., a 3x3 matrix like a rotation or quadrupole moment)
Definition: base.h:144
void SetX(double x)
Definition: generic.h:1070
void SetBond(OBBond *bond)
Definition: generic.h:85
OBSetData()
Definition: generic.h:158
Definition: generic.h:301
OBDOSData()
Definition: generic.h:852
std::string _data
Definition: generic.h:48
std::string _value
The data for this key/value pair.
Definition: generic.h:115
virtual OBGenericData * Clone(OBBase *) const
Definition: generic.h:118
double GetY()
Definition: generic.h:1067
void SetData(vector3 data)
Definition: generic.h:1026
OBFreeGridPoint * BeginPoint(OBFreeGridPointIterator &i)
Definition: generic.h:1117
const std::string GetSpaceGroupName() const
Definition: generic.h:411
OBSerialNums()
Definition: generic.h:771
Used to hold a 3x3 matrix item (e.g., a quadrupole moment)
Definition: generic.h:1038
Stores information on rings in a molecule from SSSR perception.
Definition: ring.h:40
void SetVelocities(std::vector< std::vector< vector3 > > vv)
Definition: generic.h:531
double GetEnergy() const
Definition: generic.h:888
Base classes to build a graph.
std::string _spaceGroupName
Definition: generic.h:314
virtual ~OBDOSData()
Definition: generic.h:853
OBFreeGridPointIterator BeginPoints()
Definition: generic.h:1107
Used to hold data on conformers or geometry optimization steps.
Definition: generic.h:504
std::vector< std::vector< vector3 > > GetForces()
Definition: generic.h:539
matrix3x3 _mOrient
Definition: generic.h:312
void SetBetaOrbitals(std::vector< OBOrbital > orbitalList)
Definition: generic.h:908
std::vector< double > _vEnergies
Relative energies of conformers (preferably in kJ/mol)
Definition: generic.h:510
int GetStereo()
Definition: generic.h:250
A 4-element templated, based on the design of the STL pair<>
Definition: obutil.h:287
std::vector< double > _vEnergies
Energy levels (eV)
Definition: generic.h:843
~OBFreeGridPoint()
Definition: generic.h:1065
void SetSpaceGroup(const SpaceGroup *sg)
Definition: generic.h:359
void SetValue(const ValueT t)
Definition: generic.h:139
OBPairTemplate< double > OBPairFloatingPoint
Store arbitrary key/value floating point data like OBPairData.
Definition: generic.h:146
~OBSymmetryData()
Definition: generic.h:561
std::vector< OBTorsion > _torsions
Definition: generic.h:639
virtual OBGenericData * Clone(OBBase *) const
Definition: generic.h:809
std::string GetSpaceGroup()
Definition: generic.h:571
std::vector< double > _vRamanActivities
Raman activities.
Definition: generic.h:804
void SetData(double x, double y, double z)
Definition: generic.h:1024
OBPairTemplate< int > OBPairInteger
Store arbitrary key/value integer data like OBPairData.
Definition: generic.h:144
std::vector< double > GetRotConsts() const
Definition: generic.h:1003
virtual OBGenericData * Clone(OBBase *) const
Definition: generic.h:245
std::vector< OBExternalBond > * GetData()
Definition: generic.h:101
double _occupation
usually 0, 1, or 2, but can be fractional (e.g., solid-state calcs)
Definition: generic.h:882
Used to hold information about orbital energies.
Definition: generic.h:895
int NumPoints()
Definition: generic.h:1097
Used to store information on an external bond (e.g., SMILES fragments)
Definition: generic.h:69
const SpaceGroup * _spaceGroup
Definition: generic.h:315
void SetSpaceGroup(std::string sg)
Definition: generic.h:568
virtual ~OBVibrationData()
Definition: generic.h:808
int SymNum
Rotational Symmetry Number.
Definition: generic.h:1010
OBFreeGridPointIterator EndPoints()
Definition: generic.h:1112
Bond class.
Definition: bond.h:58
Used to hold density of states information.
Definition: generic.h:836
double _energy
in electron volts
Definition: generic.h:881
std::vector< double > RotConsts
Rotational constants in GHz.
Definition: generic.h:1009
std::vector< std::vector< vector3 > > _vForces
Atomic forces for each conformer.
Definition: generic.h:512
Used to hold the 3 atoms in an angle and the angle itself.
Definition: generic.h:674
std::vector< double > GetIntensities() const
Definition: generic.h:826
Used to hold torsions as generic data for OBMol.
Definition: generic.h:634
OBGenericData * GetData(const char *s)
Definition: generic.h:177
Used to hold the torsion data for a single rotatable bond and all four atoms around it...
Definition: generic.h:577
Molecule Class.
Definition: mol.h:118
std::vector< std::vector< vector3 > > _vVelocity
Atomic velocities for each conformer (e.g., trajectories)
Definition: generic.h:514
Electronic transition data (e.g., UV/Vis, excitation energies, etc.)
Definition: base.h:153
std::vector< triple< OBAtom *, OBAtom *, double > > _ads
double is angle in radians
Definition: generic.h:585
virtual ~OBMatrixData()
Definition: generic.h:1042
std::map< int, OBAtom * > & GetData()
Definition: generic.h:784
std::map< int, OBAtom * > _serialMap
map between serial num
Definition: generic.h:767
Used to temporarily store bonds that reference an atom that has not yet been added to a molecule...
Definition: generic.h:236
double GetAngle() const
Definition: generic.h:710
void SetLatticeType(const LatticeType lt)
Set the Bravais lattice type for this unit cell.
Definition: generic.h:375
std::vector< std::string > GetData()
Definition: generic.h:544
Rotational energy information.
Definition: base.h:129
int GetIdx() const
Definition: generic.h:80
void SetY(double y)
Definition: generic.h:1071
std::string _spaceGroup
Definition: generic.h:555
unsigned int _bgn
Definition: generic.h:239
virtual ~OBOrbitalData()
Definition: generic.h:900
~OBAngle()
Definition: generic.h:698
A 3-element templated, based on the design of the STL pair<>
Definition: obutil.h:251
bool _openShell
Whether we store both alpha and beta spin-orbitals (i.e., a restricted open-shell or unrestricted cal...
Definition: generic.h:935
Set Data (a set of OBGenericData)
Definition: base.h:135
Definition: generic.h:302
LatticeType _lattice
Definition: generic.h:316
OBElectronicTransitionData()
Definition: generic.h:959
std::string _mullikenSymbol
symmetry designation
Definition: generic.h:883
size_t GetSize() const
Definition: generic.h:612
virtual OBGenericData * Clone(OBBase *) const
Definition: generic.h:98
unsigned int _end
Definition: generic.h:240
double GetOccupation() const
Definition: generic.h:889
Definition: generic.h:300
void SetHOMO(int alpha, int beta=0)
Definition: generic.h:910
std::vector< triple< OBAtom *, OBAtom *, double > > GetADs()
Definition: generic.h:622
double GetFermiEnergy() const
Definition: generic.h:864
virtual OBGenericData * Clone(OBBase *) const
Definition: generic.h:321
Definition: generic.h:303
void SetData(const std::string &data)
Definition: generic.h:56
OBAtom * GetAtom() const
Definition: generic.h:81
virtual OBGenericData * Clone(OBBase *) const
Definition: generic.h:745
std::vector< std::vector< vector3 > > _vDisplace
Atomic displacements for each conformer (e.g., RMS distances)
Definition: generic.h:516
Used to store arbitrary text attribute/value relationships.
Definition: generic.h:112
std::vector< std::vector< vector3 > > GetLx() const
Definition: generic.h:822
void SetDisplacements(std::vector< std::vector< vector3 > > vd)
Definition: generic.h:533
Arbitrary key/value data, i.e., OBPairData.
Definition: base.h:70
OBFreeGrid()
Definition: generic.h:1088
void SetData(std::vector< OBGenericData *> &vdata)
Set the array of data to a new vector.
Definition: generic.h:171
double GetZ()
Definition: generic.h:1068
std::vector< unsigned short > GetDimension()
Definition: generic.h:537
std::vector< OBOrbital > GetBetaOrbitals()
Definition: generic.h:920
void SetValue(const std::string &v)
Definition: generic.h:121
void SetSpaceGroup(const std::string sg)
Definition: generic.h:364
std::vector< OBAngle > _angles
Definition: generic.h:732
Used to store arbitrary attribute/set relationships. Should be used to store a set of OBGenericData b...
Definition: generic.h:153
ValueT _value
The data for this key/value pair.
Definition: generic.h:133
std::vector< OBFreeGridPoint * > _points
coordinates with accompanying float values
Definition: generic.h:1085
Definition: generic.h:304
std::vector< double > _vRotatoryStrengthsVelocity
Rotatory strengths (velocity)
Definition: generic.h:953
OBRotationData()
Definition: generic.h:991
std::vector< double > GetIntegration() const
Definition: generic.h:870
vector3 GetData() const
Definition: generic.h:1028
unsigned int _betaHOMO
Highest occupied for _betaOrbitals (if needed)
Definition: generic.h:934
Helper class for OBFreeGrid Can hold a random coordinate and associated value.
Definition: generic.h:1057
size_t GetSize() const
Definition: generic.h:662
OBPairTemplate< bool > OBPairBool
Store arbitrary key/value boolean data like OBPairData.
Definition: generic.h:148
Used to store arbitrary attribute/value relationsips of any type.
Definition: generic.h:130
std::vector< double > _vWavelengths
Wavelengths (nm)
Definition: generic.h:944
OBVectorData()
Definition: generic.h:1020
std::pair< OBAtom *, OBAtom * > _bc
Definition: generic.h:583
int _stereo
Definition: generic.h:242
virtual OBGenericData * Clone(OBBase *) const
Definition: generic.h:523
Density of States data (fermi energy and energy vs. density data)
Definition: base.h:150
std::vector< OBOrbital > GetAlphaOrbitals()
Definition: generic.h:919
OBOrbitalData()
Definition: generic.h:898
void SetData(std::string pg, std::string sg="")
Definition: generic.h:565
std::vector< double > _vIntegration
Integrated DOS vector.
Definition: generic.h:849
unsigned int _alphaHOMO
Highest occupied molecular orbital for _alphaOrbitals.
Definition: generic.h:933
std::vector< double > GetEnergies()
Definition: generic.h:538
Used to store energy, occupation, and orbital symmetry of a particular orbital.
Definition: generic.h:877
Represents a vector in 3-dimensional real space.
Definition: vector3.h:44
~OBTorsion()
Definition: generic.h:595
std::vector< double > GetEnergies() const
Definition: generic.h:866
matrix3x3 _mOrtho
Definition: generic.h:311
Defines a map between serial numbers (e.g., in a PDB file) and OBAtom objects inside a molecule...
Definition: generic.h:764
matrix3x3 _matrix
3x3 matrix to be stored
Definition: generic.h:1051
unsigned int _ord
Definition: generic.h:241
void SetDimension(std::vector< unsigned short > vd)
Definition: generic.h:528
OBGenericData * GetData(const std::string &s)
Definition: generic.h:189
matrix3x3 GetData() const
Definition: generic.h:1047
void SetData(std::map< int, OBAtom *> &sm)
Definition: generic.h:785
Represents a real 3x3 matrix.
Definition: matrix3x3.h:42
vector3 _offset
Definition: generic.h:313
unsigned int GetBetaHOMO()
Definition: generic.h:918
void SetData(double energy, double occupation=2.0, std::string symbol="A")
Definition: generic.h:885
void SetEnergies(std::vector< double > ve)
Definition: generic.h:529
void SetValue(const char *v)
Definition: generic.h:120
RType type
linear, symmetric or asymmetric top
Definition: generic.h:1011
std::vector< double > GetRotatoryStrengthsVelocity() const
Definition: generic.h:979
std::vector< OBExternalBond > _vexbnd
Definition: generic.h:93
RType
Definition: generic.h:990
virtual OBGenericData * Clone(OBBase *) const
Definition: generic.h:961
std::vector< double > _vEDipole
Electric dipole strengths.
Definition: generic.h:950
const std::string GetSpaceGroupName()
Definition: generic.h:410
void SetZ(double z)
Definition: generic.h:1072
unsigned int GetBgn()
Definition: generic.h:247
~OBUnitCell()
Definition: generic.h:323
const std::string & GetData() const
Definition: generic.h:60
Vector Data (i.e., one vector like a dipole moment)
Definition: base.h:141
virtual OBGenericData * Clone(OBBase *) const
Definition: generic.h:52
Used for storing information about periodic boundary conditions with conversion to/from translation v...
Definition: generic.h:297
std::vector< unsigned short > _vDimension
Dimensionalities of conformers.
Definition: generic.h:508
virtual const std::string & GetValue() const
Base class returns a default value (the attribute type) but should never be called.
Definition: generic.h:62
std::vector< OBRing * >::iterator BeginRings()
Definition: generic.h:285
int GetSymmetryNumber() const
Definition: generic.h:1005
std::string & Trim(std::string &txt)
Remove leading and trailing whitespace from a string (docs in tokenst.cpp)
Definition: tokenst.cpp:135
bool IsOpenShell()
Definition: generic.h:915
virtual const ValueT & GetGenericValue() const
Definition: generic.h:140
std::vector< OBRing * > _vr
Definition: generic.h:258
Electronic levels, redox states, orbitals, etc.
Definition: base.h:123
std::vector< double > GetRotatoryStrengthsLength() const
Definition: generic.h:981
~OBFreeGrid()
Definition: generic.h:1092
virtual OBGenericData * Clone(OBBase *) const
Definition: generic.h:854
unsigned int GetAlphaHOMO()
Definition: generic.h:917
std::vector< OBRing * >::iterator EndRings()
Definition: generic.h:287
Residue serial numbers.
Definition: base.h:100
Handle double precision floating point data with coordinates not on a grid Can hold array of random c...
Definition: generic.h:1082
void SetV(double V)
Definition: generic.h:1073
std::vector< double > _vIntensities
Infrared absorption intensities in KM/Mole.
Definition: generic.h:801
void SetData(std::vector< OBRing *> &vr)
Definition: generic.h:272
void DeleteData(OBGenericData *gd)
Delete the matching OBGenericData element.
Definition: generic.h:219
std::vector< std::vector< vector3 > > _vLx
Normal modes in 1/sqrt(a.u.)
Definition: generic.h:795
void SetAngle(double angle)
Definition: generic.h:716
int NumPartialCharges()
Definition: generic.h:1141
void SetData(RType RotorType, std::vector< double > RotationalConstants, int SymmetryNumber)
Definition: generic.h:995
void PushBack(OBRing *r)
Definition: generic.h:276
Used to hold a 3D vector item (e.g., a dipole moment)
Definition: generic.h:1017
std::pair< OBAtom *, OBAtom * > _termini
Definition: generic.h:684
std::vector< double > _vRotatoryStrengthsLength
Rotatory strengths (length)
Definition: generic.h:956
Used to hold the point-group and/or space-group symmetry.
Definition: generic.h:552
std::vector< double > GetFrequencies() const
Definition: generic.h:824
const SpaceGroup * GetSpaceGroup()
Definition: generic.h:406
std::vector< OBFreeGridPoint * >::iterator OBFreeGridPointIterator
A standard iterator over a vector of FreeGridPoints.
Definition: generic.h:1077
virtual OBGenericData * Clone(OBBase *) const
Definition: generic.h:267
virtual const std::vector< OBGenericData * > & GetData() const
Gets the entire set.
Definition: generic.h:201
Handle crystallographic space group symmetry.
Definition: spacegroup.h:35
Used to hold the normal modes of a molecule, etc.
Definition: generic.h:791
std::vector< std::string > _vData
Additional data (as strings)
Definition: generic.h:518
void SetAlphaOrbitals(std::vector< OBOrbital > orbitalList)
Definition: generic.h:906
OBPcharge()
Definition: generic.h:1138
void SetForces(std::vector< std::vector< vector3 > > vf)
Definition: generic.h:530
std::vector< OBGenericData * >::iterator OBDataIterator
A standard iterator over vectors of OBGenericData (e.g., inherited from OBBase)
Definition: base.h:235
const SpaceGroup * GetSpaceGroup() const
Definition: generic.h:407
Used to store information on external bonds (e.g., in SMILES fragments)
Definition: generic.h:90
size_t GetSize() const
Definition: generic.h:755
std::vector< double > GetPartialCharge()
Definition: generic.h:1151
std::vector< OBRing * > & GetData()
Definition: generic.h:280
virtual OBGenericData * Clone(OBBase *) const
Definition: generic.h:993
void SetData(matrix3x3 data)
Definition: generic.h:1045
std::vector< OBAngle > GetData() const
Gets the angle vector data.
Definition: generic.h:738
unsigned int GetEnd()
Definition: generic.h:248
std::vector< OBGenericData * >::iterator GetBegin()
Get the begin iterator.
Definition: generic.h:207
Various utility methods.
std::vector< double > _vFrequencies
Harmonic frequencies in inverse centimeters.
Definition: generic.h:798
RType GetRotorType() const
Definition: generic.h:1006
virtual OBGenericData * Clone(OBBase *) const
Definition: generic.h:1043
OBMatrixData()
Definition: generic.h:1041
std::pair< OBAtom *, OBAtom * > GetBC()
Definition: generic.h:616
std::vector< double > _vForces
Oscillator strengths.
Definition: generic.h:947
~OBConformerData()
Definition: generic.h:524
Used to hold the rotational constants and symmetry numbers.
Definition: generic.h:987
std::vector< OBOrbital > _betaOrbitals
Only used if needed (e.g., unrestricted calculations)
Definition: generic.h:932
OBExternalBond()
Definition: generic.h:75
void SetAtom(OBAtom *atom)
Definition: generic.h:84
std::vector< OBGenericData * >::iterator GetEnd()
Get the end iterator.
Definition: generic.h:213
OBFreeGridPoint(double x, double y, double z, double V)
Definition: generic.h:1064
virtual OBGenericData * Clone(OBBase *) const
Definition: generic.h:781
std::vector< OBTorsion > GetData() const
Definition: generic.h:655
std::vector< double > GetEDipole() const
Definition: generic.h:977
Used to hold information about electronic transitions.
Definition: generic.h:940
Base Class.
Definition: base.h:239
std::string GetPointGroup()
Definition: generic.h:570
OBVibrationData()
Definition: generic.h:807
bool SetData(OBBond *)
Definition: generic.h:606
Handle Crystallographic Space Groups.
std::vector< std::vector< vector3 > > GetVelocities()
Definition: generic.h:540
std::vector< double > _PartialCharge
Definition: generic.h:1136
void SetIdx(int idx)
Definition: generic.h:83
virtual OBGenericData * Clone(OBBase *) const
Definition: generic.h:1022
OBBond * GetBond() const
Definition: generic.h:82
virtual const std::string & GetValue() const
Base class returns a default value (the attribute type) but should never be called.
Definition: generic.h:122
Definition: generic.h:990
std::vector< OBOrbital > _alphaOrbitals
List of orbitals. In case of unrestricted calculations, this contains the alpha spin-orbitals.
Definition: generic.h:931
void SetPointGroup(std::string pg)
Definition: generic.h:567
bool operator==(const OBBitVec &bv1, const OBBitVec &bv2)
Definition: bitvec.cpp:525
virtual OBGenericData * Clone(OBBase *) const
Definition: generic.h:560
virtual ~OBElectronicTransitionData()
Definition: generic.h:960
Global namespace for all Open Babel code.
Definition: alias.h:22
Atom class.
Definition: atom.h:71
double GetX()
Definition: generic.h:1066
void AddPartialCharge(std::vector< double > q)
Definition: generic.h:1146