Changeset 737c47


Ignore:
Timestamp:
Jul 26, 2012, 8:49:17 AM (13 years ago)
Author:
Frederik Heber <heber@…>
Children:
5ce17f
Parents:
0eb774e
Message:

MPQC now uses SamplingGrid as information container for sampled density.

Location:
src/bin/mpqc
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/bin/mpqc/MPQCJob.h

    r0eb774e r737c47  
    1919#include "JobMarket/Jobs/FragmentJob.hpp"
    2020
     21#include "Jobs/Grid/SamplingGridProperties.hpp"
     22
    2123#include <string>
    2224
     
    3436      const int _level) :
    3537    FragmentJob(_JobId),
    36     inputfile(_inputfile),
    37     size(0.),
    38     level(0)
     38    inputfile(_inputfile)
    3939  {}
     40
    4041  virtual ~MPQCJob() {}
    4142
     
    4546  //!> contents of the input file
    4647  const std::string inputfile;
    47   //!> offset of grid
    48   double begin[3];
    49   //!> size of grid, i.e. edge length of cubic(!) domain
    50   const double size;
    51   //!> level, i.e. \f$2^{\text{level}}\f$ grid points per axis
    52   const int level;
     48  //!> information for how to sample the density
     49  const SamplingGridProperties grid;
    5350
    5451private:
     
    5754  MPQCJob() :
    5855    FragmentJob(JobId::IllegalJob),
    59     size(0.),
    60     level(0)
    6156  {}
    6257
     
    6863    ar & boost::serialization::base_object<FragmentJob>(*this);
    6964    ar & const_cast<std::string &>(inputfile);
    70     int i;
    71     for (i=0; i<3; ++i)
    72       ar & begin[i];
    73     ar & const_cast<double &>(size);
    74     ar & const_cast<int &>(level);
     65    ar & const_cast<SamplingGridProperties &<(grid);
    7566  }
    7667};
  • src/bin/mpqc/Makefile

    r0eb774e r737c47  
    3232DEFINES += \
    3333        -DHAVE_JOBMARKET -I/home/heber/packages/JobMarket-1.0.0/include -I/home/heber/workspace_C/JobMarket/build64 -I/home/heber/packages/boost-1.47/include/boost-1_47\
    34         -DHAVE_MPQCDATA -I/home/heber/workspace_C/molecuilder_LinkedCell/build64-jobmarket/include/MoleCuilder
     34        -DHAVE_MPQCDATA -I/home/heber/workspace_C/molecuilder/build64/include/MoleCuilder
    3535
    3636XDEF =
    37 XLIBS = -L/home/heber/packages/JobMarket-1.0.0/lib -lJobMarketPoolWorker -Wl,-rpath,/home/heber/packages/JobMarket-1.0.0/lib -Wl,-rpath,/home/heber/packages/boost-1.47/lib -L/home/heber/workspace_C/molecuilder_LinkedCell/build64-jobmarket/lib/ -lMolecuilderJobs -Wl,-rpath,/home/heber/workspace_C/molecuilder_LinkedCell/build64-jobmarket/lib
     37XLIBS = -L/home/heber/packages/JobMarket-1.0.0/lib -lJobMarketPoolWorker -Wl,-rpath,/home/heber/packages/JobMarket-1.0.0/lib -Wl,-rpath,/home/heber/packages/boost-1.47/lib -L/home/heber/workspace_C/molecuilder/build64/lib/ -lMolecuilderJobs -Wl,-rpath,/home/heber/workspace_C/molecuilder/build64/lib
    3838ifeq ($(HAVE_SC_SRC_LIB_CHEMISTRY_QC_PSI),yes)
    3939XDEF += -DHAVE_CHEMISTRY_QC_PSI
  • src/bin/mpqc/mpqc.cc

    r0eb774e r737c47  
    14641464     Ref<Wavefunction> wfn;
    14651465     wfn << mole;
    1466      ExEnv::out0() << "The number of atomic orbitals: " << wfn->ao_dimension()->n() << endl;
    1467      ExEnv::out0() << "The AO density matrix is ";
    1468      wfn->ao_density()->print(ExEnv::out0());
    1469      ExEnv::out0() << "The natural density matrix is ";
    1470      wfn->natural_density()->print(ExEnv::out0());
    1471      ExEnv::out0() << "The Gaussian basis is " << wfn->basis()->name() << endl;
    1472      ExEnv::out0() << "The Gaussians sit at the following centers: " << endl;
    1473      for (int nr = 0; nr< wfn->basis()->ncenter(); ++nr) {
    1474        ExEnv::out0() << nr << " basis function has its center at ";
    1475        for (int i=0; i < 3; ++i)
    1476            ExEnv::out0() << wfn->basis()->r(nr,i) << "\t";
    1477        ExEnv::out0() << endl;
    1478      }
     1466//     ExEnv::out0() << "The number of atomic orbitals: " << wfn->ao_dimension()->n() << endl;
     1467//     ExEnv::out0() << "The AO density matrix is ";
     1468//     wfn->ao_density()->print(ExEnv::out0());
     1469//     ExEnv::out0() << "The natural density matrix is ";
     1470//     wfn->natural_density()->print(ExEnv::out0());
     1471//     ExEnv::out0() << "The Gaussian basis is " << wfn->basis()->name() << endl;
     1472//     ExEnv::out0() << "The Gaussians sit at the following centers: " << endl;
     1473//     for (int nr = 0; nr< wfn->basis()->ncenter(); ++nr) {
     1474//       ExEnv::out0() << nr << " basis function has its center at ";
     1475//       for (int i=0; i < 3; ++i)
     1476//           ExEnv::out0() << wfn->basis()->r(nr,i) << "\t";
     1477//       ExEnv::out0() << endl;
     1478//     }
    14791479     // print the energy
    14801480     data.energies.total = mole->energy();
     
    15331533       data.forces.resize(grad.dim()/3);
    15341534       for (int j=0;j<grad.dim()/3; ++j) {
    1535          data.forces[j].resize(3);
     1535         data.forces[j].resize(3, 0.);
    15361536       }
    15371537       std::cout << "Gradient of the MolecularEnergy:" << std::endl;
     
    17201720  } while (test.good());
    17211721  // put info how to sample the density into MPQCData
    1722   MPQCData data;
    1723   data.density.size = size;
    1724   data.density.level = level;
    1725   for (int i=0;i<3; ++i)
    1726     data.density.begin[i] = begin[i];
     1722  MPQCData data(begin, size, level);
    17271723// now call work horse
    17281724  mainFunction(grp, values, output, input, generic_input, in_char_array, argc, argv, data);
Note: See TracChangeset for help on using the changeset viewer.