Code Monkey home page Code Monkey logo

Comments (4)

shyuep avatar shyuep commented on May 19, 2024

Hi Germain,

Thanks for reporting the issue. I have applied your fix and contributions.

As for the line-mode, I know that VASP uses Line-mode. But because of the way the Enum design pattern works, I can't use "-" in the class. In any case, VASP does not actually look for "Line-mode". They only look at the first letter of that line.

Regarding having pymatgen dev and stable versions on the same machine, one possibility is to use virtualenv. Another way is to simply fork the repo to your own Github repo and you can always work off your own fork of pymatgen. When you have some contributions that you would like to share with the community, you can submit a pull request and I can add them.

from pymatgen.

ok030320 avatar ok030320 commented on May 19, 2024

hi, i am new to vasp, and ran into this article
http://gvallver.perso.univ-pau.fr/?p=587
it is very helpful for me, and i applied to a ge-bulk system as an example to learn band structure (L-G-X)
there is an error when i get to the point of get_band_structure,
and i narrowed down the error in pymatgen/electronic_structure/bandstructure.py
class BandStructureSymmLine(BandStructure, MSONable):
......
self._branches.append({"start_index": b[0], "end_index": b[-1],
"name": (self._kpoints[b[0]].label + "-" +
self._kpoints[b[-1]].label)})
.....

and, here for my system, i have tried to None+"-"
(a NoneType and a string)
----error msg--------------------------
pymatgen/electronic_structure/bandstructure.py", line 741, in init
"name": (self._kpoints[b[0]].label + "-" +

TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

so, i changed to
self._branches.append({"start_index": b[0], "end_index": b[-1],
"name": (str(self._kpoints[b[0]].label) + "-" +
str(self._kpoints[b[-1]].label))})
and it worked.
is this a bug?

from pymatgen.

hautierg avatar hautierg commented on May 19, 2024

Hi,

Thanks for your report. Could you send me your vasp files? Send them to me to [email protected] . We'll take it from there.

from pymatgen.

hautierg avatar hautierg commented on May 19, 2024

I have looked into the files you sent.
Your KPOINTS file does not have label for each kpoint. this is mandatory for a band structure along symmetry lines.

It is:
K-points L-G-X
25
Line-mode
reciprocal
0.5 0.5 0.5
0 0 0

0 0 0
0.5 0.5 0

While it should be:

K-points L-G-X
25
Line-mode
reciprocal
0.5 0.5 0.5 L
0 0 0 G

0 0 0 G
0.5 0.5 0 X

I have applied a patch so a clearer exception is now raised when this happens.

Geoffroy

from pymatgen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.