Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any chemical database written for python?

I write script which needs to know atomic mass of tin. Is there a python database which has such info?

Edit:

periodictable is nice, but some libs are more rich in data. For example gperiodic program.

like image 256
Adobe Avatar asked Sep 18 '25 18:09

Adobe


1 Answers

You could have simply googled before asking. But anyway, you might find this useful: http://pypi.python.org/pypi/periodictable. Below is an example straight out of the page.

>>> from periodic import element
>>> hydrogen = element('hydrogen')
>>> hydrogen.mass
1.0079
like image 77
UltraInstinct Avatar answered Sep 21 '25 08:09

UltraInstinct