[DFTB-Plus-User] Bond length plot in Ehrenfest dynamics

Cristian Sanchez cristian.g.sanchez at gmail.com
Mon Feb 1 17:00:51 CET 2021


Dear Raghavendra,

When preparing the recipe I used quite an ugly old school UNIX hack:

grep MD tdcoords.xyz |awk '{print $5}' > time
grep -A 6 MD tdcoords.xyz| awk '/MD/{if (NR!=1)print "";next}{printf $0}END{print "";}'  | awk '{ print sqrt(($9 -$2 )^2+($10-$3 )^2+($11-$4 )^2) }' > C1.dat
grep -A 6 MD tdcoords.xyz| awk '/MD/{if (NR!=1)print "";next}{printf $0}END{print "";}'  | awk '{ print sqrt(($16-$9 )^2+($17-$10)^2+($18-$11)^2) }' > C2.dat
grep -A 6 MD tdcoords.xyz| awk '/MD/{if (NR!=1)print "";next}{printf $0}END{print "";}'  | awk '{ print sqrt(($23-$16)^2+($24-$17)^2+($25-$18)^2) }' > C3.dat
grep -A 6 MD tdcoords.xyz| awk '/MD/{if (NR!=1)print "";next}{printf $0}END{print "";}'  | awk '{ print sqrt(($30-$23)^2+($31-$24)^2+($32-$25)^2) }' > C4.dat
grep -A 6 MD tdcoords.xyz| awk '/MD/{if (NR!=1)print "";next}{printf $0}END{print "";}'  | awk '{ print sqrt(($37-$30)^2+($38-$31)^2+($39-$32)^2) }' > C5.dat
grep -A 6 MD tdcoords.xyz| awk '/MD/{if (NR!=1)print "";next}{printf $0}END{print "";}'  | awk '{ print sqrt(($2-$37)^2+($3-$38)^2+($4-$39)^2) }' > C6.dat
pr -m -t  time C1.dat > C1b.dat
pr -m -t  time C2.dat > C2b.dat
pr -m -t  time C3.dat > C3b.dat
pr -m -t  time C4.dat > C4b.dat
pr -m -t  time C5.dat > C5b.dat
pr -m -t  time C6.dat > C6b.dat

It should produce the data files I used for the plot but is clearly not scalable. I understand that if you use the ASE modules in python you can read XYZ files and the processing should only require some a few lines.

Best,

Cristián



Dr. Cristián G. Sánchez

Investigador Principal
Instituto Interdisciplinario de Ciencias Básicas (ICB)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)

Profesor Asociado
Facultad de Ciencias Exactas Físicas y Naturales (FCEN)
Universidad Nacional de Cuyo (UNCuyo)

Padre Jorge Contreras 1300, Parque General San Martín
M5502JMA, Mendoza, Argentina

http://www.cgsanchez.net/
cristian.g.sanchez at gmail.com
csanchez at mendoza-conicet.gob.ar
--

> On 28 Jan 2021, at 06:14, Raghavendra V <raghav011986 at gmail.com> wrote:
> 
> Dear Friends,
> 
> I am new to DFTB+ and I have been trying to repeat calculations given in the DFTB+ recipes. I tried to do the Ehrenfest Dynamics (https://dftbplus-recipes.readthedocs.io/en/latest/electronicdynamics/ehrenfest.html <https://dftbplus-recipes.readthedocs.io/en/latest/electronicdynamics/ehrenfest.html>)
> and the calculation ran successfully. I would like to plot the graph given in the same page where the C-C bonds in benzene are plotted against time.
> 
> I see that the "tdcoords.xyz <http://tdcoords.xyz/>" contain the molecular geoemtry at different times of the simulation. I'm not really sure how to extract the geometry for each time step and get the bond length of bond angle etc. 
> 
> I will be very thankful if someone could help me do this task.
> 
> Kindly let me know if I am not clear.
> Sincerely,
> 
>  V. Raghavendra
> Research Scholar
> C/O Dr. V. Subramanian
> Inorganic and Physical Chemistry Division
> Central Leather Research Institute (CSIR-CLRI)
> Adyar, Chennai - 600 020
> Tamil Nadu, India
>  http://clri.res.in/subramanian/index.html <http://clri.res.in/subramanian/group.html>
>  Mobile - +91 9962 559 388
> _______________________________________________
> DFTB-Plus-User mailing list
> DFTB-Plus-User at mailman.zfn.uni-bremen.de
> https://mailman.zfn.uni-bremen.de/cgi-bin/mailman/listinfo/dftb-plus-user

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.zfn.uni-bremen.de/pipermail/dftb-plus-user/attachments/20210201/35c06c6b/attachment.htm>


More information about the DFTB-Plus-User mailing list