Re: colvars: make an extended CV periodic

From: Jérôme Hénin (
Date: Fri Apr 06 2018 - 12:47:56 CDT

Hi Haochuan,

This was not implemented, but it did seem to be a good suggestion.

I have just committed the following change:

Now, scripted and custom function colvars accept the keywords *period* and
*wrapAround*, to manually define them as periodic.

Please test it and tell me if it works in your case.


On 6 April 2018 at 05:42, yjcoshc <> wrote:

> Hello,
> I have defined a scripted function to calculate a collective variable
> through the Colvars module. This function uses atan2 and have a period
> ranged from -180.0 to 180.0. Now I enable the extended lagrangian dynamics,
> but the extended CV looks not periodic. Is there any way to make the
> extended CV periodic following the scripted function? (For example, wrap
> the extended CV to 175 if it is -185)
> Thanks,
> Haochuan Chen

This archive was generated by hypermail 2.1.6 : Mon Dec 31 2018 - 23:20:58 CST