ComputeNonbondedUtil Class Reference

#include <ComputeNonbondedUtil.h>

Inheritance diagram for ComputeNonbondedUtil:
ComputeLCPO ComputeNonbondedCUDA ComputeNonbondedMIC ComputeNonbondedPair ComputeNonbondedSelf CudaComputeNonbonded ExclElem

List of all members.

Public Types

enum  {
  exclChecksumIndex, pairlistWarningIndex, electEnergyIndex, fullElectEnergyIndex,
  vdwEnergyIndex, goNativeEnergyIndex, goNonnativeEnergyIndex, groLJEnergyIndex,
  groGaussEnergyIndex, electEnergyIndex_s, fullElectEnergyIndex_s, vdwEnergyIndex_s,
  electEnergyIndex_ti_1, fullElectEnergyIndex_ti_1, vdwEnergyIndex_ti_1, electEnergyIndex_ti_2,
  fullElectEnergyIndex_ti_2, vdwEnergyIndex_ti_2, TENSOR = (virialIndex), TENSOR = (virialIndex),
  VECTOR = (pairVDWForceIndex), VECTOR = (pairVDWForceIndex), reductionDataSize
}

Public Member Functions

 ComputeNonbondedUtil ()
 ~ComputeNonbondedUtil ()
void calcGBIS (nonbonded *params, GBISParamStruct *gbisParams)

Static Public Member Functions

static void select (void)
static void submitReductionData (BigReal *, SubmitReduction *)
static void submitPressureProfileData (BigReal *, SubmitReduction *)
static BigReal square (const BigReal &x, const BigReal &y, const BigReal &z)
static void calc_error (nonbonded *)
static void calc_pair (nonbonded *)
static void calc_pair_energy (nonbonded *)
static void calc_pair_fullelect (nonbonded *)
static void calc_pair_energy_fullelect (nonbonded *)
static void calc_pair_merge_fullelect (nonbonded *)
static void calc_pair_energy_merge_fullelect (nonbonded *)
static void calc_pair_slow_fullelect (nonbonded *)
static void calc_pair_energy_slow_fullelect (nonbonded *)
static void calc_self (nonbonded *)
static void calc_self_energy (nonbonded *)
static void calc_self_fullelect (nonbonded *)
static void calc_self_energy_fullelect (nonbonded *)
static void calc_self_merge_fullelect (nonbonded *)
static void calc_self_energy_merge_fullelect (nonbonded *)
static void calc_self_slow_fullelect (nonbonded *)
static void calc_self_energy_slow_fullelect (nonbonded *)
static void calc_pair_energy_fep (nonbonded *)
static void calc_pair_energy_fullelect_fep (nonbonded *)
static void calc_pair_energy_merge_fullelect_fep (nonbonded *)
static void calc_pair_energy_slow_fullelect_fep (nonbonded *)
static void calc_self_energy_fep (nonbonded *)
static void calc_self_energy_fullelect_fep (nonbonded *)
static void calc_self_energy_merge_fullelect_fep (nonbonded *)
static void calc_self_energy_slow_fullelect_fep (nonbonded *)
static void calc_pair_energy_ti (nonbonded *)
static void calc_pair_ti (nonbonded *)
static void calc_pair_energy_fullelect_ti (nonbonded *)
static void calc_pair_fullelect_ti (nonbonded *)
static void calc_pair_energy_merge_fullelect_ti (nonbonded *)
static void calc_pair_merge_fullelect_ti (nonbonded *)
static void calc_pair_energy_slow_fullelect_ti (nonbonded *)
static void calc_pair_slow_fullelect_ti (nonbonded *)
static void calc_self_energy_ti (nonbonded *)
static void calc_self_ti (nonbonded *)
static void calc_self_energy_fullelect_ti (nonbonded *)
static void calc_self_fullelect_ti (nonbonded *)
static void calc_self_energy_merge_fullelect_ti (nonbonded *)
static void calc_self_merge_fullelect_ti (nonbonded *)
static void calc_self_energy_slow_fullelect_ti (nonbonded *)
static void calc_self_slow_fullelect_ti (nonbonded *)
static void calc_pair_les (nonbonded *)
static void calc_pair_energy_les (nonbonded *)
static void calc_pair_fullelect_les (nonbonded *)
static void calc_pair_energy_fullelect_les (nonbonded *)
static void calc_pair_merge_fullelect_les (nonbonded *)
static void calc_pair_energy_merge_fullelect_les (nonbonded *)
static void calc_pair_slow_fullelect_les (nonbonded *)
static void calc_pair_energy_slow_fullelect_les (nonbonded *)
static void calc_self_les (nonbonded *)
static void calc_self_energy_les (nonbonded *)
static void calc_self_fullelect_les (nonbonded *)
static void calc_self_energy_fullelect_les (nonbonded *)
static void calc_self_merge_fullelect_les (nonbonded *)
static void calc_self_energy_merge_fullelect_les (nonbonded *)
static void calc_self_slow_fullelect_les (nonbonded *)
static void calc_self_energy_slow_fullelect_les (nonbonded *)
static void calc_pair_energy_int (nonbonded *)
static void calc_pair_energy_fullelect_int (nonbonded *)
static void calc_pair_energy_merge_fullelect_int (nonbonded *)
static void calc_self_energy_int (nonbonded *)
static void calc_self_energy_fullelect_int (nonbonded *)
static void calc_self_energy_merge_fullelect_int (nonbonded *)
static void calc_pair_pprof (nonbonded *)
static void calc_pair_energy_pprof (nonbonded *)
static void calc_pair_fullelect_pprof (nonbonded *)
static void calc_pair_energy_fullelect_pprof (nonbonded *)
static void calc_pair_merge_fullelect_pprof (nonbonded *)
static void calc_pair_energy_merge_fullelect_pprof (nonbonded *)
static void calc_pair_slow_fullelect_pprof (nonbonded *)
static void calc_pair_energy_slow_fullelect_pprof (nonbonded *)
static void calc_self_pprof (nonbonded *)
static void calc_self_energy_pprof (nonbonded *)
static void calc_self_fullelect_pprof (nonbonded *)
static void calc_self_energy_fullelect_pprof (nonbonded *)
static void calc_self_merge_fullelect_pprof (nonbonded *)
static void calc_self_energy_merge_fullelect_pprof (nonbonded *)
static void calc_self_slow_fullelect_pprof (nonbonded *)
static void calc_self_energy_slow_fullelect_pprof (nonbonded *)
static void calc_pair_tabener (nonbonded *)
static void calc_pair_energy_tabener (nonbonded *)
static void calc_pair_fullelect_tabener (nonbonded *)
static void calc_pair_energy_fullelect_tabener (nonbonded *)
static void calc_pair_merge_fullelect_tabener (nonbonded *)
static void calc_pair_energy_merge_fullelect_tabener (nonbonded *)
static void calc_pair_slow_fullelect_tabener (nonbonded *)
static void calc_pair_energy_slow_fullelect_tabener (nonbonded *)
static void calc_self_tabener (nonbonded *)
static void calc_self_energy_tabener (nonbonded *)
static void calc_self_fullelect_tabener (nonbonded *)
static void calc_self_energy_fullelect_tabener (nonbonded *)
static void calc_self_merge_fullelect_tabener (nonbonded *)
static void calc_self_energy_merge_fullelect_tabener (nonbonded *)
static void calc_self_slow_fullelect_tabener (nonbonded *)
static void calc_self_energy_slow_fullelect_tabener (nonbonded *)
static void calc_pair_go (nonbonded *)
static void calc_pair_energy_go (nonbonded *)
static void calc_pair_fullelect_go (nonbonded *)
static void calc_pair_energy_fullelect_go (nonbonded *)
static void calc_pair_merge_fullelect_go (nonbonded *)
static void calc_pair_energy_merge_fullelect_go (nonbonded *)
static void calc_pair_slow_fullelect_go (nonbonded *)
static void calc_pair_energy_slow_fullelect_go (nonbonded *)
static void calc_self_go (nonbonded *)
static void calc_self_energy_go (nonbonded *)
static void calc_self_fullelect_go (nonbonded *)
static void calc_self_energy_fullelect_go (nonbonded *)
static void calc_self_merge_fullelect_go (nonbonded *)
static void calc_self_energy_merge_fullelect_go (nonbonded *)
static void calc_self_slow_fullelect_go (nonbonded *)
static void calc_self_energy_slow_fullelect_go (nonbonded *)

Static Public Attributes

static void(* calcPair )(nonbonded *)
static void(* calcPairEnergy )(nonbonded *)
static void(* calcSelf )(nonbonded *)
static void(* calcSelfEnergy )(nonbonded *)
static void(* calcFullPair )(nonbonded *)
static void(* calcFullPairEnergy )(nonbonded *)
static void(* calcFullSelf )(nonbonded *)
static void(* calcFullSelfEnergy )(nonbonded *)
static void(* calcMergePair )(nonbonded *)
static void(* calcMergePairEnergy )(nonbonded *)
static void(* calcMergeSelf )(nonbonded *)
static void(* calcMergeSelfEnergy )(nonbonded *)
static void(* calcSlowPair )(nonbonded *)
static void(* calcSlowPairEnergy )(nonbonded *)
static void(* calcSlowSelf )(nonbonded *)
static void(* calcSlowSelfEnergy )(nonbonded *)
static Bool commOnly
static Bool fixedAtomsOn
static Bool qmForcesOn
static BigReal cutoff
static BigReal cutoff2
static float cutoff2_f
static BigReal dielectric_1
static const LJTableljTable = 0
static const Moleculemol
static BigReal r2_delta
static BigReal r2_delta_1
static int rowsize
static int columnsize
static int r2_delta_exp
static BigRealtable_alloc = 0
static BigRealtable_ener = 0
static BigRealtable_short
static BigRealtable_noshort
static BigRealfast_table
static BigRealscor_table
static BigRealslow_table
static BigRealcorr_table
static BigRealfull_table
static BigRealvdwa_table
static BigRealvdwb_table
static BigRealr2_table
static int table_length
static BigReal scaling
static BigReal scale14
static BigReal switchOn
static BigReal switchOn_1
static BigReal switchOn2
static BigReal v_vdwa
static BigReal v_vdwb
static BigReal k_vdwa
static BigReal k_vdwb
static BigReal cutoff_3
static BigReal cutoff_6
static float v_vdwa_f
static float v_vdwb_f
static float k_vdwa_f
static float k_vdwb_f
static float cutoff_3_f
static float cutoff_6_f
static float switchOn_f
static float A6_f
static float B6_f
static float C6_f
static float A12_f
static float B12_f
static float C12_f
static BigReal c0
static BigReal c1
static BigReal c3
static BigReal c5
static BigReal c6
static BigReal c7
static BigReal c8
static Bool alchFepOn
static Bool alchThermIntOn
static Bool alchWCAOn
static BigReal alchVdwShiftCoeff
static Bool vdwForceSwitching
static Bool alchDecouple
static Bool lesOn
static int lesFactor
static BigReal lesScaling
static BigReallambda_table = 0
static Bool pairInteractionOn
static Bool pairInteractionSelf
static Bool pressureProfileOn
static int pressureProfileSlabs
static int pressureProfileAtomTypes
static BigReal pressureProfileThickness
static BigReal pressureProfileMin
static Bool accelMDOn
static Bool drudeNbthole
static BigReal ewaldcof
static BigReal pi_ewaldcof
static int vdw_switch_mode
static Bool goGroPair
static Bool goForcesOn
static int goMethod

Detailed Description

Definition at line 235 of file ComputeNonbondedUtil.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
exclChecksumIndex 
pairlistWarningIndex 
electEnergyIndex 
fullElectEnergyIndex 
vdwEnergyIndex 
goNativeEnergyIndex 
goNonnativeEnergyIndex 
groLJEnergyIndex 
groGaussEnergyIndex 
electEnergyIndex_s 
fullElectEnergyIndex_s 
vdwEnergyIndex_s 
electEnergyIndex_ti_1 
fullElectEnergyIndex_ti_1 
vdwEnergyIndex_ti_1 
electEnergyIndex_ti_2 
fullElectEnergyIndex_ti_2 
vdwEnergyIndex_ti_2 
TENSOR 
TENSOR 
VECTOR 
VECTOR 
reductionDataSize 

Definition at line 264 of file ComputeNonbondedUtil.h.


Constructor & Destructor Documentation

ComputeNonbondedUtil::ComputeNonbondedUtil (  )  [inline]

Definition at line 239 of file ComputeNonbondedUtil.h.

00239 {}

ComputeNonbondedUtil::~ComputeNonbondedUtil (  )  [inline]

Definition at line 240 of file ComputeNonbondedUtil.h.

00240 {}


Member Function Documentation

void ComputeNonbondedUtil::calc_error ( nonbonded  )  [static]

Definition at line 242 of file ComputeNonbondedUtil.C.

References NAMD_bug().

Referenced by select().

00242                                                  {
00243   NAMD_bug("Tried to call missing nonbonded compute routine.");
00244 }

static void ComputeNonbondedUtil::calc_pair ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_energy ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_energy_fep ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_energy_fullelect ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_energy_fullelect_fep ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_energy_fullelect_go ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_energy_fullelect_int ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_energy_fullelect_les ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_energy_fullelect_pprof ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_energy_fullelect_tabener ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_energy_fullelect_ti ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_energy_go ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_energy_int ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_energy_les ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_energy_merge_fullelect ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_energy_merge_fullelect_fep ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_energy_merge_fullelect_go ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_energy_merge_fullelect_int ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_energy_merge_fullelect_les ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_energy_merge_fullelect_pprof ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_energy_merge_fullelect_tabener ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_energy_merge_fullelect_ti ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_energy_pprof ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_energy_slow_fullelect ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_energy_slow_fullelect_fep ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_energy_slow_fullelect_go ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_energy_slow_fullelect_les ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_energy_slow_fullelect_pprof ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_energy_slow_fullelect_tabener ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_energy_slow_fullelect_ti ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_energy_tabener ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_energy_ti ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_fullelect ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_fullelect_go ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_fullelect_les ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_fullelect_pprof ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_fullelect_tabener ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_fullelect_ti ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_go ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_les ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_merge_fullelect ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_merge_fullelect_go ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_merge_fullelect_les ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_merge_fullelect_pprof ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_merge_fullelect_tabener ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_merge_fullelect_ti ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_pprof ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_slow_fullelect ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_slow_fullelect_go ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_slow_fullelect_les ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_slow_fullelect_pprof ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_slow_fullelect_tabener ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_slow_fullelect_ti ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_tabener ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_pair_ti ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_energy ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_energy_fep ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_energy_fullelect ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_energy_fullelect_fep ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_energy_fullelect_go ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_energy_fullelect_int ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_energy_fullelect_les ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_energy_fullelect_pprof ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_energy_fullelect_tabener ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_energy_fullelect_ti ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_energy_go ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_energy_int ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_energy_les ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_energy_merge_fullelect ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_energy_merge_fullelect_fep ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_energy_merge_fullelect_go ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_energy_merge_fullelect_int ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_energy_merge_fullelect_les ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_energy_merge_fullelect_pprof ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_energy_merge_fullelect_tabener ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_energy_merge_fullelect_ti ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_energy_pprof ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_energy_slow_fullelect ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_energy_slow_fullelect_fep ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_energy_slow_fullelect_go ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_energy_slow_fullelect_les ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_energy_slow_fullelect_pprof ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_energy_slow_fullelect_tabener ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_energy_slow_fullelect_ti ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_energy_tabener ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_energy_ti ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_fullelect ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_fullelect_go ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_fullelect_les ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_fullelect_pprof ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_fullelect_tabener ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_fullelect_ti ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_go ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_les ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_merge_fullelect ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_merge_fullelect_go ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_merge_fullelect_les ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_merge_fullelect_pprof ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_merge_fullelect_tabener ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_merge_fullelect_ti ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_pprof ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_slow_fullelect ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_slow_fullelect_go ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_slow_fullelect_les ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_slow_fullelect_pprof ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_slow_fullelect_tabener ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_slow_fullelect_ti ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_tabener ( nonbonded  )  [static]

Referenced by select().

static void ComputeNonbondedUtil::calc_self_ti ( nonbonded  )  [static]

Referenced by select().

void ComputeNonbondedUtil::calcGBIS ( nonbonded params,
GBISParamStruct gbisParams 
)

Definition at line 261 of file ComputeGBIS.C.

References GBISParamStruct::a_cut, GBISParamStruct::bornRad, CalcDHPair(), CalcHPair(), CompAtom::charge, COULOMB, GBISParamStruct::cutoff, DA, DB, DC, DD, DE, GBISParamStruct::dEdaSum, GBISParamStruct::dHdrPrefix, GBISParamStruct::doEnergy, GBISParamStruct::doFullElectrostatics, GBISParamStruct::doSmoothing, GBISParamStruct::epsilon_p, GBISParamStruct::epsilon_s, nonbonded::ff, FS_MAX, nonbonded::fullf, GBISParamStruct::gbInterEnergy, GBISParamStruct::gbisPhase, GBISParamStruct::gbisStepPairlists, GBISParamStruct::gbSelfEnergy, h1(), h2(), CompAtomExt::id, GBISParamStruct::intRad, j, GBISParamStruct::kappa, nonbonded::minPart, Pairlists::nextlist(), CompAtom::nonbondedGroupSize, nonbonded::numAtoms, nonbonded::numParts, GBISParamStruct::numPatches, nonbonded::offset, nonbonded::p, pairlistFromAll(), nonbonded::pExt, CompAtom::position, GBISParamStruct::psiSum, Pairlists::reset(), scaling, GBISParamStruct::sequence, TA, TB, TC, TD, TE, Vector::x, Vector::y, Vector::z, and ZERO.

