Changeset 16135f


Ignore:
Timestamp:
Jul 13, 2012, 1:29:23 PM (13 years ago)
Author:
Frederik Heber <heber@…>
Children:
e144c8
Parents:
4aba27
Message:

Accumulated more data stored on resulting MPQCData.

  • added timing, nuclear_repulsion, hcore, and overlap.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/bin/mpqc/mpqc.cc

    r4aba27 r16135f  
    135135#include "MPQCJob.h"
    136136
     137#include "chemistry/qc/scf/scfops.h"
     138
    137139#ifdef HAVE_MPQCDATA
    138 #include "Jobs/MPQCCommandJob_MPQCData.hpp"
     140#include "Jobs/MPQCData.hpp"
    139141#endif
    140142
     
    14761478     }
    14771479     // print the energy
    1478      data.energy = mole->energy();
     1480     data.energies.total = mole->energy();
     1481     data.energies.nuclear_repulsion = wfn->nuclear_repulsion_energy();
     1482//     data.energies.electron_repulsion = integral->electron_repulsion();
     1483//     data.energies.correlation = wfn->corr_energy();
     1484     {
     1485       RefSymmSCMatrix t = wfn->overlap();
     1486       RefSymmSCMatrix cl_dens_ = wfn->ao_density();
     1487
     1488       SCFEnergy *eop = new SCFEnergy;
     1489       eop->reference();
     1490       Ref<SCElementOp2> op = eop;
     1491       t.element_op(op,cl_dens_);
     1492       op=0;
     1493       eop->dereference();
     1494
     1495       data.energies.overlap = eop->result();
     1496
     1497       delete eop;
     1498       t = 0;
     1499       cl_dens_ = 0;
     1500     }
     1501//     data.energies.kinetic = integral->kinetic();
     1502     {
     1503       RefSymmSCMatrix t = wfn->core_hamiltonian();
     1504       RefSymmSCMatrix cl_dens_ = wfn->ao_density();
     1505
     1506       SCFEnergy *eop = new SCFEnergy;
     1507       eop->reference();
     1508       Ref<SCElementOp2> op = eop;
     1509       t.element_op(op,cl_dens_);
     1510       op=0;
     1511       eop->dereference();
     1512
     1513       data.energies.hcore = eop->result();
     1514
     1515       delete eop;
     1516       t = 0;
     1517       cl_dens_ = 0;
     1518     }
    14791519     ExEnv::out0() << endl << indent
    14801520          << scprintf("Value of the MolecularEnergy: %15.10f",
     
    15041544       }
    15051545     }
     1546     // times
     1547     data.times.walltime = tim->get_wall_time();
     1548     data.times.cputime = tim->get_cpu_time();
     1549     data.times.flops = tim->get_flops();
     1550
    15061551//     // GaussianShell is the actual orbital functions it seems ...
    15071552//     //ExEnv::out0() << "There are the following Gaussian Shells: " << endl;
     
    16031648  MPQCData data;
    16041649  Ref<MessageGrp> grp = MessageGrp::get_default_messagegrp();
    1605   char filename_template[] = "mpqc_temp_XXXXXX";
    1606   const char *output = mktemp(filename_template);
     1650  // create unique, temporary name and check whether it exists
     1651  const char *output = NULL;
     1652  std::ifstream test;
     1653  do {
     1654    char filename_template[] = "mpqc_temp_XXXXXX";
     1655    output = mktemp(filename_template);
     1656    test.open(output);
     1657  } while (test.good());
     1658  // now call work horse
    16071659  mainFunction(grp, values, output, input, generic_input, in_char_array, argc, argv, data);
    16081660//  delete[] in_char_array;
Note: See TracChangeset for help on using the changeset viewer.