Re: Using harmonic walls on water molecules

From: Moises Ernesto Romero (moiseser_at_uci.edu)
Date: Fri Feb 08 2019 - 15:23:45 CST

Hi Josh and Jerome,

Thank you for your help and insight! This accomplished exactly what I
needed.

On Tue, Feb 5, 2019 at 1:28 AM Jérôme Hénin <jerome.henin_at_ibpc.fr> wrote:

> I second Josh's answer. What you are trying to do is easy to describe in
> terms of many individual variables (coordinates of water molecules), and
> quite a bit harder to put in terms of a small number of collective
> variables. Here the collective variable you'd want is the number of water
> molecules occupying a certain region of space, and that's a non-trivial
> thing to do, especially in a way that scales. TclBC is designed just for
> that, for scalability.
>
> Jerome
>
> On Tue, 5 Feb 2019 at 02:53, Vermaas, Joshua <Joshua.Vermaas_at_nrel.gov>
> wrote:
>
>> Hi Moises,
>>
>> The pre-colvars way of doing this should still work. TclBC is the one
>> that springs to mind first. Below implements something close to what you
>> intended.
>>
>> tclBC on
>> tclBCScript {
>> proc calcforces {step unique K} {
>> if { $step % 20 == 0 } {
>> cleardrops
>> }
>> while { [nextatom] } {
>> #Drop things outside of a serial list
>> if { [getid] < 179210 || [getid] > 224830 } {
>> dropatom
>> continue
>> }
>> set pos [getcoord]
>> set z [lindex $pos 2]
>> if { $z < 46 && $z > -36 } {
>> dropatom
>> continue
>> }
>> if { $z > 47 } {
>> addenergy [expr {$K * ($z-47) * ($z-47)}]
>> addforce [vecscale [list 0 0 -1] [expr
>> 2.*$K*($z-47)]]
>> } elseif { $z < -38 } {
>> addenergy [expr {$K * ($z+38) * ($z+38)}]
>> addforce [vecscale [list 0 0 -1] [expr
>> 2.*$K*($z+38)]]
>> }
>> }
>> }
>> }
>> tclBCArgs {5}
>> The downside here is that the forces applied are not relative to the rest
>> of your system, but rather in the laboratory/simulation coordinates
>> reference frame, so you'd need to do something to fix the protein
>> orientation within the simulation cell.
>>
>> -Josh
>>
>>
>> On 2019-02-04 18:20:16-07:00 owner-namd-l_at_ks.uiuc.edu wrote:
>>
>> Hi All,
>> I am trying to confine a large amount of water molecules within an
>> annulus of a protein which is in a vacuum.
>> The water molecules escape along the z-directions.
>> I have tried to accomplish this by defining harmonic walls using the
>> collective variables modules.
>> My first attempt involved defining all waters as a single collective
>> variable:
>> colvarsTrajFrequency 100
>> colvar {
>> name water
>> lowerboundary -39.0
>> upperboundary 48.0
>> lowerWallConstant 5.0
>> lowerWall -38.0
>> upperWall 47.0
>> upperWallConstant 5.0
>> distanceZ {
>> main { atomNumbersRange 179209-224829 }
>> ref { atomNumbersRange 224830-316341 }
>> axis { (0.0 , 0.0 , 1.0) }
>> }
>> }
>> The waters still escaped.
>> My second attempt involved selecting each of the ~15,000 waters as an
>> individual collective variable; however, this will take a long time to
>> initialize the simulation.
>> What is smarter way to go about this? Thanks!
>> --
>> Moises Romero
>> PhD Student
>> Andricioaei Group
>> UC Irvine
>>
>>

-- 
Moises Romero
PhD Student
Andricioaei Group
UC Irvine

This archive was generated by hypermail 2.1.6 : Mon Sep 16 2019 - 23:20:18 CDT