I want to calculate orientational correlation function with using of compute hexorder/atom command
I tried to extract this command’s results with fix ave/atom and dump commands .
compute ord all hexorder/atom
fix f5 all ave/atom 10 20 1000 c_ord[1] c_ord[2]
dump 9 all custom 1000 B_order.data id type x y f_f5[1]
f_f5[2]
Can you please let me know How I can calculate orientational correlation function ?
From Dump file I have atom type x and y and complex and real part of qn !
You would have to post-process it, I think. The idea is that you determine for all atom pairs i and j the distance between them, and then you compute the product of the local bond orientation of i times the complex conjugate of the bond orientation of j, say psi_ij, store that number together with the distance, and then in the end, you construct a histogram as function of r with in each bin the average value of psi_ij for that distance. You might be able to do it on the fly by writing a compute similar to compute rdf and leveraging the psi_ij computations to a ComputeHexOrderAtom class.
You can certainly use pair/local dist in this way to generate all the pair distances, although it is rather inefficient to writeall that data to file and then read it again. And you still need to write post-processing code to read distance.dump and combine it with information from the second file B_order.dump.
Your question about how to “attribute” is not clear, but I think the answer in pseudocode is:
Dear Aidan ,
Thanks for your reply .
For a dump file with just one TIME STEP and with this format ( for 2D systems ):
ITEM: TIMESTEP
0
ITEM: NUMBER OF ATOMS
…
ITEM: BOX BOUNDS pp pp pp
… …
… …
… …
ITEM: ATOMS id x y c_ord[1] c_ord[2]
… … … … …
I could write a Python code , but it is so slow .
I have attached the code with this Email.
I am completely beginner in programming and now I just want to know is this code acceptable or not ?
First focus on getting the right answer, then you can worry about
correctness. It is not possible for me to tell if your Python script
is correct just by looking at it. You will have to confirm that it is
correct by checking if the output seems reasonable and also by running
simple test cases where you know the right answer.
It is true that Pizza.py can make the process quite a bit easier.
Aidan
2015-11-28 8:44 GMT-07:00 Arthur France-Lanord <[email protected]...>: