From: | Axel Kohlmeyer <akohlmey@...24...> |
Date: | Sat, 19 Aug 2017 09:18:29 -0400 |
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, otherthan kinetic, because there is no potentialenergy for a single atom.
SteveOn Fri, Aug 18, 2017 at 1:22 PM, Axel Kohlmeyer <akohlmey@...24...> wrote:On Fri, Aug 18, 2017 at 3:17 PM, Zheng, Xuechen <xuechen_zheng@...802...> wrote: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.Sincerely,XuechenOn Fri, Aug 18, 2017 at 2:21 PM, Axel Kohlmeyer <akohlmey@...24...> wrote:On Fri, Aug 18, 2017 at 1:48 PM, Zheng, Xuechen <xuechen_zheng@...802...> wrote: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.------------------------------Thank you!# 3D Gay Berne on Surface simulationunits realatom_style ellipsoiddimension 3boundary p p patom_modify id yesatom_modify map arrayatom_modify sort 100 25lattice fcc 5.0region box block 0.0 5.0 0.0 5.0 0.0 5.0create_box 1 box#create_atoms 1 region substratecreate_atoms 1 single 2 2 2#create_atoms 1 single 3 3 3compute_modify extra 0set type 1 mass 16.04set type 1 shape 1 1 1velocity all create 300.0 4928459 rot yes dist gaussianset group all quat/random 18238compute rot all temp/aspherecompute_modify extra 0group spheroid type 1variable dof equal count(spheroid)+2compute_modify rot extra ${dof}neigh_modify delay 0 every 1timestep 0.0002variable z_atom atom zvariable x_atom atom xvariable y_atom atom y# Get Constants of the Energy That Don't Change Upon Taking Directional Derivativesvariable energy_x atom (1.47025e-06*v_x_atom^4+-0.000598126*v_x_atom^2+0.0156679+0. 00012389*v_x_atom^3+-0.0128309 *v_x_atom)*sin(1.04344*v_x_ato m)+-1098.47+sin(-10.7193*v_x_a tom+0.464616)*0.000818385+0.24 923*cos(0.0319159*v_x_atom+0. 106606) variable energy_y atom (1.47025e-06*v_y_atom^4+-0.000598126*v_y_atom^2+0.0156679+0. 00012389*v_y_atom^3+-0.0128309 *v_y_atom)*sin(1.04344*v_y_ato m)+-1098.47+sin(-10.7193*v_y_a tom+0.464616)*0.000818385+0.24 923*cos(0.0319159*v_y_atom+0. 106606) variable energy_z atom 6602.67*exp(-2.41063*v_z_atom)-176.047*v_z_atom^(-3)-1829.08 *v_z_atom^(-6)+2866.59*v_z_ato m^(-8) variable energy_total atom v_energy_x*v_energy_y*v_energy_z #Trans Forcesvariable fx_2 atom v_energy_y*v_energy_z*(-5.881*10^(-6)*v_x_atom^3+1.19624*10^ (-3)*v_x_atom-3.7167*10^(-4)*v _x_atom^2+.0128309)*sin(1.0434 4*v_x_atom)+(-1.47025*10^(-6)* v_x_atom^(4)+.00059812*v_x_ato m^2-.0156679-.00012399*v_x_ato m^3+.0128309*v_x_atom)*1.04344 *cos(1.04344*v_x_atom)+8.77213 9*10^(-3)*cos(-10.713*v_x_atom +.464616)+7.954399*10^(-3)*sin (.0319159*v_x_atom+.106606) variable fy_2 atom v_energy_x*v_energy_z*(-5.881*10^(-6)*v_y_atom^3+1.19624*10^ (-3)*v_y_atom-3.7167*10^(-4)*v _y_atom^2+.0128309)*sin(1.0434 4*v_y_atom)+(-1.47025*10^(-6)* v_y_atom^(4)+.00059812*v_y_ato m^2-.0156679-.00012399*v_y_ato m^3+.0128309*v_y_atom)*1.04344 *cos(1.04344*v_y_atom)+8.77213 9*10^(-3)*cos(-10.7193*v_y_ato m+.464616)+7.954399*10^(-3)*si n(.0319159*v_y_atom+.106606) variable fz_2 atom v_energy_x*v_energy_y*15917.0*exp(-2.41063*v_z_atom)-528.14 *v_z_atom^(-4)+10974*v_z_atom^ (-7)+22932.7*v_z_atom^(-9) compute q all property/atom quatw quati quatj quatkfix 1 all nve#fix 1 all nvt temp 300.0 300.0 1.0dump 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.2dump_modify 2 pad 5dump 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_zdump 5 all custom 100000 dump.x.test &id xthermo 10000thermo_style custom step temp ke pe etotal press volrun 50000000--Xuechen Zheng------------------------------ ------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
lammps-users mailing list
lammps-users@...655....net
https://lists.sourceforge.net/lists/listinfo/lammps-users
--Dr. Axel Kohlmeyer akohlmey@...24... http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.--Xuechen Zheng--Dr. Axel Kohlmeyer akohlmey@...24... http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.
------------------------------------------------------------ ------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
lammps-users mailing list
lammps-users@...655....net
https://lists.sourceforge.net/lists/listinfo/lammps-users