Changes in / [d1831e:3690e4]


Ignore:
Files:
4 added
37 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/FragmentationAction/AnalyseFragmentationResultsAction.cpp

    rd1831e r3690e4  
    7272#include "Fragmentation/Summation/SetValues/Eigenvalues.hpp"
    7373#include "Fragmentation/Summation/SetValues/Fragment.hpp"
     74#include "Fragmentation/Summation/SetValues/FragmentForces.hpp"
    7475#include "Fragmentation/Summation/SetValues/Histogram.hpp"
    7576#include "Fragmentation/Summation/SetValues/IndexedVectors.hpp"
     
    240241    const FragmentationLongRangeResults &results)
    241242{
    242   // print tables (without eigenvalues, they go extra)
     243  // print tables per keyset(without grids, they go extra)
    243244
    244245  {
     
    252253  }
    253254
     255  if (results.hasLongRangeForces()) {
     256    const std::string forceresult =
     257        writeTable<VMGDataForceMap_t, VMGDataForceVector_t>()(
     258            results.Result_ForceLongRange_fused, results.getMaxLevel());
     259    LOG(2, "DEBUG: Force table is \n" << forceresult);
     260    std::string filename;
     261    filename += FRAGMENTPREFIX + std::string("_VMGForces.dat");
     262    writeToFile(filename, forceresult);
     263  }
     264
    254265  {
    255266    const std::string gridresult =
     
    260271    filename += FRAGMENTPREFIX + std::string("_LongRangeEnergy.dat");
    261272    writeToFile(filename, gridresult);
     273  }
     274
     275  if (results.hasLongRangeForces()) {
     276    const std::string forceresult =
     277        writeTable<VMGDataLongRangeForceMap_t, VMGDataLongRangeForceVector_t >()(
     278            results.Result_ForcesLongRangeIntegrated_fused, results.getMaxLevel(), 1);
     279    LOG(2, "DEBUG: ForcesLongRange table is \n" << forceresult);
     280    std::string filename;
     281    filename += FRAGMENTPREFIX + std::string("_LongRangeForces.dat");
     282    writeToFile(filename, forceresult);
    262283  }
    263284}
     
    325346
    326347      // obtain potential distribution
    327       std::map<IndexSet::ptr, std::pair< VMGDataMap_t, VMGDataMap_t> >::const_iterator potentialiter
    328           = longrangeresults.Result_perIndexSet_LongRange.find(index);
    329       ASSERT( potentialiter != longrangeresults.Result_perIndexSet_LongRange.end(),
     348      std::map<IndexSet::ptr, std::pair< VMGDataGridMap_t, VMGDataGridMap_t> >::const_iterator potentialiter
     349          = longrangeresults.Result_perIndexSet_LongRange_Grid.find(index);
     350      ASSERT( potentialiter != longrangeresults.Result_perIndexSet_LongRange_Grid.end(),
    330351          "appendToHomologyFile() - cannot find index "+toString(*index)
    331352          +" in FragmentResults.");
    332353      // add e+n potentials
    333       value.potential_distribution = boost::fusion::at_key<VMGDataFused::both_sampled_potential>(potentialiter->second.second); // contributions
     354      value.potential_distribution =
     355          boost::fusion::at_key<VMGDataFused::both_sampled_potential>(potentialiter->second.second); // contributions
    334356//      // and re-average to zero (integral is times volume_element which we don't need here)
    335357//      const double sum =
     
    625647  if (DoLongrange) {
    626648    if ( const_cast<const World &>(World::getInstance()).getAllAtoms().size() == 0) {
    627       STATUS("Please load the full molecule intostd::map<JobId_t, VMGData> longrangeData the world before starting this action.");
     649      STATUS("Please load the full molecule into std::map<JobId_t, VMGData> longrangeData the world before starting this action.");
    628650      return Action::failure;
    629651    }
     
    635657    // remove full solution corresponding to full_sample from map (must be highest ids), has to be treated extra
    636658    std::map<JobId_t, VMGData>::iterator iter = longrangeData.end();
    637     for (size_t i=0;i<full_sample.size();++i)
    638       --iter;
     659    std::advance(iter, -full_sample.size());
    639660    std::map<JobId_t, VMGData>::iterator remove_iter = iter;
    640661    std::vector<VMGData> fullsolutionData;
    641662    for (; iter != longrangeData.end(); ++iter)
    642663      fullsolutionData.push_back(iter->second);
    643     longrangeData.erase(remove_iter, longrangeData.end());
     664    if (longrangeData.size() > 1) // when there's just a single fragment, it corresponds to full solution
     665      longrangeData.erase(remove_iter, longrangeData.end());
    644666
    645667    // Final phase: sum up and print result
  • src/Actions/FragmentationAction/FragmentationAction.cpp

    rd1831e r3690e4  
    259259        << params.InterOrder.get() << " and distance of "
    260260        << params.distance.get() << ".");
     261    const enum HydrogenTreatment treatment =
     262        params.HowtoTreatHydrogen.get() ? ExcludeHydrogen : IncludeHydrogen;
     263    const double UpperBound = std::max(10., params.distance.get());
    261264    Interfragmenter fragmenter(TotalGraph);
    262     const enum HydrogenTreatment treatment =  params.HowtoTreatHydrogen.get() ? ExcludeHydrogen : IncludeHydrogen;
     265
     266    // check the largest Rcut that causes no additional inter-fragments
     267    const double Min_Rcut =
     268        fragmenter.findLargestCutoff(params.InterOrder.get(), UpperBound, treatment);
     269
     270    // if we smear out electronic charges, warn when non-overlapping criterion does not hold
     271    if (params.InterOrder.get() < Min_Rcut)
     272      ELOG(2, "Inter-order is too low to cause any additional fragments.");
     273
     274    // then add fragments
    263275    fragmenter(params.InterOrder.get(), params.distance.get(), treatment);
     276
    264277    LOG(0, "STATUS: There are now " << TotalGraph.size() << " fragments after interfragmenting.");
    265278  }
  • src/Actions/FragmentationAction/FragmentationAutomationAction.cpp

    rd1831e r3690e4  
    260260        params.DoValenceOnly.get() ? MPQCData::DoSampleValenceOnly : MPQCData::DontSampleValenceOnly,
    261261        params.DoPrintDebug.get(),
    262         OpenBoundaryConditions)) {
     262        OpenBoundaryConditions,
     263        params.DoSmearCharges.get())) {
    263264      STATUS("Could not create long-range jobs for electronic charge distribution.");
    264265      return Action::failure;
     
    290291          params.DoValenceOnly.get() ? MPQCData::DoSampleValenceOnly : MPQCData::DontSampleValenceOnly,
    291292          params.DoPrintDebug.get(),
    292           OpenBoundaryConditions)) {
     293          OpenBoundaryConditions,
     294          params.DoSmearCharges.get())) {
    293295        STATUS("Could not create long-range jobs for nuclei charge distribution.");
    294296        return Action::failure;
     
    316318        destiter->second.both_sampled_potential = srciter->second.sampled_potential;
    317319        destiter->second.nuclei_long = srciter->second.nuclei_long;
     320        destiter->second.forces = srciter->second.forces;
     321        destiter->second.hasForces = srciter->second.hasForces;
    318322      }
    319323    }
  • src/Actions/FragmentationAction/FragmentationAutomationAction.def

    rd1831e r3690e4  
    1818// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    1919// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
    20 #define paramtypes (std::string)(std::string)(boost::filesystem::path)(unsigned int)(unsigned int)(unsigned int)(bool)(boost::filesystem::path)(bool)(bool)
    21 #define paramtokens ("server-address")("server-port")("fragment-executable")("grid-level")("near-field-cells")("interpolation-degree")("DoLongrange")("fragment-resultfile")("DoValenceOnly")("DoPrintDebug")
    22 #define paramdescriptions ("hostname of server")("controller port of server")("executable to launch on clients")("resolution of multigrid")("number of cells used in smearing out core charge")("interpolation degree for getting the nuclei potential from the grid")("whether to calculate long-range contributions")("parse fragment results from the given file")("whether the sampling uses only the valence electron and nuclei charge")("whether to print grids for debug visualization")
    23 #define paramdefaults (PARAM_DEFAULT("127.0.0.1"))(NOPARAM_DEFAULT)(PARAM_DEFAULT("mpqc"))(PARAM_DEFAULT(5))(PARAM_DEFAULT(3))(PARAM_DEFAULT(3))(PARAM_DEFAULT("0"))(PARAM_DEFAULT(""))(PARAM_DEFAULT("0"))(PARAM_DEFAULT("0"))
    24 #define paramreferences (host)(port)(executable)(level)(near_field_cells)(interpolation_degree)(DoLongrange)(resultsfile)(DoValenceOnly)(DoPrintDebug)
     20#define paramtypes (std::string)(std::string)(boost::filesystem::path)(unsigned int)(unsigned int)(unsigned int)(bool)(boost::filesystem::path)(bool)(bool)(bool)
     21#define paramtokens ("server-address")("server-port")("fragment-executable")("grid-level")("near-field-cells")("interpolation-degree")("DoLongrange")("fragment-resultfile")("DoValenceOnly")("DoPrintDebug")("DoSmearElectronicCharges")
     22#define paramdescriptions ("hostname of server")("controller port of server")("executable to launch on clients")("resolution of multigrid")("number of cells used in smearing out core charge")("interpolation degree for getting the nuclei potential from the grid")("whether to calculate long-range contributions")("parse fragment results from the given file")("whether the sampling uses only the valence electron and nuclei charge")("whether to print grids for debug visualization")("whether to smear out electronic charge distributions with bsplines or not")
     23#define paramdefaults (PARAM_DEFAULT("127.0.0.1"))(NOPARAM_DEFAULT)(PARAM_DEFAULT("mpqc"))(PARAM_DEFAULT(5))(PARAM_DEFAULT(3))(PARAM_DEFAULT(3))(PARAM_DEFAULT("0"))(PARAM_DEFAULT(""))(PARAM_DEFAULT("0"))(PARAM_DEFAULT("0"))(PARAM_DEFAULT("0"))
     24#define paramreferences (host)(port)(executable)(level)(near_field_cells)(interpolation_degree)(DoLongrange)(resultsfile)(DoValenceOnly)(DoPrintDebug)(DoSmearCharges)
    2525#define paramvalids \
    2626(DummyValidator< std::string >()) \
     
    3232(DummyValidator< bool >()) \
    3333(DummyValidator< boost::filesystem::path >()) \
     34(DummyValidator< bool >()) \
    3435(DummyValidator< bool >()) \
    3536(DummyValidator< bool >())
  • src/Fragmentation/Automation/ResultContainer_impl.hpp

    rd1831e r3690e4  
    3838    boost::archive::text_iarchive ia(inputstream);
    3939    ia >> extractedData;
    40     LOG(1, "INFO: extracted data is " << extractedData << ".");
     40    LOG(1, "INFO: extracted data of #" << (*iter)->getId() << " is " << extractedData << ".");
    4141    fragmentData.push_back(extractedData);
    4242  }
  • src/Fragmentation/Automation/VMGFragmentController.cpp

    rd1831e r3690e4  
    7676    const MPQCData::DoValenceOnly_t _DoValenceOnly,
    7777    const bool _DoPrintDebug,
    78     const bool _OpenBoundaryConditions)
     78    const bool _OpenBoundaryConditions,
     79    const bool _DoSmearCharges)
    7980{
    8081  std::vector<FragmentJob::ptr> jobs;
     
    99100            _SampleParticles == DoSampleParticles,
    100101            _DoPrintDebug,
    101             _OpenBoundaryConditions) );
     102            _OpenBoundaryConditions,
     103            _DoSmearCharges) );
    102104    jobs.push_back(testJob);
    103105  }
     
    147149            _SampleParticles == DoSampleParticles,
    148150            _DoPrintDebug,
    149             _OpenBoundaryConditions) );
     151            _OpenBoundaryConditions,
     152            _DoSmearCharges) );
    150153    jobs.push_back(testJob);
    151154  }
  • src/Fragmentation/Automation/VMGFragmentController.hpp

    rd1831e r3690e4  
    6363   * \param _OpenBoundaryConditions whether we have open (true) or periodic (false)
    6464   *        boundary conditions
     65   * \param _DoSmearCharges whether to smear out electronic charge distributions with bsplines or not
    6566   */
    6667  bool createLongRangeJobs(
     
    7374      const MPQCData::DoValenceOnly_t _DoValenceOnly,
    7475      const bool _DoPrintDebug,
    75       const bool _OpenBoundaryConditions = false);
     76      const bool _OpenBoundaryConditions = false,
     77      const bool _DoSmearCharges = false);
    7678
    7779  void waitforResults(const size_t NoExpectedResults)
  • src/Fragmentation/Exporters/ExportGraph_ToJobs.cpp

    rd1831e r3690e4  
    8080  RealSpaceMatrix M = World::getInstance().getDomain().getM();
    8181  M *= 1./AtomicLengthToAngstroem;  // scale to atomic length units
    82   const double size = M.at(0,0);
     82  const double size = std::max( std::max(M.at(0,0), M.at(1,1)), M.at(2,2));
    8383  double end[NDIM] = { size, size, size };
    8484  const ParserTypes jobtype =
  • src/Fragmentation/Interfragmenter.cpp

    rd1831e r3690e4  
    3737#include "Interfragmenter.hpp"
    3838
    39 #include <list>
    40 #include <map>
    41 
    4239#include "CodePatterns/Assert.hpp"
    4340#include "CodePatterns/Log.hpp"
     
    4542#include "LinearAlgebra/Vector.hpp"
    4643
    47 #include "AtomIdSet.hpp"
     44#include "Descriptors/AtomDescriptor.hpp"
    4845#include "Element/element.hpp"
    4946#include "Fragmentation/Graph.hpp"
     
    5350#include "World.hpp"
    5451
    55 void Interfragmenter::operator()(
    56     size_t MaxOrder,
    57     double Rcut,
    58     const enum HydrogenTreatment treatment)
     52
     53Interfragmenter::atomkeyset_t Interfragmenter::getAtomKeySetMap(
     54    size_t _MaxOrder
     55    ) const
    5956{
    6057  /// create a map of atom to keyset (below equal MaxOrder)
    61   typedef std::list<const KeySet *> keysets_t;
    62   typedef std::map<const atom *, keysets_t > atomkeyset_t;
    6358  atomkeyset_t atomkeyset;
    6459  LOG(1, "INFO: Placing all atoms and their keysets into a map.");
     
    6964    const AtomIdSet atoms(keyset);
    7065    const size_t atoms_size = atoms.getAtomIds().size();
    71     if ((atoms_size > MaxOrder) || (atoms_size == 0))
     66    if ((atoms_size > _MaxOrder) || (atoms_size == 0))
    7267      continue;
    7368    for (AtomIdSet::const_iterator atomiter = atoms.begin();
     
    8782  LOG(2, "DEBUG: There are " << atomkeyset.size() << " entries in lookup.");
    8883
     84  return atomkeyset;
     85}
     86
     87static Vector getAtomIdSetCenter(
     88    const AtomIdSet &_atoms)
     89{
     90  const molecule * const _mol = (*_atoms.begin())->getMolecule();
     91  const size_t atoms_size = _atoms.getAtomIds().size();
     92  Vector center;
     93  for (AtomIdSet::const_iterator iter = _atoms.begin();
     94      iter != _atoms.end(); ++iter) {
     95    center += (*iter)->getPosition();
     96    ASSERT ( _mol == (*iter)->getMolecule(),
     97        "getAtomIdSetCenter() - ids in same keyset belong to different molecule.");
     98  }
     99  center *= 1./(double)atoms_size;
     100
     101  return center;
     102}
     103
     104Interfragmenter::candidates_t Interfragmenter::getNeighborsOutsideMolecule(
     105    const AtomIdSet &_atoms,
     106    double _Rcut,
     107    const enum HydrogenTreatment _treatment) const
     108{
     109  /// go through linked cell and get all neighboring atoms up to Rcut
     110  const LinkedCell::LinkedCell_View view = World::getInstance().getLinkedCell(_Rcut);
     111  const Vector center = getAtomIdSetCenter(_atoms);
     112  const LinkedCell::LinkedList neighbors = view.getAllNeighbors(_Rcut, center);
     113  LOG(4, "DEBUG: Obtained " << neighbors.size() << " neighbors in distance of "
     114      << _Rcut << " around " << center << ".");
     115
     116  /// remove all atoms that belong to same molecule as does one of the
     117  /// fragment's atoms
     118  const molecule * const _mol = (*_atoms.begin())->getMolecule();
     119  candidates_t candidates;
     120  candidates.reserve(neighbors.size());
     121  for (LinkedCell::LinkedList::const_iterator iter = neighbors.begin();
     122      iter != neighbors.end(); ++iter) {
     123    const atom * const _atom = static_cast<const atom * const >(*iter);
     124    ASSERT( _atom != NULL,
     125        "Interfragmenter::getNeighborsOutsideMolecule() - a neighbor is not actually an atom?");
     126    if ((_atom->getMolecule() != _mol)
     127        && (_atom->getPosition().DistanceSquared(center) < _Rcut*_Rcut)
     128        && ((_treatment == IncludeHydrogen) || (_atom->getType()->getAtomicNumber() != 1))) {
     129      candidates.push_back(_atom);
     130    }
     131  }
     132  LOG(3, "DEBUG: There remain " << candidates.size() << " candidates.");
     133
     134  return candidates;
     135}
     136
     137Interfragmenter::atomkeyset_t Interfragmenter::getCandidatesSpecificKeySetMap(
     138    const candidates_t &_candidates,
     139    const atomkeyset_t &_atomkeyset) const
     140{
     141  atomkeyset_t fragmentmap;
     142  for (candidates_t::const_iterator candidateiter = _candidates.begin();
     143      candidateiter != _candidates.end(); ++candidateiter) {
     144    const atom * _atom = *candidateiter;
     145    atomkeyset_t::const_iterator iter = _atomkeyset.find(_atom);
     146    ASSERT( iter != _atomkeyset.end(),
     147        "Interfragmenter::getAtomSpecificKeySetMap() - could not find atom "
     148        +toString(_atom->getId())+" in lookup.");
     149    fragmentmap.insert( std::make_pair( _atom, iter->second) );
     150  }
     151  LOG(4, "DEBUG: Copied part of lookup map contains " << fragmentmap.size() << " keys.");
     152
     153  return fragmentmap;
     154}
     155
     156void Interfragmenter::combineFragments(
     157    const size_t _MaxOrder,
     158    const candidates_t &_candidates,
     159    atomkeyset_t &_fragmentmap,
     160    const KeySet &_keyset,
     161    Graph &_InterFragments,
     162    int &_counter)
     163{
     164  for (candidates_t::const_iterator candidateiter = _candidates.begin();
     165      candidateiter != _candidates.end(); ++candidateiter) {
     166    const atom *_atom = *candidateiter;
     167    LOG(3, "DEBUG: Current candidate is " << *_atom << ".");
     168    atomkeyset_t::iterator finditer = _fragmentmap.find(_atom);
     169    ASSERT( finditer != _fragmentmap.end(),
     170        "Interfragmenter::combineFragments() - could not find atom "
     171        +toString(_atom->getId())+" in fragment specific lookup.");
     172    keysets_t &othersets = finditer->second;
     173    ASSERT( !othersets.empty(),
     174        "Interfragmenter::combineFragments() - keysets to "+toString(_atom->getId())+
     175        "is empty.");
     176    keysets_t::iterator otheriter = othersets.begin();
     177    while (otheriter != othersets.end()) {
     178      const KeySet &otherset = **otheriter;
     179      LOG(3, "DEBUG: Current keyset is " << otherset << ".");
     180      // only add them one way round and not the other
     181      if (otherset < _keyset) {
     182        ++otheriter;
     183        continue;
     184      }
     185      // only add if combined they don't exceed the desired maxorder
     186      if (otherset.size() + _keyset.size() > _MaxOrder) {
     187        LOG(3, "INFO: Rejecting " << otherset << " as in sum their orders exceed " << _MaxOrder);
     188        ++otheriter;
     189        continue;
     190      }
     191      KeySet newset(otherset);
     192      newset.insert(_keyset.begin(), _keyset.end());
     193      LOG(3, "DEBUG: Inserting new combined set " << newset << ".");
     194      _InterFragments.insert( std::make_pair(newset, std::make_pair(++_counter, 1.)));
     195      // finally, remove the set such that no other combination exists
     196      otheriter = othersets.erase(otheriter);
     197    }
     198  }
     199}
     200
     201void Interfragmenter::operator()(
     202    const size_t MaxOrder,
     203    const double Rcut,
     204    const enum HydrogenTreatment treatment)
     205{
     206  atomkeyset_t atomkeyset = getAtomKeySetMap(MaxOrder);
     207
    89208  Graph InterFragments;
    90209  int counter = TotalGraph.size();
     
    101220      continue;
    102221
    103     /// go through linked cell and get all neighboring atoms up to Rcut
    104     Vector center;
    105     const molecule *_mol = (*atoms.begin())->getMolecule();
    106     for (AtomIdSet::const_iterator iter = atoms.begin();
    107         iter != atoms.end(); ++iter) {
    108       center += (*iter)->getPosition();
    109       ASSERT ( _mol == (*iter)->getMolecule(),
    110           "Interfragmenter::operator() - ids in same keyset belong to different molecule.");
    111     }
    112     center *= 1./(double)atoms_size;
    113     LinkedCell::LinkedCell_View view = World::getInstance().getLinkedCell(Rcut);
    114     LinkedCell::LinkedList neighbors = view.getAllNeighbors(Rcut, center);
    115     LOG(4, "DEBUG: Obtained " << neighbors.size() << " neighbors in distance of "
    116         << Rcut << " around " << center << ".");
    117 
    118     /// remove all atoms that belong to same molecule as does one of the
    119     /// fragment's atoms
    120     typedef std::vector<const atom *> candidates_t;
    121     candidates_t candidates;
    122     candidates.reserve(neighbors.size());
    123     for (LinkedCell::LinkedList::const_iterator iter = neighbors.begin();
    124         iter != neighbors.end(); ++iter) {
    125       const atom * const _atom = static_cast<const atom * const >(*iter);
    126       ASSERT( _atom != NULL,
    127           "Interfragmenter::operator() - a neighbor is not actually an atom?");
    128       if ((_atom->getMolecule() != _mol)
    129           && (_atom->getPosition().DistanceSquared(center) < Rcut*Rcut)
    130           && ((treatment == IncludeHydrogen) || (_atom->getType()->getAtomicNumber() != 1))) {
    131         candidates.push_back(_atom);
    132       }
    133     }
    134     LOG(3, "DEBUG: There remain " << candidates.size() << " candidates.");
     222    // get neighboring atoms outside the current molecule
     223    candidates_t candidates = getNeighborsOutsideMolecule(atoms, Rcut, treatment);
    135224
    136225    // create a lookup specific to this fragment
    137     atomkeyset_t fragmentmap;
    138     for (candidates_t::const_iterator candidateiter = candidates.begin();
    139         candidateiter != candidates.end(); ++candidateiter) {
    140       const atom * _atom = *candidateiter;
    141       atomkeyset_t::const_iterator iter = atomkeyset.find(_atom);
    142       ASSERT( iter != atomkeyset.end(),
    143           "Interfragmenter::operator() - could not find atom "
    144           +toString(_atom->getId())+" in lookup.");
    145       fragmentmap.insert( std::make_pair( _atom, iter->second) );
    146     }
    147     LOG(4, "DEBUG: Copied part of lookup map contains " << fragmentmap.size() << " keys.");
     226    atomkeyset_t fragmentmap = getCandidatesSpecificKeySetMap(candidates, atomkeyset);
    148227
    149228    /// combine each remaining fragment with current fragment to a new fragment
    150     /// if keyset is less
    151     for (candidates_t::const_iterator candidateiter = candidates.begin();
    152         candidateiter != candidates.end(); ++candidateiter) {
    153       const atom *_atom = *candidateiter;
    154       LOG(3, "DEBUG: Current candidate is " << *_atom << ".");
    155       atomkeyset_t::iterator finditer = fragmentmap.find(_atom);
    156       ASSERT( finditer != fragmentmap.end(),
    157           "Interfragmenter::operator() - could not find atom "
    158           +toString(_atom->getId())+" in fragment specific lookup.");
    159       keysets_t &othersets = finditer->second;
    160       keysets_t::iterator otheriter = othersets.begin();
    161       while (otheriter != othersets.end()) {
    162         const KeySet &otherset = **otheriter;
    163         LOG(3, "DEBUG: Current keyset is " << otherset << ".");
    164         // only add them one way round and not the other
    165         if (otherset < keyset) {
    166           ++otheriter;
    167           continue;
    168         }
    169         KeySet newset(otherset);
    170         newset.insert(keyset.begin(), keyset.end());
    171         LOG(3, "DEBUG: Inserting new combined set " << newset << ".");
    172         InterFragments.insert( std::make_pair(newset, std::make_pair(++counter, 1.)));
    173         // finally, remove the set such that no other combination exists
    174         otheriter = othersets.erase(otheriter);
    175       }
    176     }
     229    /// if keyset is less (to prevent addding same inter-fragment twice)
     230    combineFragments(MaxOrder, candidates, fragmentmap, keyset, InterFragments, counter);
    177231  }
    178232
     
    181235  TotalGraph.InsertGraph(InterFragments, counter);
    182236}
     237
     238double Interfragmenter::findLargestCutoff(
     239    const size_t _MaxOrder,
     240    const double _upperbound,
     241    const enum HydrogenTreatment _treatment) const
     242{
     243  double Rcut = _upperbound*_upperbound;
     244  std::pair<atomId_t, atomId_t> ClosestPair;
     245  // place all atoms into LC grid with some upper bound
     246  const LinkedCell::LinkedCell_View view = World::getInstance().getLinkedCell(_upperbound);
     247
     248  atomkeyset_t atomkeyset = getAtomKeySetMap(_MaxOrder);
     249
     250  // go through each atom and find closest atom not in the same keyset
     251  for (Graph::const_iterator keysetiter = TotalGraph.begin();
     252      keysetiter != TotalGraph.end(); ++keysetiter) {
     253    const KeySet &keyset = keysetiter->first;
     254    LOG(2, "DEBUG: Current keyset is " << keyset);
     255    const AtomIdSet atoms(keyset);
     256
     257    // get neighboring atoms outside the current molecule
     258    const candidates_t candidates = getNeighborsOutsideMolecule(atoms, _upperbound, _treatment);
     259    const Vector center = getAtomIdSetCenter(atoms);
     260
     261    for (candidates_t::const_iterator candidateiter = candidates.begin();
     262        candidateiter != candidates.end(); ++candidateiter) {
     263      atom const * const Walker = *candidateiter;
     264      // go through each atom in set and pick minimal distance
     265      for (AtomIdSet::const_iterator setiter = atoms.begin(); setiter != atoms.end(); ++setiter) {
     266        const double distanceSquared = Walker->getPosition().DistanceSquared(center);
     267        // pick the smallest compared to current Rcut if smaller
     268        if (distanceSquared < Rcut) {
     269          Rcut = distanceSquared;
     270          ClosestPair.first = (*setiter)->getId();
     271          ClosestPair.second = Walker->getId();
     272          LOG(2, "DEBUG: Found new pair " << ClosestPair << " with distance " << sqrt(Rcut));
     273        }
     274      }
     275    }
     276  }
     277  const double largest_distance = sqrt(Rcut);
     278  LOG(1, "INFO: Largest inter-fragment distance to cause no additional fragments: "
     279      << largest_distance);
     280
     281  return largest_distance;
     282}
  • src/Fragmentation/Interfragmenter.hpp

    rd1831e r3690e4  
    1414#endif
    1515
     16#include <list>
     17#include <map>
    1618#include <vector>
    1719
     20#include "AtomIdSet.hpp"
    1821#include "Fragmentation/HydrogenSaturation_enum.hpp"
    1922
     
    5053   */
    5154  void operator()(
    52       size_t MaxOrder,
    53       double Rcut,
     55      const size_t MaxOrder,
     56      const double Rcut,
    5457      const enum HydrogenTreatment treatment);
     58
     59  /** This finds the largest cut off distance (\a Rcut) such that when running
     60   * operator() no additional inter-fragments would be produced.
     61   *
     62   * \param MaxOrder maximum order for fragments to interrelate
     63   * \param _upperbound upper bound on \a Rcut above which we do not look
     64   * \param treatment whether hydrogens are treated specially or not
     65   * \return largest cutoff distance to cause no additional inter-fragments
     66   */
     67  double findLargestCutoff(
     68      const size_t _MaxOrder,
     69      const double _upperbound,
     70      const enum HydrogenTreatment _treatment) const;
    5571
    5672private:
     
    6278  std::vector<atom *> getAtomsFromKeySet(const KeySet &keyset) const;
    6379
     80  typedef std::list<const KeySet *> keysets_t;
     81  typedef std::map<const atom *, keysets_t > atomkeyset_t;
     82
     83  /** Helper function to create a map of atoms and their fragments/keysets.
     84   *
     85   * \param _MaxOrder maximum order
     86   * \return map with atoms as a keys and fragments as values
     87   */
     88  atomkeyset_t getAtomKeySetMap(size_t _MaxOrder) const;
     89
     90  typedef std::vector<const atom *> candidates_t;
     91
     92  /** Helper function to get all atoms around a specific keyset not contained in
     93   * the same molecule.
     94   *
     95   * \param _atoms all atoms of a fragment
     96   * \param _Rcut desired distance cutoff
     97   * \param _treatment whether hydrogens are treated special or not
     98   */
     99  candidates_t getNeighborsOutsideMolecule(
     100      const AtomIdSet &_atoms,
     101      const double _Rcut,
     102      const enum HydrogenTreatment _treatment) const;
     103
     104  /** Helper function to return a fragment/KeySet map specific to all candidates.
     105   *
     106   * \param _candidates all neighboring atoms around keyset
     107   * \param _atomkeyset map with all atoms and the KeySets they are contained in
     108   * \return specific fragment map
     109   */
     110  atomkeyset_t getCandidatesSpecificKeySetMap(
     111      const candidates_t &_candidates,
     112      const atomkeyset_t &_atomkeyset) const;
     113
     114  /** For a given set of candidates atoms in \a _candidates and a \a _keyset
     115   * we combine each fragment from either atom and place it into internal
     116   * Graph.
     117   *
     118   * \param _MaxOrder maximum order
     119   * \param _candidates all atoms neighboring the current out outside of its molecule
     120   * \param _fragmentmap all keysets related to this atom
     121   * \param _keyset current keyset (used as base for creating inter-fragments)
     122   * \param _InterFragments container for all created inter-fragments
     123   * \param _counter counts added fragments
     124   */
     125  void combineFragments(
     126      const size_t _MaxOrder,
     127      const candidates_t &_candidates,
     128      atomkeyset_t &_fragmentmap,
     129      const KeySet &_keyset,
     130      Graph &_InterFragments,
     131      int &_counter);
    64132
    65133private:
  • src/Fragmentation/Makefile.am

    rd1831e r3690e4  
    128128libMolecuilderFragmentation_KeysetsContainer_libincludedir = $(libdir)/MoleCuilder/include
    129129nodist_libMolecuilderFragmentation_KeysetsContainer_libinclude_HEADERS = $(top_builddir)/libmolecuilder_config.h
    130 
    131 ## Install the generated pkg-config file (.pc) into the expected location for
    132 ## architecture-dependent package configuration information.  Occasionally,
    133 ## pkg-config files are also used for architecture-independent data packages,
    134 ## in which case the correct install location would be $(datadir)/pkgconfig.
    135 #pkgconfigdir = $(libdir)/pkgconfig
    136 #pkgconfig_DATA = $(top_builddir)/MoleCuilder.pc
  • src/Fragmentation/Summation/Containers/FragmentationLongRangeResults.cpp

    rd1831e r3690e4  
    6565    const KeySetsContainer& _ForceKeySet) :
    6666    KeySet(_KeySet),
    67     ForceKeySet(_ForceKeySet)
     67    ForceKeySet(_ForceKeySet),
     68    hasForces((!longrangeData.empty()) && (longrangeData.begin()->second.hasForces))
    6869{
    6970  initLookups(fragmentData, longrangeData);
     
    126127        Result_LongRange_fused, Result_perIndexSet_LongRange);
    127128
     129    IndexedVectors::indices_t fullindices;
     130    if (hasLongRangeForces()) {
     131      // force has extra data converter (this is similar to MPQCData's forces
     132      std::map<JobId_t, VMGDataForceMap_t> VMGData_Force_fused;
     133      convertDatatoForceMap<VMGData, VMGDataForceMap_t, VMGDataFused>(
     134          longrangeData, ForceKeySet, VMGData_Force_fused);
     135      Result_ForceLongRange_fused.resize(MaxLevel); // we need the results of correct size already
     136      AllLevelOrthogonalSummator<VMGDataForceMap_t> forceSummer(
     137                  subsetmap,
     138                  VMGData_Force_fused,
     139                  container->getContainer(),
     140                  VMGMatrixNrLookup,
     141                  Result_ForceLongRange_fused,
     142                  Result_perIndexSet_LongRange_Force);
     143      boost::mpl::for_each<VMGDataForceVector_t>(boost::ref(forceSummer));
     144      // build full force index set
     145      KeySetsContainer::ArrayOfIntVectors::const_iterator arrayiter = ForceKeySet.KeySets.begin();
     146      std::set<IndexedVectors::index_t> sorted_indices;
     147      for (;arrayiter != ForceKeySet.KeySets.end(); ++arrayiter) {
     148        sorted_indices.insert(arrayiter->begin(), arrayiter->end());
     149      }
     150      sorted_indices.erase(-1);
     151      fullindices.insert(fullindices.begin(), sorted_indices.begin(), sorted_indices.end());
     152    }
     153
     154    // then sum up
     155    OrthogonalSumUpPerLevel<VMGDataGridMap_t, VMGData, VMGDataGridVector_t>(
     156        longrangeData, VMGMatrixNrLookup, container, subsetmap,
     157        Result_GridLongRange_fused, Result_perIndexSet_LongRange_Grid);
     158
    128159    Result_LongRangeIntegrated_fused.reserve(MaxLevel);
    129160    // NOTE: potential for level 1 is wrongly calculated within a molecule
     
    146177      // the full solution.
    147178      const SamplingGrid &short_range_correction =
    148           boost::fusion::at_key<VMGDataFused::sampled_potential>(Result_LongRange_fused[level-1]);
     179          boost::fusion::at_key<VMGDataFused::sampled_potential>(Result_GridLongRange_fused[level-1]);
    149180      double electron_short_range_energy = short_range_correction.integral();
    150181      full_sample_solution -= short_range_correction;
     
    202233          + boost::fusion::at_key<VMGDataFused::nuclei_shortrange>(instance);
    203234      Result_LongRangeIntegrated_fused.push_back(instance);
     235
     236      if (hasLongRangeForces()) {
     237        VMGDataLongRangeForceMap_t forceinstance;
     238        IndexedVectors fullforces( fullindices, fullsolutionData[level-1].forces);
     239        IndexedVectors longrangeforces =
     240            boost::fusion::at_key<VMGDataFused::forces>(Result_ForceLongRange_fused[level-1]);
     241        boost::fusion::at_key<VMGDataFused::forces_shortrange>(forceinstance) =
     242            fullforces;
     243        fullforces -= longrangeforces;
     244        boost::fusion::at_key<VMGDataFused::forces_longrange>(forceinstance) =
     245            fullforces;
     246        Result_ForcesLongRangeIntegrated_fused.push_back(forceinstance);
     247      }
    204248    }
    205249//    {
     
    207251//      SamplingGrid full_sample_solution = fullsolutionData.back().sampled_potential;
    208252//      const SamplingGrid &short_range_correction =
    209 //          boost::fusion::at_key<VMGDataFused::sampled_potential>(Result_LongRange_fused.back()).getFullContribution();
     253//          boost::fusion::at_key<VMGDataFused::sampled_potential>(Result_GridLongRange_fused.back()).getFullContribution();
    210254//      full_sample_solution -= short_range_correction;
    211255//      // multiply element-wise with charge distribution
  • src/Fragmentation/Summation/Containers/FragmentationLongRangeResults.hpp

    rd1831e r3690e4  
    8787  }
    8888
     89  const bool hasLongRangeForces() const
     90  { return hasForces; }
     91
    8992private:
    9093  void initLookups(
     
    100103  IndexSetContainer::ptr container;
    101104  SubsetMap::ptr subsetmap;
     105  //!> indicates whether the longrange results contain VMG forces data or not
     106  bool hasForces;
    102107
    103108public:
    104109  //!> results per level of summed up sampled grid charge
    105110  std::vector<MPQCDataGridMap_t> Result_Grid_fused;
    106   //!> results per level of summed up long range potential grids and energy
     111  //!> results per level of summed up long range energies
    107112  std::vector<VMGDataMap_t> Result_LongRange_fused;
     113  //!> results per level of summed up long range forces
     114  std::vector<VMGDataForceMap_t> Result_ForceLongRange_fused;
     115  //!> results per level of summed up long range potential grids
     116  std::vector<VMGDataGridMap_t> Result_GridLongRange_fused;
    108117  //!> results per level of summed up long range true energy
    109118  std::vector<VMGDataLongRangeMap_t> Result_LongRangeIntegrated_fused;
     119  //!> results per level of summed up long range true forces
     120  std::vector<VMGDataLongRangeForceMap_t> Result_ForcesLongRangeIntegrated_fused;
    110121
    111122  //!> results per IndexSet of summed up sampled grid charge
    112123  std::map<IndexSet::ptr, std::pair<MPQCDataGridMap_t,MPQCDataGridMap_t> > Result_perIndexSet_Grid;
    113   //!> results per IndexSet of summed up long range potential grids and energy
     124  //!> results per IndexSet of summed up long range energies
    114125  std::map<IndexSet::ptr, std::pair<VMGDataMap_t, VMGDataMap_t> > Result_perIndexSet_LongRange;
     126  //!> results per IndexSet of summed up long range forces
     127  std::map<IndexSet::ptr, std::pair<VMGDataForceMap_t, VMGDataForceMap_t> > Result_perIndexSet_LongRange_Force;
     128  //!> results per IndexSet of summed up long range potential grids
     129  std::map<IndexSet::ptr, std::pair<VMGDataGridMap_t, VMGDataGridMap_t> > Result_perIndexSet_LongRange_Grid;
    115130  // we don't need the map pendant for Result_LongRangeIntegrated_fused, as this
    116131  // quantity makes sense only level-wise
  • src/Fragmentation/Summation/Containers/FragmentationShortRangeResults.cpp

    rd1831e r3690e4  
    109109    // force has extra data converter
    110110    std::map<JobId_t, MPQCDataForceMap_t> MPQCData_Force_fused;
    111     convertMPQCDatatoForceMap(fragmentData, ForceKeySet, MPQCData_Force_fused);
     111    convertDatatoForceMap<MPQCData, MPQCDataForceMap_t, MPQCDataFused>(fragmentData, ForceKeySet, MPQCData_Force_fused);
    112112    Result_Force_fused.resize(MaxLevel); // we need the results of correct size already
    113113    AllLevelOrthogonalSummator<MPQCDataForceMap_t> forceSummer(
  • src/Fragmentation/Summation/Containers/MPQCData.hpp

    rd1831e r3690e4  
    2222
    2323#include "Fragmentation/Summation/SetValues/SamplingGrid.hpp"
     24#include "Fragmentation/Summation/SetValues/FragmentForces.hpp"
    2425
    2526class MPQCCommandJob;
     
    7778
    7879  /// Forces
    79   typedef std::vector<double> vector_type;
    80   std::vector< vector_type  > forces;
     80  FragmentForces forces;
    8181
    8282  //!> whether to actually sample the density
     
    131131    ar & energies.hcore;
    132132    ar & energies.eigenvalues;
    133     ar & forces;
     133    if (version < 2) {
     134      FragmentForces::forces_t justforces(forces);
     135      ar & justforces;
     136      dynamic_cast<FragmentForces::forces_t &>(forces) = justforces;
     137    } else
     138      ar & forces;
    134139    ar & sampled_grid;
    135140    ar & DoLongrange;
     
    147152};
    148153
    149 BOOST_CLASS_VERSION(MPQCData, 1)
     154BOOST_CLASS_VERSION(MPQCData, 2)
    150155
    151156std::ostream & operator<<(std::ostream &ost, const MPQCData &data);
  • src/Fragmentation/Summation/Containers/MPQCDataFused.hpp

    rd1831e r3690e4  
    2222 * instance when going throughb the list with boost::mpl::for_each.
    2323 */
    24 namespace MPQCDataFused {
     24struct MPQCDataFused {
    2525  // keys for energy_t
    2626  struct energy_total {};
     
    5151  struct times_gather_cputime {};
    5252  struct times_gather_flops {};
    53 }
     53};
    5454
    5555
  • src/Fragmentation/Summation/Containers/VMGData.cpp

    rd1831e r3690e4  
    4444  sampled_potential(_props),
    4545  nuclei_long(0.),
    46   electron_long(0.)
     46  electron_long(0.),
     47  hasForces(false)
    4748{}
    4849
     
    5455  ost << "Nuclei long-Range energy: " << data.nuclei_long << std::endl;
    5556  ost << "Electron long-Range energy: " << data.electron_long << std::endl;
     57  ost << "Nuclei long-Range forces: " << data.forces << std::endl;
    5658  return ost;
    5759}
  • src/Fragmentation/Summation/Containers/VMGData.hpp

    rd1831e r3690e4  
    2222#include <vector>
    2323
     24#include "Fragmentation/Summation/SetValues/FragmentForces.hpp"
    2425#include "Fragmentation/Summation/SetValues/SamplingGrid.hpp"
    2526
     
    4849  //!> electron long-range contribution to energy
    4950  double electron_long;
     51  //!> force vectors of all nuclei
     52  FragmentForces forces;
     53
     54  //!> internal value to check when we should sum forces and when not
     55  bool hasForces;
    5056
    5157private:
     
    6167      ar & nuclei_long;
    6268    ar & electron_long;
     69    if (version > 2) {
     70      ar & forces;
     71      hasForces = true;
     72    } else
     73      hasForces = false;
    6374  }
    6475};
    6576
    66 BOOST_CLASS_VERSION(VMGData, 2)
     77BOOST_CLASS_VERSION(VMGData, 3)
    6778
    6879std::ostream & operator<<(std::ostream &ost, const VMGData &data);
  • src/Fragmentation/Summation/Containers/VMGDataFused.hpp

    rd1831e r3690e4  
    2323 * instance when going throughb the list with boost::mpl::for_each.
    2424 */
    25 namespace VMGDataFused {
     25struct VMGDataFused {
    2626  // keys for sampled_potential
    2727  struct sampled_potential {};
     
    2929  struct nuclei_long {};
    3030  struct electron_long {};
     31  // keys for forces
     32  struct forces {};
    3133
    3234  // keys for longrange
    33 
    3435  struct electron_longrange {};
    3536  struct electron_shortrange {};
     
    4041  struct total_longrange {};
    4142  struct total_shortrange {};
    42 }
     43
     44  struct forces_longrange {};
     45  struct forces_shortrange {};
     46};
    4347
    4448
  • src/Fragmentation/Summation/Containers/VMGDataMap.hpp

    rd1831e r3690e4  
    1818#include <boost/mpl/list.hpp>
    1919
     20#include <vector>
     21
    2022#include "Fragmentation/Summation/Containers/VMGDataFused.hpp"
    2123
    2224class SamplingGrid;
     25class IndexedVectors;
    2326
    2427/** This boost::fusion map defines key-value or rather key-type pairs with
     
    3033 */
    3134typedef boost::fusion::map<
    32     boost::fusion::pair<VMGDataFused::sampled_potential, SamplingGrid >,
    33     boost::fusion::pair<VMGDataFused::both_sampled_potential, SamplingGrid >,
    3435    boost::fusion::pair<VMGDataFused::nuclei_long, double >,
    3536    boost::fusion::pair<VMGDataFused::electron_long, double >
     
    3738
    3839typedef boost::mpl::list<
    39     VMGDataFused::sampled_potential,
    40     VMGDataFused::both_sampled_potential,
    4140    VMGDataFused::nuclei_long,
    4241    VMGDataFused::electron_long
    4342> VMGDataVector_t;
     43
     44/** This boost::fusion map defines key-value or rather key-type pairs with
     45 * which we associate all forces data members in VMGData and their type.
     46 *
     47 * This lets us resolves any ambiguitites of types in VMGData, e.g.
     48 * to know vector<double> is forces or energy_eigenvalues.
     49 *
     50 */
     51typedef boost::fusion::map<
     52    boost::fusion::pair<VMGDataFused::forces, IndexedVectors >
     53> VMGDataForceMap_t;
     54
     55typedef boost::mpl::list<
     56    VMGDataFused::forces
     57> VMGDataForceVector_t;
     58
     59typedef boost::fusion::map<
     60    boost::fusion::pair<VMGDataFused::sampled_potential, SamplingGrid >,
     61    boost::fusion::pair<VMGDataFused::both_sampled_potential, SamplingGrid >
     62> VMGDataGridMap_t;
     63
     64typedef boost::mpl::list<
     65    VMGDataFused::sampled_potential,
     66    VMGDataFused::both_sampled_potential
     67> VMGDataGridVector_t;
    4468
    4569/** This boost::fusion map defines key-value or rather key-type pairs with
     
    7296> VMGDataLongRangeVector_t;
    7397
     98typedef boost::fusion::map<
     99    boost::fusion::pair<VMGDataFused::forces_longrange, IndexedVectors >,
     100    boost::fusion::pair<VMGDataFused::forces_shortrange, IndexedVectors >
     101> VMGDataLongRangeForceMap_t;
     102
     103typedef boost::mpl::list<
     104    VMGDataFused::forces_longrange,
     105    VMGDataFused::forces_shortrange
     106> VMGDataLongRangeForceVector_t;
     107
    74108
    75109#endif /* VMGDATAMAP_HPP_ */
  • src/Fragmentation/Summation/Containers/VMGData_printKeyNames.hpp

    rd1831e r3690e4  
    3838  (nuclei_long) \
    3939  (electron_long) \
     40  (forces) \
    4041  (electron_longrange) \
    4142  (electron_shortrange) \
     
    4546  (nuclei_shortrange) \
    4647  (total_longrange) \
    47   (total_shortrange)
     48  (total_shortrange) \
     49  (forces_longrange) \
     50  (forces_shortrange)
    4851
    4952/// we take note of the number of keys in tokensequence as (local) loop bounds below
  • src/Fragmentation/Summation/Converter/DataConverter.hpp

    rd1831e r3690e4  
    8888    LOG(4, "DEBUG: Current extracted Data is " << extractedData << ".");
    8989    VMGDataMap_t instance;
    90     boost::fusion::at_key<VMGDataFused::sampled_potential>(instance) = extractedData.sampled_potential;
    91     boost::fusion::at_key<VMGDataFused::both_sampled_potential>(instance) = extractedData.both_sampled_potential;
    9290    boost::fusion::at_key<VMGDataFused::nuclei_long>(instance) = extractedData.nuclei_long;
    9391    boost::fusion::at_key<VMGDataFused::electron_long>(instance) = extractedData.electron_long;
     
    9593  }
    9694}
    97 #endif
    98 
    99 inline void convertMPQCDatatoForceMap(
    100     const std::map<JobId_t, MPQCData> &fragmentData,
     95
     96template <>
     97inline void convertDataTo<VMGData, VMGDataGridMap_t>(
     98    const std::map<JobId_t, VMGData> &longrangeData,
     99    std::map<JobId_t, VMGDataGridMap_t> &VMGData_fused)
     100{
     101  // energy_t
     102  VMGData_fused.clear();
     103  for(std::map<JobId_t, VMGData>::const_iterator dataiter = longrangeData.begin();
     104      dataiter != longrangeData.end(); ++dataiter) {
     105    const VMGData &extractedData = dataiter->second;
     106    LOG(4, "DEBUG: Current extracted Data is " << extractedData << ".");
     107    VMGDataGridMap_t instance;
     108    boost::fusion::at_key<VMGDataFused::sampled_potential>(instance) = extractedData.sampled_potential;
     109    boost::fusion::at_key<VMGDataFused::both_sampled_potential>(instance) = extractedData.both_sampled_potential;
     110    VMGData_fused.insert( std::make_pair(dataiter->first, instance) );
     111  }
     112}
     113#endif
     114
     115template <class datatype, class dataforcemap, class dataforcefused>
     116inline void convertDatatoForceMap(
     117    const std::map<JobId_t, datatype> &fragmentData,
    101118    const KeySetsContainer &ForceKeySet,
    102     std::map<JobId_t, MPQCDataForceMap_t> &MPQCData_Force_fused)
     119    std::map<JobId_t, dataforcemap> &Data_Force_fused)
    103120{
    104121  // forces
    105122  ASSERT( ForceKeySet.KeySets.size() == fragmentData.size(),
    106123      "FragmentationAutomationAction::performCall() - indices and fragmentData differ in size.");
    107   MPQCData_Force_fused.clear();
    108   std::map<JobId_t, MPQCData>::const_iterator dataiter = fragmentData.begin();
     124  Data_Force_fused.clear();
     125  typename std::map<JobId_t, datatype>::const_iterator dataiter = fragmentData.begin();
    109126  KeySetsContainer::ArrayOfIntVectors::const_iterator arrayiter = ForceKeySet.KeySets.begin();
    110127  for(;dataiter != fragmentData.end(); ++dataiter, ++arrayiter) {
    111     const MPQCData &extractedData = dataiter->second;
    112     LOG(4, "DEBUG: Current extracted Data is " << extractedData << ".");
    113     MPQCDataForceMap_t instance;
     128    const datatype &extractedData = dataiter->second;
     129    LOG(4, "DEBUG: Current extracted Data is " << extractedData << ".");
     130    dataforcemap instance;
    114131    // must convert int to index_t
    115132    if (DoLog(5)) {
     
    122139    }
    123140    IndexedVectors::indices_t indices(arrayiter->begin(), arrayiter->end());
    124     boost::fusion::at_key<MPQCDataFused::forces>(instance) =
     141    boost::fusion::at_key<typename dataforcefused::forces>(instance) =
    125142        IndexedVectors(indices, extractedData.forces);
    126     MPQCData_Force_fused.insert( std::make_pair(dataiter->first, instance) );
     143    Data_Force_fused.insert( std::make_pair(dataiter->first, instance) );
    127144  }
    128145}
  • src/Fragmentation/Summation/Makefile.am

    rd1831e r3690e4  
    7777libMolecuilderFragmentationSummation_libincludedir = $(libdir)/MoleCuilder/include
    7878nodist_libMolecuilderFragmentationSummation_libinclude_HEADERS = $(top_builddir)/libmolecuilder_config.h
    79 
    80 ## Install the generated pkg-config file (.pc) into the expected location for
    81 ## architecture-dependent package configuration information.  Occasionally,
    82 ## pkg-config files are also used for architecture-independent data packages,
    83 ## in which case the correct install location would be $(datadir)/pkgconfig.
    84 #pkgconfigdir = $(libdir)/pkgconfig
    85 #pkgconfig_DATA = $(top_builddir)/MoleCuilder.pc
  • src/Fragmentation/Summation/SetValues/Makefile.am

    rd1831e r3690e4  
    55        Fragmentation/Summation/SetValues/Eigenvalues.cpp \
    66        Fragmentation/Summation/SetValues/Fragment.cpp \
     7        Fragmentation/Summation/SetValues/FragmentForces.cpp \
    78        Fragmentation/Summation/SetValues/Histogram.cpp \
    89        Fragmentation/Summation/SetValues/IndexedVectors.cpp \
     
    1314        Fragmentation/Summation/SetValues/Eigenvalues.hpp \
    1415        Fragmentation/Summation/SetValues/Fragment.hpp \
     16        Fragmentation/Summation/SetValues/FragmentForces.hpp \
    1517        Fragmentation/Summation/SetValues/Histogram.hpp \
    1618        Fragmentation/Summation/SetValues/IndexedVectors.hpp \
  • src/Jobs/InterfaceVMGJob.cpp

    rd1831e r3690e4  
    5757#include "CodePatterns/Log.hpp"
    5858
     59#include "Fragmentation/Summation/SetValues/FragmentForces.hpp"
    5960#include "Jobs/WindowGrid_converter.hpp"
     61#include "Jobs/ChargeSmearer.hpp"
    6062
    6163using namespace VMG;
     
    7476    const ImportParticles_t _ImportParticles,
    7577    const bool _DoPrintDebug,
     78    const bool _DoSmearCharges,
    7679    int coarseningSteps,
    7780    double alpha) :
    7881  VMG::Interface(boundary, levelMin, levelMax,
    7982      _box_begin, _box_end, coarseningSteps, alpha),
    80   spl(near_field_cells, Extent(MaxLevel()).MeshWidth().Max()),
     83  nfc(near_field_cells),
     84  meshwidth(Extent(MaxLevel()).MeshWidth().Max()),
     85  spl(nfc, meshwidth),
    8186  sampled_input(_sampled_input),
    8287  returndata(_returndata),
     
    8489  ImportParticles(_ImportParticles),
    8590  DoPrintDebug(_DoPrintDebug),
    86   OpenBoundaryCondition(boundary[0] == VMG::Open)
     91  OpenBoundaryCondition(boundary[0] == VMG::Open),
     92  DoSmearCharges(_DoSmearCharges)
    8793{
    8894  for (size_t i=0;i<3;++i) {
     
    158164
    159165  // add sampled electron charge density onto grid
     166  if (DoSmearCharges) {
     167    ChargeSmearer &smearer = ChargeSmearer::getInstance();
     168    smearer.initializeSplineArray(spl, nfc, meshwidth);
     169  }
    160170  WindowGrid_converter::addWindowOntoGrid(
    161171      grid,
    162172      sampled_input,
    163173      1.,
    164       OpenBoundaryCondition);
     174      OpenBoundaryCondition,
     175      DoSmearCharges);
    165176
    166177  if (DoPrintDebug) {
     
    318329        const vmg_float length = dir.Length();
    319330
    320         if (length < r_cut) {
     331        if ((length < r_cut) && (length > std::numeric_limits<double>::epsilon())) {
    321332
    322333          (*p1)->Pot() += (*p2)->Charge() / length * (1.0 + spl.EvaluatePotential(length));
     
    331342      }
    332343
     344  const vmg_int& num_particles_local = factory.GetObjectStorageVal<vmg_int>("PARTICLE_NUM_LOCAL");
     345
    333346  /* Remove average force term */
     347//  if (!particles.empty()) {
     348//    Vector average_force = 0.0;
     349//    for (std::list<Particle::Particle>::const_iterator iter=particles.begin(); iter!=particles.end(); ++iter)
     350//      average_force += iter->Charge() * iter->Field();
     351//    const vmg_int num_particles_global = comm.GlobalSum(num_particles_local);
     352//    average_force /= (double)num_particles_global;
     353//    comm.GlobalSumArray(average_force.vec(), 3);
     354//    for (std::list<Particle::Particle>::iterator iter=particles.begin(); iter!=particles.end(); ++iter)
     355//      iter->Field() -= average_force / iter->Charge();
     356//    comm.PrintOnce(Debug, "Average force term is:         %e %e %e", average_force[0], average_force[1], average_force[2]);
     357//  }
     358
     359  comm.CommParticlesBack(particles);
     360
     361  vmg_float* q = factory.GetObjectStorageArray<vmg_float>("PARTICLE_CHARGE_ARRAY");
     362  const vmg_float* p = factory.GetObjectStorageArray<vmg_float>("PARTICLE_POTENTIAL_ARRAY");
     363  const vmg_float* f = factory.GetObjectStorageArray<vmg_float>("PARTICLE_FIELD_ARRAY");
     364
     365  // extract forces
    334366  if (!particles.empty()) {
    335     Vector average_force = 0.0;
    336     for (std::list<Particle::Particle>::const_iterator iter=particles.begin(); iter!=particles.end(); ++iter)
    337       average_force += iter->Charge() * iter->Field();
    338     const vmg_int& npl = MG::GetFactory().GetObjectStorageVal<vmg_int>("PARTICLE_NUM_LOCAL");
    339     const vmg_int num_particles_global = comm.GlobalSum(npl);
    340     average_force /= num_particles_global;
    341     comm.GlobalSumArray(average_force.vec(), 3);
    342     for (std::list<Particle::Particle>::iterator iter=particles.begin(); iter!=particles.end(); ++iter)
    343       iter->Field() -= average_force / iter->Charge();
    344   }
    345 
    346   comm.CommParticlesBack(particles);
    347 
    348   vmg_float* q = factory.GetObjectStorageArray<vmg_float>("PARTICLE_CHARGE_ARRAY");
    349   const vmg_int& num_particles_local = factory.GetObjectStorageVal<vmg_int>("PARTICLE_NUM_LOCAL");
    350   const vmg_float* p = factory.GetObjectStorageArray<vmg_float>("PARTICLE_POTENTIAL_ARRAY");
    351 //  const vmg_float* f = factory.GetObjectStorageArray<vmg_float>("PARTICLE_FIELD_ARRAY");
    352 
     367    size_t index = 0;
     368    returndata.forces.resize(
     369        num_particles_local, FragmentForces::force_t(3, 0.) );
     370    for (FragmentForces::forces_t::iterator iter = returndata.forces.begin();
     371        iter != returndata.forces.end(); ++iter) {
     372      comm.PrintOnce(Debug, "%d force vector:        %e %e %e", (index/3)+1, f[index+0], f[index+1], f[index+2]);
     373      for (size_t i=0;i<3;++i)
     374          (*iter)[i] = f[index++];
     375    }
     376    returndata.hasForces = true;
     377  }
    353378
    354379  e_long = comm.GlobalSumRoot(e_long);
  • src/Jobs/InterfaceVMGJob.hpp

    rd1831e r3690e4  
    5353      const ImportParticles_t _ImportParticles=DoImportParticles,
    5454      const bool _DoPrintDebug=false,
     55      const bool _DoSmearCharges=false,
    5556      int coarseningSteps=9,
    5657      double alpha=1.6
     
    6364
    6465protected:
     66  unsigned int nfc;
     67  const double meshwidth;
    6568  VMG::Particle::BSpline spl;
    6669
     
    8891  //!> open boundary conditions or not
    8992  const bool OpenBoundaryCondition;
     93
     94  //!> whether to smear out electronic charge distributions with bsplines or not
     95  const bool DoSmearCharges;
    9096};
    9197
  • src/Jobs/MPQCCommandJob.cpp

    rd1831e r3690e4  
    5151
    5252#include "LinearAlgebra/defs.hpp"
     53
     54#include "Fragmentation/Summation/SetValues/FragmentForces.hpp"
    5355
    5456const std::string MPQCCommandJob::keyword_hartreefock_energy("total scf energy");
     
    110112        tok_iter++;
    111113        tok_iter++;
    112         MPQCData::vector_type forcevector(NDIM);
     114        FragmentForces::force_t forcevector(NDIM);
    113115        try { // first col is index, second is element
    114116          for (size_t index = 0;index < NDIM; ++index)
  • src/Jobs/Makefile.am

    rd1831e r3690e4  
    1717if CONDVMG
    1818JOBSSOURCE += \
     19        Jobs/ChargeSmearer.cpp \
    1920        Jobs/InterfaceVMGDebugGridJob.cpp \
    2021        Jobs/InterfaceVMGJob.cpp \
     
    4344if CONDVMG
    4445JOBSHEADER += \
     46        Jobs/ChargeSmearer.hpp \
    4547        Jobs/InterfaceVMGDebugGridJob.hpp \
    4648        Jobs/InterfaceVMGJob.hpp \
     
    121123nodist_libMolecuilderJobs_libinclude_HEADERS = $(top_builddir)/libmolecuilder_config.h
    122124
    123 ## Install the generated pkg-config file (.pc) into the expected location for
    124 ## architecture-dependent package configuration information.  Occasionally,
    125 ## pkg-config files are also used for architecture-independent data packages,
    126 ## in which case the correct install location would be $(datadir)/pkgconfig.
    127 #pkgconfigdir = $(libdir)/pkgconfig
    128 #pkgconfig_DATA = $(top_builddir)/MoleCuilder.pc
    129 
  • src/Jobs/VMGJob.cpp

    rd1831e r3690e4  
    9292    const bool _DoImportParticles,
    9393    const bool _DoPrintDebug,
    94     const bool _OpenBoundaryConditions) :
     94    const bool _OpenBoundaryConditions,
     95    const bool _DoSmearCharges) :
    9596  FragmentJob(_JobId),
    9697  density_grid(_density_grid),
     
    102103  DoPrintDebug(_DoPrintDebug),
    103104  OpenBoundaryConditions(_OpenBoundaryConditions),
     105  DoSmearCharges(_DoSmearCharges),
    104106  returndata(static_cast<const SamplingGridProperties &>(_density_grid)),
    105107  particles()
     
    113115  DoPrintDebug(false),
    114116  OpenBoundaryConditions(false),
     117  DoSmearCharges(false),
    115118  particles()
    116119{}
     
    246249          VMGInterfaces::InterfaceVMGJob::DoImportParticles
    247250          : VMGInterfaces::InterfaceVMGJob::DontImportParticles,
    248       DoPrintDebug);
     251      DoPrintDebug,
     252      DoSmearCharges);
    249253  const int cycle_type = 1; // V-type
    250254  if (OpenBoundaryConditions) {
  • src/Jobs/VMGJob.hpp

    rd1831e r3690e4  
    4444   * @param _DoImportParticles whether we import particles (true) or evaluate only
    4545   * @param _DoPrintDebug whether we do print grid for debug visualization or not
     46   * @param _OpenBoundaryConditions whether we have open (true) boundary conditions or periodic (false)
     47   * @param _DoSmearCharges whether to smear out electronic charge distributions with bsplines or not
    4648   */
    4749  VMGJob(const JobId_t _JobId,
     
    5355      const bool _DoImportParticles=true,
    5456      const bool _DoPrintDebug=false,
    55       const bool _OpenBoundaryConditions=false
     57      const bool _OpenBoundaryConditions=false,
     58      const bool _DoSmearCharges=false
    5659      );
    5760  virtual ~VMGJob();
     
    8184  //!> whether we have open (true) boundary conditions or periodic (false)
    8285  const bool OpenBoundaryConditions;
     86  //!> whether to smear out electronic charge distributions with bsplines or not
     87  const bool DoSmearCharges;
    8388
    8489private:
     
    134139    ar & const_cast< bool &>(DoPrintDebug);
    135140    ar & const_cast< bool &>(OpenBoundaryConditions);
     141    ar & const_cast< bool &>(DoSmearCharges);
    136142    ar & returndata;
    137143  }
  • src/Jobs/WindowGrid_converter.cpp

    rd1831e r3690e4  
    5050
    5151#include "Fragmentation/Summation/SetValues/SamplingGrid.hpp"
     52#include "Jobs/ChargeSmearer.hpp"
    5253
    5354void WindowGrid_converter::addGridOntoWindow(
     
    178179    const SamplingGrid &grid,
    179180    const double prefactor,
    180     const bool OpenBoundaryConditions)
     181    const bool OpenBoundaryConditions,
     182    const bool DoSmearCharges)
    181183{
    182184#ifndef NDEBUG
     
    244246  }
    245247
     248  /// reset grid to zero everywhere
     249
    246250  VMG::Grid::iterator griditer = window.Iterators().Local().Begin();
    247251//  griditer.advance(pre_offset[0]*total[1]*total[2]);
     252  for(N[0]=0; N[0] < total[0]; ++N[0])
     253    for(N[1]=0; N[1] < total[1]; ++N[1])
     254      for(N[2]=0; N[2] < total[2]; ++N[2]) {
     255        ASSERT( griditer != window.Iterators().Local().End(),
     256            "InterfaceVMGJob::addWindowOntoGrid() - griditer is already at end of window.");
     257        window(*griditer++) = 0.;
     258      }
     259
     260#ifndef NDEBUG
     261  ASSERT( griditer == window.Iterators().Local().End(),
     262      "InterfaceVMGJob::addWindowOntoGrid() - griditer is not at end of window.");
     263#endif
     264
     265  /// then apply charges onto grid
     266
     267  griditer = window.Iterators().Local().Begin();
     268  SamplingGrid::sampledvalues_t::const_iterator copyiter = grid.sampled_grid.begin();
     269  const ChargeSmearer &smearer = ChargeSmearer::getInstance();
     270  // NOTE: GridIterator::operator+=()'s implementation in vmg is broken. DON'T USE!
     271//  griditer += pre_offset[0] * total[1] * total[2];
    248272  for(N[0]=0; N[0] < pre_offset[0]; ++N[0])
    249273    for(N[1]=0; N[1] < total[1]; ++N[1])
     
    251275        ASSERT( griditer != window.Iterators().Local().End(),
    252276            "InterfaceVMGJob::addWindowOntoGrid() - griditer is already at end of window.");
    253         window(*griditer++) = 0.;
    254       }
    255   SamplingGrid::sampledvalues_t::const_iterator copyiter = grid.sampled_grid.begin();
     277        griditer++;
     278      }
    256279  for(N[0]=0; N[0] < length[0]; ++N[0]) {
    257 //    griditer.advance(pre_offset[1]*total[2]);
     280//    griditer += pre_offset[1] * total[2];
    258281      for(N[1]=0; N[1] < pre_offset[1]; ++N[1])
    259282        for(N[2]=0; N[2] < total[2]; ++N[2]) {
    260283          ASSERT( griditer != window.Iterators().Local().End(),
    261284              "InterfaceVMGJob::addWindowOntoGrid() - griditer is already at end of window.");
    262           window(*griditer++) = 0.;
     285          griditer++;
    263286        }
    264287    for(N[1]=0; N[1] < length[1]; ++N[1]) {
    265 //      griditer.advance(pre_offset[2]);
    266       for(N[2]=0; N[2] < pre_offset[2]; ++N[2])
    267         window(*griditer++) = 0.;
     288//      griditer += pre_offset[2];
     289      for(N[2]=0; N[2] < pre_offset[2]; ++N[2]) {
     290        griditer++;
     291      }
     292
    268293      for(N[2]=0; N[2] < length[2]; ++N[2]) {
    269294        ASSERT( griditer != window.Iterators().Local().End(),
     
    271296        ASSERT( copyiter != grid.sampled_grid.end(),
    272297            "InterfaceVMGJob::addWindowOntoGrid() - griditer is already at end of window.");
    273         window(*griditer++) += prefactor*(*copyiter++);
    274       }
    275 //      griditer.advance(post_offset[2]);
     298        // either smear out charges or not.
     299        if (DoSmearCharges) {
     300          smearer(window, griditer++, prefactor*(*copyiter++));
     301        } else {
     302          window(*griditer++) += prefactor*(*copyiter++);
     303        }
     304      }
     305//      griditer += post_offset[2];
    276306      for(N[2]=0; N[2] < post_offset[2]; ++N[2]) {
    277307        ASSERT( griditer != window.Iterators().Local().End(),
    278308            "InterfaceVMGJob::addWindowOntoGrid() - griditer is already at end of window.");
    279         window(*griditer++) = 0.;
     309        griditer++;
    280310      }
    281311    }
    282 //    griditer.advance(post_offset[1]*total[2]);
     312//    griditer += post_offset[1] * total[2];
    283313    for(N[1]=0; N[1] < post_offset[1]; ++N[1])
    284314      for(N[2]=0; N[2] < total[2]; ++N[2]) {
    285315        ASSERT( griditer != window.Iterators().Local().End(),
    286316            "InterfaceVMGJob::addWindowOntoGrid() - griditer is already at end of window.");
    287         window(*griditer++) = 0.;
    288       }
    289   }
    290   //  griditer.advance(post_offset[0]*total[1]*total[2]);
     317        griditer++;
     318      }
     319  }
     320//  griditer += post_offset[0] * total[1] * total[2];
    291321  for(N[0]=0; N[0] < post_offset[0]; ++N[0])
    292322    for(N[1]=0; N[1] < total[1]; ++N[1])
     
    294324        ASSERT( griditer != window.Iterators().Local().End(),
    295325            "InterfaceVMGJob::addWindowOntoGrid() - griditer is already at end of window.");
    296         window(*griditer++) = 0.;
     326        griditer++;
    297327      }
    298328#ifndef NDEBUG
     
    302332      "InterfaceVMGJob::addWindowOntoGrid() - copyiter is not at end of window.");
    303333#endif
    304 //  LOG(2, "DEBUG: Grid after adding other is " << grid << ".");
     334
     335  //  LOG(2, "DEBUG: Grid after adding other is " << grid << ".");
    305336}
  • src/Jobs/WindowGrid_converter.hpp

    rd1831e r3690e4  
    4949      const SamplingGrid &grid,
    5050      const double prefactor,
    51       const bool OpenBoundaryConditions = false);
     51      const bool OpenBoundaryConditions = false,
     52      const bool DoSmearCharges = false);
    5253
    5354};
  • src/Makefile.am

    rd1831e r3690e4  
    297297        Actions/ActionHistory.hpp
    298298pyMoleCuilder_la_CPPFLAGS = $(AM_CPPFLAGS) ${BOOST_CPPFLAGS} ${CodePatterns_CFLAGS} $(JobMarket_CFLAGS) -I$(PYTHON_INCLUDE_DIR)
    299 pyMoleCuilder_la_LDFLAGS = -module -avoid-version -shared $(BOOST_PYTHON_LDFLAGS)
     299pyMoleCuilder_la_LDFLAGS = -module -version-info $(MOLECUILDER_SO_VERSION) -shared $(BOOST_PYTHON_LDFLAGS)
    300300pyMoleCuilder_la_LIBADD = \
    301301        libMolecuilderUI.la
  • src/UIElements/Makefile.am

    rd1831e r3690e4  
    280280        libMolecuilderFragmentation.la \
    281281        libMolecuilderJobs.la
     282       
    282283if CONDJOBMARKET
    283284libMolecuilderUI_la_LIBADD += \
    284285        ${JobMarket_Controller_LIBS}
    285286endif
     287
    286288libMolecuilderUI_la_LIBADD += \
    287289        libMolecuilderFragmentationSummation.la \
     
    351353## configuration header file is generated at configure time and should not be
    352354## shipped with the source tarball.
    353 #libMolecuilderUI_libincludedir = $(libdir)/MoleCuilder/include
    354 #nodist_libMolecuilderUI_libinclude_HEADERS = $(top_builddir)/libmolecuilder_config.h
    355 
    356 ## Install the generated pkg-config file (.pc) into the expected location for
    357 ## architecture-dependent package configuration information.  Occasionally,
    358 ## pkg-config files are also used for architecture-independent data packages,
    359 ## in which case the correct install location would be $(datadir)/pkgconfig.
    360 #pkgconfigdir = $(libdir)/pkgconfig
    361 #pkgconfig_DATA = $(top_builddir)/MoleCuilder.pc
     355libMolecuilderUI_libincludedir = $(libdir)/MoleCuilder/include
     356nodist_libMolecuilderUI_libinclude_HEADERS = $(top_builddir)/libmolecuilder_config.h
    362357
    363358if CONDQTGUI
     
    384379
    385380nobase_libMolecuilderQtUI_la_include_HEADERS = ${QTUIHEADER} $(QTUIUI_UIFILES)
     381
     382## Define the source file list for the "libexample-@MOLECUILDER_API_VERSION@.la"
     383## target.  Note that @MOLECUILDER_API_VERSION@ is not interpreted by Automake and
     384## will therefore be treated as if it were literally part of the target name,
     385## and the variable name derived from that.
     386## The file extension .cc is recognized by Automake, and makes it produce
     387## rules which invoke the C++ compiler to produce a libtool object file (.lo)
     388## from each source file.  Note that it is not necessary to list header files
     389## which are already listed elsewhere in a _HEADERS variable assignment.
    386390libMolecuilderQtUI_la_SOURCES = ${QTUISOURCE}
    387391nodist_libMolecuilderQtUI_la_SOURCES =
     392
     393## Instruct libtool to include ABI version information in the generated shared
     394## library file (.so).  The library ABI version is defined in configure.ac, so
     395## that all version information is kept in one place.
    388396libMolecuilderQtUI_la_LDFLAGS += -version-info $(MOLECUILDER_SO_VERSION)
    389 #libMolecuilderQtUI_libincludedir = $(libdir)/MoleCuilder/include
    390 #nodist_libMolecuilderQtUI_libinclude_HEADERS = $(top_builddir)/libmolecuilder_config.h
     397
     398## The generated configuration header is installed in its own subdirectory of
     399## $(libdir).  The reason for this is that the configuration information put
     400## into this header file describes the target platform the installed library
     401## has been built for.  Thus the file must not be installed into a location
     402## intended for architecture-independent files, as defined by the Filesystem
     403## Hierarchy Standard (FHS).
     404## The nodist_ prefix instructs Automake to not generate rules for including
     405## the listed files in the distribution on 'make dist'.  Files that are listed
     406## in _HEADERS variables are normally included in the distribution, but the
     407## configuration header file is generated at configure time and should not be
     408## shipped with the source tarball.
     409libMolecuilderQtUI_libincludedir = $(libdir)/MoleCuilder/include
     410nodist_libMolecuilderQtUI_libinclude_HEADERS = $(top_builddir)/libmolecuilder_config.h
    391411
    392412BUILT_SOURCES += ui_dialoglight.h ui_changeposition.h
  • src/UIElements/Views/Qt4/Plotting/Makefile.am

    rd1831e r3690e4  
    4444
    4545nobase_libMolecuilderQwtUI_la_include_HEADERS = ${QWTHEADER}
     46
     47## Define the source file list for the "libexample-@MOLECUILDER_API_VERSION@.la"
     48## target.  Note that @MOLECUILDER_API_VERSION@ is not interpreted by Automake and
     49## will therefore be treated as if it were literally part of the target name,
     50## and the variable name derived from that.
     51## The file extension .cc is recognized by Automake, and makes it produce
     52## rules which invoke the C++ compiler to produce a libtool object file (.lo)
     53## from each source file.  Note that it is not necessary to list header files
     54## which are already listed elsewhere in a _HEADERS variable assignment.
    4655libMolecuilderQwtUI_la_SOURCES = ${QWTSOURCE}
    4756nodist_libMolecuilderQwtUI_la_SOURCES =
     57nodist_libMolecuilderQwtUI_la_SOURCES += allqwtmocs.moc.cpp
     58
     59## Instruct libtool to include ABI version information in the generated shared
     60## library file (.so).  The library ABI version is defined in configure.ac, so
     61## that all version information is kept in one place.
    4862libMolecuilderQwtUI_la_LDFLAGS += -version-info $(MOLECUILDER_SO_VERSION)
    49 #libMolecuilderQwtUI_libincludedir = $(libdir)/MoleCuilder/include
    50 #nodist_libMolecuilderQwtUI_libinclude_HEADERS = $(top_builddir)/libmolecuilder_config.h
    5163
     64## The generated configuration header is installed in its own subdirectory of
     65## $(libdir).  The reason for this is that the configuration information put
     66## into this header file describes the target platform the installed library
     67## has been built for.  Thus the file must not be installed into a location
     68## intended for architecture-independent files, as defined by the Filesystem
     69## Hierarchy Standard (FHS).
     70## The nodist_ prefix instructs Automake to not generate rules for including
     71## the listed files in the distribution on 'make dist'.  Files that are listed
     72## in _HEADERS variables are normally included in the distribution, but the
     73## configuration header file is generated at configure time and should not be
     74## shipped with the source tarball.
     75libMolecuilderQwtUI_libincludedir = $(libdir)/MoleCuilder/include
     76nodist_libMolecuilderQwtUI_libinclude_HEADERS = $(top_builddir)/libmolecuilder_config.h
    5277
    53 nodist_libMolecuilderQwtUI_la_SOURCES += allqwtmocs.moc.cpp
    5478
    5579#Rules needed for Qt4
  • src/controller_MPQCCommandJob.cpp

    rd1831e r3690e4  
    162162    boost::archive::text_iarchive ia(inputstream);
    163163    ia >> extractedData;
    164     LOG(1, "INFO: extracted data is " << extractedData << ".");
     164    LOG(1, "INFO: extracted data of #" << (*iter)->getId() << " is " << extractedData << ".");
    165165
    166166    // place results into EnergyMatrix ...
  • tests/Python/AllActions/options.dat

    rd1831e r3690e4  
    6666DoRotate        "0"
    6767DoSaturate      "0"
     68DoSmearElectronicCharges        "0"
    6869DoValenceOnly   "0"
    6970element-db      "./"
Note: See TracChangeset for help on using the changeset viewer.