From: Ashar Malik (asharjm_at_gmail.com)
Date: Thu Dec 04 2014 - 22:15:51 CST

Do you want the complete path or just the folder name. If you just want the
folder name you can use the previous suggestion and save it as a string and
seperate it using the "/" delimiter ...

If you want the full path you need to make a call to "pwd" ... This will
print the path to the current working directory .. You can then save it and
do what you want with it ...

Hope this helps ...

Best,
/A
On Dec 5, 2014 4:33 PM, "Mohammad Khalkhali" <khalkhal_at_ualberta.ca> wrote:

> Exactly! What I need is something that just show "test/". I need the path
> of the directory of the top file. There should be some easy way to do this
> instead of manipulating "molinfo top get filename" output.
>
> On Thu, Dec 4, 2014 at 7:58 PM, Cun Zhang <apzc2529_at_gmail.com> wrote:
>
>> 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>
>> ========================================
>>
>
>
>
> --
> *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>
>

-- 
Best,
/A