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

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

 From: Steve Plimpton Date: Mon, 20 Nov 2017 10:50:36 -0700

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 wrote:

On Mon, Nov 20, 2017 at 10:07 AM, htc 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
_______________________________________________
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