[CP2K-user] [CP2K:15252] Re: Printing electrostatic potential on each atom

Nicholas Winner nwi... at berkeley.edu
Wed Apr 28 20:53:08 UTC 2021


Coincidentally, it was just merged into pymatgen, so you can get it from 
the main branch. You can pull it from github ( 
https://github.com/materialsproject/pymatgen ) and follow installation 
instructions there are some basic tutorials for other functionality. Once 
you have pymatgen, you can get the average electrostatic potential around 
each atom by using the following code snippet. Simply provide (a) the path 
to the cube file you want to analyze, and (b) the radius of the sphere to 
use for averaging around the different species. The atom_averages will be 
returned in atomic units (Ha), but the radii are provided in Angstroms, as 
internally pymatgen uses eV and Angstroms.

from pymatgen.io.cube import Cube
cube = Cube('path_to_your_hartree_file')
radii = {'O': 0.871514401, ...}
atom_averages = cube.get_atomic_site_averages(atomic_site_radii=radii)

Here are the atomic site radii I personally use. Disclaimer: They are the 
values that are used internally by VASP for atomic site averaging. My own 
tests show that they transfer fine to CP2K. Let me know if you have issues.

-Nick

*atomic site radii*
Ac: 0.949509702
Ag: 1.089687061
Al: 1.29725804
Am: 1.0355554
Ar: 1.007092989
As: 1.028808863
At: 1.197141072
Au: 1.171867133
B: 0.956370674
Ba: 1.181016738
Be: 1.239553998
Bi: 1.358435791
Br: 0.985961987
C: 0.871514401
Ca: 1.078814977
Cd: 1.036283951
Ce: 0.918807009
Cl: 1.172653177
Cm: 1.109928571
Co: 1.012465916
Cr: 1.10367272
Cs: 1.095764548
Cu: 0.91348204
Dy: 0.965340843
Er: 0.857571445
Eu: 0.944011403
F: 0.893437208
Fe: 0.978689415
Fr: 1.006272353
Ga: 1.236680757
Gd: 0.954830498
Ge: 1.126694961
H: 1.106577076
H1: 1.106577076
He: 0.644015437
Hf: 1.208965988
Hg: 1.179009031
Ho: 0.970128474
I: 1.150347999
In: 1.437219142
Ir: 1.239202246
K: 1.069952195
Kr: 1.209265531
La: 0.916143122
Li: 1.215288872
Lu: 0.928082257
Mg: 1.037846085
Mn: 0.989049662
Mo: 1.19104237
N: 0.883769703
Na: 1.397780021
Nb: 1.036792122
Nd: 0.927736454
Ne: 0.911583912
Ni: 0.948389642
Np: 1.026944224
O: 0.899483759
Os: 1.158290899
P: 1.19512333
Pa: 0.955065185
Pb: 1.444092849
Pd: 1.084788257
Pm: 0.933436512
Po: 1.195151212
Pr: 0.920534844
Pt: 1.168113403
Pu: 1.036977614
Ra: 0.948110246
Rb: 1.480382262
Re: 1.150128956
Rh: 1.143610716
Rn: 1.216761009
Ru: 1.211902419
S: 1.209009282
Sb: 1.134558557
Sc: 1.273982785
Se: 1.046971046
Si: 1.233210468
Sm: 0.940676508
Sn: 1.363174078
Sr: 1.155565676
Ta: 1.214488968
Tb: 0.958209181
Tc: 1.128600762
Te: 1.152446887
Th: 0.956444797
Ti: 1.220368396
Tl: 1.437513192
Tm: 0.917283411
U: 0.964605202
V: 1.168608341
W: 1.145255565
Xe: 1.49732734
Y: 1.019887789
Yb: 0.924662502
Zn: 0.922234027
Zr: 1.030481454

On Wednesday, April 28, 2021 at 1:11:37 PM UTC-7 ban... at gmail.com wrote:

> Thank you, Nicholas. I am so sorry, but I have never used pymatgen. I 
> would love it if you could share your pymatgen extension with me and give 
> me some guidance/explanation for using it.
>
> Yours sincerely, 
>
> Lucas Bandeira
>
> On Tue, Apr 27, 2021 at 3:50 PM Nicholas Winner <n... at berkeley.edu> 
> wrote:
>
>> I don't believe CP2K can do this natively. What I have done is (1) load 
>> the V_HARTREE cube file into memory, (2) to define an atomic site radius 
>> based on each species, (3) create a spherical mask around the atomic site 
>> based on those radii in the 3D matrix of the cube's data, (4) then you can 
>> either integrate to get the total potential around the site, or more 
>> commonly you can get the average of the electrostatic potential.
>>
>> My development branch of pymatgen can do this, which I can share if you 
>> are can work with that. Alternatively, it should be in the main pymatgen 
>> branch in another week or two.
>>
>> -Nick
>> On Tuesday, April 27, 2021 at 11:42:43 AM UTC-7 ban... at gmail.com 
>> wrote:
>>
>>> Dear cp2k community, 
>>>
>>> I am performing some calculations analyzing adsorption on transition 
>>> metals, and I need to print the electrostatic potential on each atom in the 
>>> system. How can I do this?
>>>
>>> Yours faithfully,
>>>
>>> Lucas Bandeira
>>>
>>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "cp2k" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to cp... at googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/cp2k/8eb6f8ea-d621-4947-b955-6c7848734856n%40googlegroups.com 
>> <https://groups.google.com/d/msgid/cp2k/8eb6f8ea-d621-4947-b955-6c7848734856n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20210428/4b8ff8f3/attachment.htm>


More information about the CP2K-user mailing list