#include <ComputeNonbondedCUDAExcl.h>
Inheritance diagram for ExclElem:

|
|
Definition at line 24 of file ComputeNonbondedCUDAExcl.h. 00024 { size = 2 };
|
|
|
Definition at line 50 of file ComputeNonbondedCUDAExcl.h. 00050 { bondEnergyIndex, TENSOR(virialIndex),
00051 TENSOR(slowVirialIndex), reductionDataSize };
|
|
|
Definition at line 52 of file ComputeNonbondedCUDAExcl.h. 00052 { reductionChecksumLabel = REDUCTION_EXCLUSION_CHECKSUM };
|
|
|
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 ComputeNonbondedCUDAExcl.inl. 00012 { ; }
|
|
||||||||||||||||
|
Definition at line 14 of file ComputeNonbondedCUDAExcl.inl. References atomID, modified, TupleSignature::offset, and TupleSignature::tupleParamType. 00014 {
00015 atomID[0] = atom0;
00016 atomID[1] = atom0 + sig->offset[0];
00017 modified = sig->tupleParamType;
00018 }
|
|
||||||||||||
|
Definition at line 20 of file ComputeNonbondedCUDAExcl.inl. References Exclusion::atom1, Exclusion::atom2, atomID, Exclusion::modified, and modified. 00021 {
00022 atomID[0] = a->atom1;
00023 atomID[1] = a->atom2;
00024 modified = a->modified;
00025 }
|
|
||||||||||||
|
Definition at line 27 of file ComputeNonbondedCUDAExcl.inl. References atomID, and AtomID. 00028 {
00029 if (atom0 > atom1) { // Swap end atoms so lowest is first!
00030 AtomID tmp = atom1; atom1 = atom0; atom0 = tmp;
00031 }
00032 atomID[0] = atom0;
00033 atomID[1] = atom1;
00034 }
|
|
|
Definition at line 59 of file ComputeNonbondedCUDAExcl.h. 00059 {};
|
|
||||||||||||
|
Definition at line 41 of file ComputeNonbondedCUDAExcl.C. References LJTable::TableEntry::A, LJTable::TableEntry::B, BigReal, CompAtom::charge, COLOUMB, Lattice::delta(), diffa, Flags::doFullElectrostatics, Results::f, Patch::flags, Force, int64, kqq, Patch::lattice, Vector::length2(), lj_pars, localIndex, TuplePatchElem::p, p, p_j, CompAtom::position, TuplePatchElem::r, table_four_i, table_i, LJTable::table_row(), CompAtom::vdwType, Vector::x, TuplePatchElem::x, Vector::y, and Vector::z. 00043 {
00044 const CompAtom &p_i = p[0]->x[localIndex[0]];
00045 const CompAtom &p_j = p[1]->x[localIndex[1]];
00046
00047 // compute vectors between atoms and their distances
00048 const Lattice & lattice = p[0]->p->lattice;
00049 const Vector r12 = lattice.delta(p_i.position, p_j.position);
00050 BigReal r2 = r12.length2();
00051
00052 if ( r2 > cutoff2 ) return;
00053
00054 r2 += r2_delta;
00055
00056 union { double f; int64 i; } r2i;
00057 r2i.f = r2;
00058 const int r2_delta_expc = 64 * (r2_delta_exp - 1023);
00059 int table_i = (r2i.i >> (32+14)) + r2_delta_expc; // table_i >= 0
00060
00061 const BigReal* const table_four_i = table_noshort + 16*table_i;
00062
00063 BigReal diffa = r2 - r2_table[table_i];
00064
00065 const int doFull = p[0]->p->flags.doFullElectrostatics;
00066
00067 BigReal fast_a, fast_b, fast_c, fast_d;
00068 BigReal slow_a, slow_b, slow_c, slow_d;
00069
00070 if ( modified ) {
00071
00072 const LJTable::TableEntry * lj_pars =
00073 ljTable->table_row(p_i.vdwType) + 2 * p_j.vdwType;
00074
00075 // modified - normal = correction
00076 const BigReal A = scaling * ( (lj_pars+1)->A - lj_pars->A );
00077 const BigReal B = scaling * ( (lj_pars+1)->B - lj_pars->B );
00078
00079 BigReal vdw_d = A * table_four_i[0] - B * table_four_i[2];
00080 BigReal vdw_c = A * table_four_i[1] - B * table_four_i[3];
00081 BigReal vdw_b = A * table_four_i[4] - B * table_four_i[6];
00082 BigReal vdw_a = A * table_four_i[5] - B * table_four_i[7];
00083
00084 const BigReal kqq = (1.0 - scale14) *
00085 COLOUMB * p_i.charge * p_j.charge * scaling * dielectric_1;
00086
00087 fast_a = vdw_a + kqq * fast_table[4*table_i+0]; // not used!
00088 fast_b = vdw_b + 2. * kqq * fast_table[4*table_i+1];
00089 fast_c = vdw_c + 4. * kqq * fast_table[4*table_i+2];
00090 fast_d = vdw_d + 6. * kqq * fast_table[4*table_i+3];
00091
00092 if ( doFull ) {
00093 slow_a = kqq * slow_table[4*table_i+0]; // not used!
00094 slow_b = 2. * kqq * slow_table[4*table_i+1];
00095 slow_c = 4. * kqq * slow_table[4*table_i+2];
00096 slow_d = 6. * kqq * slow_table[4*table_i+3];
00097 }
00098
00099 } else if ( doFull ) { // full exclusion
00100
00101 const BigReal kqq =
00102 COLOUMB * p_i.charge * p_j.charge * scaling * dielectric_1;
00103
00104 slow_d = kqq * ( table_four_i[8] - table_four_i[12] );
00105 slow_c = kqq * ( table_four_i[9] - table_four_i[13] );
00106 slow_b = kqq * ( table_four_i[10] - table_four_i[14] );
00107 slow_a = kqq * ( table_four_i[11] - table_four_i[15] ); // not used!
00108
00109 }
00110
00111 register BigReal fast_dir =
00112 (diffa * fast_d + fast_c) * diffa + fast_b;
00113
00114 const Force f12 = fast_dir * r12;
00115
00116 // Now add the forces to each force vector
00117 p[0]->r->f[Results::nbond][localIndex[0]] += f12;
00118 p[1]->r->f[Results::nbond][localIndex[1]] -= f12;
00119
00120 // reduction[nonbondedEnergyIndex] += energy;
00121 reduction[virialIndex_XX] += f12.x * r12.x;
00122 // reduction[virialIndex_XY] += f12.x * r12.y;
00123 // reduction[virialIndex_XZ] += f12.x * r12.z;
00124 // reduction[virialIndex_YX] += f12.y * r12.x;
00125 reduction[virialIndex_YY] += f12.y * r12.y;
00126 // reduction[virialIndex_YZ] += f12.y * r12.z;
00127 // reduction[virialIndex_ZX] += f12.z * r12.x;
00128 // reduction[virialIndex_ZY] += f12.z * r12.y;
00129 reduction[virialIndex_ZZ] += f12.z * r12.z;
00130
00131 if ( doFull ) {
00132 register BigReal slow_dir =
00133 (diffa * slow_d + slow_c) * diffa + slow_b;
00134
00135 const Force slow_f12 = slow_dir * r12;
00136
00137 p[0]->r->f[Results::slow][localIndex[0]] += slow_f12;
00138 p[1]->r->f[Results::slow][localIndex[1]] -= slow_f12;
00139
00140 // reduction[nonbondedEnergyIndex] += energy;
00141 reduction[slowVirialIndex_XX] += slow_f12.x * r12.x;
00142 // reduction[slowVirialIndex_XY] += slow_f12.x * r12.y;
00143 // reduction[slowVirialIndex_XZ] += slow_f12.x * r12.z;
00144 // reduction[slowVirialIndex_YX] += slow_f12.y * r12.x;
00145 reduction[slowVirialIndex_YY] += slow_f12.y * r12.y;
00146 // reduction[slowVirialIndex_YZ] += slow_f12.y * r12.z;
00147 // reduction[slowVirialIndex_ZX] += slow_f12.z * r12.x;
00148 // reduction[slowVirialIndex_ZY] += slow_f12.z * r12.y;
00149 reduction[slowVirialIndex_ZZ] += slow_f12.z * r12.z;
00150 }
00151
00152 }
|
|
||||||||||||||||||||
|
Definition at line 26 of file ComputeNonbondedCUDAExcl.C. References int32, and NAMD_die(). 00027 {
00028 #ifdef MEM_OPT_VERSION
00029 NAMD_die("Should not be called in ExclElem::getMoleculePointers in memory optimized version!");
00030 #else
00031 *count = mol->numExclusions;
00032 *byatom = mol->exclusionsByAtom;
00033 *structarray = mol->exclusions;
00034 #endif
00035 }
|
|
||||||||||||
|
Definition at line 37 of file ComputeNonbondedCUDAExcl.C. 00037 {
00038 *v = 0;
00039 }
|
|
||||||||||||||||
|
Definition at line 34 of file ComputeNonbondedCUDAExcl.h. References AtomSignature::bondCnt, and AtomSignature::bondSigs.
|
|
|
Definition at line 45 of file ComputeNonbondedCUDAExcl.h. References atomID.
|
|
||||||||||||||||
|
|
|
|
Definition at line 41 of file ComputeNonbondedCUDAExcl.inl. References atomID. 00042 {
00043 return (atomID[0] < a.atomID[0] ||
00044 (atomID[0] == a.atomID[0] &&
00045 (atomID[1] < a.atomID[1]) ));
00046 }
|
|
|
Definition at line 36 of file ComputeNonbondedCUDAExcl.inl. References atomID.
|
|
||||||||||||
|
Reimplemented from ComputeNonbondedUtil. Definition at line 154 of file ComputeNonbondedCUDAExcl.C. References ADD_TENSOR, REDUCTION_VIRIAL_NBOND, REDUCTION_VIRIAL_SLOW, slowVirialIndex, and virialIndex. 00155 {
00156 // reduction->item(REDUCTION_BOND_ENERGY) += data[bondEnergyIndex];
00157 ADD_TENSOR(reduction,REDUCTION_VIRIAL_NBOND,data,virialIndex);
00158 ADD_TENSOR(reduction,REDUCTION_VIRIAL_SLOW,data,slowVirialIndex);
00159 }
|
|
|
Definition at line 25 of file ComputeNonbondedCUDAExcl.h. Referenced by ExclElem(), hash(), operator<(), and operator==(). |
|
|
Definition at line 26 of file ComputeNonbondedCUDAExcl.h. Referenced by computeForce(). |
|
|
Definition at line 48 of file ComputeNonbondedCUDAExcl.h. Referenced by ExclElem(). |
|
|
Definition at line 27 of file ComputeNonbondedCUDAExcl.h. Referenced by computeForce(). |
|
|
Reimplemented from ComputeNonbondedUtil. Definition at line 21 of file ComputeNonbondedCUDAExcl.C. |
|
|
Reimplemented from ComputeNonbondedUtil. Definition at line 23 of file ComputeNonbondedCUDAExcl.C. |
|
|
Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000 by The Board of Trustees of the University of Illinois. All rights reserved. Reimplemented from ComputeNonbondedUtil. Definition at line 20 of file ComputeNonbondedCUDAExcl.C. |
|
|
Reimplemented from ComputeNonbondedUtil. Definition at line 22 of file ComputeNonbondedCUDAExcl.C. |
|
|
Definition at line 28 of file ComputeNonbondedCUDAExcl.h. |
1.3.9.1