Changeset 850bce


Ignore:
Timestamp:
Jul 11, 2012, 9:03:48 AM (13 years ago)
Author:
Frederik Heber <heber@…>
Children:
4aba27
Parents:
035791
git-author:
Frederik Heber <heber@…> (07/10/12 17:17:37)
git-committer:
Frederik Heber <heber@…> (07/11/12 09:03:48)
Message:

Added MPQCData instance to MPQCJob::Work().

  • added libs and includes to src/bin/mpqc/Makefile same as before.
Location:
src/bin/mpqc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/bin/mpqc/Makefile

    r035791 r850bce  
    3030default:: mpqc
    3131
    32 DEFINES += -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
    33 
    34 XDEF = -DHAVE_JOBMARKET -I/home/heber/packages/JobMarket-1.0.0/include
    35 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
     32DEFINES += \
     33        -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
     35
     36XDEF =
     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_LinkedCell/build64-jobmarket/lib/ -lMolecuilderJobs -Wl,-rpath,/home/heber/workspace_C/molecuilder_LinkedCell/build64-jobmarket/lib
    3638ifeq ($(HAVE_SC_SRC_LIB_CHEMISTRY_QC_PSI),yes)
    3739XDEF += -DHAVE_CHEMISTRY_QC_PSI
  • src/bin/mpqc/mpqc.cc

    r035791 r850bce  
    134134#include "JobMarket/poolworker_main.hpp"
    135135#include "MPQCJob.h"
     136
     137#ifdef HAVE_MPQCDATA
     138#include "Jobs/MPQCCommandJob_MPQCData.hpp"
     139#endif
    136140
    137141#include <algorithm>
     
    12141218    char *&in_char_array,
    12151219    int argc,
    1216     char **argv)
     1220    char **argv
     1221#ifdef HAVE_MPQCDATA
     1222    , MPQCData &data
     1223#endif
     1224    )
    12171225{
    12181226  // get the message group.  first try the commandline and environment
     
    14431451
    14441452  // here, we may gather the results
    1445   // we start to construct the MPQC_Data object
     1453  // we start to fill the MPQC_Data object
    14461454  {
    14471455     Ref<Wavefunction> wfn;
     
    14591467           ExEnv::out0() << wfn->basis()->r(nr,i) << "\t";
    14601468       ExEnv::out0() << endl;
     1469     }
     1470     // print the energy
     1471     data.energy = mole->energy();
     1472     ExEnv::out0() << endl << indent
     1473          << scprintf("Value of the MolecularEnergy: %15.10f",
     1474                      mole->energy())
     1475          << endl;
     1476     // print the gradient
     1477     RefSCVector grad;
     1478     if (mole->gradient_result().computed()) {
     1479       grad = mole->gradient_result().result_noupdate();
     1480     }
     1481     else {
     1482       grad = mole->gradient();
     1483     }
     1484     if (grad.nonnull()) {
     1485       data.forces.resize(grad.dim()/3);
     1486       for (int j=0;j<grad.dim()/3; ++j) {
     1487         data.forces[j].resize(3);
     1488       }
     1489       std::cout << "Gradient of the MolecularEnergy:" << std::endl;
     1490       for (int j=0;j<grad.dim()/3; ++j) {
     1491         std::cout << "\t";
     1492         for (int i=0; i< 3; ++i) {
     1493           data.forces[j][i] = grad[3*j+i];
     1494           std::cout << grad[3*j+i] << "\t";
     1495         }
     1496         std::cout << endl;
     1497       }
    14611498     }
    14621499     // GaussianShell is the actual orbital functions it seems ...
     
    15581595  const char *input = 0;
    15591596  const char *generic_input = 0;
    1560   mainFunction(values, input, generic_input, in_char_array, argc, argv);
     1597  MPQCData data;
     1598  mainFunction(values, input, generic_input, in_char_array, argc, argv, data);
    15611599  delete[] in_char_array;
    15621600
     
    15671605//  delete[] argv;
    15681606//
    1569   FragmentResult::ptr result( new FragmentResult(getId()) );
    1570   return result;
     1607  // place into returnstream
     1608  std::stringstream returnstream;
     1609  boost::archive::text_oarchive oa(returnstream);
     1610  oa << data;
     1611
     1612  FragmentResult::ptr s( new FragmentResult(getId(), returnstream.str()) );
     1613  return s;
    15711614}
    15721615#endif
     
    16441687    // if not, work on the command line input
    16451688    char *in_char_array = 0;
     1689#ifdef HAVE_MPQCDATA
     1690    MPQCData data;
     1691    mainFunction(values, input, generic_input, in_char_array, argc, argv, data);
     1692#else
    16461693    mainFunction(values, input, generic_input, in_char_array, argc, argv);
     1694#endif
    16471695  }
    16481696
Note: See TracChangeset for help on using the changeset viewer.