| 50 |
|
#include "types/GayBerneAdapter.hpp" |
| 51 |
|
|
| 52 |
|
namespace OpenMD { |
| 53 |
+ |
|
| 54 |
+ |
BaseAtomVisitor::BaseAtomVisitor(SimInfo* info) : BaseVisitor() { |
| 55 |
+ |
storageLayout_ = info->getStorageLayout(); |
| 56 |
+ |
} |
| 57 |
+ |
|
| 58 |
|
void BaseAtomVisitor::visit(RigidBody *rb) { |
| 59 |
|
//vector<Atom*> myAtoms; |
| 60 |
|
//vector<Atom*>::iterator atomIter; |
| 113 |
|
atomInfo->hasCharge = true; |
| 114 |
|
atomInfo->charge += atom->getFlucQPos(); |
| 115 |
|
} |
| 116 |
< |
|
| 117 |
< |
if (atype->isElectrostatic()) { |
| 116 |
> |
|
| 117 |
> |
if ((storageLayout_ & DataStorage::dslElectricField) && |
| 118 |
> |
(atype->isElectrostatic())) { |
| 119 |
|
atomInfo->hasElectricField = true; |
| 120 |
|
atomInfo->eField = atom->getElectricField(); |
| 121 |
|
} |
| 157 |
|
atomInfo->charge += datom->getFlucQPos(); |
| 158 |
|
} |
| 159 |
|
|
| 160 |
< |
if (atype->isElectrostatic()) { |
| 160 |
> |
if ((storageLayout_ & DataStorage::dslElectricField) && |
| 161 |
> |
(atype->isElectrostatic())) { |
| 162 |
|
atomInfo->hasElectricField = true; |
| 163 |
|
atomInfo->eField = datom->getElectricField(); |
| 164 |
|
} |
| 177 |
|
atomInfo->vec = datom->getA().transpose()*V3Z; |
| 178 |
|
} |
| 179 |
|
|
| 180 |
+ |
atomData = new AtomData; |
| 181 |
+ |
atomData->setID("ATOMDATA"); |
| 182 |
|
atomData->addAtomInfo(atomInfo); |
| 183 |
+ |
|
| 184 |
|
datom->addProperty(atomData); |
| 185 |
|
|
| 186 |
|
setVisited(datom); |