I want to calculate 2d density profile

i want to calculate contact angle so that firstly i want to calculate 2d density profile
x and z dimension is non periodic only y dimension is periodic i put surface near the center of the simulation box so i dont understand how can i write compute and fix command
compute layers all chunk/atom bin/1d z lower 0.05 x -200 200 units reduced
fix 6 all ave/chunk 100 10 1000 layers density/mass file density.$a.2d

i used this command but data is not generated.

Please, formulate your post better. I can barely decode what you are asking. Only then someone will hopefully help you out.

I want to calculate the contact angle using density profile calculations for a droplet containing around 100,000 atoms on a graphene surface. How can I proceed further with the contact angle calculation?

What happened to checking out text books, searching the published literature, or searching the web before posting such a question in a public forum?

A quick search on Google for example reveals that there are publications describing efficient methods for computing this from molecular dynamics simulations and that there are even multiple dedicated software packages for easily computing this from MD trajectories.

If you expect that somebody will do this for you and give you a digested account of the findings and a personal “do this, then that” kind of tutorial, you still have a lot to learn about how online communities work.

P.S.: Don’t post the same question twice. This is also considered against the etiquette of online forums.