| 35 |
|
* |
| 36 |
|
* [1] Meineke, et al., J. Comp. Chem. 26, 252-271 (2005). |
| 37 |
|
* [2] Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006). |
| 38 |
< |
* [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008). |
| 38 |
> |
* [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008). |
| 39 |
|
* [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). |
| 40 |
|
* [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). |
| 41 |
|
*/ |
| 43 |
|
#include <algorithm> |
| 44 |
|
#include <fstream> |
| 45 |
|
#include "applications/staticProps/GofAngle2.hpp" |
| 46 |
+ |
#include "primitives/Atom.hpp" |
| 47 |
+ |
#include "types/MultipoleAdapter.hpp" |
| 48 |
|
#include "utils/simError.h" |
| 49 |
|
|
| 50 |
|
namespace OpenMD { |
| 98 |
|
Vector3d r12 = pos1 - pos2; |
| 99 |
|
if (usePeriodicBoundaryConditions_) |
| 100 |
|
currentSnapshot_->wrapVector(r12); |
| 101 |
< |
Vector3d dipole1 = sd1->getElectroFrame().getColumn(2); |
| 102 |
< |
Vector3d dipole2 = sd2->getElectroFrame().getColumn(2); |
| 101 |
> |
|
| 102 |
> |
AtomType* atype1 = static_cast<Atom*>(sd1)->getAtomType(); |
| 103 |
> |
AtomType* atype2 = static_cast<Atom*>(sd2)->getAtomType(); |
| 104 |
> |
MultipoleAdapter ma1 = MultipoleAdapter(atype1); |
| 105 |
> |
MultipoleAdapter ma2 = MultipoleAdapter(atype2); |
| 106 |
> |
|
| 107 |
> |
Vector3d dipole1, dipole2; |
| 108 |
> |
if (ma1.isDipole()) |
| 109 |
> |
dipole1 = sd1->getDipole(); |
| 110 |
> |
else |
| 111 |
> |
dipole1 = sd1->getA().transpose() * V3Z; |
| 112 |
> |
|
| 113 |
> |
if (ma2.isDipole()) |
| 114 |
> |
dipole2 = sd2->getDipole(); |
| 115 |
> |
else |
| 116 |
> |
dipole2 = sd2->getA().transpose() * V3Z; |
| 117 |
|
|
| 118 |
|
r12.normalize(); |
| 119 |
|
dipole1.normalize(); |