| 42 |
|
#ifndef NONBONDED_SHAPES_HPP |
| 43 |
|
#define NONBONDED_SHAPES_HPP |
| 44 |
|
|
| 45 |
+ |
#include "nonbonded/NonBondedInteraction.hpp" |
| 46 |
|
#include "types/ShapeAtomType.hpp" |
| 47 |
|
#include "UseTheForce/ForceField.hpp" |
| 48 |
|
#include "math/SquareMatrix3.hpp" |
| 50 |
|
using namespace std; |
| 51 |
|
namespace OpenMD { |
| 52 |
|
|
| 53 |
< |
class SHAPES { |
| 53 |
> |
class SHAPES : public VanDerWaalsInteraction { |
| 54 |
|
|
| 55 |
|
public: |
| 56 |
< |
static SHAPES* Instance(); |
| 57 |
< |
static void setForceField(ForceField *ff) {forceField_ = ff;}; |
| 58 |
< |
static void initialize(); |
| 59 |
< |
static void addType(AtomType* atomType); |
| 59 |
< |
|
| 60 |
< |
static void calcForce(AtomType* at1, AtomType* at2, const Vector3d d, const RealType rij, const RealType r2, const RealType sw, RealType &vpair, RealType &pot, const RotMat3x3d A1, const RotMat3x3d A2, Vector3d &f1, Vector3d &t1, Vector3d &t2); |
| 61 |
< |
|
| 62 |
< |
// Fortran support routines; |
| 63 |
< |
static RealType getShapeCut(int atid); |
| 64 |
< |
static void do_shape_pair(int *atid1, int *atid2, RealType *d, RealType *rij, RealType *r2, RealType *sw, RealType *vpair, RealType *pot, RealType *A1, RealType *A2, RealType *f1, RealType *t1, RealType *t2); |
| 56 |
> |
SHAPES(); |
| 57 |
> |
void setForceField(ForceField *ff) {forceField_ = ff;}; |
| 58 |
> |
void addType(AtomType* atomType); |
| 59 |
> |
void calcForce(InteractionData idat); |
| 60 |
|
|
| 61 |
|
private: |
| 62 |
< |
virtual ~SHAPES() { } |
| 63 |
< |
// singleton pattern, prevent reconstruction |
| 64 |
< |
SHAPES() { } |
| 65 |
< |
SHAPES(SHAPES const &) {}; |
| 66 |
< |
SHAPES& operator=(SHAPES const&) {}; |
| 72 |
< |
static SHAPES* _instance; |
| 62 |
> |
void initialize(); |
| 63 |
> |
ShapesParam getShapesParam(AtomType* atomType); |
| 64 |
> |
LJParam getLJParam(AtomType* atomType); |
| 65 |
> |
RealType getLJSigma(AtomType* atomType); |
| 66 |
> |
RealType getLJEpsilon(AtomType* atomType); |
| 67 |
|
|
| 68 |
< |
static bool initialized_; |
| 69 |
< |
static map<int, AtomType*> ShapesMap; |
| 70 |
< |
static map<pair<AtomType*, AtomType*>, SHAPESInteractionData> MixingMap; |
| 71 |
< |
static ForceField* forceField_; |
| 72 |
< |
static int lMax_; |
| 73 |
< |
static int mMax_; |
| 68 |
> |
bool initialized_; |
| 69 |
> |
map<int, AtomType*> ShapesMap; |
| 70 |
> |
map<pair<AtomType*, AtomType*>, SHAPESInteractionData> MixingMap; |
| 71 |
> |
ForceField* forceField_; |
| 72 |
> |
int lMax_; |
| 73 |
> |
int mMax_; |
| 74 |
|
}; |
| 75 |
|
} |
| 76 |
|
|