1 |
< |
/* |
1 |
> |
/* |
2 |
|
* Copyright (c) 2005 The University of Notre Dame. All Rights Reserved. |
3 |
|
* |
4 |
|
* The University of Notre Dame grants you ("Licensee") a |
42 |
|
#include "primitives/Atom.hpp" |
43 |
|
namespace oopse { |
44 |
|
|
45 |
< |
Atom::Atom(AtomType* at) : StuntDouble(otAtom, &Snapshot::atomData) ,atomType_(at) { |
46 |
< |
mass_ = at->getMass(); |
47 |
< |
} |
45 |
> |
Atom::Atom(AtomType* at) : StuntDouble(otAtom, &Snapshot::atomData) ,atomType_(at) { |
46 |
> |
mass_ = at->getMass(); |
47 |
> |
} |
48 |
|
|
49 |
< |
Mat3x3d Atom::getI() { |
49 |
> |
Mat3x3d Atom::getI() { |
50 |
|
return Mat3x3d::identity(); |
51 |
< |
} |
51 |
> |
} |
52 |
|
|
53 |
< |
std::vector<double> Atom::getGrad() { |
54 |
< |
std::vector<double> grad(3); |
53 |
> |
std::vector<RealType> Atom::getGrad() { |
54 |
> |
std::vector<RealType> grad(3); |
55 |
|
Vector3d force= getFrc(); |
56 |
|
|
57 |
|
grad[0] = -force[0]; |
59 |
|
grad[2] = -force[2]; |
60 |
|
|
61 |
|
return grad; |
62 |
< |
} |
62 |
> |
} |
63 |
|
|
64 |
< |
void Atom::accept(BaseVisitor* v) { |
64 |
> |
void Atom::accept(BaseVisitor* v) { |
65 |
|
v->visit(this); |
66 |
< |
} |
66 |
> |
} |
67 |
|
|
68 |
|
} |