diff --git a/.DS_Store b/.DS_Store index 94e8e06..de7cbe1 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/README.md b/README.md index ab06d46..b395a83 100644 --- a/README.md +++ b/README.md @@ -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]) ``` @@ -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` diff --git a/examples/band_example.png b/examples/band_example.png new file mode 100644 index 0000000..7585af5 Binary files /dev/null and b/examples/band_example.png differ diff --git a/pyband b/pyband index e2dc768..ca38ad7 100755 --- a/pyband +++ b/pyband @@ -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', @@ -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) @@ -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)) @@ -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()]