1 /********************************************************************** 2 pointgroup.h - Brute force point group symmetry detection 3 4 Copyright (C) 1996, 2003 S. Patchkovskii, Serguei.Patchkovskii@sympatico.ca 5 Some portions Copyright (C) 2007 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_POINTGROUP_H 21 #define OB_POINTGROUP_H 22 23 #include <openbabel/babelconfig.h> 24 25 namespace OpenBabel 26 { 27 class OBMol; 28 class PointGroupPrivate; 29 30 /** \class OBPointGroup pointgroup.h <openbabel/pointgroup.h> 31 \brief Brute-force point group symmetry perception 32 \since version 2.2 33 34 This class performs brute-force point group symmetry perception 35 to yield symmetry identifiers. In the future, this should provide 36 optimized symmetry-derived coordinates as well. 37 */ 38 class OBAPI OBPointGroup 39 { 40 public: 41 OBPointGroup(); 42 ~OBPointGroup(); 43 44 enum Symbol 45 { // The most likely 60 cases 46 C1 = 0, Cs, Ci, // 0 to 2 47 C2, C3, C4, C5, C6, C7, C8, // 3 to 9 48 D2, D3, D4, D5, D6, D7, D8, // 10 to 16 49 C2v, C3v, C4v, C5v, C6v, C7v, C8v, // 17 to 23 50 C2h, C3h, C4h, C5h, C6h, C7h, C8h, // 24 to 30 51 D2d, D3d, D4d, D5d, D6d, D7d, D8d, // 31 to 37 52 D2h, D3h, D4h, D5h, D6h, D7h, D8h, // 38 to 44 53 S4, S6, S8, // 45 to 47 54 T, Th, Td, // 48 to 50 55 O, Oh, // 51, 52 56 Cinfv, Dinfh, // 53, 54 57 I, Ih, // 55, 56 58 K, Kh, // 57, 58 59 Unknown // 59 60 }; 61 62 //! Set the point group detection for this molecule 63 void Setup(OBMol *); 64 65 /** \return the 3D point group symbol for this molecule. A tolerance of 66 * 0.01 is used. 67 * 68 * \todo Compatibility function; remove at next ABI break, update 69 * default arg in overload. 70 */ 71 const char * IdentifyPointGroup(); 72 73 //! \return the 3D point group symbol for this molecule 74 const char * IdentifyPointGroup(double tolerance /* = 0.01*/ ); 75 76 //! \return the 3D point group symbol for this molecule 77 //! \arg tolerance The initial tolerance for determining possibly symmetric atoms 78 Symbol IdentifyPointGroupSymbol(double tolerance = 0.01); 79 80 void Symmetrize(OBMol *); 81 82 protected: 83 PointGroupPrivate *d; 84 85 }; // class OBPointGroup 86 87 }// namespace OpenBabel 88 89 #endif // OB_POINT_GROUP_H 90 91 //! \file pointgroup.h 92 //! \brief Brute-force point group detection 93