-
Notifications
You must be signed in to change notification settings - Fork 76
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
How to generate dat file from output for further plotting #153
Comments
Hey Daniel.
You can use
Currently, there isn't. Though you I could add an option to save all the curves in a json file. A possible implementation would look like this pyprocar.dosplot(
code='vasp',
mode='stack_species',
orbitals = [4,5,6,7,8],
spins=[0,1],
clim=[0,1],
orientation='horizontal',
fermi=5.3017,
dirname=data_dir,
export_data='{path to file}.json'
) Then the json would look like this: {
"energies": values
"dos_total_spin-0": values
"dos_total_spin-1": values
"Sr-d_spin-0-projected": values
"O-d_spin-0-projected": values
"V-d_spin-0-projected": values
} Something like this. If you have any suggestions on how the format let me know! Best, Logan Lang |
Hi Logan, Thanks for your kind reply. I think it will be really nice if one can also get the data in traditiional '.dat' format to be plotted in gnuplot etc. But JSON solution should also work! cheer, |
Hey Daniel, I have been quite busy, I will get to this tomorrow afternoon. It shouldn't take me long to do this. Logan Lang |
Hey Daniel, I have added an option to export the data into a csv,json,dat,txt file. Here what the .dat file looks like. It has a header column, then the data. The column names should be self described.
Here is how to do this: pyprocar.dosplot(
code='vasp',
mode='stack_species',
orbitals = [4,5,6,7,8],
spins=[0,1],
clim=[0,1],
# orientation='horizontal',
orientation='vertical',
fermi=5.3017,
grid=True,
dirname=data_dir,
export_data_file=os.path.join(curent_dir,'data.dat'),
# export_data_file=os.path.join(curent_dir,'data.csv'),
# export_data_file=os.path.join(curent_dir,'data.json'),
# export_data_file=os.path.join(curent_dir,'data.txt'),
) I have pushed my changes to the main branch. I am not going to immediately update pypi or conda, as there are other issues I am working on. So if you want to use the most updated changes clone the repository and install that version git clone [email protected]:romerogroup/pyprocar.git
cd pyprocar
pip install -e . Tell me if there is anything else you would like. Logan Lang |
Hi Logan,
I am really thankful for your timely support. I am sure other users of
pyprocar will also benefit from this.
Best regards
Danial,
…On Fri, 19 Jul 2024, 02:33 Logan Lang, ***@***.***> wrote:
Hey Daniel,
I have added an option to export the data into a csv,json,dat,txt file.
Here what the .dat file looks like. It has a header column, then the data.
The column names should be self described.
energies dosTotalSpin-0 dosTotalSpin-1 spinChannel-0_orbitals-4:5:6:7:8_atoms-2:3:4_spinProjection-0:1 spinChannel-0_orbitals-4:5:6:7:8_atoms-0_spinProjection-0:1 spinChannel-0_orbitals-4:5:6:7:8_atoms-1_spinProjection-0:1 spinChannel-1_orbitals-4:5:6:7:8_atoms-2:3:4_spinProjection-0:1 spinChannel-1_orbitals-4:5:6:7:8_atoms-0_spinProjection-0:1 spinChannel-1_orbitals-4:5:6:7:8_atoms-1_spinProjection-0:1
-36.5055 0.0 -0.0 0.0 0.0 0.0 -0.0 -0.0 -0.0
-36.497699999999995 0.0 -0.0 0.0 0.0 0.0 -0.0 -0.0 -0.0
Here is how to do this:
pyprocar.dosplot(
code='vasp',
mode='stack_species',
orbitals = [4,5,6,7,8],
spins=[0,1],
clim=[0,1],
# orientation='horizontal',
orientation='vertical',
fermi=5.3017,
grid=True,
dirname=data_dir,
export_data_file=os.path.join(curent_dir,'data.dat'),
# export_data_file=os.path.join(curent_dir,'data.csv'),
# export_data_file=os.path.join(curent_dir,'data.json'),
# export_data_file=os.path.join(curent_dir,'data.txt'),
)
I have pushed my changes to the main branch. I am not going to immediately
update pypi or conda, as there are other issues I am working on. So if you
want to use the most updated changes clone the repository and install that
version
git clone ***@***.***:romerogroup/pyprocar.gitcd pyprocar
pip install -e .
Tell me if there is anything else you would like.
Logan Lang
—
Reply to this email directly, view it on GitHub
<#153 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BD2325NR6RGEZMD52B4I4MDZM737TAVCNFSM6AAAAABKWBZD4OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZXGEZTOMZZGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Dear All,
I am new to using PYPROCAR. I have two questions which will be really helpful for me:
Is there a possibility to change format of the plotting, for example, a 'stacked_species' comes with filled areas by default. Is there any way of getting normal curve without filled areas
Can I get the output of pyprocar in '.dat' format for further plotting (e.g. gnuplot) and analysis.
Thanks!
Danial Asad
The text was updated successfully, but these errors were encountered: