NAMD
Functions | Variables
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_begin, 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().

35  {
36  register BigReal p_i_x = *(dp1++);
37  register BigReal p_i_y = *(dp1++);
38  register BigReal p_i_z = *(dp1++);
39  register BigReal kq_i = coulomb * *(dp1++);
40  register BigReal f_i_x = 0.;
41  register BigReal f_i_y = 0.;
42  register BigReal f_i_z = 0.;
43  if ( selfmode )
44  {
45  ++j_begin; data2 += 4; results2 += 3;
46  }
47  register BigReal *dp2 = data2;
48  register BigReal *rp2 = results2;
49  register int n2c = n2;
50  register int j;
51  for( j = j_begin; j<n2c; ++j)
52  {
53  register BigReal p_ij_x = p_i_x - *(dp2++);
54  register BigReal p_ij_y = p_i_y - *(dp2++);
55  register BigReal p_ij_z = p_i_z - *(dp2++);
56 
57 #ifdef FULLDIRECT_PERIODIC
58  Vector p_ij(p_ij_x,p_ij_y,p_ij_z);
59  p_ij -= ( a1*floor(0.5+b1*p_ij) + a2*floor(0.5+b2*p_ij) + a3*floor(0.5+b3*p_ij) );
60  p_ij_x = p_ij.x;
61  p_ij_y = p_ij.y;
62  p_ij_z = p_ij.z;
63 #endif
64 
65  register BigReal r_1;
66  r_1 = 1./sqrt(p_ij_x * p_ij_x + p_ij_y * p_ij_y + p_ij_z * p_ij_z);
67  register BigReal f = *(dp2++) * kq_i * r_1;
68  electEnergy += f;
69  f *= r_1*r_1;
70  virial_xx += f * p_ij_x * p_ij_x;
71  virial_xy += f * p_ij_x * p_ij_y;
72  virial_xz += f * p_ij_x * p_ij_z;
73  p_ij_x *= f;
74  virial_yy += f * p_ij_y * p_ij_y;
75  virial_yz += f * p_ij_y * p_ij_z;
76  p_ij_y *= f;
77  virial_zz += f * p_ij_z * p_ij_z;
78  p_ij_z *= f;
79  f_i_x += p_ij_x;
80  f_i_y += p_ij_y;
81  f_i_z += p_ij_z;
82  *(rp2++) -= p_ij_x;
83  *(rp2++) -= p_ij_y;
84  *(rp2++) -= p_ij_z;
85  }
86  *(rp1++) += f_i_x;
87  *(rp1++) += f_i_y;
88  *(rp1++) += f_i_z;
89  }
register BigReal virial_xy
register BigReal virial_xz
int j_begin
register BigReal virial_yz
Definition: Vector.h:64
register BigReal electEnergy
BigReal * dp1
register const BigReal p_ij_z
register BigReal virial_yy
register BigReal virial_zz
const BigReal coulomb
register const BigReal p_ij_x
register BigReal virial_xx
BigReal * rp1
register const BigReal p_ij_y
double BigReal
Definition: common.h:112

Variable Documentation

const BigReal coulomb
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.

Referenced by for().

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 ComputePmeCUDAMgr::recvPencils(), and 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().