From: Cun Zhang (apzc2529_at_gmail.com)
Date: Thu Dec 04 2014 - 20:58:18 CST

Here is my output:
cunzhang_at_Debian:~$ vmd test/test.pdb test/test.xtc
>molinfo top get filename
{test/test.pdb test/test.xtc}

BTW: Please cc to vmd-l_at_ks.uiuc.edu when you reply.

On Fri, Dec 5, 2014 at 10:43 AM, Mohammad Khalkhali <khalkhal_at_ualberta.ca>
wrote:

> Hi Cun,
>
> I tried this. This gives the file name what i need is the path of the file.
>
> Cheers!
> MK
>
> On Thu, Dec 4, 2014 at 7:20 PM, Cun Zhang <apzc2529_at_gmail.com> wrote:
>
>> Try command "molinfo top get filename"
>>
>> On Fri, Dec 5, 2014 at 9:25 AM, Mohammad Khalkhali <khalkhal_at_ualberta.ca>
>> wrote:
>>
>>> Dear VMD community:
>>>
>>> I wonder if anyone knows how how I can get the path of a loaded
>>> trajectory in the TCL console. I have a tcl code which changes some of
>>> atoms' properties in the loaded trajectory dynamically and then I used
>>> these properties to color my molecules. This code reads a data file which
>>> is in the same directory the trajectory file directory. I have to change
>>> the path in my tcl code manually every time I load a new trajectory file.
>>> If I can get the path of TOP molecule somehow, I won't have to change the
>>> path of the data file each time. I would appreciate it if you would help me
>>> with this.
>>>
>>> Cheer!
>>> MK.
>>>
>>> --
>>> *Please consider the environment before printing this email*
>>>
>>> Mohammad Khalkhali (MK)
>>> PhD Candidate
>>> Department of Chemical and Materials Engineering
>>> University of Alberta
>>>
>>> 11421 - Saskatchewan Drive
>>> The National Institute for Nanotechnology (NINT) Building
>>> Edmonton, AB T6G 2M9
>>> Office Number: 5-08
>>> Tel: (780) 492-8775
>>> khalkhal_at_ualberta.ca
>>> <https://www.linkedin.com/pub/mohammad-khalkhali/48/514/656>
>>>
>>
>>
>>
>> --
>> ========================================
>> Cun Zhang
>> Ph.D. Candidate
>> LNM,Institute of Mechanics
>> Chinese Academy of Sciences
>> Beijing, 100190, China
>> Tel:86-10-82544204 <http://www.edwardpku.com/cun>
>> ========================================
>>
>
>
>
> --
> *Please consider the environment before printing this email*
>
> Mohammad Khalkhali (MK)
> PhD Candidate
> Department of Chemical and Materials Engineering
> University of Alberta
>
> 11421 - Saskatchewan Drive
> The National Institute for Nanotechnology (NINT) Building
> Edmonton, AB T6G 2M9
> Office Number: 5-08
> Tel: (780) 492-8775
> khalkhal_at_ualberta.ca
> <https://www.linkedin.com/pub/mohammad-khalkhali/48/514/656>
>

-- 
========================================
Cun Zhang
Ph.D. Candidate
LNM,Institute of Mechanics
Chinese Academy of Sciences
Beijing, 100190, China
Tel:86-10-82544204 <http://www.edwardpku.com/cun>
========================================