<commit_before>// $Id$
//
//  Copyright (C) 2003-2006 Rational Discovery LLC
//
//   @@ All Rights Reserved  @@
//
#include <RDKitBase.h>
#include <GraphMol/Rings.h>
#include <RDGeneral/RDLog.h>


#include <RDGeneral/utils.h>
#include <vector>
#include <set>
#include <algorithm>

typedef std::set<double> DOUBLE_SET;
typedef DOUBLE_SET::const_iterator DOUBLE_SET_CI;

namespace RingUtils {
  using namespace RDKit;

  void convertToBonds(VECT_INT_VECT &res, VECT_INT_VECT &brings, const ROMol &mol) {
    VECT_INT_VECT_I ri;
    int i, rsiz, bid;
    for (ri = res.begin(); ri != res.end(); ri++) {
      INT_VECT bring;
      rsiz = (*ri).size();
      for (i = 0; i < (rsiz-1); i++) {
	bid = mol.getBondBetweenAtoms((*ri)[i], (*ri)[i+1])->getIdx();
	bring.push_back(bid);
      }
      // bond from last to first atom
      bid = mol.getBondBetweenAtoms((*ri)[rsiz-1], (*ri)[0])->getIdx();
      bring.push_back(bid);
      brings.push_back(bring);
    }
  }<commit_msg>RDKitBase inclue fixed to include from this dir<commit_after>// $Id$
//
//  Copyright (C) 2003-2006 Rational Discovery LLC
//
//   @@ All Rights Reserved  @@
//
#include "RDKitBase.h"
#include <GraphMol/Rings.h>
#include <RDGeneral/RDLog.h>


#include <RDGeneral/utils.h>
#include <vector>
#include <set>
#include <algorithm>

typedef std::set<double> DOUBLE_SET;
typedef DOUBLE_SET::const_iterator DOUBLE_SET_CI;

namespace RingUtils {
  using namespace RDKit;

  void convertToBonds(VECT_INT_VECT &res, VECT_INT_VECT &brings, const ROMol &mol) {
    VECT_INT_VECT_I ri;
    int i, rsiz, bid;
    for (ri = res.begin(); ri != res.end(); ri++) {
      INT_VECT bring;
      rsiz = (*ri).size();
      for (i = 0; i < (rsiz-1); i++) {
	bid = mol.getBondBetweenAtoms((*ri)[i], (*ri)[i+1])->getIdx();
	bring.push_back(bid);
      }
      // bond from last to first atom
      bid = mol.getBondBetweenAtoms((*ri)[rsiz-1], (*ri)[0])->getIdx();
      bring.push_back(bid);
      brings.push_back(bring);
    }
  }
{'fraction_non_alphanumeric': 0.1717171717171717, 'fraction_numerical': 0.013131313131313131, 'mean_word_length': 3.481900452488688, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 22, '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': '6244758', 'n_tokens_mistral': 803, 'n_tokens_neox': 757, 'n_words': 169}