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

Adding Isotopes #37

Open
8me opened this issue May 19, 2021 · 5 comments
Open

Adding Isotopes #37

8me opened this issue May 19, 2021 · 5 comments

Comments

@8me
Copy link

8me commented May 19, 2021

I found in the PeriodicTable.jl thread on discourse that there was already the idea to add the individual isotopes to the elements. Has this idea been followed up at some point?

@gustavojra
Copy link

I am also interested in have isotope info.

@Gregstrq
Copy link

Gregstrq commented Aug 7, 2021

I am interested in isotope info as well. In addition to that, I would like to add nuclear spin and gyromagnetic ratio (depends on the particular isotope).

I understand that adding such information requires careful thinking, but it is precisely the reason the response from maintainers is much needed. So, guys, what are your thoughts about this? Are there any plans to develop this package further or do you just want to leave it like this?

@carstenbauer
Copy link
Member

carstenbauer commented Aug 7, 2021

IMO, isotopes and their properties could be added. The main author has also indicated that he is positive about it in the linked discourse thread. As always, the best way to drive things forward is to make a contribution. I'll happily review a PR.

@Gregstrq
Copy link

Gregstrq commented Aug 7, 2021

As always, the best way to drive things forward is to make a contribution

No doubt in that. At the same time, I would like to discuss the possible implementations before making a PR.

Presently, Periodic Table contains isotope average data. If we want to add isotopes, it should be separate Elements.
Then, isotope-specific information (abundance, spin, gyromagnetic ratio) does not make sense for isotope-averaged data. As a result, a separate Element type is needed to actually store isotope data. Are you ok with that?

On a side note, did you ever consider transforming the PeriodicTable into a DataFrame?

@gustavojra
Copy link

Maybe the easier way to keep it organize is to create a Isotope struct like

struct Isotope
    massNumber
    mass
    abundance
    spin
    gyromagneticRatio
    ...
end

then we can add a field to atoms isotopes which can be a vector of Isotope objects or perhaps a named tuple mapping the mass number to the corresponding object. Retrieving info would look like

elements[:C].isotopes[14]

Alternatively we can create a separate structure from elements. In that case retrieving info would also require the atom I guess, since mass number isn't unique (right?)

isotopes[:C, 14]

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

4 participants