|
faunus
|
Particle class for storing positions, id, and other properties. More...
#include <particle.h>
Public Types | |
| using | ParticleExtension = ParticleTemplate< Dipole, Quadrupole, Cigar > |
Public Member Functions | |
| Particle (const AtomData &a, const Point &pos) | |
| Particle (const AtomData &a) | |
| construct from AtomData More... | |
| Particle (const Particle &) | |
| copy constructor | |
| Particle & | operator= (const Particle &) |
| assignment operator | |
| const AtomData & | traits () const |
| get properties from AtomData | |
| void | rotate (const Eigen::Quaterniond &quaternion, const Eigen::Matrix3d &rotation_matrix) |
| internal rotation More... | |
| bool | hasExtension () const |
| check if particle has extensions (dipole etc.) | |
| ParticleExtension & | createExtension () |
| Create extension. | |
| ParticleExtension & | getExt () |
| get/create extension | |
| const ParticleExtension & | getExt () const |
| Get extended particle properties;. | |
Public Attributes | |
| std::unique_ptr< ParticleExtension > | ext |
| Point to extended properties. | |
| int | id = -1 |
| Particle id/type. | |
| double | charge = 0.0 |
| Particle charge. | |
| Point | pos = {0.0, 0.0, 0.0} |
| Particle position vector. | |
Particle class for storing positions, id, and other properties.
Particles carry id, pos, charge by default but can have additional or extended data stored using a different memory model. When serializing from a json object, extended properties are automatically detected and memory is automatically allocated
| Faunus::Particle::Particle | ( | const AtomData & | atomdata | ) |
construct from AtomData
| void Faunus::Particle::rotate | ( | const Eigen::Quaterniond & | quaternion, |
| const Eigen::Matrix3d & | rotation_matrix | ||
| ) |
internal rotation
| quaternion | Quaternion used to rotate points |
| rotation_matrix | Rotation matrix used to rotate tensors |
This has effect only on anisotropic particles and does no positional rotation, only internal rotation
1.8.13