Re: colvars: make an extended CV periodic

From: yjcoshc_at_gmail.com
Date: Mon Apr 09 2018 - 08:22:31 CDT

The fix works. Thanks!

在 2018年04月08日 22:46, Jérôme Hénin 写道:
> Sorry about that, indeed with the new option that dependency needed to
> be changed. Please check out my latest commit.
>
> Best,
> Jerome
>
> On 7 April 2018 at 04:21, <yjcoshc_at_gmail.com
> <mailto:yjcoshc_at_gmail.com>> wrote:
>
> Hi Jerome,
>
> Thanks for adding this feature! I have tested it but got a
> dependency error. This is the error log (in debug mode):
>
> colvars:   DEPS: colvar arg enabling "scalar"
> colvars:   DEPS: feature "scalar" in colvar arg enabled, ref_count
> = 1.
> colvars:   DEPS: disabling feature "linear" in colvar arg
> colvars:   DEPS: disabling feature "homogeneous" in colvar arg
> colvars:   Looking for the keyword "period" and its value.
> colvars:   Keyword value = "360.0".
> colvars:   Looking for the keyword "period" and its value.
> colvars:   Keyword "period" not found.
> colvars:   # period = 360
> colvars:   DEPS: colvar arg enabling "periodic"
> colvars:   periodic requires self homogeneous
> colvars:   DEPS: colvar arg enabling "homogeneous"
> colvars:   Static feature "homogeneous" may not be enabled as a
> dependency in colvar arg.
> colvars:   ...required by "periodic" in colvar arg
> colvars: Error: Failed dependency in colvar arg.
> FATAL ERROR: Error in the collective variables module: exiting.
>
> It looks the colvar is not "homogeneous". Any ideas?
>
> Thanks again,
>
> Haochuan Chen
>
>
> 在 2018年04月07日 01:47, Jérôme Hénin 写道:
>> Hi Haochuan,
>>
>> This was not implemented, but it did seem to be a good suggestion.
>>
>> I have just committed the following change:
>> https://github.com/Colvars/colvars/commit/431e52a11f34ccef1329396f91314c6e56146a53
>> <https://github.com/Colvars/colvars/commit/431e52a11f34ccef1329396f91314c6e56146a53>
>>
>> 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.
>>
>> Best,
>> Jerome
>>
>> On 6 April 2018 at 05:42, yjcoshc <yjcoshc_at_gmail.com
>> <mailto:yjcoshc_at_gmail.com>> 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:59 CST