From: Axel Kohlmeyer (
Date: Tue Dec 01 2009 - 07:30:43 CST

On Tue, Dec 1, 2009 at 7:25 AM, <> wrote:
> Dear VMD users,
> I would like to load two pdb files corresponding to two conformations of the
> same
> protein, I would read beta factors, calculate their difference and assign
> these
> differences to one of the molecules , in the b-factor column.
> Does anybody have a script for this?

this is so trivial to do that you can do it yourself.
here is the basic code (untested).

set mol1 [mol new $file1 ]
set mol2 [mol new $file2 ]

set sel1 [atomselect $mol1 all]
set sel2 [atomselect $mol2 all]

set bdiff {}
foreach a1 [$sel1 get beta] a2 [$sel2 get beta] {
    lappend bdiff [expr {$a2 - $a1]]
$sel1 set beta $bdiff

if something is not obvious, have a look at the
scripting examples in the VMD user's guide, and
check out a tcl tutorial.


> thankyou
> mvittoria cubellis

Dr. Axel Kohlmeyer
Institute for Computational Molecular Science
College of Science and Technology
Temple University, Philadelphia PA, USA.