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

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


From: Steve Plimpton <sjplimp@...24...>
Date: Tue, 21 Nov 2017 09:03:17 -0700

Please post to the list, not to me.

You should just compute omega from angmom and use it.
No need to store it.

Steve

On Mon, Nov 20, 2017 at 7:03 PM, htc <619771202@...1204...> wrote:
That means i have to  store omega,and use omega to update dipole,right?
because there is already a algorithm that use angmom to derive omega ,so i can just use it.


------------------ 原始邮件 ------------------
发件人: "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?

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

 

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