[Pw_forum] Documentation on atomic velocities
Ilya Ryabinkin
igryabinkin at gmail.com
Wed Mar 22 12:32:07 CET 2017
> Just to confirm I understood correctly, are the atomic velocities saved in
> the temporary files so that restarting with restart_mode='restart'
> will resume the dynamics continuously?
Yes. But test it! Better safe than sorry.
> And concerning my original questions, can the velocities be written to
> the ordinary output file using some undocumented option?
They are in one of those text restart files (or there are two sets of
coordinates & time step to calculate them, I don't remember) but in
internal format. However, I did change the dynamics_module.f90 to
print them to the output (see attached). You can patch and recompile,
if you really need this option.
> Many thanks for the support to users. Time is gold and you give it
> away. I really appreciate it.
Well, I'm really flattered, but here I'm more like user---the changes
are really superficial.
--
Ilya
> Luis E. Gonzalez
> Universidad de Valladolid.
>
>
> On Tue, 21 Mar 2017, Ilya Ryabinkin wrote:
>
>> By the way, to resume an interrupted MD run you DON'T need
>> ATOMIC_VELOCITIES. They are useful only if you'd like to start (for
>> whatever reason) with a setup with non-zero *initial* velocities (like
>> I needed once).
>>
>> The right way is to use restart_mode = 'restart' with all temporary
>> files available from the previous (interrupted) step.
>>
>> The reason is simple: to restart Verlrt algorithm you need more than
>> initial velocities.
>>
>>
>> --
>> I.
>>
>> On Tue, Mar 21, 2017 at 9:13 PM, Ilya Ryabinkin <igryabinkin at gmail.com> wrote:
>>> Dear Luis:
>>> Indeed, there is an undocumented option: pw.x reads the card
>>> ATOMIC_VELOCITIES once the option
>>>
>>> &IONS
>>> ion_velocities = 'from_input',
>>> /
>>>
>>> is provided.
>>>
>>> They are given in Ry/bohr, no other units are accepted.
>>>
>>> --
>>> Ilya
>>>
>>>
>>> On Tue, Mar 21, 2017 at 6:53 PM, luisen <luisen at metodos.fam.cie.uva.es> wrote:
>>>>
>>>> Sorry for not being precise enough. I am using the MD calculation in pw.x
>>>>
>>>> Luis E. Gonzalez
>>>> Univ. de Valladolid
>>>> Spain.
>>>>
>>>>
>>>> On Tue, 21 Mar 2017, LEUNG Clarence wrote:
>>>>
>>>>> Dear Luis,
>>>>> Do you use the cpmd of cp.x or the md in pw.x?
>>>>>
>>>>> Thanks.
>>>>>
>>>>> Clarence
>>>>> City university of Hong Kong
>>>>>
>>>>>
>>>>> -------- Original message --------
>>>>> From: luisen <luisen at metodos.fam.cie.uva.es>
>>>>> Date: 21/03/2017 20:42 (GMT+08:00)
>>>>> To: pw_forum at pwscf.org
>>>>> Subject: [Pw_forum] Documentation on atomic velocities
>>>>>
>>>>>
>>>>> Dear developers,
>>>>>
>>>>> I am interested in using atomic velocities generated in previous MD runs
>>>>> in order to continue the MD calculation after a finished job (finished
>>>>> either gracefully or abruptly).
>>>>> I made a small program to compute the velocities from the positions and
>>>>> modified slightly the code in order to read the velocities from a file
>>>>> upon initialization if this file was present. It is however an ad-hoc
>>>>> solution.
>>>>>
>>>>> I have seen in the last distribution (6.1) that there is the possibility
>>>>> of using a section in the input file named ATOMIC_VELOCITIES.
>>>>>
>>>>> My question is if there is any documentation for its use, and if there
>>>>> is any flag so as to output the velocities (in addition to positions) to
>>>>> the output file, for later use as input in a subsequent run.
>>>>>
>>>>> Yours,
>>>>>
>>>>> Luis Enrique Gonzalez
>>>>> Universidad de Valladolid
>>>>> _______________________________________________
>>>>> Pw_forum mailing list
>>>>> Pw_forum at pwscf.org
>>>>> http://pwscf.org/mailman/listinfo/pw_forum
>>>>>
>>>>
>>>> _______________________________________________
>>>> Pw_forum mailing list
>>>> Pw_forum at pwscf.org
>>>> http://pwscf.org/mailman/listinfo/pw_forum
>>>
>>>
>>>
>>> --
>>> *******************************************************
>>> Ilya Ryabinkin
>>> Postdoctoral Scholar
>>> Physical and Environmental Sciences
>>> University of Toronto Scarborough
>>> http://www.utsc.utoronto.ca/~aizmaylov/Members.html
>>> *******************************************************
>>
>>
>>
>> --
>> *******************************************************
>> Ilya Ryabinkin
>> Postdoctoral Scholar
>> Physical and Environmental Sciences
>> University of Toronto Scarborough
>> http://www.utsc.utoronto.ca/~aizmaylov/Members.html
>> *******************************************************
>> _______________________________________________
>> Pw_forum mailing list
>> Pw_forum at pwscf.org
>> http://pwscf.org/mailman/listinfo/pw_forum
>>
> _______________________________________________
> Pw_forum mailing list
> Pw_forum at pwscf.org
> http://pwscf.org/mailman/listinfo/pw_forum
--
*******************************************************
Ilya Ryabinkin
Postdoctoral Scholar
Physical and Environmental Sciences
University of Toronto Scarborough
http://www.utsc.utoronto.ca/~aizmaylov/Members.html
*******************************************************
-------------- next part --------------
--- dynamics_module.f90.orig 2016-09-29 11:56:12.137921000 -0400
+++ dynamics_module.f90 2016-09-29 11:56:07.092669000 -0400
@@ -14,7 +14,7 @@
!
!----------------------------------------------------------------------------
MODULE dynamics_module
- !----------------------------------------------------------------------------
+!----------------------------------------------------------------------------
!
USE kinds, ONLY : DP
USE ions_base, ONLY : amass
@@ -300,6 +300,15 @@
!
vel = ( tau_new - tau_old ) / ( 2.D0*dt ) * dble( if_pos )
!
+ ! ... Print out velocities in the format acceptable by input
+ !
+ WRITE( stdout, &
+ & '(/"ATOMIC_VELOCITIES")' ) ! Rydberg units: bohr/Rut
+ DO na = 1, nat
+ WRITE( stdout,'(A3,3X,3F14.9)') &
+ atm(ityp(na)), vel(:,na)*alat
+ END DO
+ !
ml = 0.D0
ekin = 0.D0
kstress = 0.d0
More information about the users
mailing list