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

3d lattice construction fails in pytriqs.Base.Lattice #46

Open
leopo opened this issue Mar 2, 2012 · 6 comments
Open

3d lattice construction fails in pytriqs.Base.Lattice #46

leopo opened this issue Mar 2, 2012 · 6 comments
Labels

Comments

@leopo
Copy link
Contributor

leopo commented Mar 2, 2012

I am trying to construct a 3d simple cubic lattice using the lattice tools from

pytriqs.Base.Lattice.TightBinding

I construct the lattice as follows:

BL = bravais_lattice(Units = [(1,0,0) , (0,1,0), (0,0,1) ], Orbital_Positions= {"" : (0,0,0)} )

The code crushes due to check of the Units dimension in pytriqs/Base/Lattice/C++/bravais_lattice_and_brillouin_zone.cpp (l. 53) :
assert(dim_==2);
Is this some check left from debugging or the code is supposed to work for 2d lattices only?

@nstange
Copy link
Contributor

nstange commented Apr 16, 2013

Any news here? I've just run into the same issue.

@tayral
Copy link
Member

tayral commented Apr 16, 2013

This should be solved in branch 1.0, where the following code snippet works:

import pytriqs.lattice.tight_binding as tb
BL = tb.BravaisLattice(units = [(1,0,0) , (0,1,0), (0,0,1) ], orbital_positions= {"" : (0,0,0)} )

(note the new naming conventions)

@parcollet
Copy link
Member

Has it been tested in 1.0 ?
It seems we have removed in 1.0 the assert which was unnecessary, but I don't remember that any proper test where conducted...

@mferrero
Copy link
Member

Hi earlybirds! Well the assert has not been removed really. It's still there but not active when the code is compiled with -DNDEBUG (this is set by default when the build type is release). So I think we should test the code!

@tayral
Copy link
Member

tayral commented Apr 16, 2013

I've tested the dos for the cubic (3D) case, it looks correct

@nstange
Copy link
Contributor

nstange commented Apr 17, 2013

Thanks alot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants