Dear H.H. Guo,

Yes, E_KS is the potential energy for your simulation. Maybe there is a problem with terminology. In ab initio molecular dynamics, E_KS is sometimes said to be the total energy of the electronic system. It includes all energy contributions except the kinetic energy of the ionic system, that is, E_KS is the total energy that you would obtain in a zero-temperature calculation. The forces on atoms are calculated from E_KS through Hellman-Feynman theorem. So in particular, E_KS already accounts for the ion-ion interactions.

The total energy in a Verlet (microcanonical) MD simulation is equal to the sum of E_KS (potential energy of the system) plus the kinetic energy of the ions, so it also includes the ion-ion interactions.

In the MDE file, if you subtract E_KS from the total energy in a Verlet run, you will get the kinetic energy, which can be exactly obtained from the temperature. For example, if you consider a molecule which does not translate but free to rotate, then Ekin= (3N-3)*kB*T/2. Of course, please allow for some rounding error as the T is only given with a finite precision in the MDE file (but is exactly calculated within the code). So no errors here. Please check again.

If you are using thermostats or barostats, then the total energy in the MDE file includes kinetic and potential contributions from the additional degrees of freedom associated to them. But E_KS continues to be the potential energy, you still can deduce the kinetic energy from the temperature, and so you can recover the physical total energy.

Hope this helps.

Andres Aguado

On Fri, 18 Feb 2011, guohuaihong wrote:


Thanks, Andres. It is really helpful! I get *.MDE file now after setting
"WriteMDhistory" as true, so simple and so useful!

However, I am still puzzled by the data structure in MDE file.  The iomd.f
in SIESTA package, which takes care of this output, shows that
------------------------ iomd.f ----------------------------------------
write(iuene,"(6a)") '#Step', 'T(K)', 'E_KS', 'E_tot', 'Vol',  'P(kBar)'
write(iuene,'(i6,1x,f9.2,2(1x,f13.5),1x,f11.3,1x,f11.3)')
    .               istep,  temp,   eks*eV, getot*eV, volume, Psol
------------------------------------------------------------------------

with
--------------------------- iomd.f ------------------------------------
c real*8  temp       : Temperature of ions
c real*8  eks        : Kohn-Sham energy
c real*8  getot      : Total energy
c integer istep      : Present time step
c real*8  volume     : cell volume in Ang**3
c real*8  Psol       : total pressure (static plus kinetik) in kBar
---------------------------------------------------------------------

For the "Total energy getot", the "write_md_record.F" code tells that,
------------------------ write_md_record.F -----------------------------
         getot = Etot_output + Ekinion + kn + kpr + vn + vpr
------------------------------------------------------------------------

The "dynamics.f' shows that
-------------------------- dynamics.f --------------------------------
C real*8 kn             : Kinetic energy of Nose variable
C real*8 kpr            : Kinetic energy of Parrinello-Rahman variable
C real*8 vn             : Potential energyy of Nose variable
C real*8 vpr            : Potential energyy of P-R variables
----------------------------------------------------------------------

From above, we can see that the 1st four columes(istep,temp,eks*eV,getot*eV) in 
MDE file are,
MD steps, ionic temperature(ionic kinetic energy), electronic KS energy, and 
Total energy,
respectively.

But (Total energy - KS energy)/ionic temperature is not a constant, as you 
suggested!

So here my consequent questions are:
(1) Is E_KS is the potential energy of the system, as you said?
(2) Why doesn't Total energy include ion-ion interaction?

Looking forward to having your or other's reply, thanks!

Best regards!

H.H.Guo



-----原始邮件-----
发件人: aguado <[email protected]>
发送时间: 2011年2月18日 星期五
收件人: siesta-l <[email protected]>
抄送:
主题: Re: [SIESTA-L] Potential energy saving in MD run


Dear guohuaihong,

I'm not sure that I understand what you are precisely meaning, but the
potential energy at each step of an MD run is given in the file *.MDE,
under the column E_KS. This means that E_KS is the potential energy of the
system, understood as the total energy (given in the E_tot column) minus
the kinetic energy (which is given in the form of a temperature in column
T).

I hope this answers your question. I don't know either what kind of system
are you simulating, but in case it is a finite system like a molecule or
cluster, keep in mind that the temperature definition depends on the
statistical ensemble. The T given in the *.MDE file is just one possible
definition, extracted from equipartition as applied to the kinetic energy.

Best wishes,

Andres Aguado

On Fri, 18 Feb 2011, guohuaihong wrote:


Dear  SIESTA users:
       

I intend to get system potential energy (including electronic, ionic and
pseudopotential) for each MD step

as doing Nose molecular dynamics (MD) simulation in SIESTA.

 

I have a few questions to ask:

1.  How to obtain system potential? As we know, in each MD step, code only 
gives out
E_KS and Free Energy

of electrons. The total energy or the total potential won't be given until the 
last MD
step.

 

2.  The clue may lie in the following setting.

       SaveNeutralAtomPotential  True

         SaveTotalPotential               True

However, according to the SIESTA-3.0-b manual, "SaveTotalPotential" is "to 
write the
valence total effective

local potential (local pseudopotential + Hartree + Vxc), at the mesh...". Does 
it
include both electronic and

ionic contributions? 

 

3. If "SaveTotalPotential" only refers to the electronic part, I guess we have 
to use
"SaveNeutralAtomPotential"

to calculate ionic part. Is it correct? "SaveNeutralAtomPotential" is a new 
command in
3.0-b version compared

with stable version 2.0.2 and defines "the sum of the hartree potential of a 
pseudo
atomic valence charge plus

the local pseudopotential". Then, both have local pseudopotential part, how can 
we avoid
the double-counting?

 

4. How to save those potential in one file (such as *.VT or VH) in sequence 
like *.ANI
during the MD runs.


Any suggestion will be appriciated! Thank you very much!

Best wishes,


HH GUO






--
Magnetism and Magnetic Materials Division
Shenyang Materials Science National Laboratory
Institute of Metal Research
Chinese Academy of Sciences
72 Wenhua Road,Shenyang 110016, China


+86-15140243901 (mobile)
work:     [email protected]






Responder a