Class RBTopology#

Class Documentation#

class RBTopology#

represent a collection of rigid bodies

Public Functions

inline RBTopology()#
inline void add_site(RigidFragment const &site)#
inline std::vector<RigidFragment> const &get_sites() const#

provide access to the vector of rigid fragments

inline void assign_atom_indices()#
inline size_t nrigid() const#

return the number of rigid bodies

inline size_t natoms_total() const#

return the total number of atoms in the atomistic representation

inline size_t number_of_non_rigid_atoms() const#
inline CoordsAdaptor get_coords_adaptor(pele::Array<double> x) const#

return an already constructed CoordsAdaptor object

Array<double> to_atomistic(Array<double> rbcoords)#

convert rigid body coordinates to atomistic coordinates

void transform_gradient(
pele::Array<double> rbcoords,
pele::Array<double> grad,
pele::Array<double> rbgrad
)#

convert atomistic gradient into gradient in rigid body coordinates

pele::VecN<3> align_angle_axis_vectors(
pele::VecN<3> const &p1,
pele::VecN<3> const &p2in
)#

align two angle axis vectors

perform symmetry operations on p2 to minimize the distance with p1

void align_all_angle_axis_vectors(pele::Array<double> x1, pele::Array<double> x2)#

Ensure the angle axis rotations of two structures are aligned with each other.

x1 will remain unchanged, only modify x2

void align_path(std::list<pele::Array<double>> path)#

ensure a series of images are aligned with each other

this simply aligns the angle axis vectors

inline void get_zero_modes(
pele::Array<double> const x,
std::vector<pele::Array<double>> &zev
)#

return a list of zero modes

i.e. vectors corresponding to directions with zero curvature. (these are not necessarily orthogonal)

inline double distance_squared(
pele::Array<double> const x1,
pele::Array<double> const x2
) const#

return the squared distance between two configurations

inline void distance_squared_grad(
pele::Array<double> const x1,
pele::Array<double> const x2,
pele::Array<double> grad
) const#

Calculate gradient with respect to x1 for the squared distance.

used to compute the spring force on x1 to x2