pass voronoi weights to calculation of hexatic order parameter

103 views
Skip to first unread message

Gabriele T.

unread,
May 15, 2020, 6:22:51 AM5/15/20
to freud-users
Hello,

I have started to use Freud to compute voronoi diagrams and hexatic order parameters. I would like to know there is a straightforward way to calculate the order parameter psi_k by weighting the angle theta_ij between two neighbours by the length of their voronoi side, similarly to what done in these two papers


I have managed so far, following the documentation and the examples to calculate the hexatic order parameter and the voronoi lines but I am not sure if there is a way to pass the length of the voronoi sides to the compute class for the hexatic order parameter. The relevant lines for the calculation of the voronoi sides and for the hexatic order parameter are below and are similar to the examples provided to the documentation. Please let me know if you have any suggestions, or you could point to where I could start to look in the code to include this. Thanks.


Vor=voro.compute((box,atoms))

nlist = voro.nlist
            
line_data = np.asarray([[atoms[i],
                       atoms[i] + box.wrap(atoms[j] - atoms[i])]
                        for i, j in nlist])[:, :, :2]


hex_order = freud.order.Hexatic(k=6)

hex_order.compute(system=(box, atoms), neighbors={'num_neighbors': 6})


Bradley Dice

unread,
May 15, 2020, 2:33:06 PM5/15/20
to freud-users
Hi Gabriele,

This is a great question. I have been meaning to add this feature to the hexatic order parameter for a while. It should be straightforward to add, since we have made similar changes to allow for "weighted" computations in the Steinhardt order parameter (which is like a 3D form of the 2D hexatic order).

Would you be willing to review and test a pull request adding this feature? Please share your GitHub username and I will add you.


Best,
Bradley

Gabriele T.

unread,
May 18, 2020, 5:19:15 AM5/18/20
to freud-users
Hi Bradley,

Thanks for the reply. I have taken a look at the code for Steinhardt. For now I got the hexatic order parameter with weights working by using the voronoi module for the weights and then calculating psi_k with weights separately without using the freud module by calculating sum_j exp(6i theta_ij) explicitly, but just making use of the freud neighbour lists.

I will try to implement the "weighted" option following what is done in the Steinhardt module and do a pull request.

Cheers,
Gabriele

Bradley Dice

unread,
May 18, 2020, 9:14:29 AM5/18/20
to freud-users
Hi Gabriele,

I looked at this a bit over the weekend -- I just pushed a branch and opened a pull request. If you can comment, I will add you as a reviewer. I haven't tested it yet, but I think it's close to right (possibly not normalized correctly). After you have a chance to try it out and approve it, I'll find a second reviewer and we'll put this feature in our next release.


Best,
Bradley

Gabriele T.

unread,
May 18, 2020, 9:27:06 AM5/18/20
to Bradley Dice, freud-users
Hi Bradley,

Yes. I am happy to review it, you can add me. Thanks for implementing it so quickly!

Best 
Gabriele 

-- 
You received this message because you are subscribed to the Google Groups "freud-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to freud-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/freud-users/410804ab-56fb-4ba7-8275-9039d9c5c532%40googlegroups.com.

vramasub

unread,
May 18, 2020, 10:13:40 AM5/18/20
to freud-users
Hi Gabriele,
Could you comment on the issue here indicating that you'd be willing to review? Once you do that, I'll be able to add you as a reviewer.

Thanks for your interest in freud and your willingness to help out with testing this!
Best,
Vyas
Gabriele 

To unsubscribe from this group and stop receiving emails from it, send an email to freud-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages