Dear professor Andrei Postnikov,
Thank you very much for your kindly reply!

2010-07-24



Guangping Zhang
---------------------------------------------------------
网易闪电邮(fm.163.com),收发邮件、快如闪电!



发件人: [email protected]
发送时间: 2010-07-24 13:50
主 题: Re: Re: Re: [SIESTA-L] about the DM file
收件人: [email protected]



Dear Guangping Zhang, 
I do not know the details, and do not have much to add. 
Still: 
In the periodic case, one needs to keep trace of the overlaps, 
and hence DM elements, with atoms in neighbouring unit cells; 
the corresponding bookkeeping is done through the construction 
of "naive supercell" - search for these words in the output. 
So - yes, the big numbers refer to basis functions in translated cells. 
This is one of the reasons DM is not 
stored in a straightforward square form 
(another reason being its sparceness), but in a "rectangular" form. 
Its lines run through ALL basis functions in the unit cell, and 
the columns - so to say, through all basis functions in "naive supercell". 
However, they are not written explicitly, but only non-zero elements 
with their adresses. Note that non-zero elements are numbered as 
they come, they don't have to follow in the order of increasing basis 
functions. If you'd recover the full rectangular form (with 
a lot of zeros) you'll probably see that the its left-hand square, 
i.e. the "unit-cell only" part of it, is indeed Hermitian (so I think). 
In my DMtune tools, I tried to manipulate the DM elements, 
either on-site (the whole block refering to a given atom), 
or the whole matrix. 
I think a useful exercise, in order to realy understand the structure 
of DM file, would be to write a "deciphering machine" - explicitly 
identifying each appearing non-zero element by 
(cell/atom/basis function) on both sides. 

Good luck 

Andrei Postnikov 


> Sorry to trouble you again.I find in the *DM file for periodical system. 
> For each row,the column index, some times, not only from smaller to bigger 
> but also appear a number bigger than Norbit(total number of basis in a 
> unit cell).Just like this: 
>           1 
>           2 
>           3 
>         ..... 
>          25 
>          26 
>         828 
>         830 
>         831 
>         832 
>          32 
>          33 
>          34 
>          35 
> if the total number of the basis in a unit cell is 398, 828 indicates the 
> 32th (mod(828,398)) basis in the neighbour unit cell? 
> Thanks in advance! 
> 2010-07-24 
> 

> Indeed,I read the iodm.F code for many times and think hard on the 
> structure of the *.DM file,I convert it to formatted style,and get a 
> little information.I thought the *.DM file was arranged according to 
> columns,firt column ,second column ,...,in a one dimenssion array.As you 
> say,it is arranged according to rows,firt row,second row,and so on ,in a 
> one dimenssion array.However it is the same if the *.DM is Hermitian 
> conjugate since (DM)ij=(DM)ji.But it is not true all time(am I right? 
> Since it is probably only Hermitian at complex situation).So this issue is 
> serious. 
> 
> As you say the *.DM file can divided into there blocks,first block 
> containing the total number basis functions (say Norbit) in the 
> calculation and the total spin.Just two integers in the front of the file. 
> But I wonder to konwn if the system is periodical, the first number seems 
> to be only the basis number in a unit cell. 
> So my question is :Is *.DM contains only the information in a unit cell? 
> 
> The second block of *.DM contains Norbit integers.I think each number 
> stands each row,for there are Norbit rows in the *.DM file.Each number 
> indicates the index of column for each non-zero element of the row? Each 
> row have a small block,and there are Norbit small block in the second 
> block. 
> 
> The third block of *.DM is the DM element corresponding to the list in 
> second block. 
> 
> If the consideration is right above.There is another question:in the 
> second block, for each row,the column index, some times, not from smaller 
> to bigger.Just like this: 
>           1 
>           2 
>           3 
>           4 
>           5 
>           6 
>           7 
>           8 
>           9 
>          10 
>          11 
>          12 
>          13 
>          14 
>          15 
>          16 
>          17 
>          18 
>          19 
>          20 
>          21 
>          22 
>          23 
>          24 
>          25 
>          26 
>          32 
>          33 
>          34 
>          35 
>          36 
>          27 
>          28 
>          29 
>          30 
>          31 
> In addition to this ,this is a periodical system in there direction. 
> 
> Now I want to extract a part of the *.DM,belonging to a rang from basis_i 
> to basis_f.And then construct a new *.DM then feed it to siesta for the 
> subsytem whose basis is from basis_i to basis_f. 
> So for each row,which column index should I pick out? 
> ( Is this criterion enough?: index_of_basis_i<=index<=index_of_basis_f) 
> 
> Thank in advance! 
> 
> 
> 2010-07-24 
> 
> 
> 
> Guangping Zhang 
> --------------------------------------------------------- 
> 定时提醒您处理邮件、高效办公不费心,请用网易闪电邮(fm.163.com)! 
> 
> 
> 
> 发件人: [email protected] 
> 发送时间: 2010-07-24 00:21 
> 主 题: Re: [SIESTA-L] about the DM file 
> 收件人: [email protected] 
> 
> 
> 
>> Dear siesta users and developers: 
>> Now I want to konw the structure of the DM file.So I convert it to DMF 
>> file which is readable. 
>> But I have a question about the meaning of the integers after the number 
>> of orbitals ,spins and a serial integer numbers whose number is the same 
>> with the number of orbitals.But the following integer numbers,I am 
>> puzzling.What does they mean,they do not arrange from smaller to 
>> bigger,they some times go backward then forward. 
>> Who can tell me what does they mean? 
>> It is a urgency. 
> 
> Hi, 
> the reading/writing from the DM file is organized in iodm.F 
> However, it is somehow difficult to understand it at once. 
> In a nutshell, DM is stored as a sparse matrix - for each basis 
> function (say a line in the density matrix), 
> the list follows of non-zero elements, followed by their values. 
> Moreover the lists are created which relate the column number of each 
> non-zero element to which basis function it refers to. 
> I "streamlined" a bit the i/o procedure in my DMtune suite 
> http://www.home.uni-osnabrueck.de/apostnik/Software/DMtune.tar.gz 
> , adding some comments (but not much). 
> 
> Best regards 
> 
> Andrei Postnikov 

Responder a