From: Ropon-Palacios G. (biodano.geo_at_gmail.com)
Date: Fri May 21 2021 - 20:25:10 CDT
Dear user,
I am simulating a membrane protein that has a long lateral displacement, which I have not been able to correct with pbctool, so I would like to do the simulation again, trying to be able to use a circular barrier of force to keep the protein in its center of mass with a freedom of move 5 Angstroms on the XY axis, without compromising its secondary structure or conformational changes. Could you please help me solve this with tcl?
I leave my script below.
proc calcforces {} {
global grp xc0 yc0 zc0
global kforce
global freq fout ofile
loadcoords coords
set rc $coords($grp)
set xc [lindex $rc 0]
set yc [lindex $rc 1]
set zc [lindex $rc 2]
set diffx [expr {$xc0 - $xc}]
set diffy [expr {$yc0 - $yc}]
#set diffz [expr {$zc0 - $zc}]
set f {}
set fx [expr {$kforce*$diffx}]
set fy [expr {$kforce*$diffy}]
#set fz [expr {$kforce*$diffz}]
lappend f $fx $fy ; #$fz
addforce $grp $f
addenergy [expr {0.5*$kforce*$diffx*$diffx}]
addenergy [expr {0.5*$kforce*$diffy*$diffy}]
#addenergy [expr {0.5*$kforce*$diffz*$diffz}]
# set currstep [getstep]
# if {[expr {$currstep % $freq}] == 0} {
# set fout [open $ofile a+]
# puts $fout [format "%f %f %f %f" $currstep $xc $yc $zc]
# close $fout
# }
return
}
}
This archive was generated by hypermail 2.1.6 : Fri Dec 31 2021 - 23:17:11 CST