<commit_before>// $Id: hin2mol2.C,v 1.1 2006/05/08 07:44:36 anker Exp $
//
// A very simple utility for converting HyperChem files into MOL2 files

#include <BALL/KERNEL/system.h>
#include <BALL/DATATYPE/string.h>
#include <BALL/FORMAT/MOL2File.h>
#include <BALL/FORMAT/HINFile.h>

using namespace BALL;
using namespace std;

int main(int argc, char** argv)
{

	if (argc != 2)
	{
		cerr << "Need one filename! Aborting." << endl;
		return(1);
	}
	
	String infile_name(argv[1]);
	String outfile_name(infile_name);
	outfile_name.reverse();
	outfile_name = outfile_name.after(".");
	outfile_name.reverse();
	outfile_name = outfile_name + ".mol2";

	HINFile hin_file(infile_name);
	System system;
	hin_file >> system;
	hin_file.close();
	cout << "System contains " << system.countAtoms() << " atoms." << endl;

	MOL2File mol2_file(outfile_name, ios::out);
	mol2_file << system;
	mol2_file.close();
	cout << "Wrote HyperChem file " << outfile_name << endl;

	return(0);
}
<commit_msg>fixed: copy and paste error<commit_after>// $Id: hin2mol2.C,v 1.2 2006/05/08 07:49:58 anker Exp $
//
// A very simple utility for converting HyperChem files into MOL2 files

#include <BALL/KERNEL/system.h>
#include <BALL/DATATYPE/string.h>
#include <BALL/FORMAT/MOL2File.h>
#include <BALL/FORMAT/HINFile.h>

using namespace BALL;
using namespace std;

int main(int argc, char** argv)
{

	if (argc != 2)
	{
		cerr << "Need one filename! Aborting." << endl;
		return(1);
	}
	
	String infile_name(argv[1]);
	String outfile_name(infile_name);
	outfile_name.reverse();
	outfile_name = outfile_name.after(".");
	outfile_name.reverse();
	outfile_name = outfile_name + ".mol2";

	HINFile hin_file(infile_name);
	System system;
	hin_file >> system;
	hin_file.close();
	cout << "System contains " << system.countAtoms() << " atoms." << endl;

	MOL2File mol2_file(outfile_name, ios::out);
	mol2_file << system;
	mol2_file.close();
	cout << "Wrote MOL2 file " << outfile_name << endl;

	return(0);
}

{'fraction_non_alphanumeric': 0.15607524148449414, 'fraction_numerical': 0.029994916115912557, 'mean_word_length': 4.575070821529745, 'pattern_counts': {'":': 0, '<': 51, '<?xml version=': 0, '>': 15, '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': '7046014', 'n_tokens_mistral': 819, 'n_tokens_neox': 762, 'n_words': 174}