[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ESPResSo-users] zero angle (full angle)
From: |
Ulf Schiller |
Subject: |
Re: [ESPResSo-users] zero angle (full angle) |
Date: |
Thu, 16 Apr 2015 15:08:37 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 |
Hi,
On 16/04/15 14:44, Dudo wrote:
> Hi,
>
> I'm trying to implement a zero angle potential with minima at 0 or 2*pi
> respectively.
How would you decide whether the angle is in [0,pi] or [pi,2*pi] ?
> For this I just added a phase shift into the former angle_harmonic.hpp
> potential:
>
> cos_phi = scalar(vec21, vec31) / (vec21_magn * vec31_magn) -
> (3.141592653589793238462 / 2.000000000000000);
This does not seem to make sense. cos_phi should be in the range [-1,1].
> However, in my model I would need also flat angle and right angle
> definitions.
For zero angle cos_phi=1, for right angle cos_phi=0, for flat angle
cos_phi=-1.
Cheers,
Ulf
--
Dr Ulf D Schiller
Centre for Computational Science
University College London
20 Gordon Street
London WC1H 0AJ
United Kingdom