From: John Stone (johns_at_ks.uiuc.edu)
Date: Wed Oct 20 2004 - 09:40:09 CDT

Marc,
  In general, the saved state files contain pathnames returned
as they were by the file browsers or file loading commands used by
the user when they loaded the files. The state files are currently
implemented as Tcl scripts, and so they are 100% human-editable.
You can easily truncate the absolute paths down to a relative-path
subset with any standard text editor. VMD doesn't know a priori
what the common sub-path of all loaded files is. In order to save
the state file using relative paths, it would either need to factor
out the common subpath and store that, or else it would need to store
paths relative to the starting working directory, or something like that.
Neither option is much more attractive than what it is doing now, and
all options cause one or more subsets of users to have to edit their
saved state files in certain circumstances. Older versions of VMD behaved
the opposite way, saving with relative paths (due to the behavior of the
XForms file browser back then) and I got complaints about that too, so
neither option is a panacea. Writing code to factor out the common
sub-path of all files might be a starting point for an automated feature
for saving using relative paths, if I come up with a better idea I'll
see about implementing it.

Thanks,
  John Stone
  vmd_at_ks.uiuc.edu

On Wed, Oct 20, 2004 at 09:00:23AM -0400, Marc Q. Ma wrote:
> Dear VMD developers,
>
> Saving VMD states is a great feature. I have enjoyed using it. However,
> when I wanted to use the same set of states (saved on Mac OS X) to
> display my systems in other machines (SUN OS 2.9 with AFS), I found
> that the states contain absolute paths of my files, which is not
> usable.
>
> Same problems happen when someone want to share a saved state with
> others about the same system but different choice of display styles
> (cylinder, coil, bond, etc) -- they usually do not keep a directory
> structure same as others.
>
> One way to dismiss this problem is to allow users to save states using
> relative path, such as the unix "./" for current directory. States
> saved this way will be usable among users studying the same system as
> long as they maintain the same relative dir, which can be easily
> achieved by putting all files in one directory.
>
> Looking forward to get some insight from you!
>
> Thanks,
>
> Marc
> ----------------------------------------------------------------------
> Marc Q. Ma, Ph.D. | Tel: 973-642-4497
> Department of Computer Science | Fax: 973-596-5777
> New Jersey Institute of Technology | Email: qma_at_oak.njit.edu
> University Heights, Newark, NJ 07102 | URL: http://cs.njit.edu/~qma
> ----------------------------------------------------------------------

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349              
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078