How to output only the atoms positions after equilibrium?

Hello All,

I am using write_data command after minimizing the emergy of my system, to output the after equilibrium data. This command gives me all the bond, angle data. How can I tell it to write only the atom positions (x,y,z) of one type of atoms?

I only need the position of my carbon atoms after equilibrium.

Thanks a lot.

Can use a custom data file instead, see dump command — LAMMPS documentation
e.g. something like this:
dump 1 all custom 100 dump.mypos.* id x y z

Thank you so much, but this also gives me the data in every 100 * timesteps. Is there any way to out put the last timestep data only to get just the last position of atoms in that moment that the system is relaxed?
(I know that I can increase the N=100 and delet some information in the data file, but wanted to know if there is more neat way to ask LAMMPS to print the last time step data)

Just check the documentation for the write_dump command — LAMMPS documentation
It is listed right next to write_data in the command overview: 5.5. General commands — LAMMPS documentation
:wink:

1 Like

Thanks a lot

Dear Axel,

my time step is 0.01 and I am running for 5000 times. I used "write_dump CNT custom cntrelx.* id type x y z " to output the cnt relaxed atom positions, and I am getting a file with the name : “cntrelx.100”. I am not sure where 100 comes from since I am not asking for repetetive outputs. I want to make sure that the data I am outputting is the relaxed data. Could you please explain this to me and tell me how to use the command properly?

I noticed 100 in “cntrelx.100” means data belongs to timestep 100,
when the time step is 0.01, timestep 100 is 100*0.01=1, does that mean this data belongs to the last timestep of last run?

Thanks a lot

The * means append the timestep to the file. So whatever timestep the dump file was created on will match the file name.

Thank you, I noticed that 100 in “cntrelx.100” means data belongs to timestep 100,
My time step is 0.01, so timestep 100 is the total time 100*0.01=1, does that mean this data belongs to the last timestep of last run?

Not sure, how many timesteps did you run for? Did you use the reset_timestep 0 or similar command? reset_timestep command — LAMMPS documentation

If you put the write_dump command after the last run command then yes it is for the last timestep.

1 Like

yes I ran 5000 times and then wrote write_dump command. that is why i was confused . 0.01 is my timestep and I was expecting 0.01*5000 =50

Can you post your exact commands from the input? It should be 5000 not 100 unless you used reset_timestep. It is the number of timesteps completed not simulation time in the file name for *

1 Like

Why don’t you just use cntrelx.final as file name for the write_dump command?
No more puzzling over timesteps and simulation length needed.

2 Likes