Avogadro  1.1.0
Classes | Signals | Public Member Functions | Public Attributes
Avogadro::ZMatrix Class Reference

Z-matrix internal coordinates for a molecule. More...

#include <avogadro/zmatrix.h>

Inheritance diagram for Avogadro::ZMatrix:
Inheritance graph

List of all members.


struct  zItem


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< zItemm_items

Detailed Description

Z-matrix internal coordinates for a molecule.

Marcus D. Hanwell

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.

Constructor & Destructor Documentation

Avogadro::ZMatrix::ZMatrix ( QObject parent = 0) [explicit]

Constructor. Parent should always be a Molecule.

References QObject::parent().


Member Function Documentation

void Avogadro::ZMatrix::addRow ( int  row = -1)

Add a new line to the z-matrix.

rowRow 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]
The number of rows in the z-matrix.

References QList::size().

void Avogadro::ZMatrix::setBond ( int  atom1,
int  atom2 

Set the atom that the z matrix item is bonded to.

atom1The first atom in the bond
atom2The second atom in the bond

References Avogadro::Molecule::bond(), and Avogadro::Bond::setAtoms().

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().

The documentation for this class was generated from the following files: