data structure design question
Thomas Hamelryck
thamelry at vub.ac.be
Mon Feb 14 12:03:06 EST 2000
Felix Thibault <felixt at dicksonstreet.com> wrote:
: I'm thinking of trying to do some chemistry stuff in
: Python, and one of the things I was thinking of was
: to define a Chemical (or Molecule) object. On paper
: chemicals are represented by stuctures like:
: H
: |
: C=O
: |
: H
What you really need is a graph data structure. There is an excellent
module called kjbuckets that is just the right tool for the job. You can
consider the bonds as edges in the graph and the atoms as nodes.
Take a look at:
http://www.pythonpros.com/arw/kjbuckets/
Cheers,
---
Thomas Hamelryck Institute of Molecular and Structural Biology
Aarhus University Gustav Wieds Vej 10C
DK-8000 Aarhus C Denmark
More information about the Python-list
mailing list