<commit_before>/*!
  @file XYZReader.hpp
  @brief definition of a class that reads xyz file.

  @author <NAME> (<EMAIL>)
  @date 2017-01-05 17:00
  @copyright <NAME> 2016 on MIT License
*/

#ifndef COFFEE_MILL_XYZ_READER_HPP
#define COFFEE_MILL_XYZ_READER_HPP
#include <mill/common/Trajectory.hpp>
#include <memory>
#include <utility>
#include <fstream>
#include <sstream>
#include <stdexcept>
#include <string>
#include <vector>

namespace mill
{

//! read XYZfile and return the data as std::vector<std::vector<position>>.
/*!
 *  @tparam vectorT type of position
 */
template<typename vectorT>
class XYZReader
{
  public:
    using vector_type     = vectorT;
    using trajectory_type = Trajectory<vector_type>;
    using snapshot_type   = typename trajectory_type::snapshot_type;
    using particle_type   = typename snapshot_type::particle_type;

  public:
    XYZReader(const std::string& fname): xyz_(fname)
    {
        if(!xyz_.good())
        {
            throw std::runtime_error("XYZReader: file open error: " + fname);
        }<commit_msg>:alien: remove template argument from Trajectory<commit_after>/*!
  @file XYZReader.hpp
  @brief definition of a class that reads xyz file.

  @author <NAME> (<EMAIL>)
  @date 2017-01-05 17:00
  @copyright <NAME> 2016 on MIT License
*/

#ifndef COFFEE_MILL_XYZ_READER_HPP
#define COFFEE_MILL_XYZ_READER_HPP
#include <mill/common/Trajectory.hpp>
#include <memory>
#include <utility>
#include <fstream>
#include <sstream>
#include <stdexcept>
#include <string>
#include <vector>

namespace mill
{

//! read XYZfile and return the data as std::vector<std::vector<position>>.
/*!
 *  @tparam vectorT type of position
 */
template<typename vectorT>
class XYZReader
{
  public:
    using trajectory_type = Trajectory;
    using snapshot_type   = typename trajectory_type::snapshot_type;
    using particle_type   = typename snapshot_type::particle_type;
    using vector_type     = typename particle_type::vector_type;

  public:
    XYZReader(const std::string& fname): xyz_(fname)
    {
        if(!xyz_.good())
        {
            throw std::runtime_error("XYZReader: file open error: " + fname);
        }
{'fraction_non_alphanumeric': 0.11296296296296296, 'fraction_numerical': 0.014814814814814815, 'mean_word_length': 4.060889929742388, 'pattern_counts': {'":': 0, '<': 32, '<?xml version=': 0, '>': 32, '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': '4474831', 'n_tokens_mistral': 773, 'n_tokens_neox': 710, 'n_words': 186}