[ANN] Mendeleev.jl - accessing chemical elements data

No, it doesn’t work with subscript.

The next question: cc"Na2Pb1.5(CO3)2(OH)" ? - No, it errors.

The next one: cc"YBa2Cu3O7-δ" - anybody helping me further down into the rabbit hole? - I’m not a chemist :smiling_face_with_tear:

The general message here is that it would be useful to have an umbrella package like Chemistry.jl or similar name that combines the features of these smaller packages into a cohesive experience.

1 Like

And the big general question - WHO?

For me, Mendelev was/is purely a pet project with approximately zero connection with my job (actually maybe negative connection as I am writing this post now instead of fitting some curves with OriginPro). There are some features to be yet implemented in Mendeleev , I’d finish ChemElementsBB, and probably make a small ChemFormulae package given the parsing is already done. These packages will be compatible, and IMO they don’t have to be a part of an umbrella package to provide a cohesive experience.

Back to the “who” question. It would be great if “somebody” could join the efforts to establish Julia Chemistry organization. I am definitely not going to lead these efforts. I think there once was a discussion about it on the Discourse…

One thing I am certain is that the most likely answer to this question is a name that belongs to the set of maintainers of existing chemistry-related packages. If you are a maintainer of Mendelev.jl you already have higher likelihood of being the “WHO” that the community needs.

May I repeat

That doesn’t invalidate the likelihoods. If you don’t want to lead this effort, other maintainers can take the lead.

OK, we have it.

julia> using ChemFormulae
julia> abellait = ChemFormula("NaPb₂(CO3)₂(OH)");
julia> abellait.brutto_string
"HC2O7NaPb2"

julia> abellait.weight
574.41276928

julia> x = abellait[1];
julia> x.elem.name
"Hydrogen"

julia> x.mass_share
0.0017548356406900244

julia> pb = abellait[:Pb];
julia> pb.weight
414.4

julia> pb.mass_share
0.7214324300614544

The package at GitHub - Eben60/ChemFormulae.jl

Some 80% of the functionality is now implemented, meaning I still have to do some 80% of the work, so it is going to take a while before I consider the package ready to being registered.

3 Likes

@Eben60 you should probably reconsider becoming the JuliaChemistry founder :slight_smile: These packages are super useful and could live in a common umbrella. Even if you don’t plan to maintain the org in the long term, you can add other Julia members to it so that everyone can change roles over time.

Thank you for ChemFormulae.jl, it will be super useful. :heart:

3 Likes

@Eben60 I just tried installing the package ChemFormulae.jl but it depends on another unregistered package ChemElementsBB.jl. Could you give a big picture of how these packages relate to each other and perhaps register some of them to facilitate usage?

Basically ChemElementsBB.jl contains data on chemical elements (atomic weight, element number, name, symbol), and ChemFormulae.jl parses formulas and computes molecular weight. You can install ChemElementsBB just the same way, i.e. from the GitHub URL.

I will make the both packages ready and then register, but in the next couple of weeks will have no time, nor capacity. The coming holidays, then.

@Eben60 would it make sense to merge these tiny packages into a single package for chemical analysis? Something like ChemicalAnalysis.jl or Chemistry.jl that could be loaded by end-users with all these features glued together? If you are planning to register a package, that would be the one that we are all looking forward to install and use in projects.

I already encountered issues with ChemFormulae.jl. For instance, it doesn’t support formulas with ionization superscripts like “ZnFe3+2O4”. I thought that I should report the issue on the issue tracker of ChemFormulae.jl but the fact that the package was written in a few days, is not registered, etc. makes me think twice before trying to contribute code and become a maintainer.

Can I create a JuliaChemistry org and add you there as admin? Can we deprecate these tiny packages and start a fresh umbrella package in the org? Can we contact all the people behind the various chemistry packages to see if they want to join the boat? Can I take the lead here even though I don’t have a single chemistry package that I’ve written myself?

@juliohm , yes, surely you are welcome to open issues at my packages. It is however too early to contribute to the code before I consider these ready to go and register.

And yes, I am indeed going to make them ready and register as soon as I capacity to do that.

No, do not think it is better to deprecate these tiny packages and start a fresh umbrella package instead. I think it is the better way to have these 4 interoperable packages (with possibility to add more functionality later on through separate packages):

  • Mendeleev.jl
  • IsotopeTable.jl
  • ChemElementsBB.jl
  • ChemFormulae.jl

Yes, it would be great if you take the lead and create JuliaChemistry org, and you contact all the people behind the various packages. You can add me as another admin after you find at least one more person to join the boat.

And right now for the next weeks I have really other priorities.

1 Like

BTW (subtle) differences in the isotopic composition is an important geological marker.

I don’t know if anyone has told you that before, but these sentences that you write, which are purely based on “I” and “You”, are not very common in open source. The “We” is much more common and productive.

If you stop to think about it, you are just pushing people away. people who are willing to help. Try to practice more collaborative ways of working and communicating your ideas, it is worth it for a healthy career, whatever your plans are.

About the JuliaChemistry org, someone already created it: JuliaChemistry · GitHub

About the tiny packages, my point of view remains the same: they are confusing for end-users, and do not address the social issues around chemistry-related work in Julia.

About ChemFormulae.jl, I opened issues as suggested.

2 Likes

Good work and package! I wanted something like this about a year ago.