Representation of internal coordinate system, including methods to build it from cartesian coordinates, and to convert between coordinate systems.

class InternalCoordinateSet

add_extra_inverse   add_extra_redundant   b_inv_matrix   b_matrix   b_matrix_primitive   do_step_cartesian_from_internal   find_angles   find_bonds   find_inverse_intermolecular   find_torsions   fix_torsions_in_primitive_vector   fix_torsions_in_vector   g_matrix   geometry_changed!   grad_to_internal   hessian_from_primitive   hessian_to_cart   hessian_to_internal   initialize   k_matrix   m_matrix   no_of_nonredundant   p_matrix   primitive_to_delocalized   print   project_hessian   rotate_initial_geometry   to_vector   to_vector_primitive   u_matrix  

Constructors

initialize(geometry, options = {})

Creates new instance of InternalCoordinateSet operating on specified Geometry. Possible options are:

Type conversion

to_vector_primitive

Vector of values of the primitive (redundant) internal coordinates

to_vector

Vector in the internal coordinates, either delocalized or redundant

Misc

print

prints the set of internal coordinates

fix_torsions_in_primitive_vector(v)

Value of torsions are adjusted to be in -pi...pi interval

fix_torsions_in_vector(v)

Fixes torsions in primitive coordinates. Nothing is done for delocalized coordinates.

no_of_nonredundant

Counts the degrees of freedom as number of nonzero eigenvalues of G matrix in the redundant coordinates

rotate_initial_geometry

Rotate the geometry so that translation/rotation degrees of freedom can be later eliminated easily.

Matrices

The matrices used are cached in instance variables. They depend only on current cartesian geometry, so the cache should be invalidated each time the geometry changes (by calling geometry_changed! method).

geometry_changed!

Invalidates matrices

b_matrix_primitive # => Matrix

b_matrix

b_inv_matrix

m_matrix

g_matrix

p_matrix

Delocalized nonredundant coordinates

u_matrix

primitive_to_delocalized(q)

Transformations

do_step_cartesian_from_internal(sq)

k_matrix(gq) # => Matrix

grad_to_internal(gradient)

Converts cartesian gradient to projected gradient in internal coordinates

hessian_to_internal(hx)

hessian_to_cart(hq)

project_hessian(h)

hessian_from_primitive(hqp)

Search (private methods)

find_bonds(options = {:intermolecular => true, :h_bonds => false})

Identifies all covalent bonds and closest interfragment connections. Returns number of coordinates found.

find_inverse_intermolecular(options = {:hydrogens => true})

find_angles

Identifies all bond angles in the connectivity established by find_bonds. Returns number of coordinates found.

find_torsions

Identifies all torsions angles in the connectivity established by find_bonds. If none is found in sufficiently large molecule, looks for improper torsions. Returns number of coordinates found.

add_extra_redundant(distance)

add_extra_inverse(mindist, maxdist = 9.9e99)