Skip to content

Commit

Permalink
2020-02-01 crushed a bug preventing to use same different spd on same…
Browse files Browse the repository at this point in the history
… atoms, updated readme.
  • Loading branch information
Chengcheng-Xiao committed Feb 1, 2020
1 parent ea273b4 commit d86eeda
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
Binary file modified .DS_Store
Binary file not shown.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ where in the arguments of `--spd`:
More command line arguments can be found by `pyband -h`.

For Mac users, [iterm2](https://iterm2.com/) combined with [imgcat](https://iterm2.com/documentation-shell-integration.html) can be used to show inline image. Just modify the last line from:
For Mac users, [iterm2](https://iterm2.com/) combined with [imgcat](https://iterm2.com/documentation-shell-integration.html) can be used to show inline images. Just modify the last line from:
```
call(['feh', '-xdF', opts.bandimage])
```
Expand All @@ -88,6 +88,14 @@ to
call(['~/.iterm2/imgcat', opts.bandimage])
```

more example:

`pyband --occ '3 4' --spd '1' --occMc 'red' --occ '3-4' --spd '2-3' --occMc 'blue'`

![band_example_1](examples/band_example.png)



## pydos

This script is used to plot partial density of states (pDOS) from VASP `PROCAR`
Expand Down
Binary file added examples/band_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 5 additions & 2 deletions pyband
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ def command_line_arg():

par.add_option('--spd',
action='append', type="string", dest='spdProjections',
default=None,
default=[],
help='Spd-projected wavefunction character of each KS orbital.')

par.add_option('--lsorbit',
Expand Down Expand Up @@ -517,6 +517,7 @@ if __name__ == '__main__':
opts.occMarkerSize = occMs

whts = []
iterater = 0
for occ in opts.occ:
# CCX 2020-01-31 prase input range of atoms
occTmp = praseAtoms(occ)
Expand All @@ -540,7 +541,7 @@ if __name__ == '__main__':
print "number of projections does not match number of occupations"
sys.exit(0)
# set angall to corresponding item of spdProjections
angall = opts.spdProjections[opts.occ.index(occ)]
angall = opts.spdProjections[iterater]
# praser input spd information
angTmp = prasespds(angall)
angularM = list(set(angTmp))
Expand All @@ -552,6 +553,8 @@ if __name__ == '__main__':
else:
whts.append(WeightFromPro(opts.procar, whichAtom=occAtom,
lsorbit=opts.lsorbit))
iterater += 1

else:
# if opts.spdProjections:
# angularM = [int(x) for x in opts.spdProjections.split()]
Expand Down

0 comments on commit d86eeda

Please sign in to comment.