how to use VMD to better visulize the surface of a crystal

Dear All,

I’m using lammps to simulate Al2O3 single crystal and pure Al single crystal. My dump file contatins id, type, x, y, z. When I use VMD to visualize my dump file, I found that there were some isolated atoms on the surface of the box as shown in picuture_1, making the surface rough. My understandings is that this is because the coordinates of these atoms are out of the boundary of the box. If we check the dump file, we can see that the coordiantes of some atoms are less than xlo or greater than xhi.I want to know how to move these atoms back to the simulation box so that VMD can give a better visualization of the surface, with the surface of a crystal being as flat as a inner plane, which is shown in picture_2? To do this, what should be included in dump file?

Thanks and look forward to your reply.

Rui

picture_1.JPG

picutre_2.JPG

Dear All,

I'm using lammps to simulate Al2O3 single crystal and pure Al single
crystal. My dump file contatins id, type, x, y, z. When I use VMD to
visualize my dump file, I found that there were some isolated atoms on the
surface of the box as shown in picuture_1, making the surface rough. My
understandings is that this is because the coordinates of these atoms are
out of the boundary of the box. If we check the dump file, we can see that
the coordiantes of some atoms are less than xlo or greater than xhi.I want
to know how to move these atoms back to the simulation box so that VMD can
give a better visualization of the surface, with the surface of a crystal
being as flat as a inner plane, which is shown in picture_2? To do this,
what should be included in dump file?

​try dumping xu, yu, zu instead of x, y, z​.

you don't want to wrap them "back into the box"; that is already happening,
but rather you don't want them to be wrapped back.

another issue could be, that you are creating atoms exactly on the box
boundary. move the box by a small fraction of the lattice constant, say
20%, and these atoms may not be coming close to the box boundaries at all,
so this all will become a non-issue.

axel.

Dear all,

I am simulating nanoindentation of mono-layer graphene. We modeled the mono-layer graphene in Lammps.

boundary f f s
units metal

create geometry

lattice custom 1.0 a1 2.46 0.0 0.0 a2 0.0 4.26 0.0 a3 0.0 0.0 3.4 &
basis 0.0 0.0 0.0 &
basis 0.5 0.16666666667 0.0 &
basis 0.5 0.5 0.0 &
basis 0.0 0.66666666667 0.0
region graphene block 0 364.14 0 364.14 77.52 80.92 units box
create_box 1 graphene
create_atoms 1 region graphene
mass 1 12.01
group graphene region graphene
pair_style airebo 2.5 0 0
#pair_style rebo
pair_coeff * * …/CH.airebo C
timestep 0.001
minimize 2.3e-16 1.0e-3 200000 200000

Dear all,

I am simulating nanoindentation of mono-layer graphene. We modeled the
mono-layer graphene in Lammps.

boundary f f s
units metal
# create geometry
lattice custom 1.0 a1 2.46 0.0 0.0 a2 0.0 4.26 0.0 a3 0.0 0.0 3.4 &
                         basis 0.0 0.0 0.0 &
                         basis 0.5 0.16666666667 0.0 &
                         basis 0.5 0.5 0.0 &
                         basis 0.0 0.66666666667 0.0
region graphene block 0 364.14 0 364.14 77.52 80.92 units box
create_box 1 graphene
create_atoms 1 region graphene
mass 1 12.01
group graphene region graphene
pair_style airebo 2.5 0 0
#pair_style rebo
pair_coeff * * ../CH.airebo C
timestep 0.001
minimize 2.3e-16 1.0e-3 200000 200000
---
---
---

but we got an error message: Cannot use neighbor bins - box size << cutoff
(../neighbor.cpp:1803).
If I change the region command:
region graphene block 0 364.14 0 364.14 67.52 80.92 units box,
that is ok. But we cannot get a single-layer graphene.
What mistakes in our input codes? How to correct the codes for get a
single-layer graphene?

