lammps-master/src/USER-MISC/pair_ilp_graphene_hbn.h
inline double calc_dTap(double r_ij, double Rcut) {
    double dTap,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) {dTap = 0.0;}
    else {
      dTap = 7.0*Tap_coeff[7] * r + 6.0*Tap_coeff[6];
      dTap = dTap * r  + 5.0*Tap_coeff[5];
      dTap = dTap * r  + 4.0*Tap_coeff[4];
      dTap = dTap * r  + 3.0*Tap_coeff[3];
      dTap = dTap * r  + 2.0*Tap_coeff[2];
      dTap = dTap * r  + Tap_coeff[1];
      dTap = dTap/Rcut;
    }
    return(dTap);
  }
/* ----Calculate the derivatives of long-range cutoff term */
Calculate the derivatives of long-range cutoff term
Calculate the derivatives of long - range cutoff term
inline double calc_dTap(double r_ij, double Rcut) {
    double dTap,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) {dTap = 0.0;}
    else {
      dTap = 7.0*Tap_coeff[7] * r + 6.0*Tap_coeff[6];
      dTap = dTap * r  + 5.0*Tap_coeff[5];
      dTap = dTap * r  + 4.0*Tap_coeff[4];
      dTap = dTap * r  + 3.0*Tap_coeff[3];
      dTap = dTap * r  + 2.0*Tap_coeff[2];
      dTap = dTap * r  + Tap_coeff[1];
      dTap = dTap/Rcut;
    }
    return(dTap);
  }
inline double calc_dTap ( double r_ij , double Rcut ) { double dTap , 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 ) { dTap = 0.0 ; } else { dTap = 7.0 * Tap_coeff [ 7 ] * r + 6.0 * Tap_coeff [ 6 ] ; dTap = dTap * r + 5.0 * Tap_coeff [ 5 ] ; dTap = dTap * r + 4.0 * Tap_coeff [ 4 ] ; dTap = dTap * r + 3.0 * Tap_coeff [ 3 ] ; dTap = dTap * r + 2.0 * Tap_coeff [ 2 ] ; dTap = dTap * r + Tap_coeff [ 1 ] ; dTap = dTap / Rcut ; } return ( dTap ) ; }
Calculate the derivatives of long-range cutoff term
Calculate the derivatives of long - range cutoff term