VMD-L Mailing List
From: Mayne, Christopher G (cmayne2_at_illinois.edu)
Date: Thu May 09 2013 - 09:52:08 CDT
- Next message: John Stone: "Re: convert pdb file from angstorm to nm units"
- Previous message: Axel Kohlmeyer: "Re: molinfo top get filename, dialogue vs. "mol new""
- In reply to: Christopher MacDermaid: "molinfo top get filename, dialogue vs. "mol new""
- Next in thread: Christopher MacDermaid: "Re: molinfo top get filename, dialogue vs. "mol new""
- Reply: Christopher MacDermaid: "Re: molinfo top get filename, dialogue vs. "mol new""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
try:
file normalize [mol info top get filename]
Christopher Mayne
On May 9, 2013, at 8:30 AM, Christopher MacDermaid wrote:
> Hello,
>
> When calling "molinfo top get filename", the filename returned is different depending on the method in which I choose to load the molecule.
>
> If I use the file browser dialogue, molinfo returns the absolute path, however if I use the console with "mol new" it returns the relative path:
>
> vmd> mol new ../../../../test/test.pdb
>
> vmd > molinfo top get filename
> ../../../../test/test.pdb
>
> detrimental in the event that I want to reload the molecule like so and if I've changed working directories...
>
> proc reload { mol } {
> lassign {*}[molinfo $mol get filename] psf dcd
> mol delete $mol
> mol new $psf type psf waitfor all
> mol addfile $dcd waitfor all
> }
>
> Can this be fixed such that "mol new" will set the correct file name to one that is the absolute path of the loaded files. I realize this may present complications since mol new can be used to create an empty molecule, but the behavior regarding the file names is rather unexpected.
>
> Thanks!
>
> Dr. Chris MacDermaid, Postdoctoral Fellow
> Institute for Computational Molecular Science
> Temple University, Philadelphia, PA
>
- Next message: John Stone: "Re: convert pdb file from angstorm to nm units"
- Previous message: Axel Kohlmeyer: "Re: molinfo top get filename, dialogue vs. "mol new""
- In reply to: Christopher MacDermaid: "molinfo top get filename, dialogue vs. "mol new""
- Next in thread: Christopher MacDermaid: "Re: molinfo top get filename, dialogue vs. "mol new""
- Reply: Christopher MacDermaid: "Re: molinfo top get filename, dialogue vs. "mol new""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]