​the problem is the choice of boundary condition as f f s
this will have the box collapse in z direction, since there are no atoms.
if you use f f m boundary and the box will expand in z, but never shrink
below the initial dimensions.

axel.

Dear Axel,

Thanks for replying my email on weekend.

The reason is that I create some atoms exactly on the boundary of the box. To move the box by a samll fraction, one way I can adopt is to difine a small box, then define a larger region and create atoms in this region. In this way, I can let the boundary of the box locate between two atom layers. I can do this in x and y direction, however, in z direction, because there are two atom layers in Al2O3 very close to each other and I want to create an interface located excatly between these two layers, so no matter how I move the box in z direction, one of the two layers will be very close to the boundary. Could you give me some suggestions on how to deal with it? Now I don’t know whether atoms on the surface at the begining (shown in picture1) still stay on the surface in the end of the simulation (shown in picture2)?

Is there any another way to achieve this? I mean is there any command I can use in VMD which can add Lx to an atom’s x coordinate automically if the atom’s x coordinate is less than xlo in dump file? We know that in a frame of a dump file, it is possible that an atom’s x coordinate is less than xlo. My understanding is if this happens, this means we should add Lx to the atom’s x coordinate in a frame to get its real x coordinate. Is my understanding correct?

Thanks and look forward to your reply.

Rui

surface1.JPG

surface2.JPG

Dear Axel,

Thanks for replying my email on weekend.

The reason is that I create some atoms exactly on the boundary of the
box. To move the box by a samll fraction, one way I can adopt is to difine
a small box, then define a larger region and create atoms in this region.
In this way, I can let the boundary of the box locate between two atom
layers. I can do this in x and y direction, however, in z direction,
because there are two atom layers in Al2O3 very close to each other and I
want to create an interface located excatly between these two layers, so no
matter how I move the box in z direction, one of the two layers will be
very close to the boundary. Could you give me some suggestions on how to
deal with it? Now I don't know whether atoms on the surface at the begining
(shown in picture1) still stay on the surface in the end of the simulation
(shown in picture2)?

​write out unwrapped coordinates.​

Is there any another way to achieve this? I mean is there any command I
can use in VMD which can add Lx to an atom's x coordinate automically if
the atom's x coordinate is less than xlo in dump file? We know that in a
frame of a dump file, it is possible that an atom's x coordinate is less
than xlo. My understanding is if this happens, this means we should add Lx
to the atom's x coordinate in a frame to get its real x coordinate. Is my
understanding correct?

the effects you are complaining about exactly happen because of atoms being
wrapped around PBC after moving outside the box due to thermal motion.

again, i already suggested dumping unwrapped coordinates to you.

axel.

Thank Axel,

The code is ok according to your suggestion.

Mike

在 2017-06-11 22:29:51,“Axel Kohlmeyer” <akohlmey@…24…> 写道:

Dear Axel,

To better visualize the surface of a crystal, in another word, to see whether atoms on the surface of a crystal at the begining of a simulation are still on the surface when the simulation finishes, I took your suggestion and writed out unwrapped coordinates. When I used VMD to display this lammps trajectory file, I found that the crystal as a whole moves from one side of the screen to the other side and then disappeared. It seems that the simulation box moves a long distance. Why this happens? What can I do to stop the simulation box from moving in VMD?

Thanks and look forward to your reply.

Rui

Dear Axel,

To better visualize the surface of a crystal, in another word, to see
whether atoms on the surface of a crystal at the begining of a simulation
are still on the surface when the simulation finishes, I took your
suggestion and writed out unwrapped coordinates. When I used VMD to display
this lammps trajectory file, I found that the crystal as a whole moves from
one side of the screen to the other side and then disappeared. It seems that
the simulation box moves a long distance. Why this happens? What can I do to
stop the simulation box from moving in VMD?

this is not a visualization issue, but an indication of a serious
problem in your simulation.
search the mailing list archives for "flying icecube" for discussions
of the reasons and ways how to avoid it.

axel.