Quantcast
Channel: Active questions tagged vmd - Stack Overflow
Viewing all articles
Browse latest Browse all 33

Tcl print cwd and use it as string

$
0
0

I was making a small script in tcl for VMD:

mol load psf run_1/structure.psf xtc run_1/postDocking_wrapped.xtcset final [atomselect top "not (water or ions or resid 1216)" frame last]$final writepdb last_frame.pdbputs "finished!"quit

I wish i could add the folder I'm working in as a string to last_frame.pdb

like: last_frame_A1234.pdb where A1234 is my current folder.When I try:

set path [file dirname [file normalize [info script] ] ]

it just returns a "."

I have also tried:

set path [file [info script]]

but the result is always the "." rather than A1234F.

If I put:

set path [pwd]

it would give me the full path (with the "/") and writepdb does not accept special characters.

Is there any way to just get the cwd? or from pwd access only to the last folder and use it as a string?

Thank you!


Viewing all articles
Browse latest Browse all 33

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>