Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lookup element by its symbol? #25

Closed
caseykneale opened this issue Sep 24, 2019 · 2 comments
Closed

Lookup element by its symbol? #25

caseykneale opened this issue Sep 24, 2019 · 2 comments

Comments

@caseykneale
Copy link

caseykneale commented Sep 24, 2019

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
Copy link

rjpower4 commented Mar 27, 2020

This is implemented as

elements[:ElementSymbol]

@caseykneale
Copy link
Author

forgot about this! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants