<commit_before>/* 
 * File:   ctp_map.cc
 * Author: vehoff
 *
 * Created on March 5, 2010, 3:02 PM
 */

#include <iostream>
#include <fstream>
#include <stdexcept>
#include "qmtopology.h"
#include "md2qm_observer.h"
#include <votca/csg/csgapplication.h>

using namespace std;


using namespace std;
using namespace votca::csg;

class CtpMapApp
    : public CsgApplication
{
    string ProgramName() { return "ctp_map"; }
    void HelpText(ostream &out) {
        out << "Maps an atomistic into a coarse grained geometry";
    }

    bool DoTrajectory() {return true;}
    bool DoMapping() { return true; }

    void Initialize();
    bool EvaluateOptions();

protected:
    // we have one observer
    MD2QMObserver _observer;
    Property _options;
    QMTopology _qmtopol;
};

namespace po = boost::program_options;

void CtpMapApp::Initialize()
{
    CsgApplication::Initialize();
    AddProgramOptions("Charge transport options")
            ("listcharges,l", po::value<string>(), "  Crg unit definitions")
            ("out", po::value<string>()->default_value("state.dat"), " Name of the output file for statesaver")
            ("cutoff,c", po::value<double>()-> default_value(1.0), "  CutOff for nearest neighbours");
}

bool CtpMapApp::EvaluateOptions()
{
    CheckRequired("listcharges");

    _qmtopol.LoadListCharges(OptionsMap()["listcharges"].as<string>());
    _observer.setCutoff(OptionsMap()["cutoff"].as<double>());
    _observer.setOut(OptionsMap()["out"].as<string>());
    _observer.Initialize(_qmtopol, _options);

    // add our observer that it gets called to analyze frames
    AddObserver(dynamic_cast<CGObserver*>(&_observer));
    return true;
}


int main(int argc, char** argv)
{
    CtpMapApp app;
    return app.Exec(argc, argv);
}<commit_msg>Calculator for generating site energies. non-correlated gaussian energies so far<commit_after>/* 
 * File:   ctp_map.cc
 * Author: vehoff
 *
 * Created on March 5, 2010, 3:02 PM
 */

#include <iostream>
#include <fstream>
#include <stdexcept>
#include "qmtopology.h"
#include "md2qm_observer.h"
#include <votca/csg/csgapplication.h>

using namespace std;


using namespace std;
using namespace votca::csg;

class CtpMapApp
    : public CsgApplication
{
    string ProgramName() { return "ctp_map"; }
    void HelpText(ostream &out) {
        out << "Maps an atomistic into a coarse grained geometry";
    }

    bool DoTrajectory() {return true;}
    bool DoMapping() { return true; }

    void Initialize();
    bool EvaluateOptions();

    void BeginEvaluate(Topology *top, Topology *top_ref);

protected:
    // we have one observer
    MD2QMObserver _observer;
    Property _options;
    QMTopology _qmtopol;
};

namespace po = boost::program_options;

void CtpMapApp::Initialize()
{
    CsgApplication::Initialize();
    AddProgramOptions("Charge transport options")
            ("listcharges,l", po::value<string>(), "  Crg unit definitions")
            ("out", po::value<string>()->default_value("state.dat"), " Name of the output file for statesaver")
            ("cutoff,c", po::value<double>()-> default_value(1.0), "  CutOff for nearest neighbours");
}

bool CtpMapApp::EvaluateOptions()
{
    CheckRequired("listcharges");

    _observer.setCutoff(OptionsMap()["cutoff"].as<double>());
    _observer.setOut(OptionsMap()["out"].as<string>());
    _observer.Initialize(_qmtopol, _options);

    // add our observer that it gets called to analyze frames
    AddObserver(dynamic_cast<CGObserver*>(&_observer));
    return true;
}

void CtpMapApp::BeginEvaluate(Topology *top, Topology *top_ref)
{
    _qmtopol.LoadListCharges(OptionsMap()["listcharges"].as<string>());
    CsgApplication::BeginEvaluate(top, top_ref);
}

int main(int argc, char** argv)
{
    CtpMapApp app;
    return app.Exec(argc, argv);
}
{'fraction_non_alphanumeric': 0.13788557869760085, 'fraction_numerical': 0.006327445293962563, 'mean_word_length': 4.133964817320703, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6160565', 'n_tokens_mistral': 1258, 'n_tokens_neox': 1220, 'n_words': 295}