cortner / SKTB.jl

Other
9 stars 4 forks source link

`positions` not found #13

Closed cortner closed 7 years ago

cortner commented 7 years ago
using JuLIP, JuLIP.ASE, TightBinding
TB = TightBinding;
NRLTB = TightBinding.NRLTB;

β = 30.0
at = bulk("C", pbc = true, cubic = true)
bzq = TB.MPGrid(at, (4,4,4))
nrltb = TB.NRLTB.NRLTBModel(:C, TB.FermiDiracSmearing(β), bzquad = bzq, cutoff = :original);

TB.spectrum(nrltb,at)

this creates an exception on @ettersi 's linux laptop. (both in release and master of JuLIP)

cortner commented 7 years ago

I can't reproduce it on Kaiju.

cortner commented 7 years ago

@ettersi : Could you please do the following:

ettersi commented 7 years ago

I deleted both JuLIP and TightBinding (TightBinding depends on JuLIP, so Pkg.rm("JuLIP") does not actually remove JuLIP) and reinstalled, using Pkg.clone("git@github.com:cortner/TightBinding.jl.git") for TightBinding. The first time I forgot typing JULIPVISUALISE = false and got the same error message as before:

ERROR: KeyError: key "positions" not found
 in getindex(::PyCall.PyObject, ::String) at /home/simon/.julia/v0.5/PyCall/src/PyCall.jl:268
 in length at /home/simon/.julia/v0.5/JuLIP/src/ASE.jl:113 [inlined]
 in ndofs at /home/simon/.julia/v0.5/TightBinding/src/types.jl:68 [inlined]
 in band_structure(::TightBinding.TBModel{TightBinding.NRLTB.NRLHamiltonian{4,Function},TightBinding.FermiDiracSmearing}, ::JuLIP.ASE.ASEAtoms) at /home/simon/.julia/v0.5/TightBinding/src/calculators.jl:216
 in spectrum(::TightBinding.TBModel{TightBinding.NRLTB.NRLHamiltonian{4,Function},TightBinding.FermiDiracSmearing}, ::JuLIP.ASE.ASEAtoms) at /home/simon/.julia/v0.5/TightBinding/src/calculators.jl:229

Then I removed and added again, made sure I added the JULIPVISUALISE line and ran again, and now it crashes with

Intel MKL FATAL ERROR: Cannot load /home/simon/anaconda3/lib/python3.5/site-packages/numpy/core/../../../../libmkl_core.so.
ettersi commented 7 years ago

I suspect something is wrong with my Python/ASE installation, but I have no idea how to check that.

cortner commented 7 years ago

this is a bigger request: is there a way to switch to Python 2.7?

ettersi commented 7 years ago

Is that what you are using?

cortner commented 7 years ago

yes

cortner commented 7 years ago
Sunrise:~ ortner$ ipython
Python 2.7.12 |Anaconda custom (x86_64)| (default, Jul  2 2016, 17:43:17)
Type "copyright", "credits" or "license" for more information.
ettersi commented 7 years ago

Ok, I'll look into it

ettersi commented 7 years ago

It works! Hard to tell what really caused the issue, though, because changing the Python version also required me to reinstall ASE and matscipy. In any case, it seems to work so no point digging deeper for now.

cortner commented 7 years ago

I'm relieved. And to be on the safe side I just pushed an update to JuLIP that gives a warning if the Python version is > 2.7.x.