Obtaining stack size in a semi-nematic system

41 views
Skip to first unread message

Yaoting Zhang

unread,
Oct 18, 2022, 11:16:12 AM10/18/22
to freud-users
Hi,

 I have a system with 1000 platelets consisting of x amount of atoms each. I used Freud to calculate the  Nematic order parameters using Rowan quarterion data generated for each platelet. 
Now I wonder if I can use the same Rowan to calculate the platelet stacking size distribution where I am only interested in platelets within proximity and the same orientation? Using COM alone might not be enough, and using the Cluster/Density libraries does not seem to include Rowan info. 

Some recommendations would be great,

Thank you

Bradley Dice

unread,
Oct 18, 2022, 11:23:14 AM10/18/22
to freud-users
Hi, this is possible using a combination of features in freud. Here's what I would suggest:

1. Find all neighbors within the desired cutoff distance and create a NeighborList object. See the tutorial for an example: https://freud.readthedocs.io/en/latest/gettingstarted/tutorial/neighborfinding.html#neighbor-lists
2. Filter that NeighborList object to only keep bonds between particles that are oriented in a similar way. Use `nlist.query_point_indices` and `nlist.point_indices` to build a boolean array that defines whether each bond is oriented similarly or not. Use the indices to fetch the orientations of both particles in the bond, then use a function from rowan to compute the difference in orientation and return true/false based on your desired threshold. See NeighborList.filter: https://freud.readthedocs.io/en/latest/modules/locality.html#freud.locality.NeighborList.filter
3. Use this filtered NeighborList as part of the call to `Cluster.compute(..., neighbors=filtered_nlist)`. https://freud.readthedocs.io/en/latest/modules/cluster.html#freud.cluster.Cluster.compute

Then you should have clusters of nearby, similarly-oriented platelets and you can quantify the size distributions.

Hope that helps,
Bradley

Yaoting Zhang

unread,
Nov 1, 2022, 11:20:59 AM11/1/22
to freud-users
Hi Bradley,

Thank you for the detailed instruction on this. Without your help I would not be able to do this.
 
I did step 2 slightly differently though

aq = freud.locality.AABBQuery(box, points)
query_result = aq.query(points, dict(num_neighbors=2, exclude_ii=True)) 
nlist = query_result.toNeighborList()
Then I created a boolean filter loop on the nlist[:] and filtered out systems whose quaternions dot products were not close to 1 (a property of similarly oriented particles) 
nlist.filter(filtered)

system = freud.AABBQuery(box, points)
cl = freud.cluster.Cluster()
cl.compute(system, neighbors=nlist)


Thanks again.
Reply all
Reply to author
Forward
0 new messages