# \[ANN\] Mendeleev.jl - accessing chemical elements data

**URL:** <https://discourse.julialang.org/t/ann-mendeleev-jl-accessing-chemical-elements-data/89804>\
**Category:** Package Announcements\
**Tags:** physics, chemistry\
**Created:** [November 5, 2022, 10:01am UTC](https://discourse.julialang.org/t/ann-mendeleev-jl-accessing-chemical-elements-data/89804 "2022-11-05T10:01:17Z")\
**Posts on this page:** 15\
**Page:** 2

<div class="post-metadata">

**Author:** ![Eben60](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/eben60/32/13475_2.png) [@Eben60](https://discourse.julialang.org/u/Eben60)\
**Post date:** [November 14, 2022, 2:39pm UTC](https://discourse.julialang.org/t/ann-mendeleev-jl-accessing-chemical-elements-data/89804/21 "2022-11-14T14:39:56Z")

</div>

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 🥲

---

<div class="post-metadata">

**Author:** ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Post date:** [November 14, 2022, 4:40pm UTC](https://discourse.julialang.org/t/ann-mendeleev-jl-accessing-chemical-elements-data/89804/22 "2022-11-14T16:40:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Eben60](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/eben60/32/13475_2.png) [@Eben60](https://discourse.julialang.org/u/Eben60)\
**Post date:** [November 14, 2022, 5:35pm UTC](https://discourse.julialang.org/t/ann-mendeleev-jl-accessing-chemical-elements-data/89804/23 "2022-11-14T17:35:46Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Post date:** [November 14, 2022, 5:46pm UTC](https://discourse.julialang.org/t/ann-mendeleev-jl-accessing-chemical-elements-data/89804/24 "2022-11-14T17:46:08Z")

</div>

> [@Eben60](#):
>
> And the big general question - WHO?

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.

---

<div class="post-metadata">

**Author:** ![Eben60](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/eben60/32/13475_2.png) [@Eben60](https://discourse.julialang.org/u/Eben60)\
**Post date:** [November 14, 2022, 5:58pm UTC](https://discourse.julialang.org/t/ann-mendeleev-jl-accessing-chemical-elements-data/89804/25 "2022-11-14T17:58:30Z")

</div>

> [@juliohm](#):
>
> you already have higher likelihood of being the “WHO” that the community needs.

May I repeat

> [@Eben60](#):
>
> I am definitely not going to lead these efforts.

---

<div class="post-metadata">

**Author:** ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Post date:** [November 14, 2022, 7:17pm UTC](https://discourse.julialang.org/t/ann-mendeleev-jl-accessing-chemical-elements-data/89804/26 "2022-11-14T19:17:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Eben60](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/eben60/32/13475_2.png) [@Eben60](https://discourse.julialang.org/u/Eben60)\
**Post date:** [November 16, 2022, 9:48pm UTC](https://discourse.julialang.org/t/ann-mendeleev-jl-accessing-chemical-elements-data/89804/27 "2022-11-16T21:48:26Z")

</div>

OK, we have it.

```julia
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](https://github.com/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.

---

<div class="post-metadata">

**Author:** ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Post date:** [November 16, 2022, 10:02pm UTC](https://discourse.julialang.org/t/ann-mendeleev-jl-accessing-chemical-elements-data/89804/28 "2022-11-16T22:02:48Z")

</div>

@Eben60 you should probably reconsider becoming the JuliaChemistry founder 🙂 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. ❤

---

<div class="post-metadata">

**Author:** ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Post date:** [December 2, 2022, 1:15pm UTC](https://discourse.julialang.org/t/ann-mendeleev-jl-accessing-chemical-elements-data/89804/29 "2022-12-02T13:15:11Z")

</div>

@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?

---

<div class="post-metadata">

**Author:** ![Eben60](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/eben60/32/13475_2.png) [@Eben60](https://discourse.julialang.org/u/Eben60)\
**Post date:** [December 2, 2022, 9:15pm UTC](https://discourse.julialang.org/t/ann-mendeleev-jl-accessing-chemical-elements-data/89804/30 "2022-12-02T21:15:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Post date:** [December 3, 2022, 11:03am UTC](https://discourse.julialang.org/t/ann-mendeleev-jl-accessing-chemical-elements-data/89804/31 "2022-12-03T11:03:21Z")

</div>

@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](https://juliapackages.com/c/chemistry) 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?

---

<div class="post-metadata">

**Author:** ![Eben60](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/eben60/32/13475_2.png) [@Eben60](https://discourse.julialang.org/u/Eben60)\
**Post date:** [December 3, 2022, 4:48pm UTC](https://discourse.julialang.org/t/ann-mendeleev-jl-accessing-chemical-elements-data/89804/32 "2022-12-03T16:48:28Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![Eben60](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/eben60/32/13475_2.png) [@Eben60](https://discourse.julialang.org/u/Eben60)\
**Post date:** [December 3, 2022, 5:26pm UTC](https://discourse.julialang.org/t/ann-mendeleev-jl-accessing-chemical-elements-data/89804/33 "2022-12-03T17:26:24Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Post date:** [December 3, 2022, 6:37pm UTC](https://discourse.julialang.org/t/ann-mendeleev-jl-accessing-chemical-elements-data/89804/34 "2022-12-03T18:37:58Z")

</div>

> [@Eben60](#):
>
> @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.
> 
> **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.

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](https://github.com/JuliaChemistry)

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.

---

<div class="post-metadata">

**Author:** ![jlapeyre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jlapeyre/32/4514_2.png) [@jlapeyre](https://discourse.julialang.org/u/jlapeyre)\
**Post date:** [December 8, 2022, 2:42pm UTC](https://discourse.julialang.org/t/ann-mendeleev-jl-accessing-chemical-elements-data/89804/35 "2022-12-08T14:42:42Z")

</div>

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

[Previous page](https://discourse.julialang.org/t/ann-mendeleev-jl-accessing-chemical-elements-data/89804.md?page=1)
