A decorator for a particle with x,y,z coordinates and a radius.
More...
#include <IMP/core/XYZR.h>
|
static XYZR | decorate_particle (::IMP::kernel::Particle *p) |
|
static FloatKey | get_radius_key () |
| Get the default radius key.
|
|
static bool | particle_is_instance (Particle *p) |
| Check if the particle has the required attributes.
|
|
static XYZR | setup_particle (Particle *p) |
|
static XYZR | setup_particle (Particle *p, Float radius) |
|
static XYZR | setup_particle (Particle *p, const algebra::Sphere3D s) |
|
static XYZR | setup_particle (Model *m, ParticleIndex pi, const algebra::Sphere3D s) |
|
static XYZ | decorate_particle (::IMP::kernel::Particle *p) |
|
static FloatKey | get_coordinate_key (unsigned int i) |
|
static const FloatKeys & | get_xyz_keys () |
| Get a vector containing the keys for x,y,z. More...
|
|
static bool | particle_is_instance (Particle *p) |
|
static bool | particle_is_instance (Model *m, ParticleIndex pi) |
|
static XYZ | setup_particle (Model *m, ParticleIndex pi, const algebra::Vector3D v=algebra::Vector3D(0, 0, 0)) |
|
static XYZ | setup_particle (Particle *p, const algebra::Vector3D v=algebra::Vector3D(0, 0, 0)) |
|
static bool | particle_is_instance (Particle *p) |
| Return true if the particle can be cast to the decorator. More...
|
|
|
(Note that these are not member functions.)
|
XYZRs | create_xyzr_particles (Model *m, unsigned int num, Float radius, Float box_side=10) |
| Create a set of particles with random coordinates. More...
|
|
double | get_distance (XYZR a, XYZR b) |
| Compute the distance between a pair of particles.
|
|
algebra::Sphere3D | get_enclosing_sphere (const XYZs &v) |
| Get a sphere enclosing the set of XYZRs. More...
|
|
void | set_enclosing_radius (XYZR b, const XYZs &v) |
| Set the radius of the first to enclose the list. More...
|
|
void | set_enclosing_sphere (XYZR b, const XYZs &v, double slack=0) |
| Set the coordinates and radius of the first to enclose the list. More...
|
|
double | get_dihedral (XYZ a, XYZ b, XYZ c, XYZ d) |
| Compute the dihedral angle (in radians) between the four particles.
|
|
double | get_distance (XYZ a, XYZ b) |
| Compute the distance between a pair of particles.
|
|
A simple example illustrating some of the functionality.
Definition at line 27 of file XYZR.h.
Create a decorator using radius_key to store the FloatKey.
- Parameters
-
[in] | p | The particle to wrap. |
Definition at line 36 of file XYZR.h.
Create a decorator using radius_key to store the FloatKey. The particle should already be an XYZ particle.
- Parameters
-
[in] | p | The particle to wrap. |
[in] | radius | The radius to set initially |
Definition at line 50 of file XYZR.h.
Create a decorator using radius_key to store the FloatKey.
- Parameters
-
[in] | p | The particle to wrap. |
[in] | s | The sphere to use to set the position and radius |
Definition at line 60 of file XYZR.h.
Add the coordinates and radius from the sphere to the particle.
Definition at line 70 of file XYZR.h.
XYZRs create_xyzr_particles |
( |
Model * |
m, |
|
|
unsigned int |
num, |
|
|
Float |
radius, |
|
|
Float |
box_side = 10 |
|
) |
| |
|
related |
This function is mostly to be used to keep demo code brief.
- Parameters
-
[in] | m | The model to add them to. |
[in] | num | The number of particles to create. |
[in] | radius | The radius to give them. |
[in] | box_side | The particles have coordinates from -box_side to box_side. |
The particles coordinates are optimized.
- Parameters
-
[in] | v | The one whose radius should be set Any particle which does not have the attribute b.get_radius() is assumed to have a radius of 0. |
void set_enclosing_radius |
( |
XYZR |
b, |
|
|
const XYZs & |
v |
|
) |
| |
|
related |
- Parameters
-
[in] | v | The vector of XYZ or XYZR particles to enclose |
[out] | b | The one whose radius should be set Any particle which does not have the attribute b.get_radius() is assumed to have a radius of 0. |
void set_enclosing_sphere |
( |
XYZR |
b, |
|
|
const XYZs & |
v, |
|
|
double |
slack = 0 |
|
) |
| |
|
related |
- Parameters
-
[in] | v | The vector of XYZ or XYZR particles to enclose |
[out] | b | The one whose values should be set |
[in] | slack | An amount to add to the radius. Any particle which does not have the attribute b.get_radius() is assumed to have a radius of 0. |
- Note
- This function produces tighter bounds if the CGAL library is available.
The documentation for this class was generated from the following file: