<commit_before>#include "integralsapp.h"

Integrals::Integrals()
{}

Integrals::~Integrals()
{}

void Integrals::HelpText()
{
    //votca::md2qm::HelpTextHeader("unknown program name");
    cout << "no help text available\n\n";
    cout << _op_desc << endl;
}

void Integrals::AddSpecificOptions(){
  
}

void Integrals::setNNnames(string nnnames){
    Tokenizer tok(nnnames, " ;");
    Tokenizer::iterator itok = tok.begin();
    for (; itok!= tok.end(); ++itok){
        _nnnames.push_back(*itok);
    }
}

void Integrals::Initialize(){
    /// set the nearest neighbor names to be matched
    setNNnames(_op_vm["nnnames"].as<string>());
}

bool Integrals::MatchNNnames(CrgUnit *crg1, CrgUnit* crg2){
    vector <string>::iterator its = _nnnames.begin();
    string namecrg = crg1->getType()->GetName()+string(":")+crg2->getType()->GetName();
    for ( ; its!= _nnnames.end(); ++its){
        if(wildcmp(its->c_str(), namecrg.c_str()) ){
            return true;
        }
    }
    return false;
}

bool Integrals::EvaluateFrame(){
    QMNBList &nblist = _qmtop.nblist();
    for(QMNBList::iterator iter = nblist.begin();iter!=nblist.end();++iter){
        CrgUnit *crg1 = (*iter)->Crg1();
        CrgUnit *crg2 = (*iter)->Crg2();
        if(MatchNNnames(crg1, crg2)){
            vector <double> Js = _qmtop.GetJCalc().CalcJ(*crg1, *crg2);
            (*iter)->setJs(Js);
        }
    }

    stringstream ss;
    ss << _qmtop.getStep();
    string res;
    ss >> res;
    res = string ("nbl") + res + string(".res");
    PrintNbs(res);
}

 void Integrals::EndEvaluate()
 {
 }<commit_msg>cosmetics. Note: step in qmtop does not appear to be properly initialized!!<commit_after>#include "integralsapp.h"

Integrals::Integrals()
{}

Integrals::~Integrals()
{}

void Integrals::HelpText()
{
    //votca::md2qm::HelpTextHeader("unknown program name");
    cout << "no help text available\n\n";
    cout << _op_desc << endl;
}

void Integrals::AddSpecificOptions(){
  
}

void Integrals::setNNnames(string nnnames){
    Tokenizer tok(nnnames, " ;");
    Tokenizer::iterator itok = tok.begin();
    for (; itok!= tok.end(); ++itok){
        _nnnames.push_back(*itok);
    }
}

void Integrals::Initialize(){
    /// set the nearest neighbor names to be matched
    setNNnames(_op_vm["nnnames"].as<string>());
}

bool Integrals::MatchNNnames(CrgUnit *crg1, CrgUnit* crg2){
    vector <string>::iterator its = _nnnames.begin();
    string namecrg = crg1->getType()->GetName()+string(":")+crg2->getType()->GetName();
    for ( ; its!= _nnnames.end(); ++its){
        if(wildcmp(its->c_str(), namecrg.c_str()) ){
            return true;
        }
    }
    return false;
}

bool Integrals::EvaluateFrame(){
    QMNBList &nblist = _qmtop.nblist();
    for(QMNBList::iterator iter = nblist.begin();iter!=nblist.end();++iter){
        CrgUnit *crg1 = (*iter)->Crg1();
        CrgUnit *crg2 = (*iter)->Crg2();
        if(MatchNNnames(crg1, crg2)){
            vector <double> Js = _qmtop.GetJCalc().CalcJ(*crg1, *crg2);
            (*iter)->setJs(Js);
        }
    }

    stringstream ss;
    ss << _qmtop.getStep();
    string res;
    ss >> res;
    res = string ("nbl_") + res + string(".res");
    PrintNbs(res);
}

 void Integrals::EndEvaluate()
 {
 }
{'fraction_non_alphanumeric': 0.1847859562673237, 'fraction_numerical': 0.008007391438250694, 'mean_word_length': 3.3019867549668875, 'pattern_counts': {'":': 2, '<': 25, '<?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': '5687102', 'n_tokens_mistral': 1180, 'n_tokens_neox': 1168, 'n_words': 217}