ComputeFullDirectBase.h File Reference

Go to the source code of this file.

Functions

 for (int i=0;i< n1;++i)

Variables

const BigReal coulomb
BigRealdp1 = data1
BigRealrp1 = results1
int j_begin = 0
register BigReal electEnergy = 0.
register BigReal virial_xx = 0.
register BigReal virial_xy = 0.
register BigReal virial_xz = 0.
register BigReal virial_yy = 0.
register BigReal virial_yz = 0.
register BigReal virial_zz = 0.
virial xx = virial_xx
virial xy = virial_xy
virial xz = virial_xz
virial yx = virial_xy
virial yy = virial_yy
virial yz = virial_yz
virial zx = virial_xz
virial zy = virial_yz
virial zz = virial_zz

Function Documentation

for (  ) 

Definition at line 34 of file ComputeFullDirectBase.h.

References j, p_ij_x, p_ij_y, and p_ij_z.

Referenced by ComputeQMMgr::calcMOPAC(), ComputeQMMgr::calcORCA(), ComputeQMMgr::calcUSR(), GridforceLiteGrid::compute_VdV(), gather_force(), Sequencer::langevinPiston(), ComputeMgr::recvComputeConsForceMsg(), and ComputeQMMgr::storeQMRes().

00035   {
00036     register BigReal p_i_x = *(dp1++);
00037     register BigReal p_i_y = *(dp1++);
00038     register BigReal p_i_z = *(dp1++);
00039     register BigReal kq_i = coulomb * *(dp1++);
00040     register BigReal f_i_x = 0.;
00041     register BigReal f_i_y = 0.;
00042     register BigReal f_i_z = 0.;
00043     if ( selfmode )
00044     {
00045       ++j_begin; data2 += 4; results2 += 3;
00046     }
00047     register BigReal *dp2 = data2;
00048     register BigReal *rp2 = results2;
00049     register int n2c = n2;
00050     register int j;
00051     for( j = j_begin; j<n2c; ++j)
00052     {
00053       register BigReal p_ij_x = p_i_x - *(dp2++);
00054       register BigReal p_ij_y = p_i_y - *(dp2++);
00055       register BigReal p_ij_z = p_i_z - *(dp2++);
00056 
00057 #ifdef FULLDIRECT_PERIODIC
00058       Vector p_ij(p_ij_x,p_ij_y,p_ij_z);
00059       p_ij -= ( a1*floor(0.5+b1*p_ij) + a2*floor(0.5+b2*p_ij) + a3*floor(0.5+b3*p_ij) );
00060       p_ij_x = p_ij.x;
00061       p_ij_y = p_ij.y;
00062       p_ij_z = p_ij.z;
00063 #endif
00064 
00065       register BigReal r_1;
00066       r_1 = 1./sqrt(p_ij_x * p_ij_x + p_ij_y * p_ij_y + p_ij_z * p_ij_z);
00067       register BigReal f = *(dp2++) * kq_i * r_1;
00068       electEnergy += f;
00069       f *= r_1*r_1;
00070       virial_xx += f * p_ij_x * p_ij_x;
00071       virial_xy += f * p_ij_x * p_ij_y;
00072       virial_xz += f * p_ij_x * p_ij_z;
00073       p_ij_x *= f;
00074       virial_yy += f * p_ij_y * p_ij_y;
00075       virial_yz += f * p_ij_y * p_ij_z;
00076       p_ij_y *= f;
00077       virial_zz += f * p_ij_z * p_ij_z;
00078       p_ij_z *= f;
00079       f_i_x += p_ij_x;
00080       f_i_y += p_ij_y;
00081       f_i_z += p_ij_z;
00082       *(rp2++) -= p_ij_x;
00083       *(rp2++) -= p_ij_y;
00084       *(rp2++) -= p_ij_z;
00085     }
00086     *(rp1++) += f_i_x;
00087     *(rp1++) += f_i_y;
00088     *(rp1++) += f_i_z;
00089   }


Variable Documentation

Initial value:

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

Definition at line 12 of file ComputeFullDirectBase.h.

BigReal* dp1 = data1

Definition at line 14 of file ComputeFullDirectBase.h.

return electEnergy = 0.

Definition at line 17 of file ComputeFullDirectBase.h.

Referenced by ComputeFullDirect::doWork(), and for().

int j_begin = 0

Definition at line 16 of file ComputeFullDirectBase.h.

BigReal* rp1 = results1

Definition at line 15 of file ComputeFullDirectBase.h.

register BigReal virial_xx = 0.

Definition at line 18 of file ComputeFullDirectBase.h.

Referenced by Patch::forceBoxClosed().

register BigReal virial_xy = 0.

Definition at line 19 of file ComputeFullDirectBase.h.

Referenced by Patch::forceBoxClosed().

register BigReal virial_xz = 0.

Definition at line 20 of file ComputeFullDirectBase.h.

Referenced by Patch::forceBoxClosed().

register BigReal virial_yy = 0.

Definition at line 21 of file ComputeFullDirectBase.h.

Referenced by Patch::forceBoxClosed().

register BigReal virial_yz = 0.

Definition at line 22 of file ComputeFullDirectBase.h.

Referenced by Patch::forceBoxClosed().

register BigReal virial_zz = 0.

Definition at line 23 of file ComputeFullDirectBase.h.

Referenced by Patch::forceBoxClosed().

virial xx = virial_xx

Definition at line 91 of file ComputeFullDirectBase.h.

Referenced by Vector::cross(), MatrixFitRMS(), and vec_rotation_matrix().

virial xy = virial_xy

Definition at line 92 of file ComputeFullDirectBase.h.

Referenced by vec_rotation_matrix().

virial xz = virial_xz

Definition at line 93 of file ComputeFullDirectBase.h.

virial yx = virial_xy

Definition at line 94 of file ComputeFullDirectBase.h.

virial yy = virial_yy

Definition at line 95 of file ComputeFullDirectBase.h.

Referenced by Vector::cross(), and vec_rotation_matrix().

virial yz = virial_yz

Definition at line 96 of file ComputeFullDirectBase.h.

Referenced by vec_rotation_matrix().

virial zx = virial_xz

Definition at line 97 of file ComputeFullDirectBase.h.

Referenced by vec_rotation_matrix().

virial zy = virial_yz

Definition at line 98 of file ComputeFullDirectBase.h.

virial zz = virial_zz

Definition at line 99 of file ComputeFullDirectBase.h.

Referenced by vec_rotation_matrix().


Generated on 17 Sep 2019 for NAMD by  doxygen 1.6.1