# | Line 38 | Line 38 | |
---|---|---|
38 | * University of Notre Dame has been advised of the possibility of | |
39 | * such damages. | |
40 | */ | |
41 | < | |
41 | > | |
42 | #include "primitives/Atom.hpp" | |
43 | namespace oopse { | |
44 | < | |
45 | < | Atom::Atom(AtomType* at) : StuntDouble(otAtom, &Snapshot::atomData) ,atomType_(at) { |
44 | > | |
45 | > | Atom::Atom(AtomType* at) : StuntDouble(otAtom, &Snapshot::atomData), |
46 | > | atomType_(at) { |
47 | mass_ = at->getMass(); | |
48 | } | |
49 | ||
50 | Mat3x3d Atom::getI() { | |
51 | return Mat3x3d::identity(); | |
52 | } | |
53 | < | |
54 | < | std::vector<double> Atom::getGrad() { |
55 | < | std::vector<double> grad(3); |
53 | > | |
54 | > | std::vector<RealType> Atom::getGrad() { |
55 | > | std::vector<RealType> grad(3); |
56 | Vector3d force= getFrc(); | |
57 | < | |
57 | > | |
58 | grad[0] = -force[0]; | |
59 | grad[1] = -force[1]; | |
60 | grad[2] = -force[2]; | |
61 | ||
62 | return grad; | |
63 | } | |
64 | < | |
64 | > | |
65 | void Atom::accept(BaseVisitor* v) { | |
66 | v->visit(this); | |
67 | < | } |
67 | < | |
67 | > | } |
68 | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |