|my $ic = Chemistry::InternalCoords->new($atom, $len_ref, $len_val, $ang_ref, $ang_val, $dih_ref, $dih_val)||
Create a new internal coordinate object. $atom is the atom to which the
coordinates apply. $len_ref, $ang_ref, and $dih_ref are either atom references
or atom indices and are used to specify the distance, angle, and dihedral that
are used to define the current position. $len_val, $ang_val, and $dih_val are
the values of the distance, angle, and dihedral. The angle and the dihedral are
expected to be in degrees.
means that $atom is 1.1 distance units from atom 4, the angle $atom-4-3 is 109.5 degrees, and the dihedral $atom-4-3-2 is 180.0 degrees.
The first three atoms in the molecule dont need all the internal coordinates: the first atom doesnt need anything (except for the atom reference $atom) because it will always be placed at the origin; the second atom only needs a distance, and it will be placed on the X axis; the third atom needs a distance and an angle, and it will be placed on the XY plane.
|my ($atom, $distance) = $ic->distance||Return the atom reference and distance value contained in the Chemistry::InternalCoords object.|
|my ($atom, $angle) = $ic->angle||Return the atom reference and angle value contained in the Chemistry::InternalCoords object.|
|my ($atom, $dihedral) = $ic->dihedral||Return the atom reference and dihedral value contained in the Chemistry::InternalCoords object.|
|my $vector = $ic->cartesians||Calculate the Cartesian coordinates from an internal coordinate object. Returns a Math::VectorReal object. Note that the Cartesian coordinates of the atoms referenced by the $ic object should already be calculated.|
|my $vector = $ic->add_cartesians||
Same as $ic->cartesians, but also adds the newly calculated Cartesian
coordinates to the atom. It is just shorthand for the following:
The best way of calculating the Cartesian coordinates for an entire molecule, assuming that every atom is defined only in terms of previous atoms (as it should be), is the following:
|my $string = $ic->stringify||Dump the object as a string representation. May be useful for debugging. This method overloads the "" operator.|
Chemistry::InternalCoords::Builder, Chemistry::Mol, Chemistry::Atom, Math::VectorReal, <http://www.perlmol.org/>.
Ivan Tubert-Brohman <firstname.lastname@example.org>
Copyright (c) 2004 Ivan Tubert-Brohman. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
|perl v5.20.3||INTERNALCOORDS (3)||2004-09-24|