Re: Trouble using rotateReference, centerRefrence and refPositionsGroup in the colvar module

From: Giacomo Fiorin (giacomo.fiorin_at_gmail.com)
Date: Tue Jan 31 2012 - 12:28:24 CST

Hello Ajasja, first of all, the centerReference and rotateReference options
only affect the group they are defined into. If you need to center and
rotate all groups of a colvar component (in this case, the dihedral
component), you should copy those options inside each group. A future
version of the colvars module will probably include "reusable groups" for
this purpose, but in the end you achieve what you need with some cutting
and pasting of the keywords (centerReference, rotateReference,
refPositionsGroup, refPositionsFile) inside group1 through group4.

The colvar (or more precisely, its components such as dihedral) may access
and use the roto-translation matrix to express the gradients in the
"laboratory" frame. But the keywords centerReference, rotateReference, etc
are only meaningful inside the atom groups.

You did this correctly in the last version, however, the problem there is
that the dummy atom won't accept them. This is because a dummy atom is by
design a fixed position in space. If you need to change the dummy atom's
position accordingly to the movements of some atoms of the system, use
those atoms as group, not a dummy atom.

I don't know about the different number of atoms, since I can't see the PDB
file you provided.

Finally, one really important point: a dihedral is a function of the
Cartesian coordinates whose values do not depend on translations or
rotations. So even if you apply the same translation and rotation to
group1 through group4 correctly, the value of the dihedral won't change.

So to answer your final question, you don't need a relative reference
coordinate system for a dihedral.

Or perhaps you do, but then I have to ask you what you were trying to do
when you modified the original configuration?

Bests
Giacomo

On Tue, Jan 31, 2012 at 9:30 AM, Ajasja Ljubetič
<ajasja.ljubetic_at_gmail.com>wrote:

