[ase-users] wrap without breaking molecules
Jens Jørgen Mortensen
jjmo at dtu.dk
Wed Nov 28 11:20:00 CET 2018
On 11/28/2018 10:21 AM, Jonatan Öström via ase-users wrote:
>
> Hi, can I wrap water molecules into the box without breaking them?
>
If your molecules are ordered OHHOHHOHH...:
p1 = water.get_positions()
water.wrap()
p2 = water.positions
p2[1::3] = p2[0::3] + p1[1::3] - p1[0::3]
p2[2::3] = p2[0::3] + p1[2::3] - p1[0::3]
Jens Jørgen
>
>
> _______________________________________________
> ase-users mailing list
> ase-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20181128/113f5053/attachment.html>
More information about the ase-users
mailing list