LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] How to use molecular's quaternions for orientation-dependent forces calculation with "hybrid sphere molecular" style?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] How to use molecular's quaternions for orientation-dependent forces calculation with "hybrid sphere molecular" style?


From: Axel Kohlmeyer <akohlmey@...24...>
Date: Mon, 25 Sep 2017 09:19:50 -0400

On Sat, Sep 23, 2017 at 1:26 PM, RainMan <debianfans@...24...> wrote:
> Dear LAMMPSers,
>
> I am going to use Lammps to calculate orientation-dependent forces on finite
> size rigid bodies with
>
> ----------------------------------------------
> atom_style hybrid sphere molecular
> ...
> fix Rigids all rigid molecule
> ...
> ----------------------------------------------
>
> Assuming the force coefficients of a specific shaped rigid body are
> pre-calculated from different Euler angles (a_x, a_y, a_z), and the uniform
> force field (electric/fluid field, etc ) orientation is fix at Z+ direction.
> Since "fix rigid" does calculate the quaternion information for each rigid
> body, therefore the force coefficient can be calculated like: coeff_force =
> Func(field_direction, quat_rigid) via the pre-calculated data (interpolation
> utilized).
>
> My question is: how to use the per rigid/molecular quaternion information
> "quat[ibody]" for
> 1) created a new fix for the orientation-dependent forces calculation

you can access internal data from other class instances via the
extract() function.
if a property is not listed, you can add it. body exists in
FixRigid::extract(), access to quat would need to be added.

>
> and
>
> 2) if Lammps is called as static library for other program, how we can get
> the quat[ibody] information?

same mechanism as above using lammps_extract_fix()

axel.

>
> The problem might be easy for you, but I am not familiar with LAMMPS
> programming, and want to get some advice or insight before I dig into this
> issue.
>
> best regards,
>
> David
>
> ------------------------------------------------------------------------------
> 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@lists.sourceforge.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.