Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/molecule.hpp

    rf17e1c rc27778  
    77#define MOLECULES_HPP_
    88
     9using namespace std;
     10
    911/*********************************************** includes ***********************************/
    1012
    11 #ifdef HAVE_CONFIG_H
    12 #include <config.h>
    13 #endif
     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>
    1421
    1522//// STL headers
     
    2431#include "types.hpp"
    2532#include "graph.hpp"
     33#include "stackclass.hpp"
    2634#include "tesselation.hpp"
    2735#include "Patterns/Observer.hpp"
    2836#include "Patterns/ObservedIterator.hpp"
    2937#include "Patterns/Cacheable.hpp"
    30 #include "Formula.hpp"
    3138
    3239#include "Descriptors/MoleculeDescriptor_impl.hpp"
     
    4653class periodentafel;
    4754class Vector;
    48 class Shape;
    49 template <class> class StackClass;
    5055
    5156/******************************** Some definitions for easier reading **********************************/
     
    98103    //int AtomCount;          //!< number of atoms, brought up-to-date by CountAtoms()
    99104    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
    100107    mutable int NoNonHydrogen;  //!< number of non-hydrogen atoms in molecule
    101108    mutable int NoNonBonds;     //!< number of non-hydrogen bonds in molecule
     
    108115
    109116  private:
    110     Formula formula;
     117    Cacheable<string> formula;
    111118    Cacheable<int>    AtomCount;
    112119    moleculeId_t id;
     
    134141  void setId(moleculeId_t);
    135142  void setName(const std::string);
    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 
     143  const std::string getFormula();
     144  std::string calcFormula();
    142145
    143146  iterator begin();
     
    257260
    258261  /// Count and change present atoms' coordination.
     262  void CountElements();
    259263  bool CenterInBox();
    260264  bool BoundInBox();
     
    312316
    313317  molecule *CopyMolecule();
    314   molecule* CopyMoleculeFromSubRegion(const Shape&) const;
     318  molecule* CopyMoleculeFromSubRegion(const Vector offset, const double *parallelepiped) const;
    315319
    316320  /// Fragment molecule by two different approaches:
Note: See TracChangeset for help on using the changeset viewer.