| 44 |
|
#include "visitors/AtomVisitor.hpp" |
| 45 |
|
#include "primitives/DirectionalAtom.hpp" |
| 46 |
|
#include "primitives/RigidBody.hpp" |
| 47 |
+ |
#include "types/MultipoleAdapter.hpp" |
| 48 |
+ |
#include "types/GayBerneAdapter.hpp" |
| 49 |
|
|
| 50 |
|
namespace OpenMD { |
| 51 |
|
void BaseAtomVisitor::visit(RigidBody *rb) { |
| 85 |
|
Vector3d vel; |
| 86 |
|
Vector3d frc; |
| 87 |
|
Vector3d u; |
| 86 |
– |
RealType c; |
| 88 |
|
|
| 89 |
|
if (isVisited(atom)) |
| 90 |
|
return; |
| 127 |
|
Vector3d vel; |
| 128 |
|
Vector3d frc; |
| 129 |
|
Vector3d u; |
| 129 |
– |
RealType c; |
| 130 |
|
|
| 131 |
|
if (isVisited(datom)) |
| 132 |
|
return; |
| 134 |
|
pos = datom->getPos(); |
| 135 |
|
vel = datom->getVel(); |
| 136 |
|
frc = datom->getFrc(); |
| 137 |
< |
if (datom->getAtomType()->isGayBerne()) { |
| 138 |
< |
u = datom->getA().transpose()*V3Z; |
| 139 |
< |
} else if (datom->getAtomType()->isMultipole()) { |
| 140 |
< |
u = datom->getElectroFrame().getColumn(2); |
| 137 |
> |
|
| 138 |
> |
GayBerneAdapter gba = GayBerneAdapter(datom->getAtomType()); |
| 139 |
> |
MultipoleAdapter ma = MultipoleAdapter(datom->getAtomType()); |
| 140 |
> |
|
| 141 |
> |
if (gba.isGayBerne()) { |
| 142 |
> |
u = datom->getA().transpose()*V3Z; |
| 143 |
> |
} else if (ma.isDipole()) { |
| 144 |
> |
u = datom->getDipole(); |
| 145 |
|
} |
| 146 |
|
atomData = new AtomData; |
| 147 |
|
atomData->setID("ATOMDATA"); |