Re: AW: AW: AW: AW: tclBC incorrect output

From: P.-L. Chau (pc104_at_pasteur.fr)
Date: Mon May 07 2012 - 20:59:14 CDT

Thanks for your message.

> Does the atom numbers printed match your wanted CA atoms?

Yes.

> Do you start from a unwrapped restart?

Yes.

> Does namd use other unit for the coords internally?
> ->If someone know, please tell us.

I do not quite know what that means. Could you perhaps expound?

> Does namd for some other reason than wrapping updates the coordinates
> initially?

No.

Anyway, I have got the script working, and it looks like this:

[...]
wrapmode input

proc calcforces {step unique Rrate Rtarget K} {

    global aalist
    if {$unique} {
        if { $step == 20000001} {puts "K = $K"}
    }
    if {$unique} {puts "****** step = $step"}

    while {[nextatom]} {
        set atomid [getid]

        if { [lsearch $aalist $atomid] >= 0 } {
            set rvec [getcoord]
            if {$unique} {puts "$atomid $rvec"}
            foreach { x y z } $rvec {break}

            set fX [expr $K * $x * ($step-20000000) ]
            set fY [expr $K * $y * ($step-20000000) ]
            set fZ [expr 0.0]
            puts "****** $atomid x- and y-force = $fX $fY"
            addforce "$fX $fY $fZ"
        }
    }
}

Obviously this is not what I would use in my research, but I can now add
artificial forces to push designated atoms in specified directions.

Thank you very much to you all who helped me with this.

Best regards,
P-L Chau

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