Trouble using rotateReference, centerRefrence and refPositionsGroup in the colvar module

From: Ajasja Ljubetič (ajasja.ljubetic_at_gmail.com)
Date: Tue Jan 31 2012 - 08:30:05 CST

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 : Wed Feb 29 2012 - 05:24:42 CST