| 1 | 
  | 
/* | 
| 2 | 
< | 
 * Copyright (C) 2000-2004  Object Oriented Parallel Simulation Engine (OOPSE) project | 
| 2 | 
> | 
 * Copyright (C) 2000-2009  The Open Molecular Dynamics Engine (OpenMD) project | 
| 3 | 
  | 
 *  | 
| 4 | 
< | 
 * Contact: oopse@oopse.org | 
| 4 | 
> | 
 * Contact: gezelter@openscience.org | 
| 5 | 
  | 
 *  | 
| 6 | 
  | 
 * This program is free software; you can redistribute it and/or | 
| 7 | 
  | 
 * modify it under the terms of the GNU Lesser General Public License | 
| 25 | 
  | 
 | 
| 26 | 
  | 
#include "primitives/DirectionalAtom.hpp" | 
| 27 | 
  | 
 | 
| 28 | 
< | 
namespace oopse { | 
| 28 | 
> | 
namespace OpenMD { | 
| 29 | 
  | 
 | 
| 30 | 
  | 
DirectionalAtom::DirectionalAtom(DirectionalAtomType* dAtomType)  | 
| 31 | 
  | 
                         : Atom(dAtomType){ | 
| 38 | 
  | 
 | 
| 39 | 
  | 
void DirectionalAtom::setPrevA(const RotMat3x3d& a) { | 
| 40 | 
  | 
    ((snapshotMan_->getPrevSnapshot())->*storage_).aMat[localIndex_] = a; | 
| 41 | 
< | 
    ((snapshotMan_->getPrevSnapshot())->*storage_).unitVector[localIndex_] = a.inverse() * sU_.getColum(2); | 
| 41 | 
> | 
    ((snapshotMan_->getPrevSnapshot())->*storage_).unitVector[localIndex_] = a.inverse() * sU_.getColumn(2); | 
| 42 | 
  | 
} | 
| 43 | 
  | 
 | 
| 44 | 
  | 
       | 
| 45 | 
  | 
void DirectionalAtom::setA(const RotMat3x3d& a) { | 
| 46 | 
  | 
    ((snapshotMan_->getCurrentSnapshot())->*storage_).aMat[localIndex_] = a; | 
| 47 | 
< | 
    ((snapshotMan_->getCurrentSnapshot())->*storage_).unitVector[localIndex_] = a.inverse() * sU_.getColum(2); | 
| 47 | 
> | 
    ((snapshotMan_->getCurrentSnapshot())->*storage_).unitVector[localIndex_] = a.inverse() * sU_.getColumn(2); | 
| 48 | 
  | 
}     | 
| 49 | 
  | 
     | 
| 50 | 
  | 
void DirectionalAtom::setA(const RotMat3x3d& a, int snapshotNo) { | 
| 51 | 
  | 
    ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).aMat[localIndex_] = a; | 
| 52 | 
< | 
    ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).unitVector[localIndex_] = a.inverse() * sU_.getColum(2);     | 
| 52 | 
> | 
    ((snapshotMan_->getSnapshot(snapshotNo))->*storage_).unitVector[localIndex_] = a.inverse() * sU_.getColumn(2);     | 
| 53 | 
  | 
}     | 
| 54 | 
  | 
 | 
| 55 | 
  | 
void DirectionalAtom::rotateBy(const RotMat3x3d& m) { |