Re: colvars: How to implement a collective variable of vector type?

From: Giacomo Fiorin (giacomo.fiorin_at_gmail.com)
Date: Wed Mar 14 2018 - 08:26:48 CDT

If you added a file, you should definitely edit Makefile.namd and run "make
depends" to regenerate Make.depend.

If you didn't add any files, keep in mind that you need to implement all
functions that you have declared when adding a new class. Look at the
details of the error message to see what functions are missing.

Giacomo

On Wed, Mar 14, 2018 at 5:13 AM, yjcoshc <yjcoshc_at_gmail.com> wrote:

> Hi Giacomo,
>
> I have followed the steps decribed in http://colvars.github.io/
> doxygen/html/classcolvar_1_1cvc.html. However the object file isn't
> compiled when compiling NAMD and then it gives me "undefined reference"
> error during linking. Should I modify the Make.depend or some other
> Makefile manually?
>
> Thanks,
>
> Haochuan Chen
>
> 在 2018年03月13日 22:07, Giacomo Fiorin 写道:
>
> Hi Haochuan,
>
> 1. The "atom" class only has a single field "grad" for the gradients of a
> scalar variable. There is no general mechanism for storing gradients of
> vector variables (I'm working on that very slowly and sporadically). I
> would recommend allocating inside your new class several STL vectors of 3D
> vectors (cvm::rvector), and storing their pointers in a container of your
> choosing. This is what is done for the quaternion variable, in the
> cvm::rotation class. This will be easier to port to the new general
> mechanism that will some time see the light of day.
>
> The implicit gradients flag tells the rest of the code about this
> limitation, which affects for example computing the gradients of the
> rotational fit. If your new variable is rotationally invariant (like e.g--00000000000030ace105675f56f2--

This archive was generated by hypermail 2.1.6 : Wed Dec 04 2019 - 23:19:42 CST