1
/* -*- c++ -*- ----------------------------------------------------------
2
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
3
http://lammps.sandia.gov, Sandia National Laboratories
4
Steve Plimpton, sjplimp@sandia.gov
6
Copyright (2003) Sandia Corporation. Under the terms of Contract
7
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
8
certain rights in this software. This software is distributed under
9
the GNU General Public License.
11
See the README file in the top-level LAMMPS directory.
12
------------------------------------------------------------------------- */
14
/* ----------------------------------------------------------------------
15
Contributing author: W. Michael Brown (Intel)
16
------------------------------------------------------------------------- */
20
PairStyle(lj/charmm/coul/long/intel,PairLJCharmmCoulLongIntel)
24
#ifndef LMP_PAIR_LJ_CHARMM_COUL_LONG_INTEL_H
25
#define LMP_PAIR_LJ_CHARMM_COUL_LONG_INTEL_H
27
#include "pair_lj_charmm_coul_long.h"
28
#include "fix_intel.h"
32
class PairLJCharmmCoulLongIntel : public PairLJCharmmCoulLong {
35
PairLJCharmmCoulLongIntel(class LAMMPS *);
36
virtual ~PairLJCharmmCoulLongIntel();
38
virtual void compute(int, int);
41
typedef struct { float x,y,z; int w; } sng4_t;
47
template <class flt_t> class ForceConst;
48
template <class flt_t, class acc_t>
49
void compute(int eflag, int vflag, IntelBuffers<flt_t,acc_t> *buffers,
50
const ForceConst<flt_t> &fc);
51
template <int EVFLAG, int EFLAG, int NEWTON_PAIR, class flt_t, class acc_t>
52
void eval(const int offload, const int vflag,
53
IntelBuffers<flt_t,acc_t> * buffers,
54
const ForceConst<flt_t> &fc, const int astart, const int aend);
56
template <class flt_t, class acc_t>
57
void pack_force_const(ForceConst<flt_t> &fc,
58
IntelBuffers<flt_t, acc_t> *buffers);
60
// ----------------------------------------------------------------------
61
template <class flt_t>
64
typedef struct { flt_t r, dr, f, df; } table_t;
65
_alignvar(flt_t special_coul[4],64);
66
_alignvar(flt_t special_lj[4],64);
67
flt_t **cutsq, g_ewald, tabinnersq;
68
flt_t cut_coulsq, cut_ljsq;
71
flt_t *etable, *detable, *ctable, *dctable;
72
typename IntelBuffers<flt_t,flt_t>::vec4_t **lj;
74
ForceConst() : _ntypes(0), _ntable(0) {}
75
~ForceConst() { set_ntypes(0,0,NULL,_cop); }
77
void set_ntypes(const int ntypes, const int ntable, Memory *memory,
81
int _ntypes, _ntable, _cop;
84
ForceConst<float> force_const_single;
85
ForceConst<double> force_const_double;
93
/* ERROR/WARNING messages:
95
E: The 'package intel' command is required for /intel styles
99
E: Intel varient of lj/charmm/coul/long expects lj cutoff<=coulombic
101
The intel accelerated version of the CHARMM style requires that the
102
Lennard-Jones cutoff is not greater than the coulombic cutoff.