Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_vasp_dos_projected_onto_site_centered_lm_spherical_harmonics_sp.sh #1

Open
SidraFirdous opened this issue Mar 27, 2019 · 2 comments

Comments

@SidraFirdous
Copy link

Thank you for the script.

If, rather than a range, we need to sum the contributions of three discrete atoms, lets say atoms 1, 3, 5, how do we do this"

@ondrejkrejci
Copy link
Collaborator

Dear Sidra,

unfortunately Eero, who wrote the original scripts, is not here anymore. I have to say, that I cannot find any easy way, how to change the script to address your problem.
There are two ways, how to do this:

  1. st long and needed a lots of work with bash terminal, but it can also serve as a starting point how to learn some programming:

i) you'll run the script several times and then make several files out of it:
./get_vasp_dos_projected_onto_site_centered_lm_spherical_harmonics_sp.sh OUTCAR DOSCAR 1 1; mv gvd_spin_up_total_dos_shifted.dat gvd_up_1.dat; mv gvd_spin_down_total_dos_shifted.dat gvd_dn_1.dat; ./get_vasp_dos_projected_onto_site_centered_lm_spherical_harmonics_sp.sh OUTCAR DOSCAR 3 3; mv gvd_spin_up_total_dos_shifted.dat gvd_up_3.dat; mv gvd_spin_down_total_dos_shifted.dat gvd_dn_3.dat; ./get_vasp_dos_projected_onto_site_centered_lm_spherical_harmonics_sp.sh OUTCAR DOSCAR 5 5; mv gvd_spin_up_total_dos_shifted.dat gvd_up_5.dat; mv gvd_spin_down_total_dos_shifted.dat gvd_dn_5.dat;

ii) use simple bash & awk script to give you everything into wanted file; the script should look like this:
#!/bin/bash

down spin

paste gvd_dn_1.dat gvd_dn_3.dat gvd_dn_5.dat | awk '{print $1 $2+$4+$6}' > gvd_dn_sum.dat

echo "spin down done"

up spin

paste gvd_up_1.dat gvd_up_3.dat gvd_up_5.dat | awk '{print $1 $2+$4+$6}' > gvd_up_sum.dat

echo "spin up done"

you save it as "sum_dos_awk.sh" and use "chmod u+x sum_dos_awk.sh" in terminal and then you can run it.

2nd option is to use some other way, I wrote myself an mathematica notebooks that can be used for plotting of DOS with/without spin-polarization from various DFT codes (DOS_plot_and_view...,nb files). They can be found in https://github.com/ondrejkrejci/MathemticaForDFTnSPM

You can plot single atoms, range, or any lists, there.

Unfortunately I don't have any documentation yet, but you can write me and I can try to explain what you will not understand.

Hope this will help.
Regards,
Ondrej

@SidraFirdous
Copy link
Author

Dear Ondrej,
Thank you so much for your detailed answer and for your willingness to help.
Also, thank you for sharing your Mathematica notebooks. I don't have much experience with Mathematica, but I will definitely ask for help if I start using them.

Best regards,
Sidra

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants