twobodygrid.h

00001 //
00002 // twobodygrid.h
00003 //
00004 // Copyright (C) 2004 Edward Valeev
00005 //
00006 // Author: Edward Valeev <edward.valeev@chemistry.gatech.edu>
00007 // Maintainer: EV
00008 //
00009 // This file is part of the SC Toolkit.
00010 //
00011 // The SC Toolkit is free software; you can redistribute it and/or modify
00012 // it under the terms of the GNU Library General Public License as published by
00013 // the Free Software Foundation; either version 2, or (at your option)
00014 // any later version.
00015 //
00016 // The SC Toolkit is distributed in the hope that it will be useful,
00017 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019 // GNU Library General Public License for more details.
00020 //
00021 // You should have received a copy of the GNU Library General Public License
00022 // along with the SC Toolkit; see the file COPYING.LIB.  If not, write to
00023 // the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
00024 //
00025 // The U.S. Government is granted a limited license as per AL 91-7.
00026 //
00027 
00028 #ifdef __GNUG__
00029 #pragma interface
00030 #endif
00031 
00032 #ifndef _chemistry_qc_mbptr12_twobodygrid_h
00033 #define _chemistry_qc_mbptr12_twobodygrid_h
00034 
00035 #include <vector>
00036 #include <util/ref/ref.h>
00037 #include <util/state/statein.h>
00038 #include <util/state/stateout.h>
00039 #include <math/scmat/vector3.h>
00040 #include <chemistry/molecule/molecule.h>
00041 
00042 using namespace std;
00043 
00044 namespace sc {
00045 
00049 class TwoBodyGrid : virtual public SavableState {
00050 
00051   std::string name_;               // String identifier for the grid
00052   vector<SCVector3> r1_;           // Cartesian coordinates of particle 1
00053   vector<SCVector3> r2_;           // Cartesian coordinates of particle 2
00054   SCVector3 O_;                   // The origin with respect to which r1 and r2 are defined
00055 
00056 public:
00057   TwoBodyGrid(StateIn&);
00060   TwoBodyGrid(const Ref<KeyVal>&);
00061   ~TwoBodyGrid();
00062 
00063   void save_data_state(StateOut&);
00064 
00065   const std::string& name() const;
00066   int nelem() const;
00067   const SCVector3& origin() const;
00068 
00070   SCVector3 xyz1(int i, const SCVector3& O=SCVector3(0.0)) const;
00072   SCVector3 xyz2(int i, const SCVector3& O=SCVector3(0.0)) const;
00074   SCVector3 rtp1(int i, const SCVector3& O=SCVector3(0.0)) const;
00076   SCVector3 rtp2(int i, const SCVector3& O=SCVector3(0.0)) const;
00078   void print(std::ostream&o=ExEnv::out0()) const;
00079 
00080 };
00081 
00082 
00083 }
00084 
00085 #endif
00086 
00087 // Local Variables:
00088 // mode: c++
00089 // c-file-style: "CLJ"
00090 // End:
00091 
00092 

Generated at Mon Dec 3 23:23:42 2007 for MPQC 2.3.1 using the documentation package Doxygen 1.5.2.