pele.angleaxis.RigidFragment#

class pele.angleaxis.RigidFragment[source]#

Defines a single rigid fragment

Attributes:
S3x3 array

weighted tensor of gyration S_ij = \sum w_i x_i x_j. This is used for computing distances between angle axis sites. We find that weighting all atoms the same (w_i = 1) gives the best distance metric.

Sm3x3 array

mass-weighted tensor of gyration S_ij = \sum m_i x_i x_j. This is used to compute physical properties like normal mode vibrational frequncies.

Mfloat

The total mass of the angle axis site

Wfloat

The sum of all the weights. For this is just the number of atoms.

cognp.array

center of geometry. If the atom masses are not all the same this can be different from the center of mass. Normally the center of mass is located at the origin.

symmetrieslist of 3x3 np.arrays

list of all symmetry operations (expressed as matrices) which can be performed on the angle axis site. Excluding inversion. These are computed automatically.

atom_positionslist of arrays of length 3

the position of the atoms in the lab frame

atom_typeslist of strings

list of atom types

atom_masseslist of floats

Notes

This defines a collection of atoms that compose a single rigid bodies. This class collects all the information necessary to perform operations on the rigid body such as converting from center of mass + angle axis rotataion to atomistic coordinates. In the most simple case, this is just a whole molecule

We have tried to logically separate the concept of a rigid body (a rigid collection atoms) from an angle axis site, which might describe a single atom with a dipolar interaction.

Usage

Add the atoms to the rigid fragment one at a time. When they are all added call self.finalize_setup(). The relevant properties of the rigid fragment, including center of geometry, tensor of gyration, and internal symmetries will be computed automatically.

The base class is pele.angleaxis.AASiteType.

Methods

add_atom(atomtype, pos[, mass])

Add a new atom to the rigid fragment

distance_squared(com1, p1, com2, p2)

distance measure between 2 angle axis bodies of same type

distance_squared_grad(com1, p1, com2, p2)

calculate spring force between 2 sites

finalize_setup([shift_com])

finalize setup after all sites have been added

get_natoms()

get_smallest_rij(com1, com2)

return the shortest vector from com1 to com2

metric_tensor(p)

calculate the mass weighted metric tensor

metric_tensor_cog(p)

calculate the metric tensor when for w_i != m_i

redistribute_forces(p, grad_com, grad_p)

to_atomistic(com, p)

convert the center of mass position + angle axis vector to atomistic coords

transform_grad(p, g)

Attributes