Can lammps run single atom at NVE?

Dear Mr or Mrs,

I would like to simulate only single atom at NVE without the thermostatting. But it will say “Attempting to rescale a 0.0 temperature”. And after I create the second atom, then it will run in a right way. Therefore, I wonder whether lammps can simulate single atom at NVE. If so , How to do that?My input file is attached.

Thank you!

3D Gay Berne on Surface simulation

units real
atom_style ellipsoid
dimension 3
boundary p p p
atom_modify id yes

atom_modify map array

atom_modify sort 100 25
lattice fcc 5.0
region box block 0.0 5.0 0.0 5.0 0.0 5.0
create_box 1 box
#create_atoms 1 region substrate
create_atoms 1 single 2 2 2
#create_atoms 1 single 3 3 3
compute_modify extra 0
set type 1 mass 16.04
set type 1 shape 1 1 1
velocity all create 300.0 4928459 rot yes dist gaussian

set group all quat/random 18238

compute rot all temp/asphere
compute_modify extra 0
group spheroid type 1
variable dof equal count(spheroid)+2

compute_modify rot extra ${dof}

neigh_modify delay 0 every 1

timestep 0.0002

variable z_atom atom z

variable x_atom atom x

variable y_atom atom y

Get Constants of the Energy That Don’t Change Upon Taking Directional Derivatives

variable energy_x atom (1.47025e-06v_x_atom^4±0.000598126v_x_atom^2+0.0156679+0.00012389v_x_atom^3±0.0128309v_x_atom)sin(1.04344v_x_atom)±1098.47+sin(-10.7193v_x_atom+0.464616)0.000818385+0.24923cos(0.0319159v_x_atom+0.106606)

variable energy_y atom (1.47025e-06v_y_atom^4±0.000598126v_y_atom^2+0.0156679+0.00012389v_y_atom^3±0.0128309v_y_atom)sin(1.04344v_y_atom)±1098.47+sin(-10.7193v_y_atom+0.464616)0.000818385+0.24923cos(0.0319159v_y_atom+0.106606)

variable energy_z atom 6602.67exp(-2.41063v_z_atom)-176.047v_z_atom^(-3)-1829.08v_z_atom^(-6)+2866.59*v_z_atom^(-8)

variable energy_total atom v_energy_xv_energy_yv_energy_z

#Trans Forces

variable fx_2 atom v_energy_yv_energy_z(-5.88110^(-6)v_x_atom^3+1.1962410^(-3)v_x_atom-3.716710^(-4)v_x_atom^2+.0128309)sin(1.04344v_x_atom)+(-1.4702510^(-6)v_x_atom^(4)+.00059812v_x_atom^2-.0156679-.00012399v_x_atom^3+.0128309v_x_atom)1.04344cos(1.04344v_x_atom)+8.77213910^(-3)cos(-10.713v_x_atom+.464616)+7.95439910^(-3)sin(.0319159v_x_atom+.106606)

variable fy_2 atom v_energy_xv_energy_z(-5.88110^(-6)v_y_atom^3+1.1962410^(-3)v_y_atom-3.716710^(-4)v_y_atom^2+.0128309)sin(1.04344v_y_atom)+(-1.4702510^(-6)v_y_atom^(4)+.00059812v_y_atom^2-.0156679-.00012399v_y_atom^3+.0128309v_y_atom)1.04344cos(1.04344v_y_atom)+8.77213910^(-3)cos(-10.7193v_y_atom+.464616)+7.95439910^(-3)sin(.0319159v_y_atom+.106606)

variable fz_2 atom v_energy_xv_energy_y15917.0exp(-2.41063v_z_atom)-528.14v_z_atom^(-4)+10974v_z_atom^(-7)+22932.7*v_z_atom^(-9)

compute q all property/atom quatw quati quatj quatk

fix 1 all nve
#fix 1 all nvt temp 300.0 300.0 1.0

dump 1 all custom 100000 dump.ellipse.gayberne &
id type x y z c_q[1] c_q[2] c_q[3] c_q[4]

dump 2 all image 100000 image.*.jpg type type adiam 1.2

dump_modify 2 pad 5

dump 4 all custom 100000 dump.force.test &
id v_fx_2 v_fy_2 v_fz_2 v_energy_x v_energy_y v_energy_z

dump 5 all custom 100000 dump.x.test &
id x

thermo 10000

thermo_style custom step temp ke pe etotal press vol

run 50000000

Dear Mr or Mrs,

   I would like to simulate only single atom at NVE without the thermostatting.
But it will say "Attempting to rescale a 0.0 temperature". And after I
create the second atom, then it will run in a right way. Therefore, I
wonder whether lammps can simulate single atom at NVE. If so , How to do
that?My input file is attached.

​yes, you can run an MD for a single atom, but it will have limited utility
and meaning, especially in an environment without any other interactions.
you cannot assign a temperature (since the system considered to be
invariant to translation) or compute one for translation of the atoms.
if you watch very closely, you should see at which command LAMMPS fails and
i will bet a large sum of money, it is not the "run" command.​
if you comment out the failing list, what happens?

axel.

Dear Mr or Mrs,

Thank you for your reply. The problem is the “velocity”, and when I comment out it , then the kinetic energy, potential energy and temperature will all be 0 and will never change.

Sincerely,
Xuechen

Dear Mr or Mrs,

    Thank you for your reply. The problem is the "velocity", and when I
comment out it , then the kinetic energy, potential energy and
temperature will all be 0 and will never change.

​this is not a problem of the velocity command. it is a problem of you
asking for something that doesn't make sense.

as mentioned already, you cannot compute a temperature for a single atom
via Sum_i(1/2*m*v^2)*​k_B/n_DOF, since your system is considered invariant
to translation, i.e. the number of degrees of freedom is zero. please keep
in mind, that the velocity command acts only on and knows only about point
particles. so the rotational DOFs of your particles do not factor in here.
LAMMPS is behaving as one should expect.

​axel.​

Dear Axel,

So you mean I cannot compute it in this way? Please tell me how to calculate to get the energy, the coordinate and other information.

Thanks!

Sincerely,
Xuechen

Dear Axel,

   So you mean I cannot compute it in this way? Please tell me how to
calculate to get the energy, the coordinate and other information.

​what energy of what and what coordinate and what other information?

axel.​

Dear Axel,

I would like to compute the sole atom’s the coordinate(x,y,z),the kinetic energy, and a special energy that calculated according to a formula which needs the coordinate.

Sincerely,
Xuechen

Dear Axel,

    I would like to compute the sole atom's the coordinate(x,y,z),the
kinetic energy, and a special energy that calculated according to a
formula which needs the coordinate.

​i have to repeat, a single atom in a periodic box is considered to have no
translational degrees of freedom, so what you are asking for makes no sense
to me.

this is a statistical thermodynamics issue, not really a LAMMPS limitation.

axel.

You can use the velocity command with its “set”
option to set the velocity of a single atom.
Then it will move when you use fix nve.

There will be no “energy” of the system, other
than kinetic, because there is no potential
energy for a single atom.

Steve

You can use the velocity command with its "set"
option to set the velocity of a single atom.
Then it will move when you use fix nve.

There will be no "energy" of the system, other
than kinetic, because there is no potential
energy for a single atom.

​but it is pointless to run an MD for this.
the atom will just keep moving with the given velocity and nothing will
change it, since there are no interactions (well, with a large enough
cutoff the atom would interact with periodic images of itself, but those
forces would cancel out).​

axel.