From: Vermaas, Joshua (
Date: Mon Mar 26 2018 - 13:59:16 CDT

Hi Miguel,

My preferred method would be to abuse the "user" field, and color by user.

set center [list 0 0 0]
set sel [atomselect top "protein"]
for { set f 0 } { $f < [molinfo top get numframes] } { incr f } {
    $sel frame $f
    set userlist [list ]
    foreach v [$sel get {x y z}] {
       lappend userlist [vecdist $v $center]
    $sel set user $userlist

Basically, this approach works whenever the default VMD colorings do not do what you want them to, since you can specify the user field per-frame.


On 03/26/2018 11:31 AM, Miguel Caro wrote:


I would like to use the radial coloring method using as center a position chosen by me. By default, VMD uses the center of mass of the atoms. How could I use, e.g., the center of my box as the origin?



Dr. Miguel Caro
Academy of Finland Postdoctoral Researcher
Department of Electrical Engineering and Automation,
and Department of Applied Physics
Aalto University, Finland
Personal email:<>
Websites: http://mcaroba.dyndns.orglGJ2ANxoi8s0%26m%3DWB-l19X1hIwaBbzGMpBK9AP4_exyXoPAEQ9i2yn9yrU%26s%3Dd__KGmw872P93XXXCS88HhffiTZIi9If4CqdQqba5xU%26e%3D&> http://dospt.orgDWB-l19X1hIwaBbzGMpBK9AP4_exyXoPAEQ9i2yn9yrU%26s%3DMCSH7F7SoVwZSd9k_P9Vngtmrgk5dqGuxbhm0Kdt6lw%26e%3D&>