Changes in src/molecule.hpp [1f1b23:520c8b]
- File:
-
- 1 edited
-
src/molecule.hpp (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/molecule.hpp
r1f1b23 r520c8b 27 27 #include <vector> 28 28 29 #include <string> 30 29 31 #include "graph.hpp" 30 32 #include "stackclass.hpp" 31 33 #include "tesselation.hpp" 34 #include "Patterns/Observer.hpp" 32 35 33 36 /****************************************** forward declarations *****************************/ … … 80 83 * Class incorporates number of types 81 84 */ 82 class molecule : public PointCloud {85 class molecule : public PointCloud , public Observable { 83 86 public: 84 87 double cell_size[6];//!< cell size … … 99 102 bool ActiveFlag; //!< in a MoleculeListClass used to discern active from inactive molecules 100 103 Vector Center; //!< Center of molecule in a global box 104 int IndexNr; //!< index of molecule in a MoleculeListClass 101 105 char name[MAXSTRINGSIZE]; //!< arbitrary name 102 int IndexNr; //!< index of molecule in a MoleculeListClass 103 106 107 public: 104 108 molecule(const periodentafel * const teil); 105 109 virtual ~molecule(); 110 111 //getter and setter 112 const std::string getName(); 113 void setName(const std::string); 106 114 107 115 // re-definition of virtual functions from PointCloud … … 269 277 int FragmentMolecule(int Order, config *configuration); 270 278 bool CheckOrderAtSite(bool *AtomMask, Graph *GlobalKeySetList, int Order, int *MinimumRingSize, char *path = NULL); 271 bool StoreBondsToFile(char *path);272 279 bool StoreAdjacencyToFile(char *path); 273 280 bool CheckAdjacencyFileAgainstMolecule(char *path, atom **ListOfAtoms); … … 299 306 bool OutputTemperatureFromTrajectories(ofstream * const output, int startstep, int endstep); 300 307 308 // Manipulation routines 309 void flipActiveFlag(); 310 301 311 private: 302 312 int last_atom; //!< number given to last atom … … 308 318 /** A list of \a molecule classes. 309 319 */ 310 class MoleculeListClass {320 class MoleculeListClass : public Observable { 311 321 public: 312 322 MoleculeList ListOfMolecules; //!< List of the contained molecules … … 327 337 int CountAllAtoms() const; 328 338 339 // Methods moved here from the menus 340 // TODO: more refactoring needed on these methods 341 void flipChosen(); 342 void createNewMolecule(periodentafel *periode); 343 void loadFromXYZ(periodentafel *periode); 344 void setMoleculeFilename(); 345 void parseXYZIntoMolecule(); 346 void eraseMolecule(); 347 348 329 349 // merging of molecules 330 350 bool SimpleMerge(molecule *mol, molecule *srcmol);
Note:
See TracChangeset
for help on using the changeset viewer.
