how to rotate a molecule

Dear all,

i have two components in my system .cnt and a molecule i named it cnad.the composition of the system is like this:
cnt is gonna be in the center of the simulation box and molecule is gonna be 4-5 A away from it.pairwise interractions inside of the cnt and molecule should be cut.i tried to do what i wanted by using lammps comments till here but when i converted the dump file into pdb file and checked with vmd i saw the position of the items did not change. why is that?
the other thing i wanted to know how can i rotate cnad so it will be paralel to cnt?is it possible to do this with lammps?
my input file and data file are attached…


Aysun Itai

cnad-cnt(2).data (28 KB)

cnad-cnt(3).in (2.36 KB)

cnad-cnt_trj.pdb (7.82 KB)

To exclude pairwise interactions within a molecule, see
the neigh_modify exclude molecule option.

If you want to rotate a molecule while a simulation
is running, see the fix move rotate command.

If you want to do it as a setup step, then I suggest
you write a script or program to do it and just create
a new data file with the rotated coords. It is just
multiplying each atom's 3-vector of coords by a 3x3
rotation matrix.


Here's an alternative procedure using "" and
"". (These are some new utilities I've been working on.
You can download them at They are still
experimental, but I am actively working on them. Please report any
bugs you find!)

Once you have installed everything, you can use "" to
extract the two molecules in your system and convert them into .LT
format: -name CNAD -molid "1" > -name CNT -molid "2" >

Then create new DATA and IN files using:

This will generate a new data file (named ""), and a new
.in file (named, containing all of the topology and
force-field data in your original files (hopefully). (Unfortunately
it might also renumber everything, but you can override that using the
-a argument described in appendix C.1 of the manual.)

The file "" (attached) contains the rotation and move commands.
The "move()" and "rot()" commands are explained in section 4 of the manual.

After downloading the archive, unpack it, and update your $PATH
environment variable to point to the "src" subdirectory. (Optional:
You may also want to create a MOLTEMPLATE_PATH variable and point it
to the "common" subdirectory. More careful instructions are in
section 2 of the manual.)

cnad-cnt(3).in (2.36 KB)

cnad-cnt(2).data (28 KB) (847 Bytes)