From: L. Michel Espinoza-Fonseca (mef_at_ddt.biochem.umn.edu)
Date: Thu Apr 10 2008 - 17:02:13 CDT

Hi all,

I want to create a new trajectory from a pdb-formatted trajectory
using VMD. The problem I'm facing is that I'm trying to write the new
trajectory with one residue having a different name (i.e., THR by
FOO). I was trying to do the following:

set all [atomselect top all frame all]
set res [atomselect top "resid 10" frame all]
$res set resname FOO
animate write pdb new_trajectory.pdb $all

However, every time I run these lines I get the following error: ERROR
> Invalid molecule id 0

Do you have any ideas on how to solve this issue?

Thanks!
Michel