**From:** Jérôme Hénin (*jerome.henin_at_ibpc.fr*)

**Date:** Mon Mar 23 2015 - 15:45:02 CDT

**Next message:**Jeff Comer: "Re: Restraining angle between bond vector and coordinate vector"**Previous message:**Seth Axen: "Restraining angle between bond vector and coordinate vector"**In reply to:**Seth Axen: "Restraining angle between bond vector and coordinate vector"**Next in thread:**Jeff Comer: "Re: Restraining angle between bond vector and coordinate vector"**Messages sorted by:**[ date ] [ thread ] [ subject ] [ author ] [ attachment ]

It should be easy, using the Collective Variables Module, to define that

angle as a scripted function of a distanceVec coordinate. Then you can

define a standard restraint potential on that variable.

You can find an example (more complicated than what you need actually) here:

https://github.com/colvars/colvars/tree/master/namd/tests/library/007_scripted_cv_biases

I should warn you that the support for that feature on vectors got

completed just about the time when NAMD 2.10 was released, so it might

happen that 2.10 doesn't handle your case and you need to use the

development version of colvars.

Best,

Jerome

On 23 March 2015 at 21:26, Seth Axen <seth.axen_at_gmail.com> wrote:

*> I would like to add a harmonic restraint for an angle between a specific
*

*> bond vector and a target vector in 3D space, defined by 3 coordinates. The
*

*> resulting force should be updated at every step of the simulation. I'm
*

*> having trouble figuring out the best way to go about this from the
*

*> documentation and user-defined forces examples, and I'd appreciate any
*

*> suggestions.
*

*>
*

*> Thanks!
*

*>
*

**Next message:**Jeff Comer: "Re: Restraining angle between bond vector and coordinate vector"**Previous message:**Seth Axen: "Restraining angle between bond vector and coordinate vector"**In reply to:**Seth Axen: "Restraining angle between bond vector and coordinate vector"**Next in thread:**Jeff Comer: "Re: Restraining angle between bond vector and coordinate vector"**Messages sorted by:**[ date ] [ thread ] [ subject ] [ author ] [ attachment ]

*
This archive was generated by hypermail 2.1.6
: Thu Dec 31 2015 - 23:21:45 CST
*