From: Norman Geist (norman.geist_at_uni-greifswald.de)
Date: Thu Mar 02 2017 - 07:30:55 CST

Example TCL procedure derived from my userani movie system (untested):

 

proc AutoFocus { molid seltext } {

  set prog 1

  set me [lindex [info level [info level]] 0]

  

  set sel [atomselect $molid ($seltext)]

  set center [measure center $sel weight mass]

  $sel delete

  

  foreach molid [molinfo list] {

    eval "molinfo $molid set center [list [list $center]]"

  }

  

  set global_matrix [lindex [molinfo top get global_matrix] 0]

  set ctrans [list [lindex [lindex $global_matrix 0] 3] [lindex [lindex
$global_matrix 1] 3] [lindex [lindex $global_matrix 2] 3]]

  set ntrans [vecscale $ctrans [expr pow(abs($prog-1.),$prog)]]

  eval "translate to $ntrans"

  return

}

 

Norman Geist

 

 

Von: owner-vmd-l_at_ks.uiuc.edu [mailto:owner-vmd-l_at_ks.uiuc.edu] Im Auftrag von
TUBIANA Thibault CNRS
Gesendet: Donnerstag, 2. März 2017 11:00
An: vmd-l_at_ks.uiuc.edu
Betreff: vmd-l: Center camera rotation on a molid

 

Dear all,

I'm trying to set the center of rotation of the camera on a molid (like when
a new pdb is loaded).
Is there anything like the pymol "center" command (something like "center
top" or "center [atomselect top "resid 200 to 210"]") ?

Kind regards,

 

--
Thibault TUBIANA