| 85 |
|
cellOffsets_.push_back( Vector3i(-1,-1,1) ); |
| 86 |
|
cellOffsets_.push_back( Vector3i(0, -1,1) ); |
| 87 |
|
cellOffsets_.push_back( Vector3i(1, -1,1) ); |
| 88 |
+ |
|
| 89 |
+ |
// cellAllOffsets are the full space for the cell lists used in |
| 90 |
+ |
// constructing the neighbor lists |
| 91 |
+ |
cellAllOffsets_.clear(); |
| 92 |
+ |
cellAllOffsets_.push_back( Vector3i(0, 0, 0) ); |
| 93 |
+ |
|
| 94 |
+ |
cellAllOffsets_.push_back( Vector3i(-1, -1, -1) ); |
| 95 |
+ |
cellAllOffsets_.push_back( Vector3i(0, -1, -1) ); |
| 96 |
+ |
cellAllOffsets_.push_back( Vector3i(1, -1, -1) ); |
| 97 |
+ |
cellAllOffsets_.push_back( Vector3i(-1, 0, -1) ); |
| 98 |
+ |
cellAllOffsets_.push_back( Vector3i(0, 0, -1) ); |
| 99 |
+ |
cellAllOffsets_.push_back( Vector3i(1, 0, -1) ); |
| 100 |
+ |
cellAllOffsets_.push_back( Vector3i(-1, 1, -1) ); |
| 101 |
+ |
cellAllOffsets_.push_back( Vector3i(0, 1, -1) ); |
| 102 |
+ |
cellAllOffsets_.push_back( Vector3i(1, 1, -1) ); |
| 103 |
+ |
|
| 104 |
+ |
cellAllOffsets_.push_back( Vector3i(-1, -1, 0) ); |
| 105 |
+ |
cellAllOffsets_.push_back( Vector3i(0, -1, 0) ); |
| 106 |
+ |
cellAllOffsets_.push_back( Vector3i(1, -1, 0) ); |
| 107 |
+ |
cellAllOffsets_.push_back( Vector3i(-1, 0, 0) ); |
| 108 |
+ |
// cellAllOffsets_.push_back( Vector3i(0, 0, 0) ); |
| 109 |
+ |
cellAllOffsets_.push_back( Vector3i(1, 0, 0) ); |
| 110 |
+ |
cellAllOffsets_.push_back( Vector3i(-1, 1, 0) ); |
| 111 |
+ |
cellAllOffsets_.push_back( Vector3i(0, 1, 0) ); |
| 112 |
+ |
cellAllOffsets_.push_back( Vector3i(1, 1, 0) ); |
| 113 |
+ |
|
| 114 |
+ |
cellAllOffsets_.push_back( Vector3i(-1, -1, 1) ); |
| 115 |
+ |
cellAllOffsets_.push_back( Vector3i(0, -1, 1) ); |
| 116 |
+ |
cellAllOffsets_.push_back( Vector3i(1, -1, 1) ); |
| 117 |
+ |
cellAllOffsets_.push_back( Vector3i(-1, 0, 1) ); |
| 118 |
+ |
cellAllOffsets_.push_back( Vector3i(0, 0, 1) ); |
| 119 |
+ |
cellAllOffsets_.push_back( Vector3i(1, 0, 1) ); |
| 120 |
+ |
cellAllOffsets_.push_back( Vector3i(-1, 1, 1) ); |
| 121 |
+ |
cellAllOffsets_.push_back( Vector3i(0, 1, 1) ); |
| 122 |
+ |
cellAllOffsets_.push_back( Vector3i(1, 1, 1) ); |
| 123 |
|
} |
| 124 |
|
|
| 125 |
|
void ForceDecomposition::fillSelfData(SelfData &sdat, int atom1) { |
| 126 |
|
|
| 127 |
< |
sdat.atype = ff_->getAtomType(idents[atom1]); |
| 127 |
> |
sdat.atype = atypesLocal[atom1]; |
| 128 |
|
|
| 129 |
|
// Still Missing skippedCharge |
| 130 |
|
if (storageLayout_ & DataStorage::dslElectroFrame) { |
| 147 |
|
sdat.dfrhodrho = &(snap_->atomData.functionalDerivative[atom1]); |
| 148 |
|
} |
| 149 |
|
|
| 150 |
+ |
if (storageLayout_ & DataStorage::dslSkippedCharge) { |
| 151 |
+ |
sdat.skippedCharge = &(snap_->atomData.skippedCharge[atom1]); |
| 152 |
+ |
} |
| 153 |
+ |
|
| 154 |
|
if (storageLayout_ & DataStorage::dslParticlePot) { |
| 155 |
|
sdat.particlePot = &(snap_->atomData.particlePot[atom1]); |
| 156 |
|
} |
| 163 |
|
// if we have changed the group identities or haven't set up the |
| 164 |
|
// saved positions we automatically will need a neighbor list update: |
| 165 |
|
|
| 166 |
< |
if ( saved_CG_positions_.size() != nGroups ) { |
| 128 |
< |
cerr << "build because size\n"; |
| 129 |
< |
return true; |
| 130 |
< |
} |
| 166 |
> |
if ( saved_CG_positions_.size() != nGroups ) return true; |
| 167 |
|
|
| 168 |
|
RealType dispmax = 0.0; |
| 169 |
|
Vector3d disp; |
| 182 |
|
dispmax = 2.0 * sqrt (3.0 * dispmax * dispmax); |
| 183 |
|
|
| 184 |
|
|
| 185 |
< |
if (dispmax > skinThickness_) { |
| 150 |
< |
cerr << "build because movement\n"; |
| 185 |
> |
if (dispmax > skinThickness_) |
| 186 |
|
return (dispmax > skinThickness_); |
| 187 |
< |
} else { |
| 153 |
< |
cerr << "not rebuilding\n"; |
| 154 |
< |
} |
| 187 |
> |
|
| 188 |
|
return false; |
| 189 |
|
} |
| 190 |
|
} |