fix move problem

Dear All,

I just got a problem.
When I use fix move rotate command, as
“fix 1 Chain-1 move rotate 0 0 0 0.5 -2 3.8 1 units box”
The rotation axis R = (Rx,Ry,Rz) is given randomly.
But I just got the error message that “some bond is too long,”
It said the bond length between 2 atoms are larger than the lenth of box.
I donot know why since I have the ppp bounday conditions.
So any suggstions?
Thanks.

Have you visualized your simulation? (Have you looked at the
positions of the atoms?)
This is the best way to figure out what is going on.

   ---- visualization instructions ----
I am attaching some instructions for using VMD to visualize a LAMMPS
trajectory. You will need a LAMMPS DATA file, and convert it to a PSF
file (which VMD needs) using topotools
https://sites.google.com/site/akohlmey/software/topotools

Does the error occur at the beginning of your simulation (timestep 0), or later?
You may need to save (dump) your trajectory frequently to catch the error.
(The attached README file suggests how to use the "dump" command."

If that does not work, you can use "run 0" and then "write_restart
onetimestep.rst" to create a restart file after the first timestep.
Then you can convert "onetimestep.rst" to a DATA file using
"restart2data".
http://lammps.sandia.gov/doc/Section_tools.html
Then you can view the atom coordinates in VMD using topotools. This
new DATA file should include the effect of the the "rotate" command
you are using.)

Cheers

Andrew

README_visualize.txt (2.85 KB)

Dear Sir,

I did not visualize the system.
But I do check the 2 particular bonded atoms which Lammps reported later that hugh bond length is found by fix moving command.
Before moving, the bond length is correct.
The fix move command is used here for a single chain. So all the bond length of this chain should not change after the movement.
But once I try to run a simulation with this command, it shows the error message and I cannot get the results at all.
So I donot know that happens at this moment.
what possible reason for this ?
Also I can get the error message when I use fix move linear with a larger velocity.
Any suggestion is really appreciated.

What is the exact error message? There should not be a message that
reads "some bond is too long,"

Are you using pair_reax with bond_style? If yes, then you should not.
ReaxFF determines bonds by itself. I can use fix move rotate with
reax/c with ppp boundary condition without a problem.

Thanks,
Ray

Thanks for replying

here is the message

WARNING: FENE bond too long: 2 432942 432943 1.43213
WARNING: FENE bond too long: 2 230011 230012 1.53405
WARNING: FENE bond too long: 2 62277 62278 1.7511
WARNING: FENE bond too long: 2 62392 62393 1.84617
WARNING: FENE bond too long: 2 62399 62400 1.66254
WARNING: FENE bond too long: 2 63481 63482 1.84419
WARNING: FENE bond too long: 2 63741 63742 1.64555

ERROR on proc 7: Bond atoms 424474 424475 missing on proc 7 at step 2
ERROR on proc 1: Bond atoms 432939 432940 missing on proc 1 at step 2

Bond potential is chosen as FENE.
I donot use the ReaxFF in this simulation.

Dear Sir,

   I did not visualize the system.
   But I do check the 2 particular bonded atoms which Lammps reported later
that hugh bond length is found by fix moving command.
   Before moving, the bond length is correct.

You said you are using:
  "fix 1 Chain-1 move rotate 0 0 0 0.5 -2 3.8 1 units box"

You do realize that the last argument "1" is the period of the
rotation (in time units, not time steps). Perhaps you thought it was
an angle (in degrees)?

So it looks like your command rotates Chain-1 by 360 degrees in a
duration of 1.0. If you are using real units, this is a very fast
rotation. Is this what you intended?

Try increasing this last argument to a number which is more
reasonable. This should reduce the amount of rotation that occurs in
a single timestep, and make it easier to see what is going on.

Cheers

Andrew

Sorry, please pardon me for mis-reading your message. :slight_smile:

Ray

Dear Sir.

Actually, the polymer system is not equilibrium.
So I try to give random translation and rotation to equilibrium the system.
the number 1 is just a random number.
the group chain-1 is the 1st chain of the polymer system.
So the displacement of the chain may be very big even 1 step calculation.

Sorry, please pardon me for mis-reading your message. :slight_smile:

Ray, you're reply seemed fine to me.

Dear Sir.
   Actually, the polymer system is not equilibrium.
   So I try to give random translation and rotation to equilibrium the
system.
   the number 1 is just a random number.
   the group chain-1 is the 1st chain of the polymer system.
   So the displacement of the chain may be very big even 1 step calculation.

Dear Zhiwei

Are trying prepare your atoms before the simulation begins?
You should not use "fix rotate" for this task.

Do you realize that the "fix rotate" command rotates your atoms every
timestep? (Continuous rotation.) Suppose you are using a timestep of
0.5. This means that every timestep, Chain-1 rotates by 180 degrees
(because the period would be 2 timesteps, since 2*0.5=1). Is this
what you want?

If you want to prepare the coordinates of your atoms before the
simulation begins, you can do that by creating a DATA file with the
atoms in the correct locations. There are several programs you can
use to build your data file:

(There's also a new program "Molecular Dynamics Studio":
Molecular Dynamics Studio download | SourceForge.net)

--- moltemplate ---
I did not intend to use this opportunity to promote my program, but
because I wrote it I am familiar with how to use it. You can use
moltemplate to rotate your polymer. (There may be a way to do this
using topotools as well.)

If you downloaded LAMMPS recently, it should come with a version of
"moltemplate". (It should be located in the "tools/moltemplate"
directory. If not, you can download it from www.moltemplate.org. The
procedure for installing moltemplate is described in chapter 2 of the
manual. You can download examples there too.)

Once you have installed moltemplate, there is an example showing how
to take an existing DATA file, extract a single molecule from it,
rotate it, move it (and copy it) and build a new DATA file.

The example is located in this subdirectory:
examples/all_atom_examples/convert_LAMMPS_to_LT_examples/cnad-cnt/

(There are some pictures in the "images" subdirectory.)
Feel free to post a question if you run into difficulty.

Moltemplate is useful for rotating and moving rigid molecules.
I suspect there may be scripts which are better at generating random
flexible polymers. (For simple polymers, pizza.py has a chain.py
tool.)

I hope that something I said helps.
Cheers!

Andrew

I'm sorry, I meant "fix move". (There is no "fix rotate".)
:slight_smile:

Dear Andrew

Thanks for replying again.
I’m really appreciated.
I do know the meaning of the parameters of fix rotate.
Yes. one timestep with 180 degree’s rotation may be needed.
Indeed, I want to rotate with random angle.
I use coarse grain model to generate the data file first and then want to equilibrium the system.
In order to achieve that, I will use some random translations and rotations.
That’s my main goal.
So far, the translation is achieved by using displace_atom command.
I have no idea about rotate movement, that’s why I choose the fix move rotate.
And got the problems.

So the displacement of the chain may be very big even 1 step calculation.

Fix move is generally meant to move atoms slowly during a run.
You could have problems if you try to move atoms a large
distance in a single step. Especially if you don't reneighbor every step.
Even if you do, you might get bad dynamics or lose atoms.

Steve