Referenced by ComputeNonbondedSelf::doForce(), and ComputeNonbondedPair::doForce().

00261                                                                                   {
00262 //CkPrintf("SEQ%03i, P%i, CID%05i(%02i,%02i) ENTER\n",gbisParams->sequence,gbisParams->gbisPhase,gbisParams->cid,gbisParams->patchID[0],gbisParams->patchID[1]);
00263 #if CHECK_PRIORITIES
00264 CkPrintf("PE%i, S%09i, P%i\n",CkMyPe(),gbisParams->sequence,gbisParams->gbisPhase);
00265 #endif
00266   if (params->numAtoms[0] == 0 || params->numAtoms[1] == 0) return;
00267 
00268   const BigReal offset_x = params->offset.x;
00269   const BigReal offset_y = params->offset.y;
00270   const BigReal offset_z = params->offset.z;
00271 
00272   int partSize = params->numAtoms[0] / params->numParts;
00273   int minIg = 0;
00274   for (int s = 0; s < params->minPart; s++) {
00275     minIg+=params->p[0][minIg].nonbondedGroupSize;
00276   }
00277   int maxI = params->numAtoms[0];
00278   int strideIg = params->numParts;
00279 
00280   int unique = (gbisParams->numPatches == 1) ? 1 : 0;//should inner loop be unique from ourter loop
00281   int numGBISPairlists = 4;
00282   float r_cut = gbisParams->cutoff;
00283   float fsMax = FS_MAX; // gbisParams->fsMax;//FS_MAX;
00284   float a_cut = gbisParams->a_cut-fsMax;
00285   float a_cut2 = a_cut*a_cut;
00286   float a_cut_ps = a_cut + fsMax;//max screen radius
00287   float r_cut2 = r_cut*r_cut;
00288   float a_cut_ps2 = a_cut_ps*a_cut_ps;
00289   //put PL pointer back to beginning of lists
00290   for (int k = 0; k < numGBISPairlists; k++)
00291     gbisParams->gbisStepPairlists[k]->reset();
00292       
00293 
00294 /***********************************************************
00295 * GBIS Phase 1
00296 ***********************************************************/
00297 if (gbisParams->gbisPhase == 1) {
00298 //CkPrintf("SEQ%03i, P%i, CID%05i(%02i,%02i):[%03i,%03i]\n",gbisParams->sequence,gbisParams->gbisPhase,gbisParams->cid,gbisParams->patchID[0],gbisParams->patchID[1],minI,maxI);
00299 
00300   pairlistFromAll(params,gbisParams,minIg,strideIg,maxI);
00301 
00302 #ifdef BENCHMARK
00303   int nops = 0;
00304   int domains[] = {0, 0, 0, 0, 0, 0, 0, 0};
00305   int numDom = 7;
00306   double t1 = 1.0*clock()/CLOCKS_PER_SEC;
00307 #endif
00308   register GBReal psiI;
00309 
00310   register float dr;
00311   register float r2;
00312   register float r, r_i, r2_i;
00313   float rhoi0, rhois, rhojs, rhoj0;
00314   Position ri, rj;
00315   register int j;
00316   int numPairs;
00317   register float ta = TA;
00318   register float tb = TB;
00319   register float tc = TC;
00320   register float td = TD;
00321   register float te = TE;
00322 
00323   register float hij,hji;
00324   int dij,dji;
00325   float k;
00326   float rhois2, rhojs2;
00327 
00328   //calculate piecewise-22 Pairs
00329   int c = 0;
00330   for (int ngi = minIg; ngi < maxI;  ) {
00331     int iGroupSize = params->p[0][ngi].nonbondedGroupSize;
00332   for (int i = ngi; i < ngi+iGroupSize; i++) {
00333     ri = params->p[0][i].position;
00334     ri.x += offset_x;
00335     ri.y += offset_y;
00336     ri.z += offset_z;
00337     rhoi0 = gbisParams->intRad[0][2*i+0];
00338     rhois = gbisParams->intRad[0][2*i+1];
00339     rhois2 = rhois*rhois;
00340     psiI = ZERO;
00341     plint *pairs;
00342     gbisParams->gbisStepPairlists[c]->nextlist(&pairs,&numPairs);
00343     for (register int jj = 0; jj < numPairs; jj++) {
00344 #ifdef BENCHMARK
00345       nops++;
00346 #endif
00347       j = pairs[jj];
00348       rj = params->p[1][j].position;
00349 
00350       dr = (ri.x - rj.x);
00351       r2 = dr*dr;
00352       dr = (ri.y - rj.y);
00353       r2 += dr*dr;
00354       dr = (ri.z - rj.z);
00355       r2 += dr*dr;
00356       r2_i = 1.0/r2;
00357 
00358       rhoj0 = gbisParams->intRad[1][2*j+0];
00359       rhojs = gbisParams->intRad[1][2*j+1];
00360       rhojs2 = rhojs*rhojs;
00361 
00362       k = rhojs2*r2_i;//k=(rs/r)^2
00363       hij = rhojs*r2_i*k*(ta+k*(tb+k*(tc+k*(td+k*te))));
00364 
00365       k = rhois2*r2_i;//k=(rs/r)^2
00366       hji = rhois*r2_i*k*(ta+k*(tb+k*(tc+k*(td+k*te))));
00367 
00368 //#if 1
00369 #ifdef PRINT_COMP
00370       int id1 = params->pExt[0][i].id;
00371       int id2 = params->pExt[1][j].id;
00372       float h1 = hij;
00373       float h2 = hji;
00374       float r10 = rhoi0;
00375       float r1s = rhojs;
00376       float r20 = rhoj0;
00377       float r2s = rhois;
00378 /*printf("PSIPAIR %05i %05i%9.5f%6.3f%6.3f%2i% 13.5e\n",
00379 id1,id2,sqrt(r2),
00380 rhoi0, rhojs,
00381 2,hij);
00382 printf("PSIPAIR %05i %05i%9.5f%6.3f%6.3f%2i% 13.5e\n",
00383 id2,id1,sqrt(r2),
00384 rhoj0, rhois,
00385 2,hji);
00386 */
00387       if (id1 > id2) {
00388         int tmp = id1;
00389         id1 = id2;
00390         id2 = tmp;
00391         h1 = hji;
00392         h2 = hij;
00393         r20 = rhoi0;
00394         r2s = rhojs;
00395         r10 = rhoj0;
00396         r1s = rhois;
00397       }
00398 //      CkPrintf("PSIPAIR%5i%5i%10.5f%5i%14.8f%7.4f%7.4f\n",id1,id2,sqrt(r2),2,h1,r10,r1s);
00399 //      CkPrintf("PSIPAIR%5i%5i%10.5f%5i%14.8f%7.4f%7.4f\n",id2,id1,sqrt(r2),2,h2,r20,r2s);
00400       //CkPrintf("PPSI(%04i)[%04i,%04i] = 22\n",gbisParams->cid,id1,id2);
00401 #endif
00402 
00403       psiI += hij;
00404       gbisParams->psiSum[1][j] += hji;
00405     }//end inner j
00406     gbisParams->psiSum[0][i] += psiI;
00407   }//end outer i
00408   for (int s = 0; s < strideIg; s++) {
00409     ngi+=params->p[0][ngi].nonbondedGroupSize;
00410   }
00411   }
00412 #ifdef BENCHMARK
00413   double t2 = 1.0*clock()/CLOCKS_PER_SEC;
00414   //nops *= (9 + 2*DIV_FLOPS+SQRT_FLOPS) + (14 + 0*DIV_FLOPS + 0*LOG_FLOPS);
00415   //double flops = 1.0 * nops / (t2 - t1);
00416   //double gflops = flops / 1000000000.0;
00417   CkPrintf("PHASE1.1: %8.3f ms @ %8.3f ns/iter for %i iter\n",1000.0*(t2-t1), 1000000000.0*(t2-t1)/nops, nops);
00418 nops = 0;
00419   t1 = 1.0*clock()/CLOCKS_PER_SEC;
00420   nops = 0;
00421 #endif
00422 
00423   float rmris, rmrjs;
00424   float rmrsi;
00425   float rmrs2;
00426   float rs2;
00427   float logri, logrj;
00428   float rci2;
00429   float a_cut_i = 1.0 / a_cut;
00430   float a_cut_i2 = a_cut_i*a_cut_i;
00431 
00432   //calculate piecewise-11 pairs
00433   c = 1;
00434   for (int ngi = minIg; ngi < maxI;  ) {
00435     int iGroupSize = params->p[0][ngi].nonbondedGroupSize;
00436   for (int i = ngi; i < ngi+iGroupSize; i++) {
00437     ri = params->p[0][i].position;
00438     ri.x += offset_x;
00439     ri.y += offset_y;
00440     ri.z += offset_z;
00441     rhoi0 = gbisParams->intRad[0][2*i+0];
00442     rhois = gbisParams->intRad[0][2*i+1];
00443     psiI = ZERO;
00444     plint *pairs;
00445     gbisParams->gbisStepPairlists[c]->nextlist(&pairs,&numPairs);
00446     for (register int jj = 0; jj < numPairs; jj++) {
00447       j = pairs[jj];
00448       rj = params->p[1][j].position;
00449 
00450       dr = (ri.x - rj.x);
00451       r2 = dr*dr;
00452       dr = (ri.y - rj.y);
00453       r2 += dr*dr;
00454       dr = (ri.z - rj.z);
00455       r2 += dr*dr;
00456       r_i = 1.0/sqrt(r2);
00457       r = r2*r_i;
00458 
00459       rhoj0 = gbisParams->intRad[1][2*j+0];
00460       rhojs = gbisParams->intRad[1][2*j+1];
00461 
00462       float tmp1 = 0.125*r_i;
00463       float tmp2 = r2 - 4.0*a_cut*r;
00464       float rr = 2.0*r;
00465 
00466 
00467       rmrjs = r-rhojs;
00468       rmris = r-rhois;
00469       logri = log(rmris*a_cut_i);
00470       logrj = log(rmrjs*a_cut_i);
00471 
00472       rmrsi = 1.0/rmrjs;
00473       //rmrs2 = rmrjs*rmrjs;
00474       rs2 = rhojs*rhojs;
00475       hij = /*0.125*r_i*/tmp1*(1 + rr*rmrsi +
00476         a_cut_i2*(/*r2 - 4.0*a_cut*r*/tmp2 - rs2) + logrj+logrj);
00477 
00478 
00479       rmrsi = 1.0/rmris;
00480       //rmrs2 = rmris*rmris;
00481       rs2 = rhois*rhois;
00482       hji = /*0.125*r_i*/tmp1*(1 + rr*rmrsi +
00483         a_cut_i2*(/*r2 - 4.0*a_cut*r*/tmp2 - rs2) + 2.0* logri);
00484 //#if 1
00485 #ifdef PRINT_COMP
00486       int id1 = params->pExt[0][i].id;
00487       int id2 = params->pExt[1][j].id;
00488       float h1 = hij;
00489       float h2 = hji;
00490       float r10 = rhoi0;
00491       float r1s = rhojs;
00492       float r20 = rhoj0;
00493       float r2s = rhois;
00494 /*printf("PSIPAIR %05i %05i%9.5f%6.3f%6.3f%2i% 13.5e\n",
00495 id1,id2,sqrt(r2),
00496 rhoi0, rhojs,
00497 1,hij);
00498 printf("PSIPAIR %05i %05i%9.5f%6.3f%6.3f%2i% 13.5e\n",
00499 id2,id1,sqrt(r2),
00500 rhoj0, rhois,
00501 1,hji);*/
00502       if (id1 > id2) {
00503         int tmp = id1;
00504         id1 = id2;
00505         id2 = tmp;
00506         h1 = hji;
00507         h2 = hij;
00508         r20 = rhoi0;
00509         r2s = rhojs;
00510         r10 = rhoj0;
00511         r1s = rhois;
00512       }
00513 //      CkPrintf("PSIPAIR%5i%5i%10.5f%5i%14.8f%7.4f%7.4f\n",id1,id2,sqrt(r2),1,h1,r10,r1s);
00514 //      CkPrintf("PSIPAIR%5i%5i%10.5f%5i%14.8f%7.4f%7.4f\n",id2,id1,sqrt(r2),1,h2,r20,r2s);
00515       //CkPrintf("PSI(%04i)[%04i,%04i] = 11 % .4e % .4e\n",gbisParams->sequence,id1,id2,h1, h2);
00516       //CkPrintf("PPSI(%04i)[%04i,%04i] = 11\n",gbisParams->cid,id1,id2);
00517 #endif
00518 
00519 #ifdef BENCHMARK
00520       nops++;
00521 #endif
00522           
00523       psiI += hij;
00524       gbisParams->psiSum[1][j] += hji;
00525     }//end inner j
00526     gbisParams->psiSum[0][i] += psiI;
00527   }//end outer i
00528   for (int s = 0; s < strideIg; s++) {
00529     ngi+=params->p[0][ngi].nonbondedGroupSize;
00530   }
00531   }
00532 #ifdef BENCHMARK
00533   t2 = 1.0*clock()/CLOCKS_PER_SEC;
00534   CkPrintf("PHASE1.2: %8.3f ms @ %8.3f ns/iter for %i iter\n",1000.0*(t2-t1), 1000000000.0*(t2-t1)/nops, nops);
00535 nops = 0;
00536   t1 = 1.0*clock()/CLOCKS_PER_SEC;
00537   nops = 0;
00538 #endif
00539 
00540   //calculate all other piecewise pairs
00541   c = 2;
00542   for (int ngi = minIg; ngi < maxI;  ) {
00543     int iGroupSize = params->p[0][ngi].nonbondedGroupSize;
00544   for (int i = ngi; i < ngi+iGroupSize; i++) {
00545     ri = params->p[0][i].position;
00546     ri.x += offset_x;
00547     ri.y += offset_y;
00548     ri.z += offset_z;
00549     rhoi0 = gbisParams->intRad[0][2*i+0];
00550     rhois = gbisParams->intRad[0][2*i+1];
00551     psiI = ZERO;
00552     plint *pairs;
00553     gbisParams->gbisStepPairlists[c]->nextlist(&pairs,&numPairs);
00554     for (register int jj = 0; jj < numPairs; jj++) {
00555       j = pairs[jj];
00556       rj = params->p[1][j].position;
00557 
00558       dr = (ri.x - rj.x);
00559       r2 = dr*dr;
00560       dr = (ri.y - rj.y);
00561       r2 += dr*dr;
00562       dr = (ri.z - rj.z);
00563       r2 += dr*dr;
00564       rhojs = gbisParams->intRad[1][2*j+1];
00565       rhoj0 = gbisParams->intRad[1][2*j+0];
00566       r_i = 1.0/sqrt(r2);
00567       r = r2 * r_i;
00568 
00569       CalcHPair(r,r2,r_i,a_cut,
00570           rhoi0, rhojs,
00571           rhoj0, rhois,
00572           dij,dji,hij,hji);
00573 //#if 1
00574 #ifdef PRINT_COMP
00575       int id1 = params->pExt[0][i].id;
00576       int id2 = params->pExt[1][j].id;
00577       float h1 = hij;
00578       float h2 = hji;
00579       int d1 = dij;
00580       int d2 = dji;
00581       float r10 = rhoi0;
00582       float r1s = rhojs;
00583       float r20 = rhoj0;
00584       float r2s = rhois;
00585 /*  if (dij > 0 ) {
00586 printf("PSIPAIR %05i %05i%9.5f%6.3f%6.3f%2i% 13.5e\n",
00587 id1,id2,sqrt(r2),
00588 rhoi0, rhojs,
00589 dij,hij);
00590   }
00591   if (dji > 0 ) {
00592 printf("PSIPAIR %05i %05i%9.5f%6.3f%6.3f%2i% 13.5e\n",
00593 id2,id1,sqrt(r2),
00594 rhoj0, rhois,
00595 dji,hji);
00596   }*/
00597 //      CkPrintf("PSIPAIR%5i%5i%10.5f%5i%14.8f%7.4f%7.4f\n",id1,id2,sqrt(r2),d1,h1,r10,r1s);
00598       if (id1 > id2) {
00599         int tmp = id1;
00600         id1 = id2;
00601         id2 = tmp;
00602         h1 = hji;
00603         h2 = hij;
00604         d1 = dji;
00605         d2 = dij;
00606         r20 = rhoi0;
00607         r2s = rhojs;
00608         r10 = rhoj0;
00609         r1s = rhois;
00610       }
00611 //      CkPrintf("PSIPAIR%5i%5i%10.5f%5i%14.8f%7.4f%7.4f\n",id2,id1,sqrt(r2),d2,h2,r20,r2s);
00612       //CkPrintf("PSI(%04i)[%04i,%04i] = %i%i % .4e % .4e\n",gbisParams->sequence,id1,id2,d1,d2,h1, h2);
00613       //CkPrintf("PPSI(%04i)[%04i,%04i] = %i%i\n",gbisParams->cid,id1,id2,d1,d2);
00614 #endif
00615 
00616 #ifdef BENCHMARK
00617       nops++;
00618 #endif
00619       psiI += hij;
00620       gbisParams->psiSum[1][j] += hji;
00621     }//end inner j
00622     gbisParams->psiSum[0][i] += psiI;
00623   }//end outer i
00624   for (int s = 0; s < strideIg; s++) {
00625     ngi+=params->p[0][ngi].nonbondedGroupSize;
00626   }
00627   }
00628 
00629 #ifdef BENCHMARK
00630   t2 = 1.0*clock()/CLOCKS_PER_SEC;
00631   CkPrintf("PHASE1.3: %8.3f ms @ %8.3f ns/iter for %i iter\n",1000.0*(t2-t1), 1000000000.0*(t2-t1)/nops,nops);
00632 #endif
00633 
00634 /***********************************************************
00635 * GBIS Phase 2
00636 ***********************************************************/
00637 } else if (gbisParams->gbisPhase == 2) {
00638 
00639   float epsilon_s = gbisParams->epsilon_s;
00640   float epsilon_p = gbisParams->epsilon_p;
00641   float epsilon_s_i = 1/epsilon_s;
00642   float epsilon_p_i = 1/epsilon_p;
00643   float kappa = gbisParams->kappa;
00644 
00645   //values used in loop
00646   float r_cut_2 = 1.0 / r_cut2;
00647   float r_cut_4 = 4.0*r_cut_2*r_cut_2;
00648   float coulEij=0,ddrCoulEij=0,gbEij=0,ddrGbEij=0;
00649   float dEdai=0,dEdaj=0, qiqj=0;
00650   float scale=0, ddrScale=0;
00651   float rnx=0,rny=0,rnz=0;
00652   float fx=0,fy=0,fz=0,forceCoul=0, forcedEdr=0;
00653 
00654   int nops = 0;
00655   double t1 = 1.0*clock()/CLOCKS_PER_SEC;
00656   float r2;
00657   float dr;
00658   BigReal dx, dy, dz;
00659   float r, r_i, ratio;
00660   float fIx, fIy, fIz;
00661   GBReal dEdaSumI;
00662   float bornRadI, bornRadJ;
00663   float qi;
00664   Position ri, rj;
00665   float aiaj,expr2aiaj4,fij,f_i,expkappa,Dij;
00666   float aiaj4,ddrDij,ddrf_i,ddrfij,tmp_dEda;
00667 
00668   for (int c = 0; c < 4/*dEdrPLs*/; c++) {
00669   for (int ngi = minIg; ngi < maxI;  ) {
00670     int iGroupSize = params->p[0][ngi].nonbondedGroupSize;
00671   for (int i = ngi; i < ngi+iGroupSize; i++) {
00672     ri = params->p[0][i].position;
00673     ri.x += offset_x;
00674     ri.y += offset_y;
00675     ri.z += offset_z;
00676     qi = - COULOMB * params->p[0][i].charge * scaling;
00677   //printf("ATOM(%05i) %.3e %.3e %.3e\n", params->pExt[0][i].id, params->p[0][i].charge, COULOMB, scaling);
00678     int numPairs;
00679     plint *pairs;
00680     gbisParams->gbisStepPairlists[c]->nextlist(&pairs,&numPairs);
00681     fIx = fIy = fIz = 0.0;
00682     dEdaSumI = 0.0;
00683     bornRadI = gbisParams->bornRad[0][i];
00684     for (int jj = 0; jj < numPairs; jj++) {
00685       int j = pairs[jj];
00686       rj = params->p[1][j].position;
00687 
00688       //distance
00689       dx = (ri.x - rj.x);
00690       dy = (ri.y - rj.y);
00691       dz = (ri.z - rj.z);
00692       r2 = dx*dx + dy*dy + dz*dz;
00693       if (r2 > r_cut2) continue;
00694       qiqj = qi*params->p[1][j].charge;
00695       bornRadJ = gbisParams->bornRad[1][j];
00696       r_i = 1.0/sqrt(r2);
00697       r = r2 * r_i;
00698 
00699       //pairwise calculation
00700 /*      Phase2_Pair(r, r2, r_i, qiqj,
00701           bornRadI,
00702           bornRadJ,
00703           epsilon_p_i, epsilon_s_i,
00704           kappa, gbisParams->doFullElectrostatics,
00705           gbEij, ddrGbEij, dEdai, dEdaj);
00706 */
00707 
00708   //calculate GB energy
00709   aiaj = bornRadI*bornRadJ;
00710   aiaj4 = 4*aiaj;
00711   expr2aiaj4 = exp(-r2/aiaj4);
00712   fij = sqrt(r2+aiaj*expr2aiaj4);
00713   f_i = 1/fij;
00714   expkappa = (kappa > 0) ? exp(-kappa*fij) : 1.0;
00715   Dij = epsilon_p_i - expkappa*epsilon_s_i;
00716   gbEij = qiqj*Dij*f_i;
00717 
00718   //calculate energy derivatives
00719   ddrfij = r*f_i*(1 - 0.25*expr2aiaj4);
00720   ddrf_i = -ddrfij*f_i*f_i;
00721   ddrDij = kappa*expkappa*ddrfij*epsilon_s_i;
00722   ddrGbEij = qiqj*(ddrDij*f_i+Dij*ddrf_i);
00723 
00724   //calc dEda
00725       //NAMD smoothing function
00726       scale = 1;
00727       ddrScale = 0;
00728       if (gbisParams->doSmoothing) {
00729         scale = r2 * r_cut_2 - 1;
00730         scale *= scale;
00731         ddrScale = r*(r2-r_cut2)*r_cut_4;
00732         //CkPrintf("SCALE %f %f\n",scale,ddrScale);
00733         gbisParams->gbInterEnergy += gbEij * scale;
00734         forcedEdr = -(ddrGbEij)*scale-(gbEij)*ddrScale;
00735       } else {
00736         gbisParams->gbInterEnergy += gbEij;
00737         forcedEdr = -ddrGbEij;
00738       }
00739 
00740       //add dEda
00741       if (gbisParams->doFullElectrostatics) {
00742         //gbisParams->dEdaSum[0][i] += dEdai*scale;
00743         tmp_dEda = 0.5*qiqj*f_i*f_i
00744                       *(kappa*epsilon_s_i*expkappa-Dij*f_i)
00745                       *(aiaj+0.25*r2)*expr2aiaj4;//0
00746         dEdai = tmp_dEda/bornRadI;
00747         dEdaj = tmp_dEda/bornRadJ;
00748         dEdaSumI += dEdai*scale;
00749         gbisParams->dEdaSum[1][j] += dEdaj*scale;
00750       }
00751 
00752 #if 1
00753 //#ifdef PRINT_COMP
00754       int id1 = params->pExt[0][i].id;
00755       int id2 = params->pExt[1][j].id;
00756       float deda1 = dEdai;
00757       float deda2 = dEdaj;
00758       float bR1 = bornRadI;
00759       float bR2 = bornRadJ;
00760       if (id1 > id2) {
00761         int tmp = id1;
00762         id1 = id2;
00763         id2 = tmp;
00764         deda1 = dEdaj;
00765         deda2 = dEdai;
00766         bR1 = bornRadJ;
00767         bR2 = bornRadI;
00768       }
00769       //CkPrintf("DEDR(%04i)[%04i,%04i] = % .4e\n",gbisParams->sequence,id1,id2,forcedEdr);
00770       //CkPrintf("DASM(%04i)[%04i,%04i] = % .4e % .4e\n",gbisParams->sequence,id1, id2, deda1,deda2);
00771       //CkPrintf("P2RM(%04i)[%04i,%04i] = % .4e % .4e % .4e % .4e % .4e\n",gbisParams->sequence,id1, id2, r, bR1,bR2,epsilon_p_i,epsilon_s_i,kappa);
00772 /*CkPrintf("P2PAIR %05i %05i%9.5f%6.3f%6.3f% 13.5e% 13.5e% 13.5e% 13.5e% 13.5e\n",
00773 params->pExt[0][i].id, params->pExt[1][j].id,sqrt(r2),
00774 bornRadI, bornRadJ, forcedEdr, dEdai, qiqj, Dij, scale
00775 );
00776 CkPrintf("P2PAIR %05i %05i%9.5f%6.3f%6.3f% 13.5e% 13.5e% 13.5e% 13.5e% 13.5e\n",
00777 params->pExt[1][j].id, params->pExt[0][i].id,sqrt(r2),
00778 bornRadJ, bornRadI, forcedEdr, dEdaj, qiqj, Dij, scale
00779 );*/
00780 #endif
00781 
00782       forcedEdr *= r_i;
00783       fx = dx*forcedEdr;
00784       fy = dy*forcedEdr;
00785       fz = dz*forcedEdr;
00786 
00787       params->ff[1][j].x -= fx;
00788       params->ff[1][j].y -= fy;
00789       params->ff[1][j].z -= fz;
00790 
00791       fIx += fx;
00792       fIy += fy;
00793       fIz += fz;
00794 
00795 #ifdef BENCHMARK
00796       nops ++;//= (59 + 4*DIV_FLOPS + 2*EXP_FLOPS+SQRT_FLOPS);//56 w/o nops
00797 #endif
00798 
00799     }//end inner j
00800     gbisParams->dEdaSum[0][i] += dEdaSumI;
00801     params->ff[0][i].x += fIx;
00802     params->ff[0][i].y += fIy;
00803     params->ff[0][i].z += fIz;
00804 
00805     //self energy of each atom
00806     if (c == 0 && gbisParams->doEnergy && gbisParams->numPatches == 1) {
00807       float fij = bornRadI;//inf
00808       float expkappa = exp(-kappa*fij);//0
00809       float Dij = epsilon_p_i - expkappa*epsilon_s_i;
00810       float gbEij = qi*params->p[0][i].charge*Dij/fij;
00811       gbisParams->gbSelfEnergy += 0.5*gbEij;//self energy
00812     }
00813   }// end outer i
00814   for (int s = 0; s < strideIg; s++) {
00815     ngi+=params->p[0][ngi].nonbondedGroupSize;
00816   }//end i
00817   }//end ig
00818   }//end c
00819 #ifdef BENCHMARK
00820   double t2 = 1.0*clock()/CLOCKS_PER_SEC;
00821   //double flops = 1.0 * nops / (t2 - t1);
00822   //double gflops = flops / 1000000000.0;
00823   
00824   CkPrintf("PHASE2.0: %8.3f ms @ %8.3f ns/iter for %i iter\n",1000.0*(t2-t1), 1000000000.0*(t2-t1)/nops,nops);
00825 #endif
00826 
00827 /***********************************************************
00828 * GBIS Phase 3
00829 ***********************************************************/
00830 } else if (gbisParams->gbisPhase == 3 && gbisParams->doFullElectrostatics) {
00831 
00832 #ifdef BENCHMARK
00833   //int domains[] = {0, 0, 0, 0, 0, 0, 0, 0};
00834   double t1 = 1.0*clock()/CLOCKS_PER_SEC;
00835   double t2;
00836   int nops = 0;
00837 #endif
00838   //CkPrintf("GBIS(%3i)[%2i]::P3 %3i(%3i) %3i(%3i)\n",gbisParams->sequence,gbisParams->cid, gbisParams->patchID[0],params->numAtoms[0],gbisParams->patchID[1],params->numAtoms[1]);
00839 
00840   register BigReal dx, dy, dz;
00841   register float  r2;
00842   register float r, r_i;
00843   register float rhoi0, rhois;
00844   float rhojs, rhoj0;
00845   float fx, fy, fz;
00846   float forceAlpha;
00847   register float fIx, fIy, fIz;
00848 
00849   float dhij;
00850   float dhji;
00851   int dij;
00852   int dji;
00853   register float dHdrPrefixI;
00854   float dHdrPrefixJ;
00855   register Position ri;
00856   register Position rj;
00857   register int c, numPairs, jj, j;
00858   register float k;
00859   register float da = DA;
00860   register float db = DB;
00861   register float dc = DC;
00862   register float dd = DD;
00863   register float de = DE;
00864   float r_i3;
00865 
00866   //piecewise 22
00867   c = 0;
00868   for (int ngi = minIg; ngi < maxI;  ) {
00869     int iGroupSize = params->p[0][ngi].nonbondedGroupSize;
00870   for (int i = ngi; i < ngi+iGroupSize; i++) {
00871     ri = params->p[0][i].position;
00872     ri.x += offset_x;
00873     ri.y += offset_y;
00874     ri.z += offset_z;
00875     rhois = gbisParams->intRad[0][2*i+1];
00876     plint *pairs;
00877     gbisParams->gbisStepPairlists[c]->nextlist(&pairs,&numPairs);
00878     fIx = fIy = fIz = 0.0;
00879     dHdrPrefixI = gbisParams->dHdrPrefix[0][i];
00880     for (jj = 0; jj < numPairs; jj++) {
00881       j = pairs[jj];
00882       rj = params->p[1][j].position;
00883 
00884       dx = (ri.x - rj.x);
00885       dy = (ri.y - rj.y);
00886       dz = (ri.z - rj.z);
00887       r2 = dx*dx + dy*dy + dz*dz;
00888       dHdrPrefixJ = gbisParams->dHdrPrefix[1][j];
00889 
00890       r_i = 1.0/sqrt(r2);//rptI takes 50% of loop time
00891       r_i3 = r_i*r_i*r_i;
00892 
00893       rhojs = gbisParams->intRad[1][2*j+1];
00894 
00895       k = rhojs*r_i; k*=k;//k=(rs/r)^2
00896       dhij = -rhojs*r_i3*k*
00897               (da+k*(db+k*(dc+k*(dd+k*de))));
00898 
00899       k = rhois*r_i; k*=k;//k=(rs/r)^2
00900       dhji = -rhois*r_i3*k*
00901               (da+k*(db+k*(dc+k*(dd+k*de))));
00902 
00903       //add dEda*dadr force
00904       forceAlpha = -r_i*(dHdrPrefixI*dhij+dHdrPrefixJ*dhji);
00905       fx = dx * forceAlpha;
00906       fy = dy * forceAlpha;
00907       fz = dz * forceAlpha;
00908 
00909       params->fullf[1][j].x -= fx;
00910       params->fullf[1][j].y -= fy;
00911       params->fullf[1][j].z -= fz;
00912 
00913       fIx += fx;
00914       fIy += fy;
00915       fIz += fz;
00916 
00917 #if 1
00918 //#ifdef PRINT_COMP
00919       int id1 = params->pExt[0][i].id;
00920       int id2 = params->pExt[1][j].id;
00921       float h1 = dhij;
00922       float h2 = dhji;
00923       if (id1 > id2) {
00924         int tmp = id1;
00925         id1 = id2;
00926         id2 = tmp;
00927         h1 = dhji;
00928         h2 = dhij;
00929       }
00930 /*CkPrintf("P3PAIR %05i %05i%9.5f% 13.5e% 13.5e% 13.5e% 13.5e% 13.5e %i\n",
00931 params->pExt[0][i].id, params->pExt[1][j].id,sqrt(r2),
00932 dHdrPrefixI, dHdrPrefixJ, dhij, dhji, forceAlpha, 2
00933 );
00934 CkPrintf("P3PAIR %05i %05i%9.5f% 13.5e% 13.5e% 13.5e% 13.5e% 13.5e %i\n",
00935 params->pExt[1][j].id, params->pExt[0][i].id,sqrt(r2),
00936 dHdrPrefixJ, dHdrPrefixI, dhji, dhij, forceAlpha, 2
00937 );*/
00938       //CkPrintf("DEDA(%04i)[%04i,%04i] = 22 % .4e % .4e % .4e\n",gbisParams->sequence,id1,id2,h1,h2, forceAlpha);
00939 #endif
00940 
00941 #ifdef BENCHMARK
00942       nops++;//= (24 + 2*DIV_FLOPS+SQRT_FLOPS);// 8 w/o nops
00943 #endif
00944 
00945     }//end inner j
00946     params->fullf[0][i].x += fIx;
00947     params->fullf[0][i].y += fIy;
00948     params->fullf[0][i].z += fIz;
00949   }//end outer i
00950   for (int s = 0; s < strideIg; s++) {
00951     ngi+=params->p[0][ngi].nonbondedGroupSize;
00952   }
00953   }
00954 
00955 #ifdef BENCHMARK
00956   t2 = 1.0*clock()/CLOCKS_PER_SEC;
00957   CkPrintf("PHASE3.1: %8.3f ms @ %8.3f ns/iter for %i iter\n",1000.0*(t2-t1), 1000000000.0*(t2-t1)/nops,nops);
00958 nops = 0;
00959   t1 = 1.0*clock()/CLOCKS_PER_SEC;
00960   nops = 0;
00961 #endif
00962 
00963   float a_cut_i = 1.0/a_cut;
00964   float a_cut_i2 = a_cut_i*a_cut_i;
00965   float a_cut2 = a_cut*a_cut;
00966   float rmrs;
00967   float rmrsi;
00968   float rmrs2;
00969   float rhois2, rhojs2;
00970   float logri, logrj;
00971   float r_i2;
00972 
00973   //piecewise 11
00974   c = 1;
00975   for (int ngi = minIg; ngi < maxI;  ) {
00976     int iGroupSize = params->p[0][ngi].nonbondedGroupSize;
00977   for (int i = ngi; i < ngi+iGroupSize; i++) {
00978     ri = params->p[0][i].position;
00979     ri.x += offset_x;
00980     ri.y += offset_y;
00981     ri.z += offset_z;
00982     rhois = gbisParams->intRad[0][2*i+1];
00983     rhois2 = rhois*rhois;
00984     plint *pairs;
00985     gbisParams->gbisStepPairlists[c]->nextlist(&pairs,&numPairs);
00986     fIx = fIy = fIz = 0.0;
00987     dHdrPrefixI = gbisParams->dHdrPrefix[0][i];
00988     for (jj = 0; jj < numPairs; jj++) {
00989       j = pairs[jj];
00990       rj = params->p[1][j].position;
00991       dHdrPrefixJ = gbisParams->dHdrPrefix[1][j];
00992 
00993       dx = (ri.x - rj.x);
00994       dy = (ri.y - rj.y);
00995       dz = (ri.z - rj.z);
00996       r2 = dx*dx + dy*dy + dz*dz;
00997       r_i = 1.0/sqrt(r2);//rptI
00998       r = r2* r_i;
00999       r_i2 = r_i*r_i;
01000 
01001       rhojs = gbisParams->intRad[1][2*j+1];
01002       rhojs2 = rhojs*rhojs;
01003 
01004 
01005       rmrs = r-rhojs;// 4 times
01006       rmrsi = 1.0/rmrs;
01007       rmrs2 = rmrs*rmrs;
01008       logrj = log(rmrs*a_cut_i);
01009       dhij = r_i2*(-0.25*logrj - (a_cut2 - rmrs2)*(rhojs2 + r2)*0.125*a_cut_i2*rmrsi*rmrsi);
01010 
01011 
01012       rmrs = r-rhois;// 4 times
01013       rmrsi = 1.0/rmrs;
01014       rmrs2 = rmrs*rmrs;
01015       logri = log(rmrs*a_cut_i);
01016       dhji = r_i2*(-0.25*logri - (a_cut2 - rmrs2)*(rhois2 + r2)*0.125*a_cut_i2*rmrsi*rmrsi);
01017 
01018       //add dEda*dadr force
01019       forceAlpha = -r_i*(dHdrPrefixI*dhij+dHdrPrefixJ*dhji);
01020       fx = dx * forceAlpha;
01021       fy = dy * forceAlpha;
01022       fz = dz * forceAlpha;
01023 
01024       params->fullf[1][j].x -= fx;
01025       params->fullf[1][j].y -= fy;
01026       params->fullf[1][j].z -= fz;
01027 
01028       fIx += fx;
01029       fIy += fy;
01030       fIz += fz;
01031 
01032 #if 1
01033 //#ifdef PRINT_COMP
01034       int id1 = params->pExt[0][i].id;
01035       int id2 = params->pExt[1][j].id;
01036       float h1 = dhij;
01037       float h2 = dhji;
01038       if (id1 > id2) {
01039         int tmp = id1;
01040         id1 = id2;
01041         id2 = tmp;
01042         h1 = dhji;
01043         h2 = dhij;
01044       }
01045       //CkPrintf("DEDA(%04i)[%04i,%04i] = 11 % .4e % .4e % .4e\n",gbisParams->sequence,id1,id2,h1,h2, forceAlpha);
01046 /*CkPrintf("P3PAIR %05i %05i%9.5f% 13.5e% 13.5e% 13.5e% 13.5e% 13.5e %i\n",
01047 params->pExt[0][i].id, params->pExt[1][j].id,sqrt(r2),
01048 dHdrPrefixI, dHdrPrefixJ, dhij, dhji, forceAlpha, 1
01049 );
01050 CkPrintf("P3PAIR %05i %05i%9.5f% 13.5e% 13.5e% 13.5e% 13.5e% 13.5e %i\n",
01051 params->pExt[1][j].id, params->pExt[0][i].id,sqrt(r2),
01052 dHdrPrefixJ, dHdrPrefixI, dhji, dhij, forceAlpha, 1
01053 );*/
01054 #endif
01055 
01056 #ifdef BENCHMARK
01057       nops++;
01058 #endif
01059 
01060     }//end inner j
01061     params->fullf[0][i].x += fIx;
01062     params->fullf[0][i].y += fIy;
01063     params->fullf[0][i].z += fIz;
01064   }//end outer i
01065   for (int s = 0; s < strideIg; s++) {
01066     ngi+=params->p[0][ngi].nonbondedGroupSize;
01067   }
01068   }
01069 
01070 #ifdef BENCHMARK
01071   t2 = 1.0*clock()/CLOCKS_PER_SEC;
01072   CkPrintf("PHASE3.2: %8.3f ms @ %8.3f ns/iter for %i iter\n",1000.0*(t2-t1), 1000000000.0*(t2-t1)/nops,nops);
01073 nops = 0;
01074   t1 = 1.0*clock()/CLOCKS_PER_SEC;
01075   nops = 0;
01076 #endif
01077 
01078   //piecewise all others
01079   c = 2;
01080   for (int ngi = minIg; ngi < maxI;  ) {
01081     int iGroupSize = params->p[0][ngi].nonbondedGroupSize;
01082   for (int i = ngi; i < ngi+iGroupSize; i++) {
01083     ri = params->p[0][i].position;
01084     ri.x += offset_x;
01085     ri.y += offset_y;
01086     ri.z += offset_z;
01087     rhoi0 = gbisParams->intRad[0][2*i+0];
01088     rhois = gbisParams->intRad[0][2*i+1];
01089     plint *pairs;
01090     gbisParams->gbisStepPairlists[c]->nextlist(&pairs,&numPairs);
01091     fIx = fIy = fIz = 0.0;
01092     dHdrPrefixI = gbisParams->dHdrPrefix[0][i];
01093     for (jj = 0; jj < numPairs; jj++) {
01094       j = pairs[jj];
01095       rj = params->p[1][j].position;
01096       dHdrPrefixJ = gbisParams->dHdrPrefix[1][j];
01097 
01098       dx = (ri.x - rj.x);
01099       dy = (ri.y - rj.y);
01100       dz = (ri.z - rj.z);
01101       r2 = dx*dx + dy*dy + dz*dz;
01102 
01103       r_i = 1.0/sqrt(r2);//rptI
01104       r = r2* r_i;
01105 
01106       rhojs = gbisParams->intRad[1][2*j+1];
01107       rhoj0 = gbisParams->intRad[1][2*j+0];
01108 
01109       CalcDHPair(r,r2,r_i,a_cut,
01110           rhoi0,rhojs,
01111           rhoj0,rhois,
01112           dij,dji,dhij,dhji);
01113 
01114       //add dEda*dadr force
01115       forceAlpha = -r_i*(dHdrPrefixI*dhij+dHdrPrefixJ*dhji); // *scaling ?
01116       fx = dx * forceAlpha;
01117       fy = dy * forceAlpha;
01118       fz = dz * forceAlpha;
01119 
01120       fIx += fx;
01121       fIy += fy;
01122       fIz += fz;
01123 
01124       params->fullf[1][j].x -= fx;
01125       params->fullf[1][j].y -= fy;
01126       params->fullf[1][j].z -= fz;
01127 
01128 #if 1
01129 //#ifdef PRINT_COMP
01130       int id1 = params->pExt[0][i].id;
01131       int id2 = params->pExt[1][j].id;
01132       int d1 = dij;
01133       int d2 = dji;
01134       float h1 = dhij;
01135       float h2 = dhji;
01136       if (id1 > id2) {
01137         int tmp = id1;
01138         id1 = id2;
01139         id2 = tmp;
01140         d1 = dji;
01141         d2 = dij;
01142         h1 = dhji;
01143         h2 = dhij;
01144       }
01145 //      CkPrintf("DEDA(%04i)[%04i,%04i] = %i%i % .4e % .4e % .4e\n",gbisParams->sequence,id1,id2,d1,d2,h1,h2, forceAlpha);
01146 //      CkPrintf("DEDA(%04i)[%04i,%04i] = %i%i % .4e % .4e % .4e\n",gbisParams->sequence,id1,id2,d1,d2,h1,h2, forceAlpha);
01147 /*if ( dij > 0 ) {
01148 CkPrintf("P3PAIR %05i %05i%9.5f% 13.5e% 13.5e% 13.5e% 13.5e% 13.5e %i\n",
01149 params->pExt[0][i].id, params->pExt[1][j].id,sqrt(r2),
01150 dHdrPrefixI, dHdrPrefixJ, dhij, dhji, forceAlpha, dij
01151 );
01152 }
01153 if ( dji > 0 ) {
01154 CkPrintf("P3PAIR %05i %05i%9.5f% 13.5e% 13.5e% 13.5e% 13.5e% 13.5e %i\n",
01155 params->pExt[1][j].id, params->pExt[0][i].id,sqrt(r2),
01156 dHdrPrefixJ, dHdrPrefixI, dhji, dhij, forceAlpha, dji
01157 );
01158 }*/
01159 #endif
01160 
01161 #ifdef BENCHMARK
01162       nops++;
01163 #endif
01164 
01165     }//end inner j
01166     params->fullf[0][i].x += fIx;
01167     params->fullf[0][i].y += fIy;
01168     params->fullf[0][i].z += fIz;
01169   }//end outer i
01170   for (int s = 0; s < strideIg; s++) {
01171     ngi+=params->p[0][ngi].nonbondedGroupSize;
01172   }
01173   }
01174 
01175 
01176 #ifdef BENCHMARK
01177   t2 = 1.0*clock()/CLOCKS_PER_SEC;
01178   CkPrintf("PHASE3.3: %8.3f ms @ %8.3f ns/iter for %i iter\n",1000.0*(t2-t1), 1000000000.0*(t2-t1)/nops, nops);
01179 #endif
01180 
01181 }//end if gbisPhase
01182 
01183 }//end calcGBIS

