<commit_before>#ifndef MJOLNIR_CORE_DCD_OBSERVER_HPP
#define MJOLNIR_CORE_DCD_OBSERVER_HPP
#include <mjolnir/core/ObserverBase.hpp>
#include <mjolnir/core/BoundaryCondition.hpp>
#include <mjolnir/core/System.hpp>
#include <iostream>
#include <fstream>
#include <iomanip>
#include <cassert>

namespace mjolnir
{

template<typename traitsT>
class DCDObserver final : public ObserverBase<traitsT>
{
  public:
    using base_type         = ObserverBase<traitsT>;
    using traits_type       = typename base_type::traits_type;
    using real_type         = typename base_type::real_type;
    using coordinate_type   = typename base_type::coordinate_type;
    using system_type       = typename base_type::system_type;
    using forcefield_type   = typename base_type::forcefield_type;

  public:

    explicit DCDObserver(const std::string& filename_prefix)
      : base_type(), prefix_(filename_prefix),
        pos_name_(filename_prefix + std::string("_position.dcd")),
        vel_name_(filename_prefix + std::string("_velocity.dcd"))
    {<commit_msg>fix: correctly initialize number of frames in DCD<commit_after>#ifndef MJOLNIR_CORE_DCD_OBSERVER_HPP
#define MJOLNIR_CORE_DCD_OBSERVER_HPP
#include <mjolnir/core/ObserverBase.hpp>
#include <mjolnir/core/BoundaryCondition.hpp>
#include <mjolnir/core/System.hpp>
#include <iostream>
#include <fstream>
#include <iomanip>
#include <cassert>

namespace mjolnir
{

template<typename traitsT>
class DCDObserver final : public ObserverBase<traitsT>
{
  public:
    using base_type         = ObserverBase<traitsT>;
    using traits_type       = typename base_type::traits_type;
    using real_type         = typename base_type::real_type;
    using coordinate_type   = typename base_type::coordinate_type;
    using system_type       = typename base_type::system_type;
    using forcefield_type   = typename base_type::forcefield_type;

  public:

    explicit DCDObserver(const std::string& filename_prefix)
      : base_type(), prefix_(filename_prefix),
        pos_name_(filename_prefix + std::string("_position.dcd")),
        vel_name_(filename_prefix + std::string("_velocity.dcd")),
        number_of_frames_(0)
    {
{'fraction_non_alphanumeric': 0.09602954755309326, 'fraction_numerical': 0.0004616805170821791, 'mean_word_length': 4.778666666666667, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, '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': '7292620', 'n_tokens_mistral': 731, 'n_tokens_neox': 694, 'n_words': 132}