lammps-master/src/USER-MISC/pair_ilp_graphene_hbn.h
inline double calc_Tap(double r_ij, double Rcut) {
    double Tap,r;
    double Tap_coeff[8] = {1.0,0.0,0.0,0.0,-35.0,84.0,-70.0,20.0};

    r = r_ij/Rcut;
    if(r >= 1.0) {Tap = 0.0;}
    else {
      Tap = Tap_coeff[7] * r + Tap_coeff[6];
      Tap = Tap * r  + Tap_coeff[5];
      Tap = Tap * r  + Tap_coeff[4];
      Tap = Tap * r  + Tap_coeff[3];
      Tap = Tap * r  + Tap_coeff[2];
      Tap = Tap * r  + Tap_coeff[1];
      Tap = Tap * r  + Tap_coeff[0];
    }
    return(Tap);
}
/* ----Calculate the long-range cutoff term */
Calculate the long-range cutoff term
Calculate the long - range cutoff term
inline double calc_Tap(double r_ij, double Rcut) {
    double Tap,r;
    double Tap_coeff[8] = {1.0,0.0,0.0,0.0,-35.0,84.0,-70.0,20.0};
    r = r_ij/Rcut;
    if(r >= 1.0) {Tap = 0.0;}
    else {
      Tap = Tap_coeff[7] * r + Tap_coeff[6];
      Tap = Tap * r  + Tap_coeff[5];
      Tap = Tap * r  + Tap_coeff[4];
      Tap = Tap * r  + Tap_coeff[3];
      Tap = Tap * r  + Tap_coeff[2];
      Tap = Tap * r  + Tap_coeff[1];
      Tap = Tap * r  + Tap_coeff[0];
    }
    return(Tap);
}
inline double calc_Tap ( double r_ij , double Rcut ) { double Tap , r ; double Tap_coeff [ 8 ] = { 1.0 , 0.0 , 0.0 , 0.0 , -35.0 , 84.0 , -70.0 , 20.0 } ; r = r_ij / Rcut ; if ( r >= 1.0 ) { Tap = 0.0 ; } else { Tap = Tap_coeff [ 7 ] * r + Tap_coeff [ 6 ] ; Tap = Tap * r + Tap_coeff [ 5 ] ; Tap = Tap * r + Tap_coeff [ 4 ] ; Tap = Tap * r + Tap_coeff [ 3 ] ; Tap = Tap * r + Tap_coeff [ 2 ] ; Tap = Tap * r + Tap_coeff [ 1 ] ; Tap = Tap * r + Tap_coeff [ 0 ] ; } return ( Tap ) ; }
Calculate the long-range cutoff term
Calculate the long - range cutoff term