<commit_before>/*******************************************************************************
GPU OPTIMIZED MONTE CARLO (GOMC) 2.20
Copyright (C) 2018  GOMC Group
A copy of the GNU General Public License can be found in the COPYRIGHT.txt
along with this program, also can be found at <http://www.gnu.org/licenses/>.
********************************************************************************/
#ifndef DCDATA_H
#define DCDATA_H
#include "BasicTypes.h"
#include "XYZArray.h"
#include "Setup.h"
#include "System.h"
#include "CBMC.h"
#include <vector>
#include <algorithm>

class Forcefield;


namespace cbmc
{
//Class to avoid reallocating arrays for CBMC
//Could be refactored into an object pool. This would be easier if I had bothered to write accessors
class DCData
{
public:
  explicit  DCData(System& sys, const Forcefield& forcefield,
                   const Setup& set);
  ~DCData();

  const CalculateEnergy& calc;

  const EwaldCached  *calcEwald;

  const Forcefield& ff;
  const BoxDimensions& axes;
  PRNG& prng;

  const uint nAngleTrials;
  const uint nDihTrials;
  const uint nLJTrialsFirst;
  const uint nLJTrialsNth;

  //used for both angles and dihedrals
  double* angles;
  double* angleWeights;
  double* angleEnergy;

  XYZArray& positions;     //candidate positions for inclusion (alias for multiPositions[0])
  double* inter;          //intermolecule energies, reused for new and old
  double* real;           //short range coulomb interaction
  double* ljWeights;
  double* bonded;
  double* oneFour;<commit_msg>DCData calcEwald should also be Ewald object<commit_after>/*******************************************************************************
GPU OPTIMIZED MONTE CARLO (GOMC) 2.20
Copyright (C) 2018  GOMC Group
A copy of the GNU General Public License can be found in the COPYRIGHT.txt
along with this program, also can be found at <http://www.gnu.org/licenses/>.
********************************************************************************/
#ifndef DCDATA_H
#define DCDATA_H
#include "BasicTypes.h"
#include "XYZArray.h"
#include "Setup.h"
#include "System.h"
#include "CBMC.h"
#include <vector>
#include <algorithm>

class Forcefield;


namespace cbmc
{
//Class to avoid reallocating arrays for CBMC
//Could be refactored into an object pool. This would be easier if I had bothered to write accessors
class DCData
{
public:
  explicit  DCData(System& sys, const Forcefield& forcefield,
                   const Setup& set);
  ~DCData();

  const CalculateEnergy& calc;

  const Ewald  *calcEwald;

  const Forcefield& ff;
  const BoxDimensions& axes;
  PRNG& prng;

  const uint nAngleTrials;
  const uint nDihTrials;
  const uint nLJTrialsFirst;
  const uint nLJTrialsNth;

  //used for both angles and dihedrals
  double* angles;
  double* angleWeights;
  double* angleEnergy;

  XYZArray& positions;     //candidate positions for inclusion (alias for multiPositions[0])
  double* inter;          //intermolecule energies, reused for new and old
  double* real;           //short range coulomb interaction
  double* ljWeights;
  double* bonded;
  double* oneFour;
{'fraction_non_alphanumeric': 0.17679202828672452, 'fraction_numerical': 0.005143040822886531, 'mean_word_length': 4.283531409168082, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '7441193', 'n_tokens_mistral': 965, 'n_tokens_neox': 893, 'n_words': 333}