bring back the structure

Hi, all, I am wondering how to bring the simulation structure back to the initial position every timestep, since the structure is moving out of the region I wanted it to stay. Thanks.

Best,
Haoxiang Huang

Hi, all, I am wondering how to bring the simulation structure back to the initial position every timestep, since the structure is moving out of the region I wanted it to stay. Thanks.

There are different ways to tether a structure or group of atoms to a location in space, but first you need to understand why the drift happens in the first place.

This sounds like there is a problem with your initial setup and that should be removed first. Adding a position or structure restraint modifies your dynamics and may thus taint your results.

While I used fix moment command, the structure will not move. However, I don’t think fix moment will be the right choice since this command will change the dynamics of structure and the result of simulation. I wonder there is any command can use to fix the structure to its center; I know the coordinate of the center and I am sure the initial setup should be correct.

While I used fix moment command, the structure will not move. However, I
don't think fix moment will be the right choice since this command will
change the dynamics of structure and the result of simulation. I wonder

...and any other operation will not modify the dynamics and structure?
that doesn't make any sense at all.

there is any command can use to fix the structure to its center; I know the
coordinate of the center and I am sure the initial setup should be correct.

if you know things so much better, why do you ask? you are not making
a lot of sense here. i already tried to explain that your approach is
the wrong one. before looking for a method that resolves the problem,
you need to understand what is causing it. either it is intrinsic in
your setup, or there is something done wrong. if you modify your
simulation so that you get the trajectory that you want to see, you
are not doing research, but you are making a movie and then you should
look for a job at pixar or similar.

axel.

Sorry about that, the setup for the simulation initially is fixed in NVT and NPT to equilibrate the structure. Those are necessary steps. However, the real simulation for that is under NVE, and the structure is moving off the center while I used this command. The reason to bring the structure back to the center is that I am trying to find the vibrational displacement difference of each individual atom based on the equilibrium structure coordinate which I already calculate. However, if the structure is moving off the center, the difference is large and it will not be the correct for the vibrational results I want.

Sorry about that, the setup for the simulation initially is fixed in NVT and NPT to equilibrate the structure. Those are necessary steps. However, the real simulation for that is under NVE, and the structure is moving off the center while I used this command. The reason to bring the structure back to the center is that I am trying to find the vibrational displacement difference of each individual atom based on the equilibrium structure coordinate which I already calculate. However, if the structure is moving off the center, the difference is large and it will not be the correct for the vibrational results I want.

we are going in circles and you are *still* not paying attention. what
you describe is all fine and well, but that is not relevant to your
problem. there are lots of possible reasons why a system is drifting.
most of the time it is due to bad choice of parameters, bad set up,
bad initial conditions or similar. there is no generic "do this not
that" kind of answer. if you don't understand where the drift is
coming from, you cannot know what is the best way to proceed. and i
cannot make you understand from remote. that is something that you
have to do.

axel.

Thank you Dr. Kohlmeyer, I cannot change the initial parameters to rebuild the structure...since this structure is from others and I am not sure how they connect the bonds and figure out the best parameters for the structure. But, under this situation, you mean there is no way to use lammps command to move the structure back to the center?

Thank you Dr. Kohlmeyer, I cannot change the initial parameters to rebuild the structure...since this structure is from others and I am not sure how they connect the bonds and figure out the best parameters for the structure. But, under this situation, you mean there is no way to use lammps command to move the structure back to the center?

that is not what i am saying. i feel like a broken record. for the
last time: there are multiple ways to address the situation that you
are describing. but which option to choose depends on what is causing
the drift. i don't have a crystal ball, so i cannot know. it looks
like you better go and discuss with your adviser and get some
education on this subject.

axel.

If you want the structure to stay static (not move),
then don’t time integrate those atoms in your final-stage

NVE simulation.

Steve