I am using VASP to collect bader charge data for a surface. In Avogadro, how would I create a label for each atom with its bader charge?
Thank you!
I am using VASP to collect bader charge data for a surface. In Avogadro, how would I create a label for each atom with its bader charge?
Thank you!
There are two steps to that:
If the VASP reader isnāt grabbing the charge data, please post an example so the parser can be tweaked.
Thank you for responding so quickly! It seems as though the reader isnāt grabbing the charge data. I am effectively just appending the bader charge data to either a POSCAR file or an xyz. If there is a standard format that can easily be read in, I can simply modify my file. The xyz version of what Iāve been trying so far is attached.
new3.xyz (8.7 KB)
What does the POSCAR look like?
You might want to look at the extended XYZ format created by ASE:
https://wiki.fysik.dtu.dk/ase/ase/io/formatoptions.html#extxyz
For example, adding charge:R:1
to the header, like
8
Lattice="5.44 0.0 0.0 0.0 5.44 0.0 0.0 0.0 5.44" Properties=species:S:1:pos:R:3:charge:R1
Si 0.0000 0.0000 0.0000 0.0
Si 1.3600 1.3600 1.3600 0.0
Si 2.7200 2.7200 0.0000 0.0
Si 4.0800 4.0800 1.3600 0.0
Si 2.7200 0.0000 2.7200 0.0
Si 4.0800 1.3600 4.0800 0.0
Si 0.0000 2.7200 2.7200 0.0
Si 1.3600 4.0800 4.0800 0.0
But the VASP reader can be tweaked. Where should it read the Bader charges?
I made a file as you described, and Avogadro reports that it canāt read the file. Is the file not supposed to have the extension extxyz? I also tried keeping the extension as xyz and the partial charges werenāt read in.
If the VASP reader were to be tweaked, perhaps a + or - before a column could be an indicator that charge values are being provided.
Can you please upload both the POSCAR file and the extended xyz file that wonāt open so that I and others can have a look at them? You can get round the limitations on allowed file types by adding .txt
to the end of the filename.
new4.xyz (8.5 KB)
POSCAR.txt (11.5 KB)
Isnāt there CHGCAR
or something like that?
Let me take a step back. What are you trying to accomplish? Youāre running VASP and you want to add partial charge labels. How are you doing the Bader analysis? In VASP or another tool?
I have an ACF.dat file that contains the charges from the bader charge analysis.
ACF.txt (16.0 KB).
I subtract each charge from the appropriate number of valence electrons considered by the pseudopotential (Available pseudopotentials - VASP Wiki).
I could add these computed values to any kind of input file to avogadro. I currently have a POSCAR so this is easiest, but xyz is certainly also possible.
Iād probably suggest doing that through the extended XYZ format. At the moment, the reader doesnāt look for charges (or other quantities) beyond the lattice vectors and the Cartesian coords, but that can be patched pretty easily. (e.g., Properties="species:S:1:pos:R:3:charge:R1
)
select:I:1
also seems useful (e.g., for selected atoms)
Anyway, in the meantime, once you have the charges in you can now display them as atom labels, e.g. -0.12.
Okay, with this patch, extended XYZ should read atomic charges:
I have a few questions. How do I access these patches? Do I need to be using Avogadro 2, and do I somehow have to pull from github (I donāt have a ton of experience with github). Secondly, are you expecting a file with the extension exyz, extxyz, or simply xyz (with modified format internally).
Thank you!
Yes, you need to be using Avogadro2, for example the nightly builds on Install ā Avogadro 1.99.0 documentation
Yes, itās currently expecting either file.exyz
or extxyz
but it will also figure it out if itās file.xyz
.
Hope that helpsā¦
Go to View => Rendering Settings and turn off the Ambient Occlusion (and possibly the Fog as well)
The real-time shadows are great, but the effect still needs some tweaking.
That worked. Thank you!
I now have a unit cell with partial charges. When I repeat the cell (using supercell), is there a way to also repeat the partial charges and keep creating bonds? I attached the single cell case and the repeated cells.
Adding bonds to the supercell is on the todo list: building supercell adds atoms without bonds Ā· Issue #655 Ā· OpenChemistry/avogadrolibs Ā· GitHub
Iām less sure about copying partial charges. Right now the code invalidates the partial charges (among other things) when the molecule changes. Thatās obviously the right thing to do in most cases. Seems like it should be okay when making a supercell, but Iād need to think a bit about potential exceptions.