<p style="border:0; padding:0; margin:0; font-family:'Gulim'; font-size:10pt; cursor: text;"><p style="font-family: Gulim; font-size: 10pt; border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;"></p><p style="font-family: Gulim; font-size: 10pt; border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;"></p><p style="font-family: Gulim; font-size: 10pt; border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;"></p><p style="font-family: Gulim; font-size: 10pt; border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">Dear all,&nbsp;</p><p style="font-family: Gulim; font-size: 10pt; border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;"><br></p><p style="font-family: Gulim; font-size: 10pt; border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">I would like to construct a code to describe the center of mass of a droplet, with water and ions.</p><p style="font-family: Gulim; font-size: 10pt; border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">For the following GROMACS trajectory file (confout.gro), we can have water coordinates as:</p><p style="font-family: Gulim; font-size: 10pt; border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">&nbsp; &nbsp;57SOL &nbsp; &nbsp; OW &nbsp; 36289 &nbsp;17.563 &nbsp;14.835 &nbsp; 0.520&nbsp;</p><p style="font-family: Gulim; font-size: 10pt; border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">&nbsp; &nbsp;57SOL &nbsp; &nbsp;HW1 &nbsp;36290 &nbsp;17.602 &nbsp;14.916 &nbsp; 0.487&nbsp;</p><p style="font-family: Gulim; font-size: 10pt; border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">&nbsp; &nbsp;57SOL &nbsp; &nbsp;HW2 &nbsp;36291 &nbsp;17.571 &nbsp;14.843 &nbsp; 0.615 &nbsp;</p><p style="font-family: Gulim; font-size: 10pt; border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">&nbsp; &nbsp;58SOL &nbsp; &nbsp; OW &nbsp; 36292 &nbsp;17.588 &nbsp;14.547 &nbsp; 0.457 &nbsp;</p><p style="font-family: Gulim; font-size: 10pt; border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">&nbsp; &nbsp;58SOL &nbsp; &nbsp;HW1 &nbsp;36293 &nbsp;17.573 &nbsp;14.642 &nbsp; 0.458&nbsp;</p><p style="font-family: Gulim; font-size: 10pt; border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">&nbsp; &nbsp;58SOL &nbsp; &nbsp;HW2 &nbsp;36294 &nbsp;17.521 &nbsp;14.512 &nbsp; 0.516 &nbsp;</p><p style="font-family: Gulim; font-size: 10pt; border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">&nbsp; &nbsp;59SOL &nbsp; &nbsp; OW &nbsp; 36295 &nbsp;11.747 &nbsp;17.611 &nbsp; 1.159 &nbsp;</p><p style="font-family: Gulim; font-size: 10pt; border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">&nbsp; &nbsp;59SOL &nbsp; &nbsp;HW1 &nbsp;36296 &nbsp;11.714 &nbsp;17.522 &nbsp; 1.174&nbsp;</p><p style="font-family: Gulim; font-size: 10pt; border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">&nbsp; &nbsp;59SOL &nbsp; &nbsp;HW2 &nbsp;36297 &nbsp;11.740 &nbsp;17.624 &nbsp; 1.064&nbsp;</p><p style="font-family: Gulim; font-size: 10pt; border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;"><br></p><p style="font-family: Gulim; font-size: 10pt; border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">To describe the center of mass of each molecule, we can have the following for-loop:</p><p style="font-family: Gulim; font-size: 10pt; border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">for i = 1:length(x)/3</p><p style="font-family: Gulim; font-size: 10pt; border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">&nbsp; &nbsp;xcm(i) = (x(i*3-2)*massO + x(i*3-1)*massH + x(i*3)*massH)/massWater;</p><p style="font-family: Gulim; font-size: 10pt; border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">&nbsp; &nbsp;ycm(i) =&nbsp;<span style="font-size: 13.3333330154419px;">(y(i*3-2)*massO + y(i*3-1)*massH + y(i*3)*massH)/massWater;</span></p><p style="font-family: Gulim; font-size: 10pt; border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">&nbsp; &nbsp;zcm(i) =&nbsp;<span style="font-size: 13.3333330154419px;">(z(i*3-2)*massO + z(i*3-1)*massH + z(i*3)*massH)/massWater;</span></p><p style="font-family: Gulim; font-size: 10pt; border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">end</p><p style="font-family: Gulim; font-size: 10pt; border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;"><br></p><p style="font-family: Gulim; font-size: 10pt; border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">Then, the center of mass of a droplet (100% water) can be defined by:</p><p style="font-family: Gulim; font-size: 10pt; border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">cmx = sum(xcm)/length(x)*3;</p><p style="font-family: Gulim; font-size: 10pt; border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">cmy =<span style="font-size: 13.3333330154419px;">&nbsp;</span><span style="font-size: 13.3333330154419px;">sum(ycm)/length(y)*3;</span><span style="font-size: 10pt;">&nbsp;</span></p><p style="font-family: Gulim; font-size: 10pt; border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">cmz =&nbsp;<span style="font-size: 13.3333330154419px;">sum(zcm)/length(z)*3;</span><span style="font-size: 10pt;">&nbsp;</span></p><p style="font-family: Gulim; font-size: 10pt; border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;"><br></p><p style="font-family: Gulim; font-size: 10pt; border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">For a droplet consisting of H2O, H3O, and Chloride ions, how does one describe the center of mass of each molecule/ion using the for-loop, and then using the xcm(i), ycm(i), and zcm(i) to determine the center of the droplet?&nbsp;</p><p style="font-family: Gulim; font-size: 10pt; border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;"><br></p><p style="font-family: Gulim; font-size: 10pt; border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;"><br></p><p style="font-family: Gulim; font-size: 10pt; border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">Below is an example of the coordinate file:</p><p style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">&nbsp;2015SOL &nbsp; &nbsp; OW &nbsp;42163 &nbsp;17.143 &nbsp;16.975 &nbsp; 0.502&nbsp;</p><p style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">&nbsp;2015SOL &nbsp; &nbsp;HW1 &nbsp;42164 &nbsp;17.175 &nbsp;17.038 &nbsp; 0.567&nbsp;</p><p style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">&nbsp;2015SOL &nbsp; &nbsp;HW2 &nbsp;42165 &nbsp;17.222 &nbsp;16.937 &nbsp; 0.464&nbsp;</p><p style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">&nbsp;2016SOL &nbsp; &nbsp; OW &nbsp;42166 &nbsp;16.088 &nbsp;17.097 &nbsp; 0.778&nbsp;</p><p style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">&nbsp;2016SOL &nbsp; &nbsp;HW1 &nbsp;42167 &nbsp;16.094 &nbsp;17.182 &nbsp; 0.734&nbsp;</p><p style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">&nbsp;2016SOL &nbsp; &nbsp;HW2 &nbsp;42168 &nbsp;16.159 &nbsp;17.098 &nbsp; 0.843&nbsp;</p><p style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</p><p style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</p><p style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</p><p style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</p><p style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">&nbsp;2035H3O &nbsp; &nbsp; OW &nbsp;42241 &nbsp;17.895 &nbsp;20.054 &nbsp; 0.561&nbsp;</p><p style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">&nbsp;2035H3O &nbsp; &nbsp;H31 &nbsp;42242 &nbsp;17.836 &nbsp;20.100 &nbsp; 0.492&nbsp;</p><p style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">&nbsp;2035H3O &nbsp; &nbsp;H32 &nbsp;42243 &nbsp;17.970 &nbsp;20.114 &nbsp; 0.593&nbsp;</p><p style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">&nbsp;2035H3O &nbsp; &nbsp;H33 &nbsp;42244 &nbsp;17.930 &nbsp;19.964 &nbsp; 0.527&nbsp;</p><p style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">&nbsp;2036H3O &nbsp; &nbsp; OW &nbsp;42245 &nbsp;13.948 &nbsp;17.327 &nbsp; 0.503&nbsp;</p><p style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">&nbsp;2036H3O &nbsp; &nbsp;H31 &nbsp;42246 &nbsp;13.875 &nbsp;17.348 &nbsp; 0.571&nbsp;</p><p style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">&nbsp;2036H3O &nbsp; &nbsp;H32 &nbsp;42247 &nbsp;13.978 &nbsp;17.410 &nbsp; 0.452&nbsp;</p><p style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">&nbsp;2036H3O &nbsp; &nbsp;H33 &nbsp;42248 &nbsp;14.026 &nbsp;17.276 &nbsp; 0.544&nbsp;</p><p style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</p><p style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</p><p style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</p><p style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">&nbsp;2037CLA &nbsp; &nbsp; CL &nbsp;42249 &nbsp;13.862 &nbsp;17.882 &nbsp; 1.754&nbsp;</p><p style="border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;">&nbsp;2038CLA &nbsp; &nbsp; CL &nbsp;42250 &nbsp;16.686 &nbsp;17.457 &nbsp; 0.667&nbsp;</p><div><br></div><div><br></div><div><br></div><div>Thanks in advance.</div><div><br></div><div>Regards,</div><div>Kester</div><div><br></div><p style="font-family: Gulim; font-size: 10pt; border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;"><br></p><div style="font-family: Gulim; font-size: 10pt;"><br></div><p style="font-family: Gulim; font-size: 10pt; border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;"><br></p><p style="font-family: Gulim; font-size: 10pt; border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; padding: 0px; margin: 0px; cursor: text;"><br></p><p style="font-family: Gulim; font-size: 10pt;"></p><p style="font-family: Gulim; font-size: 10pt;"></p><p style="font-family: Gulim; font-size: 10pt;"></p></p>
<img src='http://mail.ibs.re.kr/checkread/MTM1MDM0MA==/Z214LXVzZXJzQGdyb21hY3Mub3Jn/' width='1px' height='1px' />