Inconsistency with nearest neighbour query - Ovito vs Freud (triclinic box) #1244
-
Hi there, I have been using freud for the task of analyzing the number of nearest neighbours for each particle (Carbon atoms) with output files from LAMMPS and VASP. The last part of my analysis relies on identifying the number of nearest neighbours, but now the simulation box has been deformed by VASP during energy minimization. I implemented a check (via freud) to see if any carbon atom is bonded to more than 4 atoms initially just as a sanity check to tell me if files might need re-running on VASP or LAMMPS. This is when I noticed an inconsistency between my results from Freud and the results from Ovito. Namely, Freud said one carbon atom had 5 bonds total and for the same particle, Ovito said it only had 4. This occurs more than once for the set of the datafiles that I am analyzing. This prompted me to investigate the issue more systematically and I confirmed that it only occurred when I analyzed triclinic simulation boxes. Additionally, when I use the same cutoff radius in Freud and Ovito, I obtain a different number of total bonds for the same system. I have included both an example CONTCAR (output file from VASP) and a portion of my python program that checks for the total bonding for the same cutoff radius in OVITO and Freud. I have also included the input file for VASP before it was deformed to triclinic geometry to show that the number of bonds are the same for a cubic box. ovito vs freud bonding files.zip I am not sure where my error is, only that it might be related to I appreciate any help, thank you in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi Gareth, The box data in the provided script is not being read the same way in both functions. When I print the
However, when I print the
They appear to be the transpose of one another. When I transpose the |
Beta Was this translation helpful? Give feedback.
Hi Gareth,
The box data in the provided script is not being read the same way in both functions. When I print the
simbox_ovito
variable in theovito_analysis
function, I get the following:However, when I print the
box_data
variable from thefreud_analysis
function, I get the following:They appear to be the transpose of one another. When I transpose the
box_data
matrix, the number of neighbors is the same again.