How to do a simulation anealing to get good grain boundaries for polycrystals

Hi All, I’m a beginner for Lammps and I’m trying to use Lammps to do the simulation annealing using the polycrystal input file generated by ATOMSK. However, the result looks no good. I have attached lammps script here. For the input file, because I’m a new user I cannot attach it, if you need that I can email the file to you. Could you please help me with modifying this lammps script. Thanks a lot!

Lammps script:

Import atom information

units metal
dimension 3
boundary p p p
atom_style atomic
lattice hcp 3.21

read_data Mg_poly.lmp

--------- Force Field ---------

pair_style eam/fs
pair_coeff * * Mg_mm.eam.fs Mg

#----------- Settings -----------
compute csym all centro/atom 12
compute eng all pe/atom
compute eatoms all reduce sum c_eng

#-------------Run minimization----------
reset_timestep 0
velocity all create 30.0 12345
run 0
velocity all scale 30.0
thermo 100
thermo_style custom step pe lx ly lz press pxx pyy pzz c_eatoms
dump 1 all cfg 100 dump.relaxed_*.cfg mass type xs ys zs c_csym c_eng
min_style cg
minimize 1e-15 1e-15 5000 5000



print “All done”

What do you mean it “doesn’t look good”? Be more specific.

I noticed that you don’t run any MD steps, only minimization. That won’t get you the desired final result, only the first step. You need to set an integrator (e.g., fix nvt, fix npt, fix nve) and use the run command to equilibrate your system.

The grain boundaries in the output file seems to have big gaps after I have run this script. Also could you please tell me in a more detailed way about setting the integrator? Thanks a lot!

Does your initial data file “Mg_poly.lmp” have these gaps? This is turning into a question of the physics of your system and how to run MD simulations with LAMMPS, and less about specific issues with the LAMMPS software. You need to talk with your mentor/advisor/tutor about these issues and learn about how to use LAMMPS from the examples and documentation. This forum is not a suitable place for either of those.

“big” is not a good descriptor. What is “big” depends a lot on the circumstances.

Having gaps after a minimization is most likely due to one of three reasons:

  1. your initial geometry has a far too large spacing of the atoms so that when you apply the force field and use minimization, the atoms move closer (as determined by the potential) and thus form gaps
  2. your force field (pair style and potential file) is not suitable for the system you are simulating
  3. the atoms at the grain boundaries are moving to relaxed/reconstructed positions and that induces some shrinkage and thus requires some relaxation of the box as well. note that minimization always moves the system toward a 0K geometry (regardless of the actual assigned temperature). So it may want to expand again when equilibrating the system.

You should probably discuss your findings with a more experienced colleague or your adviser. A local person is in a much better position to correct some trivial beginner’s mistakes than people from remote. The important point is that problems with simulations rarely have a simple, easy to locate reason that can be quickly corrected by just looking at your input and making a simple change. Instead you will first have to understand the cause and only then can you choose a suitable correction.