Re: Colvars: Unable to restrict rotation and translation along y and z axes

From: Sourav Ray (souravray90_at_gmail.com)
Date: Fri May 20 2016 - 01:31:38 CDT

Hello Giacomo

Thanks for the suggestion! I implemented "distanceXY" in my colvar module,
I was able to restrict rotation and y-axis translation, but still was not
able to restrict translation along z-axis, I presume I am not setting the
"axis" option properly in "distanceXY" module or maybe I need to apply
harmonic restraints to "distanceXY" also?

colvarsTrajFrequency 10000
colvarsRestartFrequency 10000

colvar {

  name restxy
  width 0.1
  upperboundary 20.0
  upperwallconstant 1000.0

  distanceXY {
    ref {
    atomnumbersrange { 1-364 } # CNT1
    }

    main {
    atomnumbersrange { 365-728 } # CNT2
   }
   axis (0,1,1)
  }
}

colvar {
  name orient
  width 0.1 # distance between quaternions is from 0 to pi/2, so small
fluctuations are significant

  orientation {
    atoms {
        atomNumbersrange { 1-728 }
    }
    refPositionsFile ../ref.pdb # Fetch initial positions from this file
  }
}

colvar {
  name xtrans
  width 0.1
  lowerboundary 12.0
  upperboundary 20.0
  lowerwallconstant 1000.0
  upperwallconstant 1000.0

  distanceZ {
    ref {
    atomnumbersrange { 1-364 } # CNT1
    }

    main {
    atomnumbersrange { 365-728 } # CNT2
   }
   axis (1,0,0)
  }
}

harmonic {
colvars orient
centers (1,0,0,0)
forceconstant 100.0
}

metadynamics {
colvars xtrans
hillWidth 2
hillWeight 0.5
newHillFrequency 100
}

Regards
Sourav

On Fri, May 20, 2016 at 11:12 AM, Sourav Ray <souravray90_at_gmail.com> wrote:

>
> ---------- Forwarded message ----------
> From: Giacomo Fiorin <giacomo.fiorin_at_gmail.com>
> Date: Wed, May 18, 2016 at 6:53 PM
> Subject: Re: namd-l: Colvars: Unable to restrict rotation and translation
> along y and z axes
> To: Sourav Ray <souravray90_at_gmail.com>, NAMD list <namd-l_at_ks.uiuc.edu>
> Cc: Ajay Singh Panwar <panwar_at_iitb.ac.in>
>
>
> Hello Sourav you probably want distancexy instead of distancedir?
>
> Giacomo
> On May 18, 2016 8:53 AM, "Sourav Ray" <souravray90_at_gmail.com> wrote:
>
>> Hello
>>
>> I am trying to vary the distance between two carbon nanotubes along
>> x-axis. Additionally, I would like to restrict any rotation, whatsoever,
>> and translation along y and z axes. I am using "Distancedir" to restrict
>> translation for both the nano-tubes along y and z axes and "orient" to
>> restrict rotation with "harmonic" constraint. However, I am not getting the
>> desired effect. Please find the colvars script below:
>>
>>
>> colvarsTrajFrequency 10000
>> colvarsRestartFrequency 10000
>>
>>
>> colvar {
>>
>> name cntdis
>> width 0.1
>> lowerboundary 12.0
>> upperboundary 20.0
>> lowerwallconstant 100.0
>> upperwallconstant 100.0
>>
>>
>> distance {
>> group1 {
>> atomnumbersrange { 1-364 }
>> }
>>
>> group2 {
>> atomnumbersrange { 365-728 }
>> }
>>
>> }
>> }
>>
>> colvar {
>> name orient
>>
>> width 0.1 # distance between quaternions is from 0 to pi/2, so small
>> fluctuations are significant
>>
>> orientation {
>> atoms {
>> atomNumbersrange { 1-728 }
>> enableForces off
>> }
>> refPositionsFile ../ref.pdb # Fetch initial positions from this
>> file
>> }
>> }
>>
>>
>> colvar {
>>
>> name ztrans1
>> width 0.1
>>
>> distancedir {
>> group1 {
>> atomnumbersrange { 1-364 }
>> }
>>
>> group2 {
>> dummyatom (-6.5,0,0)
>> }
>> }
>> }
>>
>> colvar {
>>
>> name ztrans2
>> width 0.1
>>
>> distancedir {
>> group1 {
>> atomnumbersrange { 365-728 }
>> }
>>
>> group2 {
>> dummyatom (6.5,0,0)
>> }
>> }
>>
>>
>> harmonic {
>> colvars orient ztrans1 ztrans2
>> centers (1,0,0,0) (1,0,0) (1,0,0)
>> forceconstant 10.0
>> }
>> metadynamics {
>> colvars cntdis
>> hillWidth 2
>> hillWeight 0.5
>> newHillFrequency 100
>> }
>>
>>
>> Please let me know if someone has any insight regarding the same.
>>
>> Regards
>> Sourav
>>
>
>

This archive was generated by hypermail 2.1.6 : Sun Dec 31 2017 - 23:20:27 CST