Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/molecule.hpp

    rc27778 rf17e1c  
    77#define MOLECULES_HPP_
    88
    9 using namespace std;
    10 
    119/*********************************************** includes ***********************************/
    1210
    13 // GSL headers
    14 #include <gsl/gsl_eigen.h>
    15 #include <gsl/gsl_heapsort.h>
    16 #include <gsl/gsl_linalg.h>
    17 #include <gsl/gsl_matrix.h>
    18 #include <gsl/gsl_multimin.h>
    19 #include <gsl/gsl_vector.h>
    20 #include <gsl/gsl_randist.h>
     11#ifdef HAVE_CONFIG_H
     12#include <config.h>
     13#endif
    2114
    2215//// STL headers
     
    3124#include "types.hpp"
    3225#include "graph.hpp"
    33 #include "stackclass.hpp"
    3426#include "tesselation.hpp"
    3527#include "Patterns/Observer.hpp"
    3628#include "Patterns/ObservedIterator.hpp"
    3729#include "Patterns/Cacheable.hpp"
     30#include "Formula.hpp"
    3831
    3932#include "Descriptors/MoleculeDescriptor_impl.hpp"
     
    5346class periodentafel;
    5447class Vector;
     48class Shape;
     49template <class> class StackClass;
    5550
    5651/******************************** Some definitions for easier reading **********************************/
     
    10398    //int AtomCount;          //!< number of atoms, brought up-to-date by CountAtoms()
    10499    int BondCount;          //!< number of atoms, brought up-to-date by CountBonds()
    105     int ElementCount;       //!< how many unique elements are therein
    106     int ElementsInMolecule[MAX_ELEMENTS]; //!< list whether element (sorted by atomic number) is alread present or not
    107100    mutable int NoNonHydrogen;  //!< number of non-hydrogen atoms in molecule
    108101    mutable int NoNonBonds;     //!< number of non-hydrogen bonds in molecule
     
    115108
    116109  private:
    117     Cacheable<string> formula;
     110    Formula formula;
    118111    Cacheable<int>    AtomCount;
    119112    moleculeId_t id;
     
    141134  void setId(moleculeId_t);
    142135  void setName(const std::string);
    143   const std::string getFormula();
    144   std::string calcFormula();
     136  const Formula &getFormula();
     137  unsigned int getElementCount();
     138  bool hasElement(const element*) const;
     139  bool hasElement(atomicNumber_t) const;
     140  bool hasElement(const std::string&) const;
     141
    145142
    146143  iterator begin();
     
    260257
    261258  /// Count and change present atoms' coordination.
    262   void CountElements();
    263259  bool CenterInBox();
    264260  bool BoundInBox();
     
    316312
    317313  molecule *CopyMolecule();
    318   molecule* CopyMoleculeFromSubRegion(const Vector offset, const double *parallelepiped) const;
     314  molecule* CopyMoleculeFromSubRegion(const Shape&) const;
    319315
    320316  /// Fragment molecule by two different approaches:
Note: See TracChangeset for help on using the changeset viewer.