Atoms.h

Go to the documentation of this file.
00001 // This is a -*- C++ -*-  file
00002 //------------------------------------------------------------------------------------//
00003 //                                                                                    //
00004 //   Copyright (c) 2001                                                               //
00005 //      INRIA                                                                         //
00006 //      54600 VILLERS LES NANCY                                                       //
00007 //      France                                                                        //
00008 //                                                                                    //
00009 //------------------------------------------------------------------------------------//
00010 //                                                                                    //
00011 //                 * NOTICE OF PROPRIETARY INFORMATION *                              //
00012 //                                                                                    //
00013 // The information contained in this file is considered proprietary and the exclusive //
00014 // property of  INRIA. This information may not be disclosed, duplicated              //
00015 // or used, in whole or in part, for  any purpose  whatsoever without express written //
00016 // authorization from INRIA                                                           //
00017 //                                 
00018 #ifndef OC_ATOMS_H
00019 
00020 #define OC_ATOMS_H
00021 
00022 #include <string>
00023 #include <fstream>
00024 #include <sstream>
00025 #include <vector>
00026 #include "atomsElement.h"
00027 
00028 class setOfAtoms {
00029  public:
00030   //
00031   typedef   atomElement   TelementBase ;
00032   //
00033   //
00034   setOfAtoms() ;
00035   setOfAtoms(const int size) ;
00036   ~setOfAtoms() ;
00037   //
00038   int getNumberOfAtoms() const
00039     { return _numberOfAtoms ;}
00040 
00041   int numberOfAtoms() const
00042     { return _numberOfAtoms ;}
00043   void setNumberOfAtoms(const int size) ;
00044   //
00045   std::string getName(const int i) const
00046     {return _atoms[i]._name ;}
00047   //
00048   std::string getAtomName(const int i) const
00049     {return _atoms[i]._name ;}
00050   //
00051   std::string fragmentName(const int i) const
00052     {return _atoms[i]._fragName ;}
00053   //
00054   std::string& fragmentName(const int i)
00055     {return _atoms[i]._fragName ;}
00056   //
00057 //   std::string & getName(const int i) 
00058 //     {return _atoms[i]._name ;}
00059   //
00060   std::string & atomName(const int i) 
00061     {return _atoms[i]._name ;}
00062   //
00063   atomElement getElement(const int i) const
00064     { return this->_atoms[i] ; }
00065   //
00066   atomElement& getElement(const int i) 
00067     { return this->_atoms[i] ; }
00068   //
00069   atomElement & setElement(const int i) 
00070     { return this->_atoms[i] ; }
00071   //
00072   int  findNumberOfAtoms(std::ifstream & data) ;
00073   //
00074   int numberOfFragments() const
00075   {return _numberOfFragments ;}
00076   //
00077   int numberOfAA() const
00078   {return _numberOfAA ;}
00079 
00080   int numberOfFragements() const
00081   {return _numberOfFragments ;}
00082   //
00083   void reset() ;
00084   //
00085   void copyFrom(const int beginAtom, const int  EndAtom, const setOfAtoms & atoms) ;
00086   //
00087   void swap(const int i, const int  j) ;
00088   //
00089   bool readQCIFile(std::ifstream & data) ;
00090   void readXYZFile(std::ifstream & data) ; 
00091   //
00092   void writeQCIFile(std::ofstream & out, std::vector<int>& index) ;
00093   void writeXYZFile(std::ofstream & out, std::vector<int>& index) ;
00094   void writeQCIFile(std::ofstream & out) ;
00095   void writeXYZFile(std::ofstream & out) ;
00096   void writeXYZFile(std::ofstream & out, double *H) ;
00097   void writeXYZPosition(std::ofstream & out,double *H);
00098   void writeXYZFile(std::ofstream & out, double *H, const std::vector<int>& index) ;
00099   void writeVMDFile(std::ofstream & out, const std::vector< std::string > &color ) ;
00100   //
00101   void findMinMax(double *atomMin , double * atomMax  ) ;
00102   void buildGravityCenter(double *G  ) ;
00103   bool buildIinertialMatrix(double *coordG) ;
00104   void fixConnectivity(const std::vector<int> & reOrder) ;
00105   //
00106   //private:
00107   int getNumberOfFragments() ;
00108   //
00109   //
00110   //-------------------------------------------------------------//
00111   // Public Data :
00112   //-------------------------------------------------------------//
00113  protected:
00114   int               _numberOfAtoms ;
00115   int               _numberOfAA ;
00116   int               _numberOfFragments ;
00117   atomElement      *_atoms ;
00118 
00119 } ;
00120 
00121 #endif

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