JuliaPhysics / PeriodicTable.jl

Periodic Table for Julians! :fire:
Other
111 stars 26 forks source link

Lookup element by its symbol? #25

Closed caseykneale closed 4 years ago

caseykneale commented 5 years ago

It'd be really nice to have built in constructors/convenience functions that query available atoms for a given property.

IE:

PeriodicTable.Elements("H") == PeriodicTable.Elements(Hydrogen)

or

lookitup(symbol) = [ e for e in PeriodicTable.elements if e.symbol == symbol][1]
e = lookitup("H")

I'm kicking around a package that might benefit from this...

rjpower4 commented 4 years ago

This is implemented as

elements[:ElementSymbol]
caseykneale commented 4 years ago

forgot about this! Thanks!