void ComputeNonbondedUtil::select ( void   )  [static]

Definition at line 246 of file ComputeNonbondedUtil.C.

References A12_f, A6_f, SimParameters::accelMDOn, accelMDOn, SimParameters::alchDecouple, alchDecouple, SimParameters::alchFepOn, alchFepOn, SimParameters::alchThermIntOn, alchThermIntOn, SimParameters::alchVdwShiftCoeff, alchVdwShiftCoeff, SimParameters::alchWCAOn, alchWCAOn, B12_f, B6_f, c0, C1, c1, C12_f, C2, c3, c5, c6, C6_f, c7, c8, calc_error(), calc_pair(), calc_pair_energy(), calc_pair_energy_fep(), calc_pair_energy_fullelect(), calc_pair_energy_fullelect_fep(), calc_pair_energy_fullelect_go(), calc_pair_energy_fullelect_int(), calc_pair_energy_fullelect_les(), calc_pair_energy_fullelect_pprof(), calc_pair_energy_fullelect_tabener(), calc_pair_energy_fullelect_ti(), calc_pair_energy_go(), calc_pair_energy_int(), calc_pair_energy_les(), calc_pair_energy_merge_fullelect(), calc_pair_energy_merge_fullelect_fep(), calc_pair_energy_merge_fullelect_go(), calc_pair_energy_merge_fullelect_int(), calc_pair_energy_merge_fullelect_les(), calc_pair_energy_merge_fullelect_pprof(), calc_pair_energy_merge_fullelect_tabener(), calc_pair_energy_merge_fullelect_ti(), calc_pair_energy_pprof(), calc_pair_energy_slow_fullelect(), calc_pair_energy_slow_fullelect_fep(), calc_pair_energy_slow_fullelect_go(), calc_pair_energy_slow_fullelect_les(), calc_pair_energy_slow_fullelect_pprof(), calc_pair_energy_slow_fullelect_tabener(), calc_pair_energy_slow_fullelect_ti(), calc_pair_energy_tabener(), calc_pair_energy_ti(), calc_pair_fullelect(), calc_pair_fullelect_go(), calc_pair_fullelect_les(), calc_pair_fullelect_pprof(), calc_pair_fullelect_tabener(), calc_pair_fullelect_ti(), calc_pair_go(), calc_pair_les(), calc_pair_merge_fullelect(), calc_pair_merge_fullelect_go(), calc_pair_merge_fullelect_les(), calc_pair_merge_fullelect_pprof(), calc_pair_merge_fullelect_tabener(), calc_pair_merge_fullelect_ti(), calc_pair_pprof(), calc_pair_slow_fullelect(), calc_pair_slow_fullelect_go(), calc_pair_slow_fullelect_les(), calc_pair_slow_fullelect_pprof(), calc_pair_slow_fullelect_tabener(), calc_pair_slow_fullelect_ti(), calc_pair_tabener(), calc_pair_ti(), calc_self(), calc_self_energy(), calc_self_energy_fep(), calc_self_energy_fullelect(), calc_self_energy_fullelect_fep(), calc_self_energy_fullelect_go(), calc_self_energy_fullelect_int(), calc_self_energy_fullelect_les(), calc_self_energy_fullelect_pprof(), calc_self_energy_fullelect_tabener(), calc_self_energy_fullelect_ti(), calc_self_energy_go(), calc_self_energy_int(), calc_self_energy_les(), calc_self_energy_merge_fullelect(), calc_self_energy_merge_fullelect_fep(), calc_self_energy_merge_fullelect_go(), calc_self_energy_merge_fullelect_int(), calc_self_energy_merge_fullelect_les(), calc_self_energy_merge_fullelect_pprof(), calc_self_energy_merge_fullelect_tabener(), calc_self_energy_merge_fullelect_ti(), calc_self_energy_pprof(), calc_self_energy_slow_fullelect(), calc_self_energy_slow_fullelect_fep(), calc_self_energy_slow_fullelect_go(), calc_self_energy_slow_fullelect_les(), calc_self_energy_slow_fullelect_pprof(), calc_self_energy_slow_fullelect_tabener(), calc_self_energy_slow_fullelect_ti(), calc_self_energy_tabener(), calc_self_energy_ti(), calc_self_fullelect(), calc_self_fullelect_go(), calc_self_fullelect_les(), calc_self_fullelect_pprof(), calc_self_fullelect_tabener(), calc_self_fullelect_ti(), calc_self_go(), calc_self_les(), calc_self_merge_fullelect(), calc_self_merge_fullelect_go(), calc_self_merge_fullelect_les(), calc_self_merge_fullelect_pprof(), calc_self_merge_fullelect_tabener(), calc_self_merge_fullelect_ti(), calc_self_pprof(), calc_self_slow_fullelect(), calc_self_slow_fullelect_go(), calc_self_slow_fullelect_les(), calc_self_slow_fullelect_pprof(), calc_self_slow_fullelect_tabener(), calc_self_slow_fullelect_ti(), calc_self_tabener(), calc_self_ti(), calcFullPair, calcFullPairEnergy, calcFullSelf, calcFullSelfEnergy, calcMergePair, calcMergePairEnergy, calcMergeSelf, calcMergeSelfEnergy, calcPair, calcPairEnergy, calcSelf, calcSelfEnergy, calcSlowPair, calcSlowPairEnergy, calcSlowSelf, calcSlowSelfEnergy, Parameters::columnsize, columnsize, SimParameters::commOnly, commOnly, corr_table, SimParameters::cutoff, cutoff, cutoff2, cutoff2_f, cutoff_3, cutoff_3_f, cutoff_6, cutoff_6_f, SimParameters::dielectric, dielectric_1, drudeNbthole, SimParameters::drudeNbtholeCut, SimParameters::drudeOn, endi(), ewaldcof, SimParameters::exclude, fast_table, SimParameters::fixedAtomsForces, SimParameters::fixedAtomsOn, fixedAtomsOn, SimParameters::FMAOn, SimParameters::FMMOn, full_table, SimParameters::fullDirectOn, SimParameters::goForcesOn, goForcesOn, SimParameters::goGroPair, goGroPair, SimParameters::goMethod, goMethod, iERROR(), iINFO(), iout, j, k_vdwa, k_vdwa_f, k_vdwb, k_vdwb_f, lambda_table, SimParameters::lesFactor, lesFactor, SimParameters::lesOn, lesOn, lesScaling, SimParameters::limitDist, ljTable, SimParameters::longSplitting, SimParameters::martiniSwitching, mol, Node::molecule, SimParameters::MSMOn, SimParameters::MSMSplit, NAMD_bug(), NAMD_die(), SimParameters::nonbondedScaling, Node::Object(), SimParameters::pairInteractionOn, pairInteractionOn, SimParameters::pairInteractionSelf, pairInteractionSelf, Node::parameters, pi_ewaldcof, SimParameters::PMEEwaldCoefficient, SimParameters::PMEOn, SimParameters::pressureProfileAtomTypes, pressureProfileAtomTypes, SimParameters::pressureProfileOn, pressureProfileOn, SimParameters::pressureProfileSlabs, pressureProfileSlabs, SimParameters::qmForcesOn, qmForcesOn, r2_delta, r2_delta_1, r2_delta_exp, r2_table, Parameters::rowsize, rowsize, SimParameters::scale14, scale14, SCALED14, scaling, scor_table, send_build_cuda_force_table(), SHARP, Node::simParameters, simParams, slow_table, SimParameters::soluteScalingOn, SPLIT_C1, SPLIT_C2, SPLIT_MARTINI, SPLIT_NONE, SPLIT_SHIFT, SPOLY, SimParameters::switchingActive, SimParameters::switchingDist, switchOn, switchOn2, switchOn_1, switchOn_f, table_alloc, Parameters::table_ener, table_ener, table_length, table_noshort, table_short, SimParameters::tabulatedEnergies, SimParameters::useCUDA2, v_vdwa, v_vdwa_f, v_vdwb, v_vdwb_f, vdw_switch_mode, VDW_SWITCH_MODE_ENERGY, VDW_SWITCH_MODE_FORCE, VDW_SWITCH_MODE_MARTINI, vdwa_table, vdwb_table, SimParameters::vdwForceSwitching, vdwForceSwitching, and XPLOR.

