From: Isralewitz, Barry (isralewi_at_illinois.edu)
Date: Wed Nov 20 2024 - 13:19:52 CST

Hi Roshan,

Ah, I just now realized that you likely really wanted to start from the current directory (pwd) in a text terminal in macOS, not from a fixed directory. So, from a terminal (Terminal.app, iTerm2.app, or whatever):
If you launch directly from the command line with something like:
/Applications/VMD\ 1.9.4a57-arm64-Rev12.app/Contents/MacOS/startup.command
...the VMD console will start up in whatever directory your terminal was in. No need for changes for .vmdrc.

Other command line options (that same as on Linux):
/Applications/VMD\ 1.9.4a57-arm64-Rev12.app/Contents/MacOS/startup.command -dispdev text

/Applications/VMD\ 1.9.4a57-arm64-Rev12.app/Contents/MacOS/startup.command -e /Users/roshan/favorites/myscript.tcl

For help on other startup command options (again, the same on Linux):
/Applications/VMD\ 1.9.4a57-arm64-Rev12.app/Contents/MacOS/startup.command -h

For the path for other/future versions of VMD, or if you keep your VMD elsewhere than /Applications, here's how to find the path:
ctrl-click on the VMD application icon, select Show Package Contents, and browse to startup.command. Then you can use the handy macOS feature to drag the startup.command to a Terminal window to insert the path at the command line. Then use that in an alias or a shell script for future use.

Cheers,
Barry



On Nov 20, 2024, at 1:49 PM, Isralewitz, Barry <isralewi_at_illinois.edu> wrote:

Hi Roshan,

Are you sure you are naming the startup file
 ~/.vmdrc
(note the "."before the "v")
and not a ~/vmdrc (as you mention in your mail)?

Another possibility is a typo --- such as a nonexistent directory --
in your line
cd /Users/roshan/my/favorite/directory
or
cd ~/favorite_dir
...or whatever it might be.

Cheers,
Barry



On Nov 20, 2024, at 12:40 PM, Roshan Shrestha <roshanpra_at_gmail.com> wrote:

Hi,
    It may be a very stupid question, but I am not very used to using
VMD on a Mac. I have used Linux in the past, so playing with vmdrc
file would solve everything. So, I recently installed vmd on my mac,
but the issue is, that it always opens from the home folder even
though I give a command to open vmd from the folder I wanted to open
it from. I tried to add cd [pwd] on the vmdrc, but to no avail. What
can be the issue in here, and how can I solve this. Thanks.

With best regards

--
Roshan Shrestha
PhD Student
MOBI team
Molecular Microbiology and Structural Biochemistry (MMSB) - UMR5086
Institut de Biologie et Chimie des Protéines (IBCP)
7 passage du Vercors
69367 LYON Cedex 07


--
Barry Isralewitz
Theoretical and Computational Biophysics Group
3143 Beckman, University of Illinois at Urbana-Champaign
Work Phone: (217) 300-1988
Email: isralewi_at_illinois.edu
https://www.ks.uiuc.edu/~barryi









--
Barry Isralewitz
Theoretical and Computational Biophysics Group
3143 Beckman, University of Illinois at Urbana-Champaign
Work Phone: (217) 300-1988
Email: isralewi_at_illinois.edu
https://www.ks.uiuc.edu/~barryi