Avogadro
1.1.0
|
Z-matrix internal coordinates for a molecule. More...
#include <avogadro/zmatrix.h>
Classes | |
struct | zItem |
Signals | |
void | rowAdded (int row) |
Public Member Functions | |
ZMatrix (QObject *parent=0) | |
~ZMatrix () | |
void | addRow (int row=-1) |
int | rows () |
void | setBond (int atom1, int atom2) |
void | update () |
Public Attributes | |
QList< zItem > | m_items |
Molecule * | m_molecule |
Z-matrix internal coordinates for a molecule.
The ZMatrix class is a Primitive subclass that provides a ZMatrix object. All z matrices must be owned by a Molecule. It should also be removed by the Molecule that owns it.
Avogadro::ZMatrix::ZMatrix | ( | QObject * | parent = 0 | ) | [explicit] |
Constructor. Parent should always be a Molecule.
References QObject::parent().
Destructor.
void Avogadro::ZMatrix::addRow | ( | int | row = -1 | ) |
Add a new line to the z-matrix.
row | Row to add, default to adding a new row at the end. |
References Avogadro::Molecule::addAtom(), Avogadro::Molecule::addBond(), Avogadro::Primitive::id(), QList::insert(), QList::last(), QList::push_back(), Avogadro::Bond::setAtoms(), and QList::size().
int Avogadro::ZMatrix::rows | ( | ) | [inline] |
References QList::size().
void Avogadro::ZMatrix::setBond | ( | int | atom1, |
int | atom2 | ||
) |
Set the atom that the z matrix item is bonded to.
atom1 | The first atom in the bond |
atom2 | The second atom in the bond |
References Avogadro::Molecule::bond(), and Avogadro::Bond::setAtoms().
void Avogadro::ZMatrix::update | ( | ) |
Update the atoms of the z matrix according to the z matrix
References Avogadro::Molecule::atomById(), Avogadro::Atom::pos(), Avogadro::Atom::setAtomicNumber(), Avogadro::Atom::setPos(), and QList::size().