Referenced by SimParameters::nonbonded_select(), and SimParameters::scriptSet().

00247 {
00248   if ( CkMyRank() ) return;
00249 
00250   // These defaults die cleanly if nothing appropriate is assigned.
00251   ComputeNonbondedUtil::calcPair = calc_error;
00252   ComputeNonbondedUtil::calcPairEnergy = calc_error;
00253   ComputeNonbondedUtil::calcSelf = calc_error;
00254   ComputeNonbondedUtil::calcSelfEnergy = calc_error;
00255   ComputeNonbondedUtil::calcFullPair = calc_error;
00256   ComputeNonbondedUtil::calcFullPairEnergy = calc_error;
00257   ComputeNonbondedUtil::calcFullSelf = calc_error;
00258   ComputeNonbondedUtil::calcFullSelfEnergy = calc_error;
00259   ComputeNonbondedUtil::calcMergePair = calc_error;
00260   ComputeNonbondedUtil::calcMergePairEnergy = calc_error;
00261   ComputeNonbondedUtil::calcMergeSelf = calc_error;
00262   ComputeNonbondedUtil::calcMergeSelfEnergy = calc_error;
00263   ComputeNonbondedUtil::calcSlowPair = calc_error;
00264   ComputeNonbondedUtil::calcSlowPairEnergy = calc_error;
00265   ComputeNonbondedUtil::calcSlowSelf = calc_error;
00266   ComputeNonbondedUtil::calcSlowSelfEnergy = calc_error;
00267 
00268   SimParameters * simParams = Node::Object()->simParameters;
00269   Parameters * params = Node::Object()->parameters;
00270 
00271   table_ener = params->table_ener;
00272   rowsize = params->rowsize;
00273   columnsize = params->columnsize;
00274 
00275   commOnly = simParams->commOnly;
00276   fixedAtomsOn = ( simParams->fixedAtomsOn && ! simParams->fixedAtomsForces );
00277 
00278   qmForcesOn = simParams->qmForcesOn ;
00279   
00280   cutoff = simParams->cutoff;
00281   cutoff2 = cutoff*cutoff;
00282   cutoff2_f = cutoff2;
00283 
00284 //fepb
00285   alchFepOn = simParams->alchFepOn;
00286   alchThermIntOn = simParams->alchThermIntOn;
00287   alchWCAOn = simParams->alchWCAOn;
00288   alchDecouple = simParams->alchDecouple;
00289 
00290   lesOn = simParams->lesOn;
00291   lesScaling = lesFactor = 0;
00292 
00293   Bool tabulatedEnergies = simParams->tabulatedEnergies;
00294   alchVdwShiftCoeff = simParams->alchVdwShiftCoeff;
00295   vdwForceSwitching = simParams->vdwForceSwitching;
00296 
00297   delete [] lambda_table;
00298   lambda_table = 0;
00299 
00300   pairInteractionOn = simParams->pairInteractionOn;
00301   pairInteractionSelf = simParams->pairInteractionSelf;
00302   pressureProfileOn = simParams->pressureProfileOn;
00303 
00304   // Ported by JLai -- Original JE - Go
00305   goGroPair = simParams->goGroPair;
00306   goForcesOn = simParams->goForcesOn;
00307   goMethod = simParams->goMethod; 
00308   // End of port
00309 
00310   accelMDOn = simParams->accelMDOn;
00311 
00312   drudeNbthole = simParams->drudeOn && (simParams->drudeNbtholeCut > 0.0);
00313 
00314   if ( drudeNbthole ) {
00315 #ifdef NAMD_CUDA
00316     NAMD_die("drudeNbthole is not supported in CUDA version");
00317 #endif
00318     if ( lesOn )
00319       NAMD_die("drudeNbthole is not supported with locally enhanced sampling");
00320     if ( pairInteractionOn )
00321       NAMD_die("drudeNbthole is not supported with pair interaction calculation");
00322     if ( pressureProfileOn )
00323       NAMD_die("drudeNbthole is not supported with pressure profile calculation");
00324   }
00325 
00326   if ( alchFepOn ) {
00327 #ifdef NAMD_CUDA
00328     NAMD_die("Alchemical free-energy perturbation is not supported in CUDA version");
00329 #endif
00330     ComputeNonbondedUtil::calcPair = calc_pair_energy_fep;
00331     ComputeNonbondedUtil::calcPairEnergy = calc_pair_energy_fep;
00332     ComputeNonbondedUtil::calcSelf = calc_self_energy_fep;
00333     ComputeNonbondedUtil::calcSelfEnergy = calc_self_energy_fep;
00334     ComputeNonbondedUtil::calcFullPair = calc_pair_energy_fullelect_fep;
00335     ComputeNonbondedUtil::calcFullPairEnergy = calc_pair_energy_fullelect_fep;
00336     ComputeNonbondedUtil::calcFullSelf = calc_self_energy_fullelect_fep;
00337     ComputeNonbondedUtil::calcFullSelfEnergy = calc_self_energy_fullelect_fep;
00338     ComputeNonbondedUtil::calcMergePair = calc_pair_energy_merge_fullelect_fep;
00339     ComputeNonbondedUtil::calcMergePairEnergy = calc_pair_energy_merge_fullelect_fep;
00340     ComputeNonbondedUtil::calcMergeSelf = calc_self_energy_merge_fullelect_fep;
00341     ComputeNonbondedUtil::calcMergeSelfEnergy = calc_self_energy_merge_fullelect_fep;
00342     ComputeNonbondedUtil::calcSlowPair = calc_pair_energy_slow_fullelect_fep;
00343     ComputeNonbondedUtil::calcSlowPairEnergy = calc_pair_energy_slow_fullelect_fep;
00344     ComputeNonbondedUtil::calcSlowSelf = calc_self_energy_slow_fullelect_fep;
00345     ComputeNonbondedUtil::calcSlowSelfEnergy = calc_self_energy_slow_fullelect_fep;
00346   }  else if ( alchThermIntOn ) {
00347 #ifdef NAMD_CUDA
00348     NAMD_die("Alchemical thermodynamic integration is not supported in CUDA version");
00349 #endif
00350     ComputeNonbondedUtil::calcPair = calc_pair_ti;
00351     ComputeNonbondedUtil::calcPairEnergy = calc_pair_energy_ti;
00352     ComputeNonbondedUtil::calcSelf = calc_self_ti;
00353     ComputeNonbondedUtil::calcSelfEnergy = calc_self_energy_ti;
00354     ComputeNonbondedUtil::calcFullPair = calc_pair_fullelect_ti;
00355     ComputeNonbondedUtil::calcFullPairEnergy = calc_pair_energy_fullelect_ti;
00356     ComputeNonbondedUtil::calcFullSelf = calc_self_fullelect_ti;
00357     ComputeNonbondedUtil::calcFullSelfEnergy = calc_self_energy_fullelect_ti;
00358     ComputeNonbondedUtil::calcMergePair = calc_pair_merge_fullelect_ti;
00359     ComputeNonbondedUtil::calcMergePairEnergy = calc_pair_energy_merge_fullelect_ti;
00360     ComputeNonbondedUtil::calcMergeSelf = calc_self_merge_fullelect_ti;
00361     ComputeNonbondedUtil::calcMergeSelfEnergy = calc_self_energy_merge_fullelect_ti;
00362     ComputeNonbondedUtil::calcSlowPair = calc_pair_slow_fullelect_ti;
00363     ComputeNonbondedUtil::calcSlowPairEnergy = calc_pair_energy_slow_fullelect_ti;
00364     ComputeNonbondedUtil::calcSlowSelf = calc_self_slow_fullelect_ti;
00365     ComputeNonbondedUtil::calcSlowSelfEnergy = calc_self_energy_slow_fullelect_ti;
00366   } else if ( lesOn ) {
00367 #ifdef NAMD_CUDA
00368     NAMD_die("Locally enhanced sampling is not supported in CUDA version");
00369 #endif
00370     lesFactor = simParams->lesFactor;
00371     lesScaling = 1.0 / (double)lesFactor;
00372     lambda_table = new BigReal[(lesFactor+1)*(lesFactor+1)];
00373     for ( int ip=0; ip<=lesFactor; ++ip ) {
00374       for ( int jp=0; jp<=lesFactor; ++jp ) {
00375         BigReal lambda_pair = 1.0;
00376         if (ip || jp ) {
00377           if (ip && jp && ip != jp) {
00378             lambda_pair = 0.0;
00379           } else {
00380             lambda_pair = lesScaling;
00381           }
00382         }
00383         lambda_table[(lesFactor+1)*ip+jp] = lambda_pair;
00384       }
00385     }
00386     ComputeNonbondedUtil::calcPair = calc_pair_les;
00387     ComputeNonbondedUtil::calcPairEnergy = calc_pair_energy_les;
00388     ComputeNonbondedUtil::calcSelf = calc_self_les;
00389     ComputeNonbondedUtil::calcSelfEnergy = calc_self_energy_les;
00390     ComputeNonbondedUtil::calcFullPair = calc_pair_fullelect_les;
00391     ComputeNonbondedUtil::calcFullPairEnergy = calc_pair_energy_fullelect_les;
00392     ComputeNonbondedUtil::calcFullSelf = calc_self_fullelect_les;
00393     ComputeNonbondedUtil::calcFullSelfEnergy = calc_self_energy_fullelect_les;
00394     ComputeNonbondedUtil::calcMergePair = calc_pair_merge_fullelect_les;
00395     ComputeNonbondedUtil::calcMergePairEnergy = calc_pair_energy_merge_fullelect_les;
00396     ComputeNonbondedUtil::calcMergeSelf = calc_self_merge_fullelect_les;
00397     ComputeNonbondedUtil::calcMergeSelfEnergy = calc_self_energy_merge_fullelect_les;
00398     ComputeNonbondedUtil::calcSlowPair = calc_pair_slow_fullelect_les;
00399     ComputeNonbondedUtil::calcSlowPairEnergy = calc_pair_energy_slow_fullelect_les;
00400     ComputeNonbondedUtil::calcSlowSelf = calc_self_slow_fullelect_les;
00401     ComputeNonbondedUtil::calcSlowSelfEnergy = calc_self_energy_slow_fullelect_les;
00402   } else if ( pressureProfileOn) {
00403 #ifdef NAMD_CUDA
00404     NAMD_die("Pressure profile calculation is not supported in CUDA version");
00405 #endif
00406     pressureProfileSlabs = simParams->pressureProfileSlabs;
00407     pressureProfileAtomTypes = simParams->pressureProfileAtomTypes;
00408 
00409     ComputeNonbondedUtil::calcPair = calc_pair_pprof;
00410     ComputeNonbondedUtil::calcPairEnergy = calc_pair_energy_pprof;
00411     ComputeNonbondedUtil::calcSelf = calc_self_pprof;
00412     ComputeNonbondedUtil::calcSelfEnergy = calc_self_energy_pprof;
00413     ComputeNonbondedUtil::calcFullPair = calc_pair_fullelect_pprof;
00414     ComputeNonbondedUtil::calcFullPairEnergy = calc_pair_energy_fullelect_pprof;
00415     ComputeNonbondedUtil::calcFullSelf = calc_self_fullelect_pprof;
00416     ComputeNonbondedUtil::calcFullSelfEnergy = calc_self_energy_fullelect_pprof;
00417     ComputeNonbondedUtil::calcMergePair = calc_pair_merge_fullelect_pprof;
00418     ComputeNonbondedUtil::calcMergePairEnergy = calc_pair_energy_merge_fullelect_pprof;
00419     ComputeNonbondedUtil::calcMergeSelf = calc_self_merge_fullelect_pprof;
00420     ComputeNonbondedUtil::calcMergeSelfEnergy = calc_self_energy_merge_fullelect_pprof;
00421     ComputeNonbondedUtil::calcSlowPair = calc_pair_slow_fullelect_pprof;
00422     ComputeNonbondedUtil::calcSlowPairEnergy = calc_pair_energy_slow_fullelect_pprof;
00423     ComputeNonbondedUtil::calcSlowSelf = calc_self_slow_fullelect_pprof;
00424     ComputeNonbondedUtil::calcSlowSelfEnergy = calc_self_energy_slow_fullelect_pprof;
00425   } else if ( pairInteractionOn ) {
00426 #ifdef NAMD_CUDA
00427     NAMD_die("Pair interaction calculation is not supported in CUDA version");
00428 #endif
00429     ComputeNonbondedUtil::calcPairEnergy = calc_pair_energy_int;
00430     ComputeNonbondedUtil::calcSelfEnergy = calc_self_energy_int;
00431     ComputeNonbondedUtil::calcFullPairEnergy = calc_pair_energy_fullelect_int;
00432     ComputeNonbondedUtil::calcFullSelfEnergy = calc_self_energy_fullelect_int;
00433     ComputeNonbondedUtil::calcMergePairEnergy = calc_pair_energy_merge_fullelect_int;
00434     ComputeNonbondedUtil::calcMergeSelfEnergy = calc_self_energy_merge_fullelect_int;
00435   } else if ( tabulatedEnergies ) {
00436 #ifdef NAMD_CUDA
00437     NAMD_die("Tabulated energies is not supported in CUDA version");
00438 #endif
00439     ComputeNonbondedUtil::calcPair = calc_pair_tabener;
00440     ComputeNonbondedUtil::calcPairEnergy = calc_pair_energy_tabener;
00441     ComputeNonbondedUtil::calcSelf = calc_self_tabener;
00442     ComputeNonbondedUtil::calcSelfEnergy = calc_self_energy_tabener;
00443     ComputeNonbondedUtil::calcFullPair = calc_pair_fullelect_tabener;
00444     ComputeNonbondedUtil::calcFullPairEnergy = calc_pair_energy_fullelect_tabener;
00445     ComputeNonbondedUtil::calcFullSelf = calc_self_fullelect_tabener;
00446     ComputeNonbondedUtil::calcFullSelfEnergy = calc_self_energy_fullelect_tabener;
00447     ComputeNonbondedUtil::calcMergePair = calc_pair_merge_fullelect_tabener;
00448     ComputeNonbondedUtil::calcMergePairEnergy = calc_pair_energy_merge_fullelect_tabener;
00449     ComputeNonbondedUtil::calcMergeSelf = calc_self_merge_fullelect_tabener;
00450     ComputeNonbondedUtil::calcMergeSelfEnergy = calc_self_energy_merge_fullelect_tabener;
00451     ComputeNonbondedUtil::calcSlowPair = calc_pair_slow_fullelect_tabener;
00452     ComputeNonbondedUtil::calcSlowPairEnergy = calc_pair_energy_slow_fullelect_tabener;
00453     ComputeNonbondedUtil::calcSlowSelf = calc_self_slow_fullelect_tabener;
00454     ComputeNonbondedUtil::calcSlowSelfEnergy = calc_self_energy_slow_fullelect_tabener;
00455   } else if ( goForcesOn ) {
00456 #ifdef NAMD_CUDA
00457     NAMD_die("Go forces is not supported in CUDA version");
00458 #endif
00459     ComputeNonbondedUtil::calcPair = calc_pair_go;
00460     ComputeNonbondedUtil::calcPairEnergy = calc_pair_energy_go;
00461     ComputeNonbondedUtil::calcSelf = calc_self_go;
00462     ComputeNonbondedUtil::calcSelfEnergy = calc_self_energy_go;
00463     ComputeNonbondedUtil::calcFullPair = calc_pair_fullelect_go;
00464     ComputeNonbondedUtil::calcFullPairEnergy = calc_pair_energy_fullelect_go;
00465     ComputeNonbondedUtil::calcFullSelf = calc_self_fullelect_go;
00466     ComputeNonbondedUtil::calcFullSelfEnergy = calc_self_energy_fullelect_go;
00467     ComputeNonbondedUtil::calcMergePair = calc_pair_merge_fullelect_go;
00468     ComputeNonbondedUtil::calcMergePairEnergy = calc_pair_energy_merge_fullelect_go;
00469     ComputeNonbondedUtil::calcMergeSelf = calc_self_merge_fullelect_go;
00470     ComputeNonbondedUtil::calcMergeSelfEnergy = calc_self_energy_merge_fullelect_go;
00471     ComputeNonbondedUtil::calcSlowPair = calc_pair_slow_fullelect_go;
00472     ComputeNonbondedUtil::calcSlowPairEnergy = calc_pair_energy_slow_fullelect_go;
00473     ComputeNonbondedUtil::calcSlowSelf = calc_self_slow_fullelect_go;
00474     ComputeNonbondedUtil::calcSlowSelfEnergy = calc_self_energy_slow_fullelect_go;
00475   } else {
00476     ComputeNonbondedUtil::calcPair = calc_pair;
00477     ComputeNonbondedUtil::calcPairEnergy = calc_pair_energy;
00478     ComputeNonbondedUtil::calcSelf = calc_self;
00479     ComputeNonbondedUtil::calcSelfEnergy = calc_self_energy;
00480     ComputeNonbondedUtil::calcFullPair = calc_pair_fullelect;
00481     ComputeNonbondedUtil::calcFullPairEnergy = calc_pair_energy_fullelect;
00482     ComputeNonbondedUtil::calcFullSelf = calc_self_fullelect;
00483     ComputeNonbondedUtil::calcFullSelfEnergy = calc_self_energy_fullelect;
00484     ComputeNonbondedUtil::calcMergePair = calc_pair_merge_fullelect;
00485     ComputeNonbondedUtil::calcMergePairEnergy = calc_pair_energy_merge_fullelect;
00486     ComputeNonbondedUtil::calcMergeSelf = calc_self_merge_fullelect;
00487     ComputeNonbondedUtil::calcMergeSelfEnergy = calc_self_energy_merge_fullelect;
00488     ComputeNonbondedUtil::calcSlowPair = calc_pair_slow_fullelect;
00489     ComputeNonbondedUtil::calcSlowPairEnergy = calc_pair_energy_slow_fullelect;
00490     ComputeNonbondedUtil::calcSlowSelf = calc_self_slow_fullelect;
00491     ComputeNonbondedUtil::calcSlowSelfEnergy = calc_self_energy_slow_fullelect;
00492   }
00493 
00494 //fepe
00495 
00496   dielectric_1 = 1.0/simParams->dielectric;
00497   if ( simParams->soluteScalingOn ) {
00498     delete ljTable;
00499     ljTable = 0;
00500   }
00501   if ( ! ljTable ) ljTable = new LJTable;
00502   mol = Node::Object()->molecule;
00503   scaling = simParams->nonbondedScaling;
00504   if ( simParams->exclude == SCALED14 )
00505   {
00506     scale14 = simParams->scale14;
00507   }
00508   else
00509   {
00510     scale14 = 1.;
00511   }
00512   if ( simParams->switchingActive )
00513   {
00514     switchOn = simParams->switchingDist;
00515     switchOn_1 = 1.0/switchOn;
00516     // d0 = 1.0/(cutoff-switchOn);
00517     switchOn2 = switchOn*switchOn;
00518     c0 = 1.0/(cutoff2-switchOn2);
00519 
00520     if ( simParams->vdwForceSwitching ) {
00521       double switchOn3 = switchOn * switchOn2;
00522       double cutoff3 = cutoff * cutoff2;
00523       double switchOn6 = switchOn3 * switchOn3;
00524       double cutoff6 = cutoff3 * cutoff3;
00525       v_vdwa_f = v_vdwa = -1. / ( switchOn6 * cutoff6 );
00526       v_vdwb_f = v_vdwb = -1. / ( switchOn3 * cutoff3 );
00527       k_vdwa_f = k_vdwa = cutoff6 / ( cutoff6 - switchOn6 );
00528       k_vdwb_f = k_vdwb = cutoff3 / ( cutoff3 - switchOn3 );
00529       cutoff_3_f = cutoff_3 = 1. / cutoff3;
00530       cutoff_6_f = cutoff_6 = 1. / cutoff6;
00531 
00532     } else if ( simParams->martiniSwitching ) { // switching fxn for Martini RBCG
00533 
00534       BigReal p6 = 6;
00535       BigReal A6 = p6 * ((p6+1)*switchOn-(p6+4)*cutoff)/(pow(cutoff,p6+2)*pow(cutoff-switchOn,2));
00536       BigReal B6 = -p6 * ((p6+1)*switchOn-(p6+3)*cutoff)/(pow(cutoff,p6+2)*pow(cutoff-switchOn,3));        
00537       BigReal C6 = 1.0/pow(cutoff,p6)-A6/3.0*pow(cutoff-switchOn,3)-B6/4.0*pow(cutoff-switchOn,4);
00538 
00539       BigReal p12 = 12;
00540       BigReal A12 = p12 * ((p12+1)*switchOn-(p12+4)*cutoff)/(pow(cutoff,p12+2)*pow(cutoff-switchOn,2));
00541       BigReal B12 = -p12 * ((p12+1)*switchOn-(p12+3)*cutoff)/(pow(cutoff,p12+2)*pow(cutoff-switchOn,3));
00542       BigReal C12 = 1.0/pow(cutoff,p12)-A12/3.0*pow(cutoff-switchOn,3)-B12/4.0*pow(cutoff-switchOn,4);
00543 
00544       A6_f =  A6;  B6_f  = B6;  C6_f =  C6;
00545       A12_f = A12; B12_f = B12; C12_f = C12;
00546       switchOn_f = switchOn;
00547 
00548     }
00549 
00550   }
00551   else
00552   {
00553     switchOn = cutoff;
00554     switchOn_1 = 1.0/switchOn;
00555     // d0 = 0.;  // avoid division by zero
00556     switchOn2 = switchOn*switchOn;
00557     c0 = 0.;  // avoid division by zero
00558   }
00559   c1 = c0*c0*c0;
00560   c3 = 3.0 * (cutoff2 - switchOn2);
00561   c5 = 0;
00562   c6 = 0;
00563   c7 = 0;
00564   c8 = 0;
00565 
00566   const int PMEOn = simParams->PMEOn;
00567   const int MSMOn = simParams->MSMOn;
00568   const int MSMSplit = simParams->MSMSplit;
00569 
00570   if ( PMEOn ) {
00571     ewaldcof = simParams->PMEEwaldCoefficient;
00572     BigReal TwoBySqrtPi = 1.12837916709551;
00573     pi_ewaldcof = TwoBySqrtPi * ewaldcof;
00574   }
00575 
00576   int splitType = SPLIT_NONE;
00577   if ( simParams->switchingActive ) splitType = SPLIT_SHIFT;
00578   if ( simParams->martiniSwitching ) splitType = SPLIT_MARTINI;
00579   if ( simParams->fullDirectOn || simParams->FMAOn || PMEOn || MSMOn ||
00580       simParams->FMMOn ) {
00581     switch ( simParams->longSplitting ) {
00582       case C2:
00583       splitType = SPLIT_C2;
00584       break;
00585 
00586       case C1:
00587       splitType = SPLIT_C1;
00588       break;
00589 
00590       case XPLOR:
00591       NAMD_die("Sorry, XPLOR splitting not supported.");
00592       break;
00593 
00594       case SHARP:
00595       NAMD_die("Sorry, SHARP splitting not supported.");
00596       break;
00597 
00598       default:
00599       NAMD_die("Unknown splitting type found!");
00600 
00601     }
00602   }
00603 
00604   BigReal r2_tol = 0.1;
00605   
00606   r2_delta = 1.0;
00607   r2_delta_exp = 0;
00608   while ( r2_delta > r2_tol ) { r2_delta /= 2.0; r2_delta_exp += 1; }
00609   r2_delta_1 = 1.0 / r2_delta;
00610 
00611   if ( ! CkMyPe() ) {
00612     iout << iINFO << "NONBONDED TABLE R-SQUARED SPACING: " <<
00613                                 r2_delta << "\n" << endi;
00614   }
00615 
00616   BigReal r2_tmp = 1.0;
00617   int cutoff2_exp = 0;
00618   while ( (cutoff2 + r2_delta) > r2_tmp ) { r2_tmp *= 2.0; cutoff2_exp += 1; }
00619 
00620   int i;
00621   int n = (r2_delta_exp + cutoff2_exp) * 64 + 1;
00622   table_length = n;
00623   #if defined(NAMD_MIC)
00624     int n_16 = (n + 15) & (~15);
00625   #endif
00626 
00627   if ( ! CkMyPe() ) {
00628     iout << iINFO << "NONBONDED TABLE SIZE: " <<
00629                                 n << " POINTS\n" << endi;
00630   }
00631 
00632   if ( table_alloc ) delete [] table_alloc;
00633   #if defined(NAMD_MIC)
00634     table_alloc = new BigReal[61*n_16+16];
00635     BigReal *table_align = table_alloc;
00636     while ( ((long)table_align) % 128 ) ++table_align;
00637     mic_table_base_ptr = table_align;
00638     mic_table_n = n;
00639     mic_table_n_16 = n_16;
00640     table_noshort = table_align;
00641     table_short = table_align + 16*n_16;
00642     slow_table = table_align + 32*n_16;
00643     fast_table = table_align + 36*n_16;
00644     scor_table = table_align + 40*n_16;
00645     corr_table = table_align + 44*n_16;
00646     full_table = table_align + 48*n_16;
00647     vdwa_table = table_align + 52*n_16;
00648     vdwb_table = table_align + 56*n_16;
00649     r2_table = table_align + 60*n_16;
00650   #else
00651   table_alloc = new BigReal[61*n+16];
00652   BigReal *table_align = table_alloc;
00653   while ( ((long)table_align) % 128 ) ++table_align;
00654   table_noshort = table_align;
00655   table_short = table_align + 16*n;
00656   slow_table = table_align + 32*n;
00657   fast_table = table_align + 36*n;
00658   scor_table = table_align + 40*n;
00659   corr_table = table_align + 44*n;
00660   full_table = table_align + 48*n;
00661   vdwa_table = table_align + 52*n;
00662   vdwb_table = table_align + 56*n;
00663   r2_table = table_align + 60*n;
00664   #endif
00665   BigReal *fast_i = fast_table + 4;
00666   BigReal *scor_i = scor_table + 4;
00667   BigReal *slow_i = slow_table + 4;
00668   BigReal *vdwa_i = vdwa_table + 4;
00669   BigReal *vdwb_i = vdwb_table + 4;
00670   BigReal *r2_i = r2_table;  *(r2_i++) = r2_delta;
00671   BigReal r2_limit = simParams->limitDist * simParams->limitDist;
00672   if ( r2_limit < r2_delta ) r2_limit = r2_delta;
00673   int r2_delta_i = 0;  // entry for r2 == r2_delta
00674 
00675 #ifdef NAMD_KNL
00676  if ( knl_table_alloc ) delete [] knl_table_alloc;
00677  knl_table_alloc = new float[10*KNL_TABLE_SIZE];
00678  knl_fast_ener_table = knl_table_alloc;
00679  knl_fast_grad_table = knl_table_alloc + KNL_TABLE_SIZE;
00680  knl_scor_ener_table = knl_table_alloc + 2*KNL_TABLE_SIZE;
00681  knl_scor_grad_table = knl_table_alloc + 3*KNL_TABLE_SIZE;
00682  knl_slow_ener_table = knl_table_alloc + 4*KNL_TABLE_SIZE;
00683  knl_slow_grad_table = knl_table_alloc + 5*KNL_TABLE_SIZE;
00684  knl_corr_ener_table = knl_table_alloc + 6*KNL_TABLE_SIZE;
00685  knl_corr_grad_table = knl_table_alloc + 7*KNL_TABLE_SIZE;
00686  knl_full_ener_table = knl_table_alloc + 8*KNL_TABLE_SIZE;
00687  knl_full_grad_table = knl_table_alloc + 9*KNL_TABLE_SIZE;
00688  knl_fast_ener_table[0] = 0.;
00689  knl_fast_grad_table[0] = 0.;
00690  knl_scor_ener_table[0] = 0.;
00691  knl_scor_grad_table[0] = 0.;
00692  knl_slow_ener_table[0] = 0.;
00693  knl_slow_grad_table[0] = 0.;
00694  knl_corr_ener_table[0] = 0.;
00695  knl_corr_grad_table[0] = 0.;
00696  knl_full_ener_table[0] = 0.;
00697  knl_full_grad_table[0] = 0.;
00698  for ( int knl_table = 0; knl_table < 2; ++knl_table ) {
00699   int nn = n;
00700   if ( knl_table ) {
00701     nn = KNL_TABLE_SIZE-1;
00702   }
00703   for ( i=1; i<nn; ++i ) {
00704 #else
00705   // fill in the table, fix up i==0 (r2==0) below
00706   for ( i=1; i<n; ++i ) {
00707 #endif
00708 
00709     const BigReal r2_base = r2_delta * ( 1 << (i/64) );
00710     const BigReal r2_del = r2_base / 64.0;
00711     BigReal r2 = r2_base - r2_delta + r2_del * (i%64);
00712 
00713     BigReal r = sqrt(r2);
00714 
00715 #ifdef NAMD_KNL
00716     if ( knl_table ) {
00717       r = (double)(nn-1)/(double)(i);
00718       r2 = r*r;
00719     } else
00720 #endif
00721     if ( r2 <= r2_limit ) r2_delta_i = i;
00722 
00723     const BigReal r_1 = 1.0/r;
00724     const BigReal r_2 = 1.0/r2;
00725 
00726     // fast_ is defined as (full_ - slow_)
00727     // corr_ and fast_ are both zero at the cutoff, full_ is not
00728     // all three are approx 1/r at short distances
00729 
00730     // for actual interpolation, we use fast_ for fast forces and
00731     // scor_ = slow_ + corr_ - full_ and slow_ for slow forces
00732     // since these last two are of small magnitude
00733 
00734     BigReal fast_energy, fast_gradient;
00735     BigReal scor_energy, scor_gradient;
00736     BigReal slow_energy, slow_gradient;
00737 
00738     // corr_ is PME direct sum, or similar correction term
00739     // corr_energy is multiplied by r until later
00740     // corr_gradient is multiplied by -r^2 until later
00741     BigReal corr_energy, corr_gradient;
00742 
00743     
00744     if ( PMEOn ) {
00745       BigReal tmp_a = r * ewaldcof;
00746       BigReal tmp_b = erfc(tmp_a);
00747       corr_energy = tmp_b;
00748       corr_gradient = pi_ewaldcof*exp(-(tmp_a*tmp_a))*r + tmp_b;
00749     } else if ( MSMOn ) {
00750       BigReal a_1 = 1.0/cutoff;
00751       BigReal r_a = r * a_1;
00752       BigReal g, dg;
00753       SPOLY(&g, &dg, r_a, MSMSplit);
00754       corr_energy = 1 - r_a * g;
00755       corr_gradient = 1 + r_a*r_a * dg;
00756     } else {
00757       corr_energy = corr_gradient = 0;
00758     }
00759 
00760     switch(splitType) {
00761       case SPLIT_NONE:
00762         fast_energy = 1.0/r;
00763         fast_gradient = -1.0/r2;
00764         scor_energy = scor_gradient = 0;
00765         slow_energy = slow_gradient = 0;
00766         break;
00767       case SPLIT_SHIFT: {
00768         BigReal shiftVal = r2/cutoff2 - 1.0;
00769         shiftVal *= shiftVal;
00770         BigReal dShiftVal = 2.0 * (r2/cutoff2 - 1.0) * 2.0*r/cutoff2;
00771         fast_energy = shiftVal/r;
00772         fast_gradient = dShiftVal/r - shiftVal/r2;
00773         scor_energy = scor_gradient = 0;
00774         slow_energy = slow_gradient = 0;
00775         } 
00776         break;
00777       case SPLIT_MARTINI: { 
00778         // in Martini, the Coulomb switching distance is zero
00779         const BigReal COUL_SWITCH = 0.;
00780         // Gromacs shifting function
00781         const BigReal p1 = 1.;
00782         BigReal A1 = p1 * ((p1+1)*COUL_SWITCH-(p1+4)*cutoff)/(pow(cutoff,p1+2)*pow(cutoff-COUL_SWITCH,2));
00783         BigReal B1 = -p1 * ((p1+1)*COUL_SWITCH-(p1+3)*cutoff)/(pow(cutoff,p1+2)*pow(cutoff-COUL_SWITCH,3));
00784         BigReal X1 = 1.0/pow(cutoff,p1)-A1/3.0*pow(cutoff-COUL_SWITCH,3)-B1/4.0*pow(cutoff-COUL_SWITCH,4);
00785         BigReal r12 = (r-COUL_SWITCH)*(r-COUL_SWITCH);
00786         BigReal r13 = (r-COUL_SWITCH)*(r-COUL_SWITCH)*(r-COUL_SWITCH);
00787         BigReal shiftVal = -(A1/3.0)*r13 - (B1/4.0)*r12*r12 - X1;
00788         BigReal dShiftVal = -A1*r12 - B1*r13;
00789         fast_energy = (1/r) + shiftVal;
00790         fast_gradient = -1/(r2) + dShiftVal;
00791         scor_energy = scor_gradient = 0;
00792         slow_energy = slow_gradient = 0;
00793         } 
00794         break;
00795       case SPLIT_C1:
00796         // calculate actual energy and gradient
00797         slow_energy = 0.5/cutoff * (3.0 - (r2/cutoff2));
00798         slow_gradient = -1.0/cutoff2 * (r/cutoff);
00799         // calculate scor from slow and corr
00800         scor_energy = slow_energy + (corr_energy - 1.0)/r;
00801         scor_gradient = slow_gradient - (corr_gradient - 1.0)/r2;
00802         // calculate fast from slow
00803         fast_energy = 1.0/r - slow_energy;
00804         fast_gradient = -1.0/r2 - slow_gradient;
00805         break;
00806       case SPLIT_C2:
00807         //
00808         // Quintic splitting function contributed by
00809         // Bruce Berne, Ruhong Zhou, and Joe Morrone
00810         //
00811         // calculate actual energy and gradient
00812         slow_energy = r2/(cutoff*cutoff2) * (6.0 * (r2/cutoff2)
00813             - 15.0*(r/cutoff) + 10.0);
00814         slow_gradient = r/(cutoff*cutoff2) * (24.0 * (r2/cutoff2)
00815             - 45.0 *(r/cutoff) + 20.0);
00816         // calculate scor from slow and corr
00817         scor_energy = slow_energy + (corr_energy - 1.0)/r;
00818         scor_gradient = slow_gradient - (corr_gradient - 1.0)/r2;
00819         // calculate fast from slow
00820         fast_energy = 1.0/r - slow_energy;
00821         fast_gradient = -1.0/r2 - slow_gradient;
00822         break;
00823     }
00824 
00825     // foo_gradient is calculated as ( d foo_energy / d r )
00826     // and now divided by 2r to get ( d foo_energy / d r2 )
00827 
00828     fast_gradient *= 0.5 * r_1;
00829     scor_gradient *= 0.5 * r_1;
00830     slow_gradient *= 0.5 * r_1;
00831 
00832     // let modf be 1 if excluded, 1-scale14 if modified, 0 otherwise,
00833     // add scor_ - modf * slow_ to slow terms and
00834     // add fast_ - modf * fast_ to fast terms.
00835 
00836     BigReal vdwa_energy, vdwa_gradient;
00837     BigReal vdwb_energy, vdwb_gradient;
00838 
00839     const BigReal r_6 = r_2*r_2*r_2;
00840     const BigReal r_12 = r_6*r_6;
00841 
00842     // Lennard-Jones switching function
00843   if ( simParams->vdwForceSwitching ) {  // switch force
00844     vdw_switch_mode = VDW_SWITCH_MODE_FORCE;
00845 
00846     // from Steinbach & Brooks, JCC 15, pgs 667-683, 1994, eqns 10-13
00847     if ( r2 > switchOn2 ) {
00848       BigReal tmpa = r_6 - cutoff_6;
00849       vdwa_energy = k_vdwa * tmpa * tmpa;
00850       BigReal tmpb = r_1 * r_2 - cutoff_3;
00851       vdwb_energy = k_vdwb * tmpb * tmpb;
00852       vdwa_gradient = -6.0 * k_vdwa * tmpa * r_2 * r_6;
00853       vdwb_gradient = -3.0 * k_vdwb * tmpb * r_2 * r_2 * r_1;
00854     } else {
00855       vdwa_energy = r_12 + v_vdwa;
00856       vdwb_energy = r_6 + v_vdwb;
00857       vdwa_gradient = -6.0 * r_2 * r_12;
00858       vdwb_gradient = -3.0 * r_2 * r_6;
00859     }
00860   } else if ( simParams->martiniSwitching ) { // switching fxn for Martini RBCG
00861     vdw_switch_mode = VDW_SWITCH_MODE_MARTINI;
00862 
00863     BigReal r12 = (r-switchOn)*(r-switchOn);        BigReal r13 = (r-switchOn)*(r-switchOn)*(r-switchOn);
00864 
00865     BigReal p6 = 6;
00866     BigReal A6 = p6 * ((p6+1)*switchOn-(p6+4)*cutoff)/(pow(cutoff,p6+2)*pow(cutoff-switchOn,2));
00867     BigReal B6 = -p6 * ((p6+1)*switchOn-(p6+3)*cutoff)/(pow(cutoff,p6+2)*pow(cutoff-switchOn,3));        
00868     BigReal C6 = 1.0/pow(cutoff,p6)-A6/3.0*pow(cutoff-switchOn,3)-B6/4.0*pow(cutoff-switchOn,4);
00869 
00870     BigReal p12 = 12;
00871     BigReal A12 = p12 * ((p12+1)*switchOn-(p12+4)*cutoff)/(pow(cutoff,p12+2)*pow(cutoff-switchOn,2));
00872     BigReal B12 = -p12 * ((p12+1)*switchOn-(p12+3)*cutoff)/(pow(cutoff,p12+2)*pow(cutoff-switchOn,3));
00873     BigReal C12 = 1.0/pow(cutoff,p12)-A12/3.0*pow(cutoff-switchOn,3)-B12/4.0*pow(cutoff-switchOn,4);
00874 
00875     BigReal LJshifttempA = -(A12/3)*r13 - (B12/4)*r12*r12 - C12;
00876     BigReal LJshifttempB = -(A6/3)*r13 - (B6/4)*r12*r12 - C6;
00877     const BigReal shiftValA =         // used for Lennard-Jones
00878                         ( r2 > switchOn2 ? LJshifttempA : -C12);
00879     const BigReal shiftValB =         // used for Lennard-Jones
00880                         ( r2 > switchOn2 ? LJshifttempB : -C6);
00881 
00882     BigReal LJdshifttempA = -A12*r12 - B12*r13;
00883     BigReal LJdshifttempB = -A6*r12 - B6*r13;
00884     const BigReal dshiftValA =         // used for Lennard-Jones
00885                         ( r2 > switchOn2 ? LJdshifttempA*0.5*r_1 : 0 );
00886     const BigReal dshiftValB =         // used for Lennard-Jones
00887                         ( r2 > switchOn2 ? LJdshifttempB*0.5*r_1 : 0 );
00888 
00889 
00890 
00891 
00892     //have not addressed r > cutoff
00893 
00894     //  dshiftValA*= 0.5*r_1;
00895     //  dshiftValB*= 0.5*r_1;
00896 
00897     vdwa_energy = r_12 + shiftValA;
00898     vdwb_energy = r_6 + shiftValB;
00899    
00900     vdwa_gradient = -6/pow(r,14) + dshiftValA ;
00901     vdwb_gradient = -3/pow(r,8) + dshiftValB;
00902 
00903   } else {  // switch energy
00904     vdw_switch_mode = VDW_SWITCH_MODE_ENERGY;
00905 
00906     const BigReal c2 = cutoff2-r2;
00907     const BigReal c4 = c2*(c3-2.0*c2);
00908     const BigReal switchVal =         // used for Lennard-Jones
00909                         ( r2 > switchOn2 ? c2*c4*c1 : 1.0 );
00910     const BigReal dSwitchVal =        // d switchVal / d r2
00911                         ( r2 > switchOn2 ? 2*c1*(c2*c2-c4) : 0.0 );
00912 
00913     vdwa_energy = switchVal * r_12;
00914     vdwb_energy = switchVal * r_6;
00915 
00916     vdwa_gradient = ( dSwitchVal - 6.0 * switchVal * r_2 ) * r_12;
00917     vdwb_gradient = ( dSwitchVal - 3.0 * switchVal * r_2 ) * r_6;
00918   }
00919 
00920 
00921 #ifdef NAMD_KNL
00922    if ( knl_table ) {
00923     knl_fast_ener_table[i] = -1.*fast_energy;
00924     knl_fast_grad_table[i] = -2.*fast_gradient;
00925     knl_scor_ener_table[i] = -1.*scor_energy;
00926     knl_scor_grad_table[i] = -2.*scor_gradient;
00927     knl_slow_ener_table[i] = -1.*slow_energy;
00928     knl_slow_grad_table[i] = -2.*slow_gradient;
00929     knl_corr_ener_table[i] = -1.*(fast_energy + scor_energy);
00930     knl_corr_grad_table[i] = -2.*(fast_gradient + scor_gradient);
00931     knl_full_ener_table[i] = -1.*(fast_energy + slow_energy);
00932     knl_full_grad_table[i] = -2.*(fast_gradient + slow_gradient);
00933     if ( i == nn-1 ) {
00934       knl_fast_ener_table[nn] = knl_fast_ener_table[i];
00935       knl_fast_grad_table[nn] = knl_fast_grad_table[i];
00936       knl_scor_ener_table[nn] = knl_scor_ener_table[i];
00937       knl_scor_grad_table[nn] = knl_scor_grad_table[i];
00938       knl_slow_ener_table[nn] = knl_slow_ener_table[i];
00939       knl_slow_grad_table[nn] = knl_slow_grad_table[i];
00940       knl_corr_ener_table[nn] = knl_corr_ener_table[i];
00941       knl_corr_grad_table[nn] = knl_corr_grad_table[i];
00942       knl_full_ener_table[nn] = knl_full_ener_table[i];
00943       knl_full_grad_table[nn] = knl_full_grad_table[i];
00944     }
00945    } else {
00946 #endif
00947     *(fast_i++) = fast_energy;
00948     *(fast_i++) = fast_gradient;
00949     *(fast_i++) = 0;
00950     *(fast_i++) = 0;
00951     *(scor_i++) = scor_energy;
00952     *(scor_i++) = scor_gradient;
00953     *(scor_i++) = 0;
00954     *(scor_i++) = 0;
00955     *(slow_i++) = slow_energy;
00956     *(slow_i++) = slow_gradient;
00957     *(slow_i++) = 0;
00958     *(slow_i++) = 0;
00959     *(vdwa_i++) = vdwa_energy;
00960     *(vdwa_i++) = vdwa_gradient;
00961     *(vdwa_i++) = 0;
00962     *(vdwa_i++) = 0;
00963     *(vdwb_i++) = vdwb_energy;
00964     *(vdwb_i++) = vdwb_gradient;
00965     *(vdwb_i++) = 0;
00966     *(vdwb_i++) = 0;
00967     *(r2_i++) = r2 + r2_delta;
00968 #ifdef NAMD_KNL
00969    }
00970 #endif
00971 
00972   }
00973 #ifdef NAMD_KNL
00974  } // knl_table loop
00975 #endif
00976 
00977   if ( ! r2_delta_i ) {
00978     NAMD_bug("Failed to find table entry for r2 == r2_limit\n");
00979   }
00980   if ( r2_table[r2_delta_i] > r2_limit + r2_delta ) {
00981     NAMD_bug("Found bad table entry for r2 == r2_limit\n");
00982   }
00983 
00984   int j;
00985   const char *table_name = "XXXX";
00986   int smooth_short = 0;
00987   for ( j=0; j<5; ++j ) {
00988     BigReal *t0 = 0;
00989     switch (j) {
00990       case 0: 
00991         t0 = fast_table;
00992         table_name = "FAST";
00993         smooth_short = 1;
00994       break;
00995       case 1: 
00996         t0 = scor_table;
00997         table_name = "SCOR";
00998         smooth_short = 0;
00999       break;
01000       case 2: 
01001         t0 = slow_table;
01002         table_name = "SLOW";
01003         smooth_short = 0;
01004       break;
01005       case 3: 
01006         t0 = vdwa_table;
01007         table_name = "VDWA";
01008         smooth_short = 1;
01009       break;
01010       case 4: 
01011         t0 = vdwb_table;
01012         table_name = "VDWB";
01013         smooth_short = 1;
01014       break;
01015     }
01016     // patch up data for i=0
01017     t0[0] = t0[4] - t0[5] * ( r2_delta / 64.0 );  // energy
01018     t0[1] = t0[5];  // gradient
01019     t0[2] = 0;
01020     t0[3] = 0;
01021     if ( smooth_short ) {
01022       BigReal energy0 = t0[4*r2_delta_i];
01023       BigReal gradient0 = t0[4*r2_delta_i+1];
01024       BigReal r20 = r2_table[r2_delta_i];
01025       t0[0] = energy0 - gradient0 * (r20 - r2_table[0]);  // energy
01026       t0[1] = gradient0;  // gradient
01027     }
01028     BigReal *t;
01029     for ( i=0,t=t0; i<(n-1); ++i,t+=4 ) {
01030       BigReal x = ( r2_delta * ( 1 << (i/64) ) ) / 64.0;
01031       if ( r2_table[i+1] != r2_table[i] + x ) {
01032         NAMD_bug("Bad table delta calculation.\n");
01033       }
01034       if ( smooth_short && i+1 < r2_delta_i ) {
01035         BigReal energy0 = t0[4*r2_delta_i];
01036         BigReal gradient0 = t0[4*r2_delta_i+1];
01037         BigReal r20 = r2_table[r2_delta_i];
01038         t[4] = energy0 - gradient0 * (r20 - r2_table[i+1]);  // energy
01039         t[5] = gradient0;  // gradient
01040       }
01041       BigReal v1 = t[0];
01042       BigReal g1 = t[1];
01043       BigReal v2 = t[4];
01044       BigReal g2 = t[5];
01045       // explicit formulas for v1 + g1 x + c x^2 + d x^3
01046       BigReal c = ( 3.0 * (v2 - v1) - x * (2.0 * g1 + g2) ) / ( x * x );
01047       BigReal d = ( -2.0 * (v2 - v1) + x * (g1 + g2) ) / ( x * x * x );
01048       // since v2 - v1 is imprecise, we refine c and d numerically
01049       // important because we need accurate forces (more than energies!)
01050       for ( int k=0; k < 2; ++k ) {
01051         BigReal dv = (v1 - v2) + ( ( d * x + c ) * x + g1 ) * x;
01052         BigReal dg = (g1 - g2) + ( 3.0 * d * x + 2.0 * c ) * x;
01053         c -= ( 3.0 * dv - x * dg ) / ( x * x );
01054         d -= ( -2.0 * dv + x * dg ) / ( x * x * x );
01055       }
01056       // store in the array;
01057       t[2] = c;  t[3] = d;
01058     }
01059 
01060     if ( ! CkMyPe() ) {
01061     BigReal dvmax = 0;
01062     BigReal dgmax = 0;
01063     BigReal dvmax_r = 0;
01064     BigReal dgmax_r = 0;
01065     BigReal fdvmax = 0;
01066     BigReal fdgmax = 0;
01067     BigReal fdvmax_r = 0;
01068     BigReal fdgmax_r = 0;
01069     BigReal dgcdamax = 0;
01070     BigReal dgcdimax = 0;
01071     BigReal dgcaimax = 0;
01072     BigReal dgcdamax_r = 0;
01073     BigReal dgcdimax_r = 0;
01074     BigReal dgcaimax_r = 0;
01075     BigReal fdgcdamax = 0;
01076     BigReal fdgcdimax = 0;
01077     BigReal fdgcaimax = 0;
01078     BigReal fdgcdamax_r = 0;
01079     BigReal fdgcdimax_r = 0;
01080     BigReal fdgcaimax_r = 0;
01081     BigReal gcm = fabs(t0[1]);  // gradient magnitude running average
01082     for ( i=0,t=t0; i<(n-1); ++i,t+=4 ) {
01083       const BigReal r2_base = r2_delta * ( 1 << (i/64) );
01084       const BigReal r2_del = r2_base / 64.0;
01085       const BigReal r2 = r2_base - r2_delta + r2_del * (i%64);
01086       const BigReal r = sqrt(r2);
01087       if ( r > cutoff ) break;
01088       BigReal x = r2_del;
01089       BigReal dv = ( ( t[3] * x + t[2] ) * x + t[1] ) * x + t[0] - t[4];
01090       BigReal dg = ( 3.0 * t[3] * x + 2.0 * t[2] ) * x + t[1] - t[5];
01091       if ( t[4] != 0. && fabs(dv/t[4]) > fdvmax ) {
01092         fdvmax = fabs(dv/t[4]); fdvmax_r = r;
01093       }
01094       if ( fabs(dv) > dvmax ) {
01095         dvmax = fabs(dv); dvmax_r = r;
01096       }
01097       if ( t[5] != 0. && fabs(dg/t[5]) > fdgmax ) {
01098         fdgmax = fabs(dg/t[5]); fdgmax_r = r;
01099       }
01100       if ( fabs(dg) > dgmax ) {
01101         dgmax = fabs(dg); dgmax_r = r;
01102       }
01103       BigReal gcd = (t[4] - t[0]) / x;  // centered difference gradient
01104       BigReal gcd_prec = (fabs(t[0]) + fabs(t[4])) * 1.e-15 / x;  // roundoff
01105       gcm = 0.9 * gcm + 0.1 * fabs(t[5]);  // magnitude running average
01106       BigReal gca = 0.5  * (t[1] + t[5]);  // centered average gradient
01107       BigReal gci = ( 0.75 * t[3] * x + t[2] ) * x + t[1];  // interpolated
01108       BigReal rc = sqrt(r2 + 0.5 * x);
01109       BigReal dgcda = gcd - gca;
01110       if ( dgcda != 0. && fabs(dgcda) < gcd_prec ) {
01111         // CkPrintf("ERROR %g < PREC %g AT %g AVG VAL %g\n", dgcda, gcd_prec, rc, gca);
01112         dgcda = 0.;
01113       }
01114       BigReal dgcdi = gcd - gci;
01115       if ( dgcdi != 0. && fabs(dgcdi) < gcd_prec ) {
01116         // CkPrintf("ERROR %g < PREC %g AT %g INT VAL %g\n", dgcdi, gcd_prec, rc, gci);
01117         dgcdi = 0.;
01118       }
01119       BigReal dgcai = gca - gci;
01120       if ( t[1]*t[5] > 0. && gcm != 0. && fabs(dgcda/gcm) > fdgcdamax ) {
01121         fdgcdamax = fabs(dgcda/gcm); fdgcdamax_r = rc;
01122       }
01123       if ( fabs(dgcda) > fdgcdamax ) {
01124         dgcdamax = fabs(dgcda); dgcdamax_r = rc;
01125       }
01126       if ( t[1]*t[5] > 0. && gcm != 0. && fabs(dgcdi/gcm) > fdgcdimax ) {
01127         fdgcdimax = fabs(dgcdi/gcm); fdgcdimax_r = rc;
01128       }
01129       if ( fabs(dgcdi) > fdgcdimax ) {
01130         dgcdimax = fabs(dgcdi); dgcdimax_r = rc;
01131       }
01132       if ( t[1]*t[5] > 0. && gcm != 0. && fabs(dgcai/gcm) > fdgcaimax ) {
01133         fdgcaimax = fabs(dgcai/gcm); fdgcaimax_r = rc;
01134       }
01135       if ( fabs(dgcai) > fdgcaimax ) {
01136         dgcaimax = fabs(dgcai); dgcaimax_r = rc;
01137       }
01138 #if 0
01139       CkPrintf("TABLE %s %g %g %g %g\n",table_name,rc,dgcda/gcm,dgcda,gci);
01140       if (dv != 0.) CkPrintf("TABLE %d ENERGY ERROR %g AT %g (%d)\n",j,dv,r,i);
01141       if (dg != 0.) CkPrintf("TABLE %d FORCE ERROR %g AT %g (%d)\n",j,dg,r,i);
01142 #endif
01143     }
01144     if ( dvmax != 0.0 ) {
01145       iout << iINFO << "ABSOLUTE IMPRECISION IN " << table_name <<
01146         " TABLE ENERGY: " << dvmax << " AT " << dvmax_r << "\n" << endi;
01147     }
01148     if ( fdvmax != 0.0 ) {
01149       iout << iINFO << "RELATIVE IMPRECISION IN " << table_name <<
01150         " TABLE ENERGY: " << fdvmax << " AT " << fdvmax_r << "\n" << endi;
01151     }
01152     if ( dgmax != 0.0 ) {
01153       iout << iINFO << "ABSOLUTE IMPRECISION IN " << table_name <<
01154         " TABLE FORCE: " << dgmax << " AT " << dgmax_r << "\n" << endi;
01155     }
01156     if ( fdgmax != 0.0 ) {
01157       iout << iINFO << "RELATIVE IMPRECISION IN " << table_name <<
01158         " TABLE FORCE: " << fdgmax << " AT " << fdgmax_r << "\n" << endi;
01159     }
01160     if (fdgcdamax != 0.0 ) {
01161       iout << iINFO << "INCONSISTENCY IN " << table_name <<
01162         " TABLE ENERGY VS FORCE: " << fdgcdamax << " AT " << fdgcdamax_r << "\n" << endi;
01163       if ( fdgcdamax > 0.1 ) {
01164         iout << iERROR << "\n";
01165         iout << iERROR << "CALCULATED " << table_name <<
01166           " FORCE MAY NOT MATCH ENERGY! POSSIBLE BUG!\n";
01167         iout << iERROR << "\n";
01168       }
01169     }
01170     if (0 && fdgcdimax != 0.0 ) {
01171       iout << iINFO << "INCONSISTENCY IN " << table_name <<
01172         " TABLE ENERGY VS FORCE: " << fdgcdimax << " AT " << fdgcdimax_r << "\n" << endi;
01173     }
01174     if ( 0 && fdgcaimax != 0.0 ) {
01175       iout << iINFO << "INCONSISTENCY IN " << table_name <<
01176         " TABLE AVG VS INT FORCE: " << fdgcaimax << " AT " << fdgcaimax_r << "\n" << endi;
01177     }
01178     }
01179 
01180   }
01181 
01182   for ( i=0; i<4*n; ++i ) {
01183     corr_table[i] = fast_table[i] + scor_table[i];
01184     full_table[i] = fast_table[i] + slow_table[i];
01185   }
01186 
01187 #if 0  
01188   for ( i=0; i<n; ++i ) {
01189    for ( int j=0; j<4; ++j ) {
01190     table_short[16*i+6-2*j] = table_noshort[16*i+6-2*j] = vdwa_table[4*i+j];
01191     table_short[16*i+7-2*j] = table_noshort[16*i+7-2*j] = vdwb_table[4*i+j];
01192     table_short[16*i+8+3-j] = fast_table[4*i+j];
01193     table_short[16*i+12+3-j] = scor_table[4*i+j];
01194     table_noshort[16*i+8+3-j] = corr_table[4*i+j];
01195     table_noshort[16*i+12+3-j] = full_table[4*i+j];
01196    }
01197   }
01198 #endif 
01199 
01200   for ( i=0; i<n; ++i ) {
01201     table_short[16*i+0] = table_noshort[16*i+0] = -6.*vdwa_table[4*i+3];
01202     table_short[16*i+1] = table_noshort[16*i+1] = -4.*vdwa_table[4*i+2];
01203     table_short[16*i+2] = table_noshort[16*i+2] = -2.*vdwa_table[4*i+1];
01204     table_short[16*i+3] = table_noshort[16*i+3] = -1.*vdwa_table[4*i+0];
01205     
01206     table_short[16*i+4] = table_noshort[16*i+4] = -6.*vdwb_table[4*i+3];
01207     table_short[16*i+5] = table_noshort[16*i+5] = -4.*vdwb_table[4*i+2];
01208     table_short[16*i+6] = table_noshort[16*i+6] = -2.*vdwb_table[4*i+1];
01209     table_short[16*i+7] = table_noshort[16*i+7] = -1.*vdwb_table[4*i+0];
01210     
01211     table_short[16*i+8]  = -6.*fast_table[4*i+3];
01212     table_short[16*i+9]  = -4.*fast_table[4*i+2];
01213     table_short[16*i+10] = -2.*fast_table[4*i+1];
01214     table_short[16*i+11] = -1.*fast_table[4*i+0];
01215 
01216     table_noshort[16*i+8]  = -6.*corr_table[4*i+3];
01217     table_noshort[16*i+9]  = -4.*corr_table[4*i+2];
01218     table_noshort[16*i+10] = -2.*corr_table[4*i+1];
01219     table_noshort[16*i+11] = -1.*corr_table[4*i+0];
01220 
01221     table_short[16*i+12] = -6.*scor_table[4*i+3];
01222     table_short[16*i+13] = -4.*scor_table[4*i+2];
01223     table_short[16*i+14] = -2.*scor_table[4*i+1];
01224     table_short[16*i+15] = -1.*scor_table[4*i+0];
01225 
01226     table_noshort[16*i+12] = -6.*full_table[4*i+3];
01227     table_noshort[16*i+13] = -4.*full_table[4*i+2];
01228     table_noshort[16*i+14] = -2.*full_table[4*i+1];
01229     table_noshort[16*i+15] = -1.*full_table[4*i+0];
01230   }
01231 
01232 #if 0
01233   char fname[100];
01234   sprintf(fname,"/tmp/namd.table.pe%d.dat",CkMyPe());
01235   FILE *f = fopen(fname,"w");
01236   for ( i=0; i<(n-1); ++i ) {
01237     const BigReal r2_base = r2_delta * ( 1 << (i/64) );
01238     const BigReal r2_del = r2_base / 64.0;
01239     const BigReal r2 = r2_base - r2_delta + r2_del * (i%64);
01240     BigReal *t;
01241     if ( r2 + r2_delta != r2_table[i] ) fprintf(f,"r2 error! ");
01242     fprintf(f,"%g",r2);
01243     t = fast_table + 4*i;
01244     fprintf(f,"   %g %g %g %g", t[0], t[1], t[2], t[3]);
01245     t = scor_table + 4*i;
01246     fprintf(f,"   %g %g %g %g", t[0], t[1], t[2], t[3]);
01247     t = slow_table + 4*i;
01248     fprintf(f,"   %g %g %g %g", t[0], t[1], t[2], t[3]);
01249     t = corr_table + 4*i;
01250     fprintf(f,"   %g %g %g %g", t[0], t[1], t[2], t[3]);
01251     t = full_table + 4*i;
01252     fprintf(f,"   %g %g %g %g", t[0], t[1], t[2], t[3]);
01253     t = vdwa_table + 4*i;
01254     fprintf(f,"   %g %g %g %g", t[0], t[1], t[2], t[3]);
01255     t = vdwb_table + 4*i;
01256     fprintf(f,"   %g %g %g %g", t[0], t[1], t[2], t[3]);
01257     fprintf(f,"\n");
01258   }
01259   fclose(f);
01260 #endif
01261 
01262   //Flip slow table to match table_four_i
01263   for ( i=0; i<n; ++i ) {
01264     BigReal tmp0, tmp1, tmp2, tmp3;
01265     tmp0 = slow_table [i*4 + 0];
01266     tmp1 = slow_table [i*4 + 1];
01267     tmp2 = slow_table [i*4 + 2];
01268     tmp3 = slow_table [i*4 + 3];
01269 
01270     slow_table [i*4 + 0] = tmp3;
01271     slow_table [i*4 + 1] = tmp2;
01272     slow_table [i*4 + 2] = tmp1;
01273     slow_table [i*4 + 3] = tmp0;
01274   }
01275 
01276 #ifdef NAMD_CUDA
01277   if (!simParams->useCUDA2) {
01278     send_build_cuda_force_table();
01279   }
01280 #endif
01281 
01282   #ifdef NAMD_MIC
01283     send_build_mic_force_table();
01284   #endif
01285 }

static BigReal ComputeNonbondedUtil::square ( const BigReal x,
const BigReal y,
const BigReal z 
) [inline, static]

Definition at line 399 of file ComputeNonbondedUtil.h.

00402         {
00403         return(x*x+y*y+z*z);
00404         }

void ComputeNonbondedUtil::submitPressureProfileData ( BigReal data,
SubmitReduction reduction 
) [static]

Definition at line 211 of file ComputeNonbondedUtil.C.

References SubmitReduction::add(), j, pressureProfileAtomTypes, and pressureProfileSlabs.

Referenced by ComputeNonbondedSelf::doForce(), and ComputeNonbondedPair::doForce().

00213 {
00214   if (!reduction) return;
00215   int numAtomTypes = pressureProfileAtomTypes;
00216   // For ease of calculation we stored interactions between types
00217   // i and j in (ni+j).  For efficiency now we coalesce the
00218   // cross interactions so that just i<=j are stored.
00219   const int arraysize = 3*pressureProfileSlabs;
00220   size_t nelems = arraysize*(numAtomTypes*(numAtomTypes+1))/2;
00221   BigReal *arr = new BigReal[nelems];
00222   memset(arr, 0, nelems*sizeof(BigReal));
00223 
00224   int i, j;
00225   for (i=0; i<numAtomTypes; i++) {
00226     for (j=0; j<numAtomTypes; j++) {
00227       int ii=i;
00228       int jj=j;
00229       if (ii > jj) { int tmp=ii; ii=jj; jj=tmp; }
00230       const int reductionOffset = (ii*numAtomTypes - (ii*(ii+1))/2 + jj)*arraysize;
00231       for (int k=0; k<arraysize; k++) {
00232         arr[reductionOffset+k] += data[k];
00233       }
00234       data += arraysize;
00235     }
00236   }
00237   // copy into reduction
00238   reduction->add(nelems, arr);
00239   delete [] arr;
00240 }

void ComputeNonbondedUtil::submitReductionData ( BigReal data,
SubmitReduction reduction 
) [static]

Reimplemented in ExclElem.

Definition at line 179 of file ComputeNonbondedUtil.C.

References ADD_TENSOR, ADD_VECTOR, electEnergyIndex, electEnergyIndex_s, electEnergyIndex_ti_1, electEnergyIndex_ti_2, exclChecksumIndex, fullElectEnergyIndex, fullElectEnergyIndex_s, fullElectEnergyIndex_ti_1, fullElectEnergyIndex_ti_2, goNativeEnergyIndex, goNonnativeEnergyIndex, groGaussEnergyIndex, groLJEnergyIndex, SubmitReduction::item(), pairlistWarningIndex, REDUCTION_COMPUTE_CHECKSUM, REDUCTION_ELECT_ENERGY, REDUCTION_ELECT_ENERGY_F, REDUCTION_ELECT_ENERGY_SLOW, REDUCTION_ELECT_ENERGY_SLOW_F, REDUCTION_ELECT_ENERGY_SLOW_TI_1, REDUCTION_ELECT_ENERGY_SLOW_TI_2, REDUCTION_ELECT_ENERGY_TI_1, REDUCTION_ELECT_ENERGY_TI_2, REDUCTION_EXCLUSION_CHECKSUM, REDUCTION_GO_NATIVE_ENERGY, REDUCTION_GO_NONNATIVE_ENERGY, REDUCTION_GRO_GAUSS_ENERGY, REDUCTION_GRO_LJ_ENERGY, REDUCTION_LJ_ENERGY, REDUCTION_LJ_ENERGY_F, REDUCTION_LJ_ENERGY_TI_1, REDUCTION_LJ_ENERGY_TI_2, REDUCTION_PAIRLIST_WARNINGS, vdwEnergyIndex, vdwEnergyIndex_s, vdwEnergyIndex_ti_1, and vdwEnergyIndex_ti_2.

Referenced by ComputeNonbondedSelf::doForce(), and ComputeNonbondedPair::doForce().

00180 {
00181   reduction->item(REDUCTION_EXCLUSION_CHECKSUM) += data[exclChecksumIndex];
00182   reduction->item(REDUCTION_PAIRLIST_WARNINGS) += data[pairlistWarningIndex];
00183   reduction->item(REDUCTION_ELECT_ENERGY) += data[electEnergyIndex];
00184   reduction->item(REDUCTION_ELECT_ENERGY_SLOW) += data[fullElectEnergyIndex];
00185   reduction->item(REDUCTION_LJ_ENERGY) += data[vdwEnergyIndex];
00186   // Ported by JLai
00187   reduction->item(REDUCTION_GRO_LJ_ENERGY) += data[groLJEnergyIndex];
00188   reduction->item(REDUCTION_GRO_GAUSS_ENERGY) += data[groGaussEnergyIndex];
00189   reduction->item(REDUCTION_GO_NATIVE_ENERGY) += data[goNativeEnergyIndex];
00190   reduction->item(REDUCTION_GO_NONNATIVE_ENERGY) += data[goNonnativeEnergyIndex];
00191   // End of port -- JLai
00192 //fepb
00193   reduction->item(REDUCTION_ELECT_ENERGY_F) += data[electEnergyIndex_s];
00194   reduction->item(REDUCTION_ELECT_ENERGY_SLOW_F) += data[fullElectEnergyIndex_s];
00195   reduction->item(REDUCTION_LJ_ENERGY_F) += data[vdwEnergyIndex_s];
00196 
00197   reduction->item(REDUCTION_ELECT_ENERGY_TI_1) += data[electEnergyIndex_ti_1];
00198   reduction->item(REDUCTION_ELECT_ENERGY_SLOW_TI_1) += data[fullElectEnergyIndex_ti_1];
00199   reduction->item(REDUCTION_LJ_ENERGY_TI_1) += data[vdwEnergyIndex_ti_1];
00200   reduction->item(REDUCTION_ELECT_ENERGY_TI_2) += data[electEnergyIndex_ti_2];
00201   reduction->item(REDUCTION_ELECT_ENERGY_SLOW_TI_2) += data[fullElectEnergyIndex_ti_2];
00202   reduction->item(REDUCTION_LJ_ENERGY_TI_2) += data[vdwEnergyIndex_ti_2];
00203 //fepe
00204   ADD_TENSOR(reduction,REDUCTION_VIRIAL_NBOND,data,virialIndex);
00205   ADD_TENSOR(reduction,REDUCTION_VIRIAL_SLOW,data,fullElectVirialIndex);
00206   ADD_VECTOR(reduction,REDUCTION_PAIR_VDW_FORCE,data,pairVDWForceIndex);
00207   ADD_VECTOR(reduction,REDUCTION_PAIR_ELECT_FORCE,data,pairElectForceIndex);
00208   reduction->item(REDUCTION_COMPUTE_CHECKSUM) += 1.;
00209 }


Member Data Documentation

Definition at line 344 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 341 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 378 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 361 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 356 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 357 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 359 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 358 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 345 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 342 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 347 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 348 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 346 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 349 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 350 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 351 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 343 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 352 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 353 of file ComputeNonbondedUtil.h.

Referenced by select().

void(* ComputeNonbondedUtil::calcFullPair)(nonbonded *) ( nonbonded  )  [static]
void(* ComputeNonbondedUtil::calcFullSelf)(nonbonded *) ( nonbonded  )  [static]
void(* ComputeNonbondedUtil::calcMergePair)(nonbonded *) ( nonbonded  )  [static]
void(* ComputeNonbondedUtil::calcMergeSelf)(nonbonded *) ( nonbonded  )  [static]
void(* ComputeNonbondedUtil::calcPair)(nonbonded *) ( nonbonded  )  [static]
void(* ComputeNonbondedUtil::calcPairEnergy)(nonbonded *) ( nonbonded  )  [static]
void(* ComputeNonbondedUtil::calcSelf)(nonbonded *) ( nonbonded  )  [static]
void(* ComputeNonbondedUtil::calcSelfEnergy)(nonbonded *) ( nonbonded  )  [static]
void(* ComputeNonbondedUtil::calcSlowPair)(nonbonded *) ( nonbonded  )  [static]
void(* ComputeNonbondedUtil::calcSlowSelf)(nonbonded *) ( nonbonded  )  [static]

Definition at line 289 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 298 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 283 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 332 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 338 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 333 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 339 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 380 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 279 of file ComputeNonbondedUtil.h.

Referenced by ComputeNonbondedCUDA::doWork(), and select().

Definition at line 299 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 394 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 393 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 395 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 330 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 336 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 331 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 337 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 367 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 364 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 363 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 365 of file ComputeNonbondedUtil.h.

Referenced by select().

const LJTable * ComputeNonbondedUtil::ljTable = 0 [static]

Definition at line 369 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 370 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 384 of file ComputeNonbondedUtil.h.

Referenced by select().

Reimplemented in ExclElem.

Definition at line 376 of file ComputeNonbondedUtil.h.

Referenced by ComputeNonbondedSelf::doForce(), and ComputeNonbondedPair::doForce().

Reimplemented in ExclElem.

Definition at line 375 of file ComputeNonbondedUtil.h.

Referenced by ComputeNonbondedSelf::doForce(), and ComputeNonbondedPair::doForce().

Definition at line 280 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 287 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 288 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 324 of file ComputeNonbondedUtil.h.

Referenced by ExclElem::computeForce(), and select().

Definition at line 296 of file ComputeNonbondedUtil.h.

Referenced by ComputeNonbondedCUDA::build_force_table(), and select().

Definition at line 297 of file ComputeNonbondedUtil.h.

Referenced by ExclElem::computeForce(), and select().

Definition at line 325 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 327 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 326 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 340 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 291 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 292 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 303 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 294 of file ComputeNonbondedUtil.h.

Referenced by ExclElem::computeForce(), and select().

Definition at line 293 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 328 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 334 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 329 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 335 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 390 of file ComputeNonbondedUtil.h.

Referenced by select().

Definition at line 300 of file ComputeNonbondedUtil.h.

Referenced by ComputeNonbondedCUDA::build_force_table(), and select().

Definition at line 301 of file ComputeNonbondedUtil.h.

Referenced by ComputeNonbondedCUDA::build_force_table(), and select().

Definition at line 360 of file ComputeNonbondedUtil.h.

Referenced by select().


The documentation for this class was generated from the following files:

Generated on 20 Oct 2019 for NAMD by  doxygen 1.6.1