| 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 |
| 34 |
|
#define PRIMITIVES_ATOM_HPP |
| 35 |
|
|
| 36 |
|
#include "primitives/StuntDouble.hpp" |
| 37 |
+ |
#include "types/AtomType.hpp" |
| 38 |
|
|
| 39 |
< |
namespace oopse{ |
| 39 |
> |
namespace OpenMD{ |
| 40 |
|
class Atom : public StuntDouble { |
| 41 |
|
public: |
| 42 |
< |
Atom(); |
| 43 |
< |
/** |
| 44 |
< |
* Returns the inertia tensor of this stuntdouble |
| 45 |
< |
* @return the inertia tensor of this stuntdouble |
| 46 |
< |
* @see #setI |
| 47 |
< |
*/ |
| 47 |
< |
virtual Mat3x3d getI(); |
| 42 |
> |
Atom(AtomType* at); |
| 43 |
> |
/** |
| 44 |
> |
* Returns the inertia tensor of this stuntdouble |
| 45 |
> |
* @return the inertia tensor of this stuntdouble |
| 46 |
> |
*/ |
| 47 |
> |
virtual Mat3x3d getI(); |
| 48 |
|
|
| 49 |
< |
/** |
| 50 |
< |
* Sets the inertia tensor of this stuntdouble |
| 51 |
< |
* @param trq new inertia tensor |
| 52 |
< |
* @see #getI |
| 53 |
< |
*/ |
| 54 |
< |
virtual void setI(Mat3x3d& I); |
| 49 |
> |
/** |
| 50 |
> |
* Returns the gradient of this stuntdouble |
| 51 |
> |
* @return the inertia tensor of this stuntdouble |
| 52 |
> |
*/ |
| 53 |
> |
virtual std::vector<double> getGrad(); |
| 54 |
|
|
| 55 |
< |
/** |
| 57 |
< |
* Returns the gradient of this stuntdouble |
| 58 |
< |
* @return the inertia tensor of this stuntdouble |
| 59 |
< |
* @see #setI |
| 60 |
< |
*/ |
| 61 |
< |
virtual std::vector<double> getGrad(); |
| 55 |
> |
virtual void accept(BaseVisitor* v); |
| 56 |
|
|
| 57 |
< |
virtual void accept(BaseVisitor* v); |
| 57 |
> |
/** |
| 58 |
> |
* Returns the AtomType of this Atom. |
| 59 |
> |
* @return the atom type of this atom |
| 60 |
> |
*/ |
| 61 |
> |
AtomType* getAtomType() { |
| 62 |
> |
return atomType_; |
| 63 |
> |
} |
| 64 |
> |
|
| 65 |
> |
//forward functions of AtomType class |
| 66 |
> |
bool isCharge() { |
| 67 |
> |
return atomType_->isCharge(); |
| 68 |
> |
} |
| 69 |
> |
|
| 70 |
> |
bool isDirectional() { |
| 71 |
> |
return atomType_->isDirectional(); |
| 72 |
> |
} |
| 73 |
> |
|
| 74 |
> |
bool isDipole() { |
| 75 |
> |
return atomType_->isDipole(); |
| 76 |
> |
} |
| 77 |
> |
|
| 78 |
> |
bool isGayBerne() { |
| 79 |
> |
return atomType_->isGayBerne(); |
| 80 |
> |
} |
| 81 |
> |
|
| 82 |
> |
bool isSticky() { |
| 83 |
> |
return atomType_->isSticky(); |
| 84 |
> |
} |
| 85 |
> |
|
| 86 |
> |
bool isShape() { |
| 87 |
> |
return atomType_->isShape(); |
| 88 |
> |
} |
| 89 |
> |
|
| 90 |
> |
private: |
| 91 |
> |
AtomType* atomType_; |
| 92 |
|
|
| 93 |
|
}; |
| 94 |
|
|
| 95 |
< |
}//namepace oopse |
| 95 |
> |
}//namepace OpenMD |
| 96 |
|
|
| 97 |
< |
#endif //PRIMITIVES_ATOM_HPP |
| 97 |
> |
#endif //PRIMITIVES_ATOM_HPP |