plotting the charge density difference from cube file

S Ling lingsa... at gmail.com
Tue Mar 10 23:02:31 UTC 2015


You can plot it using the volume slice representation within VMD, or you 
can extract the values (let's say along the He-He bond axis and in the XZ 
plane) from the cube file and plot the data using other softwares. The cube 
file contains electron density difference at each grid point, and you 
should be able to find the number of grid points along each X/Y/Z axis in 
the begining of your cube file. Then you just need to correlate the 
electron density difference at each grid point with the actual cartesian 
coordinates of that grid point, and with these information, you can plot 
the electron density difference in whichever way you prefer. Be careful of 
the units in the cube file.

SL

On Tuesday, March 10, 2015 at 9:19:37 PM UTC, Xun Wang wrote:
>
> Thanks! I have one follow-up question about this: How can I get the 
> one-dimensional density difference plot from the cube file ?
>
> On Monday, March 9, 2015 at 6:52:47 PM UTC-4, S Ling wrote:
>>
>> This is not a CP2K related problem. 
>>
>> According to my understanding, you should first perform calculations for 
>> each single He atom placed at positions in the dimer, and you print out 
>> electron density cube files of each He atom, and then you sum them up, 
>> let's say you have cube file 1. Then you perform a calculation for the He 
>> dimer, and you print out the electron density cube file 2 (you named it 
>> rut_density). Finally, you take the difference of the two cube files by 
>> subtracting one from the other.
>>
>> To manipulate the cube files, e.g. summation or subtraction, you can use 
>> the cubecruncher tool supplied with CP2K, see $CP2K/cp2k/tools/cubecruncher 
>> (where $CP2K is the main directory of your CP2K source code). 
>> Alternatively, you can use the cubman utility of Gaussian 09 to perform the 
>> cube file manipulations.
>>
>> SL
>>
>> On Monday, March 9, 2015 at 7:07:52 PM UTC, Xun Wang wrote:
>>>
>>> Hello,
>>>
>>> I am a new user to cp2k and I would like to know how I can plot the 
>>> atomic density difference from the cube file.
>>> In my calculation of He dimer, I added the following lines to my input 
>>> file to get the cube file. 
>>>   
>>>  &E_DENSITY_CUBE 
>>>   
>>>  FILENAME ./rut_density 
>>>   
>>>  &END E_DENSITY_CUBE 
>>>
>>> I would like to get a plot as figure 2 in the following literature: 
>>> http://scitation.aip.org/content/aip/journal/jcp/117/24/10.1063/1.1522715
>>>
>>> I appreciate your help me with this!
>>>
>>>
>>> Xun
>>>  
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20150310/3dfb0005/attachment.htm>


More information about the CP2K-user mailing list