NAMD
Macros | Functions | Variables
ComputeNonbondedBase2.h File Reference

Go to the source code of this file.

Macros

#define p_j   (p_1+j)
 
#define table_four_i   (table_four + 16*table_i)
 
#define lj_pars   (lj_row+lj_index)
 
#define f_j   (f_1+j)
 
#define p_j   (p_1+j)
 
#define table_four_i   (table_four + 16*table_i)
 
#define lj_pars   (lj_row+lj_index)
 
#define f_j   (f_1+j)
 
#define p_j   (p_1+j)
 
#define table_four_i   (table_four + 16*table_i)
 
#define CODE_REDUNDANT   0
 

Functions

 ALCHPAIR (myLambda=ALCH1(lambdaUp) ALCH2(lambdaDown) ALCH3(lambdaUp) ALCH4(lambdaDown);FEP(myLambda2=ALCH1(lambda2Up) ALCH2(lambda2Down) ALCH3(lambda2Up) ALCH4(lambda2Down);) myElecLambda=ALCH1(elecLambdaUp) ALCH2(elecLambdaDown) ALCH3(elecLambdaUp) ALCH4(elecLambdaDown);FEP(myElecLambda2=ALCH1(elecLambda2Up) ALCH2(elecLambda2Down) ALCH3(elecLambda2Up) ALCH4(elecLambda2Down);) myVdwLambda=ALCH1(vdwLambdaUp) ALCH2(vdwLambdaDown) ALCH3(vdwLambdaUp) ALCH4(vdwLambdaDown);FEP(myVdwLambda2=ALCH1(vdwLambda2Up) ALCH2(vdwLambda2Down) ALCH3(vdwLambda2Up) ALCH4(vdwLambda2Down);) ALCH1(myRepLambda=repLambdaUp) ALCH2(myRepLambda=repLambdaDown);FEP(ALCH1(myRepLambda2=repLambda2Up) ALCH2(myRepLambda2=repLambda2Down);) ALCH1(myVdwShift=vdwShiftUp) ALCH2(myVdwShift=vdwShiftDown);FEP(ALCH1(myVdwShift2=vdwShift2Up) ALCH2(myVdwShift2=vdwShift2Down);)) for(k=0
 
 ALCHPAIR (const BigReal r2=r2list[k]-r2_delta;FEP(ALCH1(fep_vdw_forceandenergies(A, B, r2, myVdwShift, myVdwShift2, switchdist2, cutoff2, switchfactor, vdwForceSwitching, myVdwLambda, myVdwLambda2, alchWCAOn, myRepLambda, myRepLambda2,&alch_vdw_energy,&alch_vdw_force,&alch_vdw_energy_2);) ALCH2(fep_vdw_forceandenergies(A, B, r2, myVdwShift, myVdwShift2, switchdist2, cutoff2, switchfactor, vdwForceSwitching, myVdwLambda, myVdwLambda2, alchWCAOn, myRepLambda, myRepLambda2,&alch_vdw_energy,&alch_vdw_force,&alch_vdw_energy_2);) ALCH3(ENERGY(alch_vdw_energy=-myVdwLambda *(((diffa *vdw_d *(1/6.)+vdw_c *(1/4.))*diffa+vdw_b *(1/2.))*diffa+vdw_a);) alch_vdw_energy_2=-myVdwLambda2 *(((diffa *vdw_d *(1/6.)+vdw_c *(1/4.))*diffa+vdw_b *(1/2.))*diffa+vdw_a);alch_vdw_force=myVdwLambda *((diffa *vdw_d+vdw_c)*diffa+vdw_b);) ALCH4(ENERGY(alch_vdw_energy=-myVdwLambda *(((diffa *vdw_d *(1/6.)+vdw_c *(1/4.))*diffa+vdw_b *(1/2.))*diffa+vdw_a);) alch_vdw_energy_2=-myVdwLambda2 *(((diffa *vdw_d *(1/6.)+vdw_c *(1/4.))*diffa+vdw_b *(1/2.))*diffa+vdw_a);alch_vdw_force=myVdwLambda *((diffa *vdw_d+vdw_c)*diffa+vdw_b);)) TI(ti_vdw_force_energy_dUdl(A, B, r2, myVdwShift, switchdist2, cutoff2, switchfactor, vdwForceSwitching, myVdwLambda, alchVdwShiftCoeff, alchWCAOn, myRepLambda,&alch_vdw_energy,&alch_vdw_force,&alch_vdw_dUdl);)) if(tabtype >=0)
 
 if (ComputeNonbondedUtil::goMethod==2)
 

Variables

k< npairi;++k){TABENERGY(const
int numtypes=simParams->
tableNumTypes;const float
table_spacing=simParams->
tableSpacing;const int
npertype=(int)(namdnearbyint(simParams->
tableMaxDist/simParams->
tableSpacing)+1);) int table_i=(r2iilist[2
*k] >> 14)+r2_delta_expc;const
int j=pairlisti[k];#define p_j
BigReal diffa=r2list[k]-r2_table[table_i];#define
table_four_i TABENERGY(register
const int tabtype=-1-(lj_pars->
A< 0?lj_pars->A:0);) BigReal
kqq=kq_i *p_j-> 
charge
 
register const BigReal p_ij_x = p_i_x - p_j->position.x
 
register const BigReal p_ij_y = p_i_y - p_j->position.y
 
register const BigReal p_ij_z = p_i_z - p_j->position.z
 
const BigReal A = scaling * lj_pars->A
 
const BigReal B = scaling * lj_pars->B
 
BigReal vdw_d = A * table_four_i[0] - B * table_four_i[4]
 
BigReal vdw_c = A * table_four_i[1] - B * table_four_i[5]
 
BigReal vdw_b = A * table_four_i[2] - B * table_four_i[6]
 
BigReal vdw_a = A * table_four_i[3] - B * table_four_i[7]
 
 else
 
BigReal goNonnative = 0
 
BigReal goForce = 0
 
register const CompAtomExtpExt_j = pExt_1 + j
 
const BigReal rgo = sqrt(r2go)
 
 fast_b = goForce
 
 fast_c = vdw_c
 
 fast_a = vdw_a
 
register BigReal fast_dir
 
BigReal force_r = LAM(lambda_pair *) fast_dir
 

Macro Definition Documentation

#define CODE_REDUNDANT   0
#define f_j   (f_1+j)

Referenced by for().

#define f_j   (f_1+j)
#define lj_pars   (lj_row+lj_index)

Referenced by ExclElem::computeForce().

#define lj_pars   (lj_row+lj_index)
#define p_j   (p_1+j)
#define p_j   (p_1+j)
#define p_j   (p_1+j)

Referenced by ExclElem::computeForce().

#define table_four_i   (table_four + 16*table_i)
#define table_four_i   (table_four + 16*table_i)

Referenced by ExclElem::computeForce().

#define table_four_i   (table_four + 16*table_i)

Function Documentation

ALCHPAIR ( myLambda  = ALCH1(lambdaUp) ALCH2(lambdaDown) ALCH3(lambdaUp) ALCH4(lambdaDown);FEP(myLambda2=ALCH1(lambda2Up) ALCH2(lambda2Down) ALCH3(lambda2Up) ALCH4(lambda2Down);) myElecLambda=ALCH1(elecLambdaUp) ALCH2(elecLambdaDown) ALCH3(elecLambdaUp) ALCH4(elecLambdaDown);FEP(myElecLambda2=ALCH1(elecLambda2Up) ALCH2(elecLambda2Down) ALCH3(elecLambda2Up) ALCH4(elecLambda2Down);) myVdwLambda=ALCH1(vdwLambdaUp) ALCH2(vdwLambdaDown) ALCH3(vdwLambdaUp) ALCH4(vdwLambdaDown);FEP(myVdwLambda2=ALCH1(vdwLambda2Up) ALCH2(vdwLambda2Down) ALCH3(vdwLambda2Up) ALCH4(vdwLambda2Down);) ALCH1(myRepLambda=repLambdaUp) ALCH2(myRepLambda=repLambdaDown);FEP(ALCH1(myRepLambda2=repLambda2Up) ALCH2(myRepLambda2=repLambda2Down);) ALCH1(myVdwShift=vdwShiftUp) ALCH2(myVdwShift=vdwShiftDown);FEP(ALCH1(myVdwShift2=vdwShift2Up) ALCH2(myVdwShift2=vdwShift2Down);))
pure virtual

Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000 by The Board of Trustees of the University of Illinois. All rights reserved.

ALCHPAIR ( const BigReal  r2 = r2list[k] - r2_delta;   FEP(          ALCH1 (              fep_vdw_forceandenergies(AB, r2, myVdwShift, myVdwShift2,          switchdist2, cutoff2, switchfactor, vdwForceSwitching, myVdwLambda,          myVdwLambda2, alchWCAOn, myRepLambda, myRepLambda2, &alch_vdw_energy,          &alch_vdw_force, &alch_vdw_energy_2);)          ALCH2 (          fep_vdw_forceandenergies(AB, r2, myVdwShift, myVdwShift2,          switchdist2, cutoff2, switchfactor, vdwForceSwitching, myVdwLambda,          myVdwLambda2, alchWCAOn, myRepLambda, myRepLambda2, &alch_vdw_energy,          &alch_vdw_force, &alch_vdw_energy_2);)          ALCH3 (                      ENERGY(alch_vdw_energy = -myVdwLambda * (( ( diffa * vdw_d * (1/6.)+ vdw_c * (1/4.)) * diffa + vdw_b *(1/2.)) * diffa + vdw_a);)          alch_vdw_energy_2 = -myVdwLambda2 * (( ( diffa * vdw_d * (1/6.)+ vdw_c * (1/4.)) * diffa + vdw_b *(1/2.)) * diffa + vdw_a);          alch_vdw_force =   myVdwLambda * ((diffa * vdw_d + vdw_c) * diffa + vdw_b);)          ALCH4 (          ENERGY(alch_vdw_energy = -myVdwLambda * (( ( diffa * vdw_d * (1/6.)+ vdw_c * (1/4.)) * diffa + vdw_b *(1/2.)) * diffa + vdw_a);)          alch_vdw_energy_2 = -myVdwLambda2 * (( ( diffa * vdw_d * (1/6.)+ vdw_c * (1/4.)) * diffa + vdw_b *(1/2.)) * diffa + vdw_a);           alch_vdw_force =   myVdwLambda * ((diffa * vdw_d + vdw_c) * diffa + vdw_b);)          ) TI(ti_vdw_force_energy_dUdl(AB, r2, myVdwShift, switchdist2, cutoff2,          switchfactor, vdwForceSwitching, myVdwLambda, alchVdwShiftCoeff,          alchWCAOn, myRepLambda, &alch_vdw_energy, &alch_vdw_force,          &alch_vdw_dUdl);))
pure virtual

Definition at line 226 of file ComputeNonbondedBase2.h.

274  {
275  register BigReal r1;
276  r1 = sqrt(p_ij_x*p_ij_x + p_ij_y*p_ij_y + p_ij_z*p_ij_z);
277 
278  //CkPrintf("%i %i %f %f %i\n", npertype, tabtype, r1, table_spacing, (int) (namdnearbyint(r1 / table_spacing)));
279  register int eneraddress;
280  eneraddress = 2 * ((npertype * tabtype) + ((int) namdnearbyint(r1 / table_spacing)));
281  //CkPrintf("Using distance bin %i for distance %f\n", eneraddress, r1);
282 #ifndef A2_QPX
283  vdw_d = 0.;
284  vdw_c = 0.;
285  vdw_b = table_ener[eneraddress + 1] / r1;
286  vdw_a = (-1/2.) * diffa * vdw_b;
287 #else
288  vec_insert(0., vdw_v, 0);
289  vec_insert(0., vdw_v, 1);
290  vec_insert(table_ener[eneraddress + 1] / r1, vdw_v, 2);
291  vec_insert((-1/2.) * diffa * vdw_b, vdw_v, 3);
292 #endif
293  ENERGY(
294  register BigReal vdw_val = table_ener[eneraddress];
295  //CkPrintf("Found vdw energy of %f\n", vdw_val);
296  vdwEnergy += LAM(lambda_pair *) vdw_val;
297  FEP( vdwEnergy_s += d_lambda_pair * vdw_val; )
298  )
299  } else {
#define namdnearbyint(x)
Definition: common.h:74
#define LAM(X)
BigReal vdw_b
BigReal vdw_c
register const BigReal p_ij_z
#define FEP(X)
register const BigReal p_ij_x
BigReal vdw_d
#define ENERGY(X)
BigReal vdw_a
register const BigReal p_ij_y
double BigReal
Definition: common.h:112

Variable Documentation

const BigReal A = scaling * lj_pars->A
const BigReal B = scaling * lj_pars->B
k<npairi; ++k) { TABENERGY( const int numtypes = simParams->tableNumTypes; const float table_spacing = simParams->tableSpacing; const int npertype = (int) (namdnearbyint(simParams->tableMaxDist / simParams->tableSpacing) + 1); ) int table_i = (r2iilist[2*k] >> 14) + r2_delta_expc; const int j = pairlisti[k]; #define p_j BigReal diffa = r2list[k] - r2_table[table_i]; #define table_four_i TABENERGY( register const int tabtype = -1 - ( lj_pars->A < 0 ? lj_pars->A : 0 ); ) BigReal kqq = kq_i * p_j-> charge
else

Definition at line 299 of file ComputeNonbondedBase2.h.

fast_a = vdw_a

Definition at line 484 of file ComputeNonbondedBase2.h.

Referenced by ExclElem::computeForce().

fast_b = goForce

Definition at line 451 of file ComputeNonbondedBase2.h.

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

fast_c = vdw_c

Definition at line 482 of file ComputeNonbondedBase2.h.

Referenced by ExclElem::computeForce().

register BigReal fast_dir
Initial value:
=
(diffa * fast_d + fast_c) * diffa + fast_b

Definition at line 490 of file ComputeNonbondedBase2.h.

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

BigReal force_r = LAM(lambda_pair *) fast_dir

Definition at line 493 of file ComputeNonbondedBase2.h.

Referenced by for().

BigReal goForce = 0

Definition at line 432 of file ComputeNonbondedBase2.h.

Referenced by Molecule::get_go_force(), and Molecule::get_go_force_new().

BigReal goNonnative = 0

Definition at line 431 of file ComputeNonbondedBase2.h.

register const BigReal p_ij_x = p_i_x - p_j->position.x

Definition at line 196 of file ComputeNonbondedBase2.h.

Referenced by for().

register const BigReal p_ij_y = p_i_y - p_j->position.y

Definition at line 197 of file ComputeNonbondedBase2.h.

Referenced by for().

register const BigReal p_ij_z = p_i_z - p_j->position.z

Definition at line 198 of file ComputeNonbondedBase2.h.

Referenced by for().

register const CompAtomExt* pExt_j = pExt_1 + j

Definition at line 433 of file ComputeNonbondedBase2.h.

const BigReal rgo = sqrt(r2go)

Definition at line 439 of file ComputeNonbondedBase2.h.

BigReal vdw_a = A * table_four_i[3] - B * table_four_i[7]

Definition at line 215 of file ComputeNonbondedBase2.h.

Referenced by ExclElem::computeForce().

BigReal vdw_b = A * table_four_i[2] - B * table_four_i[6]

Definition at line 214 of file ComputeNonbondedBase2.h.

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

BigReal vdw_c = A * table_four_i[1] - B * table_four_i[5]

Definition at line 213 of file ComputeNonbondedBase2.h.

Referenced by ExclElem::computeForce().

BigReal vdw_d = A * table_four_i[0] - B * table_four_i[4]

Definition at line 212 of file ComputeNonbondedBase2.h.

Referenced by ExclElem::computeForce().