I did simulation using NAMD and wrapall = on option. While saving the coordinates in pdb format from the trajectory format, I want to unwrap the molecule.
Actually, there's nothing like "wrap molecule" that is written into PDB file. It's just a configuration option that forces keeping a set of molecules in a setten area - but it's still possible that I didn't understand your problem.
I guess you are trying to say how to fold/unfold a trajectory. I don't know how to do this using vmd/tcl but you can check this code from allen tildesley book. This code does the folding/unfolding of the trajectory:http://www.ccl.net/pub/chemistry/software/SOURCES/FORTRAN/allen-tildesley-book/f.26.shtml