JuliaMolSim / AtomsBase.jl

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

make sure AtomsBase plays nice with Crystalline.jl/Bravais.jl #31

Open rkurchin opened 2 years ago

rkurchin commented 2 years ago

https://github.com/thchr/Crystalline.jl

because this would just be really cool for geometry building etc.

...depending on how in-depth this goes, it could easily end up as a separate package...this issue is mainly here as a reminder...

mfherbst commented 2 years ago

I think @thchr would not mind implementing the AtomsBase interface or assist in making some of the features directly accessible on AtomsBase structures. Certainly something worth investigating in my opinion!

thchr commented 2 years ago

Yep, I would be interested in making connections to/compatibility between AtomsBase and Crystalline and/or Bravais easy. I don't have a complete picture of the various interfaces in AtomsBase (though I've followed your work here a bit), so I don't have a good idea of where such connections should be made - but I'd be up for trying to tie things together on the Crystalline/Bravais side.

I'm guessing there's already quite a bit of duplicated "structural" functionality between Bravais and AtomsBase - but it is probably not worth disentangling; a compatibility layer might be sufficient.

mfherbst commented 2 years ago

Well currently AtomsBase is just being rolled out. I think what could be useful is to sort of "port" the existing functionality in Crystalline/Bravais to the whole AtomsBase ecosystem. I agree that could possibly be achieved just by a compatibility layer.

thchr commented 2 years ago

One thing that I think could - possibly - be worth directly sharing is the specification of bases (DirectBasis and ReciprocalBasis) and coordinates in Bravais (DirectPoint and ReciprocalPoint). They're split up this way since that's how the transformation rules are split.

Even there though, there might be some undesirable differences from the AtomsBase point of view: e.g., bases are stored as (static) vectors of (static) vectors rather than a single (static) matrix.

EDIT: another issue is that Bravais always assumes the elements of points/bases to be Float64 type which clashes with the need here to use unitful types (I'm in photonics where we can get away with using dimensionless units, so I didn't think of units when I wrote this).