[lammps-users] atom_style for CNT

Hi, all,

I am using Lammps to simulate the thermal transport of carbon nanotubes. I am wondering what kind of atom_style should be used. I looked through the past sourceforge entries. Styles including atomic, molecular, and full have been used. I try atomic and molecular styles in my simulation respectively. But the atom lost errors occurred in the simulation using molecular style. It’s OK when I use atomic style. The potentials are AIREBO for both of them. The other setting are also the same. What’s the difference between these two atom styles? I thought they should same for AIREBO potentials. The input file is as following. Besides, I also do not know whether it is necessary to minimize the energy. Thank you.

units metal
dimension 3
boundary f f p
atom_style molecular
newton on off

read_data data.swnt

region up block INF INF INF INF -0.614012 9.21018044 units box
region down block INF INF INF INF 244.990799 254.81499144 units box

pair_style airebo 3.0

pair_coeff * * …/…/potentials/CH.airebo C

neighbor 4.0 bin
neigh_modify delay 0 every 1 check yes

timestep 0.0005

velocity all create 303.0 781654 mom yes rot yes dist gaussian

#minimize 1.0e-8 1.0e-6 1000 10000

reset_timestep 0

fix thermostat all nvt temp 300.0 300.0 0.1
compute alltemp all temp
thermo_style custom step atoms temp press pe ke etotal xlo xhi ylo yhi zlo zhi vol
thermo_modify temp alltemp lost warn

compute ke all ke/atom
variable temp atom c_ke/(1.51.0)/8.617343100000.0
fix temp_profile all ave/spatial 1 100000 100000 z -0.614012 9.82419244 v_temp file temp.profile units box
fix temp_atom all ave/atom 1 100000 100000 v_temp
compute up_temp all temp/region up
compute down_temp all temp/region down
variable delta_t equal c_down_temp-c_up_temp

fix delta_t all ave/time 1 100000 100000 v_delta_t file delta_t.dat
dump 1 all xyz 100000 dump.coord.*
dump 2 all custom 100000 dump.vel.* id type mass vx vy vz fx fy fz f_temp_atom
restart 400000 restart.mwnt.*
thermo 1000
run 400000

unfix thermostat
fix ensemble all nve
fix heat_swap all thermal/conductivity 40 z 50
variable thermal_condt equal f_heat_swap/(2.019.228080843.1415926f_delta_t(step-400000)*0.0005+1e-10)1.6021.0e4
fix thermal_condt all ave/time 100000 1 100000 v_thermal_condt file thermal_condt.dat
run 2000000


Hi, all,

I am using Lammps to simulate the thermal transport of carbon nanotubes. I
am wondering what kind of atom_style should be used. I looked through the
past sourceforge entries. Styles including atomic, molecular, and full have
been used. I try atomic and molecular styles in my simulation respectively.
But the atom lost errors occurred in the simulation using molecular style.
It's OK when I use atomic style. The potentials are AIREBO for both of them.

that must be a fluke. the impact of the choice of atom_style is
for which per-atom properties storage is provided. if a simulation
doesn't use them, the only impact would be different (parallel)
efficiency.

The other setting are also the same. What's the difference between these two
atom styles? I thought they should same for AIREBO potentials. The input
file is as following. Besides, I also do not know whether it is necessary to
minimize the energy. Thank you.

if the initial coordinates are not fully consistent with your
choice of force field parameters, yes. if your system is
already equilibrated and your data file contains the matching
velocities, no. for everything else, it depends.

cheers,
     axel.

Please post a simple example (small, quick-to-run as possible)
where running the same model with atomic vs molecular
styles gives a different answer. I don't think it should.

Steve

Hi, all

I attached the input file, data file, and output file. All the other settings are same except the atom_style. The data file for molecular style simulation contains the bond information, but the data file for atomic style simulation doesn’t. The output file shows the temperature is very high when the equilibration begins for molecular style simulation and after 4000 steps the atoms get lost.
Thank you.
Regards,
Liang

molecular.zip (109 KB)

atomic.zip (31.4 KB)

Hi, all

I attached the input file, data file, and output file. All the other
settings are same except the atom_style. The data file for molecular style
simulation contains the bond information, but the data file for atomic style

so the two inputs are _not_ identical.

the issue with your "molecular" input is not that you
have a different atom style, but that you define bonds,
but don't define a bond style for them (which is not needed
in the first place, since AIREBO considers bonds dynamically
in the pair_style).

if you'd use the "atomic" data file with the "molecular" atom style
you get the same output.

GI->GO.

cheers,
   axel.

simulation doesn't. The output file shows the temperature is very high when
the equilibration begins for molecular style simulation and after 4000 steps
the atoms get lost.

...and you don't wonder whether the bond parameters have anything to do with it?

1 Like

The issue is slightly more subtle. The data file for molecular
requires an mol ID per atom, which you added. So you
need that to run with atom_style molecular. If that's all
you did you would get the same answer with atom_style atomic.
But you also added physical bonds, which as Axel says, is
not right for AIREBO. LAMMPS would have ignored them
except that the default for special_bonds is to screen pairwise
interactions for 1-2, 1-3, 1-4 interactions. This means those
interactions are not passed to AIREBO which gives you
totally different results. If you used special_bonds lj/coul 1 1 1
then AIREBO would have been fine. But it still is pointless
to define bonds for a bond-order potential which calculates
them dynamically.

Steve

1 Like