JuliaAtoms / AtomicLevels.jl

https://juliaatoms.org/AtomicLevels.jl
Other
12 stars 3 forks source link

Duplicated electron counting #74

Closed jagot closed 3 years ago

jagot commented 3 years ago

Ooops... https://github.com/JuliaAtoms/AtomicLevels.jl/blob/474942455987d94c745438d14493c3cfc3657302/src/configurations.jl#L487-L500

https://github.com/JuliaAtoms/AtomicLevels.jl/blob/474942455987d94c745438d14493c3cfc3657302/src/configurations.jl#L654-L664

Which should we keep? I'm slightly partial to num_electrons, since it's clearer, it's used in Atoms.jl (and count(atom) does not make much sense, compared to num_electrons(atom)), and count in Base has the connotations of "how many elements fulfill this predicate", i.e. count(>(0.5), rand(10)).

mortenpi commented 3 years ago

I agree, count(::Configuration) leaves it ambiguous what we're actually counting, so I'd stick with num_electrons. (Or nelectrons or nparticles?)