Crystals @ Avogadro

Moin

I just discovered this pretty cool application:

http://www.compuchem.de/literat/kristalle.html
http://www.compuchem.de/crista.htm

The homepage is written in german but I guess the screenies should give you an
idea what the app is able to do.

Is it possible to code those dialogs in PyQt4 with Avogadro? I might be
interested in coding them, but not in c++.

Carsten

Hi Carsten,

On Thu, Mar 5, 2009 at 7:01 PM, Carsten Niehaus cniehaus@gmx.de wrote:

Moin

I just discovered this pretty cool application:

   http://www.compuchem.de/literat/kristalle.html
   http://www.compuchem.de/crista.htm

The homepage is written in german but I guess the screenies should give you an
idea what the app is able to do.

Is it possible to code those dialogs in PyQt4 with Avogadro? I might be
interested in coding them, but not in c++.

Yes, using Avogadro 0.9.2 you can use PyQt4 for the dialog and use the
Avogadro python module to set/get the unit cell. Since the unit cell
class used in avogadro is the OB one, you will also need the openbabel
python module.

Example showing how to get the unit cell: (in Avogadro’s PythonTerminal)

import Avogadro
import openbabel
mol = openbabel.OBMol(Avogadro.molecule.OBMol)
unitcell = openbabel.toUnitCell(mol.GetData(openbabel.UnitCell))
unitcell = openbabel.toUnitCell(mol.GetData(openbabel.UnitCell))
print unitcell
<openbabel.OBUnitCell; proxy of <Swig Object of type
‘OpenBabel::OBUnitCell *’ at 0xa4f35f8> >

You can implement this as an Extension. See
http://avogadro.openmolecules.net/wiki/Python_Extensions

Feel free to ask questions if you encounter problems…

Tim

Carsten


Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H


Avogadro-devel mailing list
Avogadro-devel@lists.sourceforge.net
avogadro-devel List Signup and Options