LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
[lammps-users] ?????? about to update the dipole in "fix nve asphere"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lammps-users] ?????? about to update the dipole in "fix nve asphere"


From: "htc" <619771202@...1204...>
Date: Sat, 25 Nov 2017 23:16:28 +0800


I replace "int omega[3]" with"double **omega=atom->omega",and use "omega[i][j]" derived from"mq_to_omega" to update "mu[i][j]".And then i donnot know how to use this update.I mean i try to run the
procedure and dump the "mux muy muz" of each atom,and i found that the value did not change which means it still did not update the dipole althought i had add the code.So i am curious about what to do next to apply the update.
------------------ ???????? ------------------
??????: "Steve Plimpton";<sjplimp@...24...>;
????????: 2017??11??21??(??????) ????1:50
??????: "Axel Kohlmeyer"<akohlmey@...24...>;
????: "htc"<619771202@...1204...>; "lammps-users"<lammps-users@lists.sourceforge.net>;
????: Re: [lammps-users] about to update the dipole in "fix nve asphere"

Also, the aspherical styles (e.g. ellipsoids) do not
store an omega.  They store a fully general angmom
vector and derive an omega from it.  So fix nve/asphere
would have to work with angmom.

Steve

On Mon, Nov 20, 2017 at 10:17 AM, Axel Kohlmeyer <akohlmey@...24...> wrote:


On Mon, Nov 20, 2017 at 10:07 AM, htc <619771202@...1204...> wrote:
i read the command 'fix nve shpere' and found that dipole can be updated relate to omega,so i think it may be the same for the command"fix nve asphere"to update dipole  if i use the code come from "fix nve asphere".
this:
if (mu[i][3] > 0.0) 
 {
 g[0] = mu[i][0] + dtv * (omega[i][1] * mu[i][2] - omega[i][2] * mu[i][1]);
 g[1] = mu[i][1] + dtv * (omega[i][2] * mu[i][0] - omega[i][0] * mu[i][2]);
 g[2] = mu[i][2] + dtv * (omega[i][0] * mu[i][1] - omega[i][1] * mu[i][0]);
 msq = g[0] * g[0] + g[1] * g[1] + g[2] * g[2];
 scale = mu[i][3] / sqrt(msq);
 mu[i][0] = g[0] * scale;
 mu[i][1] = g[1] * scale;
 mu[i][2] = g[2] * scale;
 }
i wonder if my judgement is right or not.And i hope you are not angry because i thought this question may be a little foolish.I am not too familliar with c++,so can you provide some suggestion?

?6?7my suggestion is that you either improve your C++ knowledge or find a collaborator that does possess sufficient knowledge and will help you to port the feature from fix nve/sphere to fix nve/asphere.
it won't work by just copying some random bits of code without adapting the style specific data structures and adding the necessary interfaces.

axel.?6?7

 

------------------------------------------------------------------------------
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.

------------------------------------------------------------------------------
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@...396...sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lammps-users