JuliaMolSim / DFTK.jl

Density-functional toolkit
https://docs.dftk.org
MIT License
442 stars 90 forks source link

Struct for `composition`? #57

Closed antoine-levitt closed 4 years ago

antoine-levitt commented 4 years ago

We pass around composition a lot and end up documenting it in several places. Should we just give it a struct?

mfherbst commented 4 years ago

That's not a bad idea. I thought about it before and wanted to leave it until we see more clearly how we need it.

One advantage would be that it would be easier to hide some pymatgen details for things such as doubling the unit cell for supercell sampling, which is definitely something we'll be using a lot more in the future.

antoine-levitt commented 4 years ago
antoine-levitt commented 4 years ago

Why Species and not Atom, btw?

antoine-levitt commented 4 years ago

The reason I'm asking is because with Atom I can figure out what its plural is :D

mfherbst commented 4 years ago

Because in coarse-graining methods the entities of the unit cell might not be atoms, but more generic species :P

mfherbst commented 4 years ago

Plural is boring: species as well ... see wiktionary

antoine-levitt commented 4 years ago

Yeah but species::Vector{Species} is weird.

mfherbst commented 4 years ago

Agreed ... I don't have a better idea at the moment however. I'm also not in favour if "atoms" to be fair.