# Method to find x coordinate of particle from its y coordinate

Hello,

I am using granular package .I have Y Coordinate of few particles(The y coordinates of all the particles in the group are unique) .How can I find the corresponding X coordinates of the particles(I do not have their atom IDs). I have to find the centres of these particles (These particles form a jammed arch in a granular simulation) which will help me calculate their distance from a certain point.

Hello,
I am using granular package .I have Y Coordinate of few
particles(The y coordinates of all the particles in the group are unique)
.How can I find the corresponding X coordinates of the particles(I do not
have their atom IDs). I have to find the centres of these particles (These
particles form a jammed arch in a granular simulation) which will help me
calculate their distance from a certain point.

x and y coordinates are by definition completely independent, so there
is not correlation unless you impose it.
so in principle there is no way.

axel

It’s not clear what you mean by “how can I find”.
Are you looking at a dump file? Are you writing
input script commands? Are you adding code to
LAMMPS?

Steve

hi Steve ,

In my Granular simulation, the particles jam after flowing through an orifice. I need to find the mean radius of the jammed arch. To that end ,I have to identify and find the centres of the particles forming the arch. So, I have divided the area around the arch in 5 vertical regions or bins (width of the strips is so defined such that each strip will have a single jammed particle) spanning the arch and am using the bound region function to find the ymin( The jammed particles would be at the bottom of each strip as the arch forms near the floor of the hopper & Y is the vertical coordinate).Thus I now have to find the X coordinate of these particle to get their centres. This is where i am facing problems. I have to encode all this as i have to perform a lot of runs which involve finding the mean radius of the jammed arch each time , as the hopper jams at the end of each run. Is there any other way to find their centres?

hi Steve ,
In my Granular simulation, the particles jam after flowing through an orifice. I need to find the mean radius of the jammed arch. To that end ,I have to identify and find the centres of the particles forming the arch. So, I have divided the area around the arch in 5 vertical regions or bins (width of the strips is so defined such that each strip will have a single jammed particle) spanning the arch and am using the bound region function to find the ymin( The jammed particles would be at the bottom of each strip as the arch forms near the floor of the hopper & Y is the vertical coordinate).Thus I now have to find the X coordinate of these particle to get their centres. This is where i am facing problems. I have to encode all this as i have to perform a lot of runs which involve finding the mean radius of the jammed arch each time , as the hopper jams at the end of each run. Is there any other way to find their centres?

Yes, this kind of task would be much easier to do in post-processing. Just dump the positions of all particles in the entire region of interest and then write a little python, Perl, c, fortran, Matlab … program to do your analysis.