by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Louis Ponet
@louisponet
oh sorry mybad didn't look at those yet
Antoine Levitt
@antoine-levitt
yup there it is
Michael F. Herbst
@mfherbst
Yes there is an open issue and yes we are. The main reason is that the python layer does a few things for you, which the julia wrapper does not
we have not yet bothered porting that stuff to julia, but I agree that it would be nice to have it all in julia :smile:
Louis Ponet
@louisponet
I could have a look at that maybe, I've used it a little a package of my own before
Michael F. Herbst
@mfherbst
especially that needing to install a python library (manually) on top is a bit annoying.
oh any help in this direction would be appreciated!
Antoine Levitt
@antoine-levitt
yeah it's the only python lib that we need for "core" stuff
yeah for sure that'd be awesome!
Michael F. Herbst
@mfherbst
One problem is that spglib does a strange error handling, which you somehow need to hook into. Also it does some setup and mapping behind the scenes, since the raw C interface is a bit low-level.
Louis Ponet
@louisponet
alright! I'll make a PR if I get it all to work!
oh I see, that I didn't do before
Antoine Levitt
@antoine-levitt
well to be fair spglib's error handling is "oh that didn't work"
Louis Ponet
@louisponet
the error stuff
Antoine Levitt
@antoine-levitt
so not that useful to have
Michael F. Herbst
@mfherbst
by the way: I thought about relocating libsymspg to JuliaMolSim as well. unkcpz said he was pretty busy at the moment, so he was happy to have me take over maintaining Libxc. So if you want to get involved, maybe he would be happy to transfer libsymspg.jl as well?
Yes the error messages are not that helpful, but I fear you might have to properly set / reset the error codes for stuff to work smoothly ... the great low-level world of C ...
Louis Ponet
@louisponet
my god, for the life of me I cannot get spg_get_symmetry to give me the correct symmetries XD
Antoine Levitt
@antoine-levitt
yeah, join the club
Louis Ponet
@louisponet
I'm trying the Si unit cell, gives me 16 symops
Antoine Levitt
@antoine-levitt
I've spent a lot of time on spglib stuff...
Louis Ponet
@louisponet
rotations seem fine, but translations are all 0's
Antoine Levitt
@antoine-levitt
that's good no?
Louis Ponet
@louisponet
but aside from that it's supposed to give me 48
Antoine Levitt
@antoine-levitt
hm yeah DFTK gives me 48 with some translations in there
Louis Ponet
@louisponet
right, and from the 16, the third one only works with a partial translation
what the hell is going on... I also cross-checked with QE and it's giving me also 48
Antoine Levitt
@antoine-levitt
usual suspect is row-major vs column-major but that shouldn't matter for silicon
are your atomic coordinates properly in relative coordinates?
Louis Ponet
@louisponet
yea, one particularly disturbing thing is that if I put in a 2x3 position matrix, it's the same result as a 3x2 position matrix...
yea [-0.125 -0.125 -0.125; 0.125 0.125 0.125]
Antoine Levitt
@antoine-levitt
try with just one atom
well then it might be a column vs row thing no?
Louis Ponet
@louisponet
I tried both and nothing helps :p
pff I'll struggle on I guess
Antoine Levitt
@antoine-levitt
even with one atom at 0 it doesn't work properly?
Louis Ponet
@louisponet
then I get 48
if I put the atoms at 0 and 0.5, I get 96
with nonzero translations, weird
Louis Ponet
@louisponet
I'm dumb, transposes don't do anything to the memory layout unless collected.... seems to work now!
Michael F. Herbst
@mfherbst
By the way: Be careful about the ordering. spglib uses a different convention for the ordering of the lattice vectors and cell objects in C++ and python, see https://spglib.github.io/spglib/python-spglib.html#crystal-structure-cell
Louis Ponet
@louisponet
yea, column vs row right? In DFTK I think it's also column?
Antoine Levitt
@antoine-levitt
Yes like in Julia
Louis Ponet
@louisponet
I think I've got spglib work, except for the error messages part
Antoine Levitt
@antoine-levitt
Awesome! Error handling for spglib is not so important...
Michael F. Herbst
@mfherbst
Yes thanks for the PR! Awesome work. I made a few review comments ... I hope I'm not being too picky on you!
Louis Ponet
@louisponet
I've fixed them, running tests now!
There was one thing I was wondering about, in general I always tend to add types to the arguments in my code (didn't do it now because it seems in DFTK in general that's not done), because it kind of helps me to understand what a function expects me to throw in. Is this a deliberate choice not to do that in DFTK?
Michael F. Herbst
@mfherbst
yes it is. The less types you put the more flexible is your interface