JuliaMolSim / AtomsBase.jl

A Julian abstract interface for atomic structures.
https://juliamolsim.github.io/AtomsBase.jl/
MIT License
84 stars 18 forks source link

Include some special casing for chemical species #126

Closed mfherbst closed 11 hours ago

mfherbst commented 3 weeks ago

Adds a few more special cases to the handling of chemical species plus a bit of cleanup.

:X is fairly common in atomic structure files as a "dummy atom" with atomic number 0. We can either force everyone to drop such atoms before using our stuff or include support here.

Here I am proposing to add this special case along with :T for tritium.

Note that I'm changing the Z -> data cache from an array to a Dict. Not sure if that has big performance implications, one could also handle this differently. @cortner probably knows if this may be an issue.

cortner commented 3 weeks ago

I suggest to discuss any further changes to chemical species with @tjjarvinen -- there is a definite need to overhaul this and I understand he has a concrete plan.

cortner commented 3 weeks ago

Note that I'm changing the Z -> data cache from an array to a Dict. Not sure if that has big performance implications, one could also handle this differently. @cortner probably knows if this may be an issue.

I doubt this matters in practice.

cortner commented 3 weeks ago

I don't mind about :T and :X, I have no strong views. I do suggest though that any atoms of type :X have no units...

tjjarvinen commented 3 weeks ago

Yes, I have plan and can make PR over weekend. After that we can discuss how to proceed.

mfherbst commented 3 weeks ago

Ok sounds good.

mfherbst commented 2 weeks ago

What's the status with respect to the overhaul of ChemicalSpecies?

The inclusion of 0 / :Z is blocking for me in the move to AtomsBase 0.4. If redesigning ChemicalSpecies will take some time (fine for me), could we get this minimal modification merged ?

tjjarvinen commented 2 weeks ago

I was busy moving to back Europe the last week. The new version only needs masses added for isotopes and few other small things. I should be able to do it by tomorrow.

mfherbst commented 11 hours ago

Superseded by #130