Issue with lattice command

Hello,

I use the lattice command to orient a Cu crystal. However, after orientation and visualizing the structure, the result does not have an fcc structure. I provided the script below and attached the output structure “test.lmp”. I appreciate it if somen can guide me with this issue. I’m using the latest stable version of lammps.

Thanks,
Reza.

clear
dimension 3
boundary p p p
units metal
atom_style atomic
atom_modify map array
lattice fcc 3.62 orient x 1 1 -2 orient y 1 1 1 orient z 1 -1 0
region box block 0 1 0 1 0 1 units lattice
create_box 1 box
create_atoms 1 box
replicate 3 3 3
mass * 62.5
write_data test.lmp

quit

test.lmp (65 KB)

Hello,

I use the lattice command to orient a Cu crystal. However, after orientation and visualizing the structure, the result does not have an fcc structure. I provided the script below and attached the output structure “test.lmp”. I appreciate it if somen can guide me with this issue. I’m using the latest stable version of lammps.

why should it? you generate a block with the rotated lattice, but you only do this for a 1 by 1 by 1 lattice spacing size box. then you replicate it along the x, y, and z axis. however, with the rotated lattice, the repeat unit is not a single lattice spacing in those directions, so you do not get a clean continuation.

LAMMPS does what you ask it to do and does it correctly. if you don’t get what you expect, then it is because you are not asking for it correctly.

axel.

Dear Axel,

Your help is greatly appreciated as always. Just one more thing. I already asked a question about fix_modify but I didn’t get any response. I provided it below again. Please kindly ignore it if it is inappropriate to be asked here, and I will post it again.

I am interested to control temperature and pressure for a specific region using the NPT ensemble which is assigned to the yellow atoms (Heat region) in the image attached and NVE everywhere else, i.e., regions composed of red atoms (NVE region). Now, I want to use the following commands where x and z are periodic directions and I want to achieve zero pressure for x, z, xz, and yz components while keeping the temperature of the Heat region at 100K:

compute CtrlTemp Heat temp
fix 1 Heat npt temp 100 100 (100.0*dt) x 0.0 0.0 (1000.0dt) z 0.0 0.0 (1000.0*dt) xz 0.0 0.0 (1000.0dt) yz 0.0 0.0 $(1000.0*dt) tchain 10 tloop 10 pchain 10 ploop 10 nreset 1000
fix_modify 1 temp CtrlTemp press ???
fix 2 NVE nve
run 10000

I appreciate it if you can give me a hint on how to tune NPT command for the specific region Heat using fix_modify. I have the same issue with box/relax command. By the way, are the commands above appropriate to control the temperature in the Heat region at 100K?

Many thanks in advance for your time and consideration,

Best regards,

Reza.

NPT-NVE.png

Dear Axel,

Your help is greatly appreciated as always. Just one more thing. I already asked a question about fix_modify but I didn’t get any response. I provided it below again. Please kindly ignore it if it is inappropriate to be asked here, and I will post it again.

please don’t post it again, because what you are asking doesn’t make sense. if you do fix npt or fix box/relax, it will always modify the whole box. there is not such thing or “controlling pressure” for a region only. so there cannot be a a fix modify command that does it.
now if you apply fix npt on a subset of atoms, it will create a temperature compute for that group automatically, so no need to create one separately, but the pressure compute will be for the whole cell and cannot be for a subset (since for starters, it does not even have a well defined volume).

I am interested to control temperature and pressure for a specific region using the NPT ensemble which is assigned to the yellow atoms (Heat region) in the image attached and NVE everywhere else, i.e., regions composed of red atoms (NVE region). Now, I want to use the following commands where x and z are periodic directions and I want to achieve zero pressure for x, z, xz, and yz components while keeping the temperature of the Heat region at 100K:

you are trying to apply macroscopic thinking to a microscopic problem, and that almost always is a mistake.

axel.