> Dear all,
>
> I'm trying to explore the energy landscape of the orientation of a spin
> label using ABF. For that I have defined the polar angles using
> the centre of mass of the spin label and three dummy atoms. An example is
> here https://gist.github.com/1710600. This works like a charmm :)
>
> Now I'm trying to get this to work in relative frame
> of reference (relative to the heavy atoms of the spin labels backbone
> atoms).
>
> So I'm trying out rotateReference, centerRefrence and refPositionsGroup.
>
> My first attempt was (all examples will be given for the dihedral phi
> angle only):
> dihedral {
>
> oneSiteSystemForce
> group1 { atomnumbers 173 174 175 176 177 181 185 189 193 194
> rotateReference on
> centerRefrence on
> refPositionsGroup {atomnumbers 200 202 204 208 209
> refPositionsFile struct/abf_ref.pdb}} ;
> group2 { dummyAtom
> (3.1630001068115234,-0.061000000685453415,-0.6990000009536743) } ;
> group3 { dummyAtom
> (3.1630001068115234,-0.061000000685453415,9.300999999046326) } ;
> group4 { dummyAtom
> (13.163000106811523,-0.061000000685453415,9.300999999046326) } ;
> }
>
> But I got the (strange) error:
> Error: no atoms defined for atom group "group1".
>
> Then I tried putting refPositionsFile outside of the refPositionsGroup:
> dihedral {
>
> oneSiteSystemForce
> group1 { atomnumbers 173 174 175 176 177 181 185 189 193 194
> rotateReference on
> centerRefrence on
> refPositionsGroup {atomnumbers 200 202 204 208 209}
> refPositionsFile struct/abf_ref.pdb
> } ;
> group2 { dummyAtom
> (3.1630001068115234,-0.061000000685453415,-0.6990000009536743) } ;
> group3 { dummyAtom
> (3.1630001068115234,-0.061000000685453415,9.300999999046326) } ;
> group4 { dummyAtom
> (13.163000106811523,-0.061000000685453415,9.300999999046326) } ;
> }
> }
>
> But got (I get the same message if I put refPositionsFile tiwice)
> Computing system force on group 1 only
>
> Initializing atom group "group1".
>
> Within atom group "group1":
>
> Defining atom group "refPositionsGroup".
>
> Initializing atom group "refPositionsGroup".
>
> Atom group "refPositionsGroup" defined, 5 initialized: total mass =
> 66.039.
> Error: the number of reference positions provided (10) does not match
> the number of atoms within "group1" (5).
>
>
> Next I saw in namd source (colvaratoms.C line 233) that a refrence group
> can be inherited from the colvar component, so i tried to do this:
> (By the way is this documented anywhere?)
> dihedral {
>
>
> oneSiteSystemForce
>
> refPositionsGroup {atomnumbers 200 202 204 208 209
> refPositionsFile struct/abf_ref.pdb}
>
> group1 { atomnumbers 173 174 175 176 177 181 185 189 193 194
> rotateReference on
> centerReference on
> refPositionsFile struct/abf_ref.pdb
> } ;
> group2 { dummyAtom
> (3.1630001068115234,-0.061000000685453415,-0.6990000009536743) } ;
> group3 { dummyAtom
> (3.1630001068115234,-0.061000000685453415,9.300999999046326) } ;
> group4 { dummyAtom
> (13.163000106811523,-0.061000000685453415,9.300999999046326) } ;
> }
>
> But this gives me an even stranger error
> colvars: Initializing atom group "group1".
> colvars: Warning: atom group "group1" is set to be rotated to a
> reference orientation: a torque different than zero on this group could
> make the simulation unstable. If this happens, set "disableForces" to yes
> for this group.
> colvars: Atom group "group1" defined, 10 initialized: total mass =
> 126.094.
> colvars: Initializing atom group "group2".
> colvars: Atom group "group2" defined, 0 initialized: total mass = 1.
> colvars: Initializing atom group "group3".
> colvars: Atom group "group3" defined, 0 initialized: total mass = 1.
> colvars: Initializing atom group "group4".
> colvars: Atom group "group4" defined, 0 initialized: total mass = 1.
> colvars: Error: keyword "refpositionsgroup" is not supported, or not
> recognized in this context.
>
> But if I add rotateReference and centerReference to all the groups like
> I originally planned
> dihedral {
>
>
> oneSiteSystemForce
>
> refPositionsGroup {atomnumbers 200 202 204 208 209
> refPositionsFile struct/abf_ref.pdb}
>
> group1 { atomnumbers 173 174 175 176 177 181 185 189 193 194
> rotateReference on
> centerReference on
> refPositionsFile struct/abf_ref.pdb
> } ;
> group2 { dummyAtom
> (3.1630001068115234,-0.061000000685453415,-0.6990000009536743)
> rotateReference on
> centerReference on
> #refPositionsFile struct/abf_ref.pdb
> } ;
> group3 { dummyAtom
> (3.1630001068115234,-0.061000000685453415,9.300999999046326)
> rotateReference on
> centerReference on
> #refPositionsFile struct/abf_ref.pdb
> } ;
> group4 { dummyAtom
> (13.163000106811523,-0.061000000685453415,9.300999999046326)
> rotateReference on
> centerReference on
> #refPositionsFile struct/abf_ref.pdb
> } ;
> }
>
>
> it gives me a totally unacceptable error:
> colvars: Computing system force on group 1 only
> colvars: Initializing atom group "group1".
> colvars: Warning: atom group "group1" is set to be rotated to a
> reference orientation: a torque different than zero on this group could
> make the simulation unstable. If this happens, set "disableForces" to yes
> for this group.
> colvars: Atom group "group1" defined, 10 initialized: total mass =
> 126.094.
> colvars: Initializing atom group "group2".
> colvars: Error: cannot set "centerReference" or "rotateReference"
> with "dummyAtom".
>
>
>
> - Is there any good reason why dummy atoms could not be used
> with rotateReference and refPositionsGroup?
> The transformation matrix is obtained from the refPositionsGroup and
> could be applied to the coordinates of the dummy atoms.
> - Is the error in the first case a bug? What about the second error
> (different number of atoms)?
> - Are refPositionsGroup attributes really inherited from the colvar?
> - Are there any other options or suggestions to implement a
> relative reference coordinate system?
>
> Thank you for your help and best regards,
> Ajasja
>
>

This archive was generated by hypermail 2.1.6 : Tue Dec 31 2013 - 23:21:36 CST