data structure design question

Felix Thibault felixt at dicksonstreet.com
Thu Feb 17 01:35:12 EST 2000


At 17:03 2/14/00 GMT, Thomas Hamelryck wrote:
>Felix Thibault <felixt at dicksonstreet.com> wrote:
<question about representing chemical structures 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/
>

I'm looking at kjbuckets now, but I have a question about the graphs-
the documentation says:

	[Graphs] relate Python hashable objects to other objects,
	 with no significance to order or redundancies on the 
	pairings. Technically, kjGraph defines a directed graph 
	abstract data type...

Does this mean that I can use a graph to show which atoms are connected,
but I need to find some other way to show whether a bond
is a single or multiple bond...or else have nucleus-nodes inter-connected
by electron=pair-nodes ?

Thanks,

Felix 


>Cheers,
>
>---
>Thomas Hamelryck    Institute of Molecular and Structural Biology
>Aarhus University   Gustav Wieds Vej 10C
>DK-8000 Aarhus C    Denmark
>
               
>
>
>-- 
>http://www.python.org/mailman/listinfo/python-list
>
>





More information about the Python-list mailing list