Some problems about Gay-Berne chain model

Hi, Steve

Thank you for your reply. Without writing some code, I rather try another possible way you suggested, and I have some issues on format of read_data “body” section.

In the “in.file” contains the body style “body nparticle 2 2” and in the read_data, I write the “Bodies” like this:


2 1 12
0 0 0 0 0 0 3.678329043 -5.002694732 -10.54556217 2.400484776
-2.891139835 -12.25097999
6 1 12
0 0 0 0 0 0 1.122640509 -0.779584938 -13.95639781 -0.155203758
1.331969959 -15.66181563
10 1 12
0 0 0 0 0 0 -1.433048026 3.443524857 -17.36723345 -2.710892293
5.555079754 -19.07265128
It follow the rules:

atom-ID ninteger nfloat-pt
ixx iyy izz ixy ixz iyz x1 y1 z1 ...

… xN yN zN

(which described in

I give “6 bodies” in the head lines and also for the “Bodies” section (24 lines total, 4 lines for each body), when the program read to the body section, it shows

“ERROR on proc 0: identifier in data file: 0 0 0 0 0 0 1.122640509 -0.779584938 -13.95639781 -0.155203758

It can’t identify the 7th line. If I set “24 bodies”(but actually I have only 6 bodies) in the head lines, it would appear “Unexpected end of data file”.

When I run the example of body, it works. The body format of the data files are the same. So I can’t understand why it stopped.

(I deleted the space or Tab after the lines in the body section, but it doesn’t matter.) Maybe it just a simple problem, sorry about that.


I don’t understand why you are using atom_style body for ellipsoids.
You should just use atom_style ellipsoid. If you want to add
the extra particles at the ends of the ellipsoid, they can be
point particles. Atom_style ellipsoid allows that.


Hi, Steve, I constructed a chain with ellipsoid like:


If I want to represent sphere1 as a point, it seems can’t use npt/asphere ensemble without setting shape to it.

Then I set small radius (shape) and small mass to sphere1. If I set R0=0 to the spring-like bond between the two sphere1(or the sphere1-ellipsoid bond), they would bounce fiercely, and the ellipsoids also rotate freely (either for the normal R0).

So I would like to use a 3-point segment as a rigid body which the central atom is assigned as a ellipsoid, then connect the bodies to form a chain. Perhaps the torque won’t take effect to the ellipsoid.

Now I use hybrid atom_style, is that possible to use ellipsoid & body style in the same time? (or there are something wrong when I use these styles, so the program can’t read)

Thanks for all your help!


Again, don’t use body style at all - it doesn’t seem

relevant to your model. Also I don’t see why you need

sphere2 in this:


Just define the groups-of-3 as rigid bodies and put a bond between
pairs of sphere1 at each end. You should be able to define

atom_style ellipsoid with some of the particles as point particles.

You should also use fix rigid/npt (if you want to do NPT) and

it will do all the integration. The rigid particle will feel
torque due to the bond(s) at the end(s) of the rigid particle.


Hi, Steve

It’s very helpful, thanks for all your patience and kindness.

I really appreciate about that!