Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Sep 17 14:22
    antoine-levitt commented #527
  • Sep 17 14:16
    umbriquse commented #527
  • Sep 17 10:45
    antoine-levitt commented #527
  • Sep 17 10:19
    antoine-levitt commented #527
  • Sep 16 18:41
    umbriquse opened #527
  • Sep 16 08:08
    antoine-levitt commented #526
  • Sep 16 07:59
    Harrykjg-physics opened #526
  • Sep 05 12:13
    LaurentVidal95 synchronize #518
  • Aug 31 08:21
    LaurentVidal95 synchronize #518
  • Aug 30 15:29
    mfherbst synchronize #524
  • Aug 30 15:29

    mfherbst on printing

    Split up model and basis (compare)

  • Aug 30 14:41
    LaurentVidal95 synchronize #518
  • Aug 30 13:59
    mfherbst synchronize #524
  • Aug 30 13:59

    mfherbst on printing

    Review 1 (compare)

  • Aug 29 20:08
    mfherbst synchronize #525
  • Aug 29 20:08

    mfherbst on periodic-problems-docs

    Fixes (compare)

  • Aug 29 19:55
    mfherbst labeled #525
  • Aug 29 19:54
    mfherbst opened #525
  • Aug 29 19:53

    mfherbst on periodic-problems-docs

    Wrote notes, untested Some fixes (compare)

  • Aug 28 20:13
    mfherbst synchronize #524
Antoine Levitt
@antoine-levitt
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
Louis Ponet
@louisponet
yea, I agree on that, but wouldn't it make sense to the add the widest type allowed rather than basically ::Any?
Michael F. Herbst
@mfherbst
so if you (or someone else) implements an interface which deliberately or by accident resembles let's say an Array interface or a matrix or something like that that the code will just work
well but doing nothing is equivalent to ::Any
Ah sorry ... misunderstood
well no because the point is that you want to decouple the brain of the developer as much as possible from the brain of the user
Louis Ponet
@louisponet
this is for example one of the issues I have very often working with python code, I look at a function and it's arguments, and I have no clue what it expects of me
then I need to go through the function body to understand what it's doing
Michael F. Herbst
@mfherbst
just because you think that should be an AbstractArray does not mean that I as the user intend to use it with an AbstractArray. But if the code still works with my user defined type than it's really annoying if the type annotation prevents it
well ideally the function and argument name makes it clear