Closed shyuep closed 7 years ago
I have nothing to do with this. I coded BSDOSPlotter only. I'm happy to support the plotter I wrote but that does not put me on the hook for fixing previous plotting codes that I had no hand in writing (and frankly never use).
Honestly pymatgen should just encourage use of BSDOSPlotter...
@computron Ok. In that case, unless anyone has objections in the next one week or so and/or fixes BSPlotterProjected, I will just completely delete the old BS plotter.
A few notes:
I will let you figure out (i). For (ii), as far as I can tell, BSPlotterProjected does allow you to specify sites, but given that it does not work right now, it is not a relevant consideration. I would suggest making BSDOSPlotter more flexible to allow those kind of projections, which I don't think is difficult at all.
The current BSPlotterProjected takes in a complicated list of orbitals and site numbers, which does not even seem to be zero-index based. Unless someone takes the effort to fix this, I am inclined to delete it because it is unusable at the moment anyway.
Ok I don't see any problems with finishing (i) this week. For the site projections, I'll code it when I need it but would certainly be happy to see it happen w/o my involvement.
I’ll look at this.
On the long-term, merging all in BSDOSPlotter could be a good move but we have to make sure we do not loose functionality.
Geoffroy
On 21 Aug 2017, at 02:16, Anubhav Jain notifications@github.com wrote:
Ok I don't see any problems with finishing (i) this week. For the site projections, I'll code it when I need it but would certainly be happy to see it happen w/o my involvement.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/materialsproject/pymatgen/issues/795#issuecomment-323621151, or mute the thread https://github.com/notifications/unsubscribe-auth/AA3l935i_b5CKsVHOcIUTBxZNXMgPMt8ks5saMxBgaJpZM4O8rnG.
Dear all,
I coded the "get_projected_plots_dots_patom_pmorb" method. I cloned the newest pymatgen and checked it. From my first look it works. I think the point might be at the incorrect site-numbers of "Cu" and "O" you supported ({'Cu': [3, 5], 'O': [1]}). These numbers should be complied with structure computed. Actually, if you give wrong site numbers, you will get error and notification (_number_of_subfigures method deals with this). When I check on my own computer, for instance, I put {'Cu': [3, 5], 'O': [1]} and get
ValueError: You put wrong site numbers in 'dictpa[O]': 1.
I do not know why you did not see something like that. Could you start with change in line 136 of "~/pymatgen/electronic_structure/tests/test_plotter.py", for example, {'Cu': [2], 'O': [3,4]}, and recheck again.
Best regards, Viet-Anh HA.
I am not sure what you are referring to. I tried
plotter.get_projected_plots_dots_patom_pmorb(
{'Cu': ['dxy', 's', 'px'], 'O': ['px', 'py', 'pz']},
{'Cu': [2], 'O': [3, 4]}
)
and I get the wrong site numbers error.
The original version gave me the error I wrote above.
Note that I am running Python 3.6, not 2.7. What I noticed is that you used some calls to map. In python 3.6, map returns a generator, not a list. A generator has no len.
I just pushed something which I think will fix it.
I should note that the structure in the BS object is O O Cu Cu Cu Cu species order. I am not sure why you think Cu is 2 and O is 3 and 4. In any case, does it work with zero indexing or is it 1 index? I tried 0 and it didn't work.
@shyuep I checked with AlCuO2 structure, thus, the orders of O and Cu are different. The index should be >=1. I am running with python 2.7. I will continue to check.
@shyuep The errors are at map call as you said. I used this twice and now I correct by putting "map" as an argument of "list" function, list(map(...)). For sure, I checked and it works for both python 2.x and python 3.x. I pushed my changes to my pymatgen version on github and asked for merging.
System
Summary
Example code
See code in the corresponding test.
Suggested solution (if any)