QCSystem.hpp

Go to the documentation of this file.
00001 //*****************************************************************************//
00002 //                                                                             //
00003 //   Copyright (c) 2001                                                        //
00004 //      INRIA                                                                  //
00005 //      54600 VILLERS LES NANCY                                                //
00006 //      France                                                                 //
00007 //                                                                             //
00008 //*****************************************************************************//
00009 //                                                                             //
00010 //               *** NOTICE OF PROPRIETARY INFORMATION ***                     //
00011 //                                                                             //
00012 // The information contained in this file is considered proprietary and the    //
00013 // exclusive property of  INRIA. This information may not be disclosed,        //
00014 // duplicated or used, in whole or in part, for  any purpose  whatsoever       //
00015 // without express written authorization from INRIA                            //
00016 //                                                                             //
00017 //*****************************************************************************//
00018 
00019 
00020 #ifndef QC_SYSTEM_H_
00021 #define QC_SYSTEM_H_
00022 
00023 
00024 #include <iostream>
00025 #include "QCAtoms.hpp"
00026 #include "QCOrdering.hpp"
00027 
00028 
00033 
00038 class QCSystem :  public QCOrdering,  public QCAtoms
00039 {
00040   
00041   friend ostream& operator << (ostream& out, const QCSystem& system);
00042 
00043   friend class QCReader;
00044 
00045 
00047 public:
00048 
00052   QCSystem (void);
00056   virtual ~QCSystem (void)
00057   {QC_TRACE_END("BEGIN QCSystem::~QCSystem");
00058     QC_TRACE_END("BEGIN QCSystem::~QCSystem");
00059   }
00063   int getSystemCharge (void)     const { return systemCharge; }
00064   int getSpinMultiplicity (void) const { return spinMultiplicity; }
00065   int getNbAtomicOrbitals (void) const { return nbAtomicOrbitals; }
00066   int getNbElectrons (void)      const { return nbElectrons; }
00067   //
00068   QCSubDomainZone getZone (int /* atomIdx */) const { return QC_CORE; }
00069 
00070 
00074   void setSystemCharge (const int& val)     { systemCharge     = val; }
00075   void setSpinMultiplicity (const int& val) { spinMultiplicity = val; }
00076   void setNbAtomicOrbitals (const int& val) { nbAtomicOrbitals = val; }
00077   void setNbElectrons (const int& val)      { nbElectrons      = val; }
00081   QCFloat distance (int i, int j) const {
00082     return sqrt( QCPow<2>( atoms[i * DIMENSION + COORDX] - 
00083                            atoms[j * DIMENSION + COORDX] ) +
00084                  QCPow<2>( atoms[i * DIMENSION + COORDY] - 
00085                            atoms[j * DIMENSION + COORDY] ) +
00086                  QCPow<2>( atoms[i * DIMENSION + COORDZ] - 
00087                            atoms[j * DIMENSION + COORDZ] ) );
00088 
00089   }
00090 
00091 
00092   
00096   template <class TPParam>
00097   inline void init (const TPParam *QCRestrict parameters,  int nbAtomTypes);
00098 
00099   //
00100   void writeQCIAtomicSystem( std::ofstream& out) ;
00101 
00102     
00103 
00105 protected:
00106 
00107     
00111   template <class TPParam>
00112   void setParamIndexes (const TPParam *QCRestrict parameters,int nbAtomTypes);
00116   template <class TPParam>
00117   void setSystemNumbers (const TPParam *QCRestrict parameters);
00121   QCSystem& asBase (void) { return *this; }
00125   const QCSystem& asBase (void) const { return *this; }
00126 
00127 
00128   
00129 
00131 private:
00132 
00133   
00135 public:
00136 protected:
00137     
00141   int      systemCharge;
00145   int      spinMultiplicity;
00149   int      nbAtomicOrbitals;
00153   int      nbElectrons;
00154 private:
00155 
00156 };
00157 
00158 
00159 
00163 template <class TPParam>
00164 inline void QCSystem::init (const TPParam *QCRestrict parameters, int nbAtomTypes)
00165 {
00166   QC_TRACE_INIT("BEGIN QCSystem::init(parameter, ....)"); 
00167   allocateCells(nbAtoms);
00168   setParamIndexes(parameters, nbAtomTypes);
00169   setSystemNumbers(parameters);
00170   QC_TRACE_INIT("END   QCSystem::init"); 
00171 }
00172 
00176 extern ostream& operator << (ostream& out, const QCSystem& system);
00177 
00178 
00179 #endif // QC_SYSTEM_H_

Generated on Sat Jan 28 21:07:30 2006 for QC++ by  doxygen 1.4.4