Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to spglib_jll #265

Merged
merged 19 commits into from
Jun 24, 2020
Merged

Move to spglib_jll #265

merged 19 commits into from
Jun 24, 2020

Conversation

louisponet
Copy link
Contributor

@louisponet louisponet commented Jun 20, 2020

All tests work. Not sure if there are the same amount of warnings as on the master branch tests.

Copy link
Member

@mfherbst mfherbst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@louisponet Thanks very much for going through the effort to do this! I have a few nits, mostly wrt. formatting and naming. Regarding the implementation, what mainly bothers me is that some of your functions bleed out the C types from spglib, which should really be internal and only live within spglib.jl from my point of view.

I hope I was not too picky 😄.

src/external/spglib.jl Outdated Show resolved Hide resolved
src/external/spglib.jl Outdated Show resolved Hide resolved
src/external/spglib.jl Outdated Show resolved Hide resolved
src/external/spglib.jl Outdated Show resolved Hide resolved
src/external/spglib.jl Outdated Show resolved Hide resolved
src/external/spglib.jl Outdated Show resolved Hide resolved
src/external/spglib.jl Outdated Show resolved Hide resolved
src/external/spglib.jl Outdated Show resolved Hide resolved
test/bzmesh.jl Outdated
is_shift = ifelse.(kshift .== 0, 0, 1)
_, grid = spglib.get_stabilized_reciprocal_mesh(kgrid_size, identity,
num_kpts, _, grid = DFTK.spglib_get_stabilized_reciprocal_mesh(kgrid_size, identity,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you don't use num_kpts please also use an underscore for that arg.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I just had an idea about this: Basically what this tries to test is that we agree with spglib, so from that point of view the best way to test would be (contrary to what I said before) to directly do a ccall into spglib_jll from the test and bypass as much of the extra icing DFTK spglib.jl adds on top. You're call if you think that's too much effort to do or not ...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also the line starts to become a bit long ;)

test/bzmesh.jl Outdated Show resolved Hide resolved
Copy link
Member

@mfherbst mfherbst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! Almost done from my end.

test/bzmesh.jl Outdated Show resolved Hide resolved
test/bzmesh.jl Outdated
is_shift = ifelse.(kshift .== 0, 0, 1)
_, grid = spglib.get_stabilized_reciprocal_mesh(kgrid_size, identity,
num_kpts, _, grid = DFTK.spglib_get_stabilized_reciprocal_mesh(kgrid_size, identity,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I just had an idea about this: Basically what this tries to test is that we agree with spglib, so from that point of view the best way to test would be (contrary to what I said before) to directly do a ccall into spglib_jll from the test and bypass as much of the extra icing DFTK spglib.jl adds on top. You're call if you think that's too much effort to do or not ...

test/bzmesh.jl Outdated
is_shift = ifelse.(kshift .== 0, 0, 1)
_, grid = spglib.get_stabilized_reciprocal_mesh(kgrid_size, identity,
num_kpts, _, grid = DFTK.spglib_get_stabilized_reciprocal_mesh(kgrid_size, identity,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also the line starts to become a bit long ;)

src/external/spglib.jl Outdated Show resolved Hide resolved
src/external/spglib.jl Outdated Show resolved Hide resolved
src/external/spglib.jl Outdated Show resolved Hide resolved
src/external/spglib.jl Outdated Show resolved Hide resolved
src/external/spglib.jl Outdated Show resolved Hide resolved
src/external/spglib.jl Outdated Show resolved Hide resolved
src/external/spglib.jl Outdated Show resolved Hide resolved
@mfherbst
Copy link
Member

Ah also could you rebase against master at some point to prepare for the merge @louisponet, thanks!

Copy link
Member

@antoine-levitt antoine-levitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this!

src/bzmesh.jl Outdated Show resolved Hide resolved
src/external/spglib.jl Show resolved Hide resolved
src/external/spglib.jl Outdated Show resolved Hide resolved
src/external/spglib.jl Outdated Show resolved Hide resolved
src/external/spglib.jl Outdated Show resolved Hide resolved
@antoine-levitt
Copy link
Member

antoine-levitt commented Jun 21, 2020

In retrospect I'm not sure our tilde and not tilde notation was very good. We should maybe have chosen Sstar for what we call S and S for what we call Stilde, to emphasize Sstar works in reciprocal space and S in real space? Or is there any standard conventions here?

@mfherbst
Copy link
Member

Well the other point is that there is \tau and \tilde{\tau}. At that end \tau^\ast makes no sense either ...

@antoine-levitt
Copy link
Member

The parallelism between S and Stilde and tau and tautilde is not very good, actually. Stilde is a rotation in real space, S a rotation in recp space. tautilde is a translation in real space. tau is also a translation in real space

@antoine-levitt
Copy link
Member

I'll open another issue for that

@antoine-levitt
Copy link
Member

Some nitpicking but apart from that good for me!

@mfherbst mfherbst merged commit 6593f42 into JuliaMolSim:master Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants