/*
  ljbond.h
  by Wei Cai  caiwei@mit.edu
  Last Modified : Fri Feb 16 09:59:52 2007

  FUNCTION  :  Two component Lennard-Jones potential, depending on group ID
*/

#ifndef _LJBOND_H
#define _LJBOND_H

#include "mdparallel.h"

//All physical constants starts with P_
#define P_KB 1.380662e-23  // (kg*m^2/s^2/K) Boltzmann constant
#define P_E 1.6021892e-19  // (C) electron charge

#define LJ_ENERGY (119.8*P_KB/P_E) // argon energy (sigma)
#define LJ_LENGTH 3.405            // argon length (epsilon)
//#define LJ_RC     (2.37343077641*LJ_LENGTH) //4 neighbor

/* In principle, MAXSP can be the same as MAXSPECIES defined in md.h
 * here we make MAXSP smaller than MAXSPECIES to save memory 
 */
#define MAXSP 4
#define MAXNUMBOND 3
class LJBONDFrame : public MDPARALLELFrame /* Si with Stillinger-Weber potential */
{
public:
    /* Lennard-Jones parameters */
    double   _ALJ[MAXSP][MAXSP];
    double   _BLJ[MAXSP][MAXSP];
    double    ALJ[MAXSP][MAXSP];
    double    BLJ[MAXSP][MAXSP];
    double     Uc[MAXSP][MAXSP];
    double  DUDRc[MAXSP][MAXSP];
    double    LJ_RC;
    double  BOND_R0, BOND_K;
    
    int *num_bonds;
    int *bond_index;
 
    LJBONDFrame(){};
    void lennard_jones_bond();
    virtual void potential();
    virtual void initvars();

    virtual void initparser();
    virtual int exec(char *name);
    virtual void calcprop();
    
    virtual void Alloc();

    void initLJ();
    void makelipids();
    void linklipids();
    
};



#endif // _LJBOND_H

