Class RigidFragment#

Class Documentation#

class RigidFragment#

represent a single rigid body

Public Functions

inline RigidFragment(
pele::Array<double> atom_positions,
Array<double> cog,
double M,
double W,
Array<double> S,
Array<double> inversion,
bool can_invert,
std::shared_ptr<DistanceInterface> distance_function
)#
inline size_t natoms() const#

return the number of atoms in the rigid body

inline void add_symmetry_rotation(pele::Array<double> R)#

add a symmetry rotation

inline void set_atom_indices(pele::Array<size_t> atom_indices)#
inline pele::Array<size_t> &get_atom_indices()#
inline std::vector<pele::MatrixNM<3, 3>> const &get_symmetry_rotations() const#

access the vector of symmetry rotations

pele::Array<double> to_atomistic(
pele::Array<double> const com,
pele::VecN<3> const &p
)#

convert a center of mass and a angle axis rotation to a set of atomistic coordinates

void transform_grad(
pele::VecN<3> const &p,
pele::Array<double> const g,
pele::VecN<3> &g_com,
pele::VecN<3> &g_rot
)#

transform an atomistic gradient into a gradient in the rigid body coordinates

inline void transform_grad(
pele::Array<double> const p,
pele::Array<double> const g,
pele::Array<double> g_com,
pele::Array<double> g_rot
)#

transform an atomistic gradient into a gradient in the rigid body coordinates

This is simply a wrapper. This copies the data into VecN objects, calls transform_grad and copies it back.

inline pele::VecN<3> get_smallest_rij(
pele::VecN<3> const &com1,
pele::VecN<3> const &com2
) const#

return the shortest vector from com1 to com2

this could be replaced by periodic distances for instance

double distance_squared(
pele::VecN<3> const &com1,
pele::VecN<3> const &p1,
pele::VecN<3> const &com2,
pele::VecN<3> const &p2
) const#

compute the squared distance between two configurations of the rigid fragment

void distance_squared_grad(
pele::VecN<3> const &com1,
pele::VecN<3> const &p1,
pele::VecN<3> const &com2,
pele::VecN<3> const &p2,
VecN<3> &g_M,
VecN<3> &g_P
) const#