<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Dear Vahid</p>
<p><br>
</p>
<p>I don't know whether VASP folds back atoms in their output or not. If they do then the msd.f90 you recommended is not accurate. Because the code simply calculate the distance between two position</p>
<p><br>
</p>
<p><span>dRx = Rx(j) - Rx0(j) </span></p>
<p><span>dRy = Ry(j) - Ry0(j) </span></p>
<p><span>dRz = Rz(j) - Rz0(j) </span></p>
<p><span>sum_msd = sum_msd + (dRx**2 + dRy**2 + dRz**2)</span><br>
</p>
<p><span><br>
</span></p>
<p>One thing is that I tried to create a .axsf file using cppx. And the atoms seem to be not folded back. Can someone confirm me that?</p>
<p><br>
</p>
<p>Best Regards,</p>
<p>Nam Tran</p>
<p><span><br>
</span></p>
<p><span><br>
</span></p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> pw_forum-bounces@pwscf.org <pw_forum-bounces@pwscf.org> on behalf of Vahid Askarpour <vh261281@dal.ca><br>
<b>Sent:</b> Monday, October 30, 2017 11:00:01 PM<br>
<b>To:</b> PWSCF Forum<br>
<b>Subject:</b> Re: [Pw_forum] How to calculate Mean Square Displacement (MSD)</font>
<div> </div>
</div>
<div>There is a collection of fortran codes (for VASP mainly but can easily be adapted) for processing simulation output including MSD calculation and the treatment of periodic images. They can be found at <a href="https://github.com/boates" class="">https://github.com/boates</a> under
 the Physics repository (see msd.f90).
<div class=""><br class="">
</div>
<div class="">Cheers,</div>
<div class=""><br class="">
</div>
<div class="">Vahid</div>
<div class=""><br class="">
</div>
<div class="">Vahid Askarpour<br class="">
Department of Physics and Atmospheric Science<br class="">
Dalhousie University,<br class="">
Halifax, NS, Canada<br class="">
<br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Oct 30, 2017, at 4:29 AM, Nam Tran <<a href="mailto:vnt981@uowmail.edu.au" class="">vnt981@uowmail.edu.au</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div id="divtagdefaultwrapper" dir="ltr" style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;" class="">
<div style="margin-top: 0px; margin-bottom: 0px;" class="">Dear QE experts,</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">I am trying to evaluate MSD for my simulation.</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">My problem is that when an atom exits the simulation cell. </div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">I do not know whether I should consider the distance with atom that goes about outside the box (a) or its image (b). Please check the image below (Blue is the original position t=0, red is the position
 at time t)</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><span id="cid:eb89eef8-985a-4e94-b8fb-1e770ba0adec"><Screenshot from 2017-10-30 14-53-57.png></span><br class="">
Best Regards</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">Nam Tran</div>
</div>
<span style="font-family: Helvetica; font-size: 24px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Helvetica; font-size: 24px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 24px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Pw_forum
 mailing list</span><br style="font-family: Helvetica; font-size: 24px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<a href="mailto:Pw_forum@pwscf.org" style="font-family: Helvetica; font-size: 24px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">Pw_forum@pwscf.org</a><br style="font-family: Helvetica; font-size: 24px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<a href="http://pwscf.org/mailman/listinfo/pw_forum" style="font-family: Helvetica; font-size: 24px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">http://pwscf.org/mailman/listinfo/pw_forum</a></div>
</blockquote>
</div>
<br class="">
</div>
</div>
</body>
</html>