I am not aware of a menu button to print these tables.
There is however a different way to get your hands on the numbers.
Avogadro features objects: molecules, bonds and atoms are instances of classes, whose properties can be read and processed by programming.
The easiest way is the build-in Python-Terminal.
(Note that I'm using Avogadro 1.1.1 on Linux in German, your menus will have different labels.)
- In Avogadro, open a Python Terminal (In German, this is done via
Einstellungen -> Werkzeugleisten -> Python-Terminal, which should be something like Settings -> Tool bars -> Python terminal
When run in the Python terminal of Avogradro, the following snippet writes
- atom index
- atomic number
- x, y, z coordinates
for all atoms of the currently opened molecule to a csv file into an existing tmp
directory in the user's home.
import os.path
import csv
home = os.path.expanduser('~')
data_dir = 'tmp'
atom_table_name = 'atoms.csv'
atom_table_path = os.path.join(home, data_dir, atom_table_name)
# generate full path for file with atom data
with open(atom_table_path, 'wt') as fout:
writer = csv.writer(fout)
writer.writerow(('Index', 'Atomic number', 'X', 'Y', 'Z'))
mol = Avogadro.molecule
for atom in mol.atoms:
index = atom.index + 1
x, y, z = atom.pos
writer.writerow((index, atom.atomicNumber, x, y, z))
EDIT
I mentioned the Python Terminal first because I didn't want to introduce too much different things at once.
Once you have played a bit with the build-in Python Terminal, you will want to go one step beyond and try a more comfortable IDE with logging, tab-completion, build-in help, etc. My suggestion is to try IPython!
With IPython (or any other IDE of your choice), you can make use of Avogadro through its API without actually running it.
Given that your data file propen.cml
looks like this:
<molecule>
<atomArray>
<atom id="a1" elementType="C" x3="-6.736896" y3="1.198243" z3="-0.001854"/>
<atom id="a2" elementType="C" x3="-5.625957" y3="2.233390" z3="-0.108371"/>
<atom id="a3" elementType="H" x3="-6.748313" y3="0.730420" z3="0.988429"/>
<atom id="a4" elementType="H" x3="-6.615420" y3="0.408802" z3="-0.751312"/>
<atom id="a5" elementType="H" x3="-7.710837" y3="1.671184" z3="-0.163704"/>
<atom id="a6" elementType="C" x3="-4.268024" y3="1.629800" z3="0.106393"/>
<atom id="a7" elementType="H" x3="-5.801148" y3="3.017025" z3="0.637857"/>
<atom id="a8" elementType="H" x3="-5.668681" y3="2.695849" z3="-1.101309"/>
<atom id="a9" elementType="C" x3="-3.137190" y3="2.345874" z3="0.062502"/>
<atom id="a10" elementType="H" x3="-4.203709" y3="0.562202" z3="0.306350"/>
<atom id="a11" elementType="H" x3="-3.147760" y3="3.413685" z3="-0.133506"/>
<atom id="a12" elementType="H" x3="-2.172936" y3="1.873521" z3="0.222912"/>
</atomArray>
<bondArray>
<bond atomRefs2="a1 a2" order="1"/>
<bond atomRefs2="a1 a3" order="1"/>
<bond atomRefs2="a1 a4" order="1"/>
<bond atomRefs2="a1 a5" order="1"/>
<bond atomRefs2="a2 a6" order="1"/>
<bond atomRefs2="a2 a7" order="1"/>
<bond atomRefs2="a2 a8" order="1"/>
<bond atomRefs2="a6 a9" order="2"/>
<bond atomRefs2="a6 a10" order="1"/>
<bond atomRefs2="a9 a11" order="1"/>
<bond atomRefs2="a9 a12" order="1"/>
</bondArray>
</molecule>
you can load the CML file and iterate over the bonds to display the index numbers of the atoms in the bond and the bond length using:
import Avogadro as av
mol = av.MoleculeFile.readMolecule('propen.cml')
# don't forget to adjust the path for the data file!
for bond in mol.bonds:
first = bond.beginAtom
last = bond.endAtom
print first.index, last.index, bond.length