Rotating particles using displace_atoms command

Thanks for your reply.

Actually in the simulated system, the layers formed of smectic A phase are not along any coordinate axes and ellipsoidal particles are perpendicular to the layers. By setting the orientation, the particles can be made to align along any coordinate axes. But the layers would remain tilted from the coordinate axes. So I want to transform the coordinate system so that the new x axis is along the director and the particles remain perpendicular to the layers of smectic A phase as well. Can I do it in LAMMPS?

there is not much that i can add to what i said before. the set
command changes the orientation of individual ellipsoids and the
displace_atoms command translates blocks/groups of ellipsoids as a
whole. whether this can do what you want, depends on your specific
system and geometric constraints (e.g. for example, you cannot rotate
a bulk periodic system by arbitrary angles for geometric reasons).

if your system aligns in a specific way, then this is usually caused
by the input geometry and force field and there is not much of a point
in trying to make it look "neat". nature (and thus physics) is not
always "neat" and besides, you have to ask yourself, if your geometry
and model is properly represented.

axel.

Perhaps you can accomplish what you want using the "displace_atoms"
command, in conjunction with other commands. But in the long run, the
complexity of your system may eventually reach a point where you
should consider creating a LAMMPS data file. "Data" files give you
complete freedom to control the position and orientation of every atom
in your system (as well as add bond topology).

The basic "Data" file format is explained here:
https://lammps.sandia.gov/doc/2001/data_format.html

... however that documentation does not explain how to add
non-point-like particles (eg. ellipsoids). The complete documentation
(including a discussion of ellipsoidal particles) can be found in
these two links:

https://lammps.sandia.gov/doc/read_data.html
https://lammps.sandia.gov/doc/atom_style.html

----- moltemplate advertisement ----

...as it happens, there's an example of building a complicated system
of ellipsoids here

https://www.moltemplate.org/visual_examples.html#ellipsoids
additional files for this same example are located here:
https://github.com/jewettaij/moltemplate/tree/master/examples/coarse_grained/ellipsoids_CG_benzene

...however you have to install "moltemplate" to prepare the "data"
file which LAMMPS needs.
(Disclaimer: I wrote moltemplate. Thanks to Otello Roscioni, and
Matteo Ricci for the example.)

Note: The system shown there was intentionally made more complicated
than a simple crystal. (It has more in common with a cholesteric
phase than a smectic phase.)

If instead, you want a simple crystal with all of the ellipses pointed
in the same direction, then edit the "system.lt" file in that example
and change:

bulk = new BENZ
     [5].move(7, 0, 0)
     [5].move(0, 7, 0).rot(10,0,1,0)
     [5].move(0, 0, 7)

to this:

bulk = new BENZ
     [5].move(7, 0, 0)
     [5].move(0, 7, 0)
     [5].move(0, 0, 7)

You can apply a rotation to all of the individual "Benz" molecules
(particles) in the array using this syntax:
bulk[*][*][*].rot(45,0,1,0)

Feel free to change the names of these objects (ie "BENZ" and "bulk")
to something more appropriate to your system.

Note: This will give you a crystalline phase, not a Smectic phase.

   Moltemplate does not have an easy way to introduce random
perturbations to the entries in an array. But you can many individual
commands to move and rotate each molecule in the array individually
(although this would be quite arduous). Hopefully, it shouldn't
matter. The force-field parameters you are using should hopefully
spontaneously allow the particles to relax into a Smectic phase when
they reach thermal equilibrium at the appropriate temperature, even if
the initial conformation was crystalline.

Note 2: You can edit the shape of the ellipsoids from disks to rods,
by editing (and perhaps renaming) the "benzene_cg.lt" file, and
modifying these parameters:

  # atom-ID width1 width2 width3 qw qx qy qz
  write("Data Ellipsoids"){
    $atom:ben 6.3888 6.3888 3.1967 1.0 0.0 0.0 0.0
  }

Hope this is helpful to someone who simulates ellipsoids.
Cheers

Andrew

I tried to rotate the whole system(smectic A phase) using displace_atoms rotate command. They get rotated to the desired position but further if I simulate the rotated system using nvt/asphere, I get the error of ‘simulation unstable’. I think this is due to the overlapping of ellipsoidal particles in a high density system. To solve this problem, I used minimize command and also tried to simulate with nve/asphere ensemble. But this problem is not going.

Displace_atoms is supposed to rotate the orientation
of the ellipsoids when it rotates their position, E.g. if you
had a block of ellipsoids all oriented in one direction
and did a rotate by 90 degrees, the direction they
are pointing in should also be rotated. However, you
might be the first person to ever use displace_atoms
for ellipsoids, so you should verify that is happening.
E.g. do a dump before and after the rotate and
dump the quaternion for each ellipsoid.

Steve