If you want to have ChimeraX be in a specific directory when it starts up, you could put the needed 'cd' command in the commands that ChimeraX executes at startup.  You can find those in the "Startup" section of the ChimeraX preferences.

--Eric

Eric Pettersen
UCSF Computer Graphics Lab


On Jan 23, 2026, at 10:10 AM, Tom Goddard via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:

Hi Tim,

  When you open a ChimeraX command script (.cxc file) it automatically changes directory to the directory of the script, and when the script ends automatically changes the directory back to the original directory ChimeraX was in.  This is described in the documentation here


"Working directory: Opening a command file changes the current directory to the directory containing that file. After execution of the file finishes, the current directory is changed back to what it was previously. See also: cd"

  Tom


On Jan 23, 2026, at 7:50 AM, Timothy Springer via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:

Thanks! 
The other thing that happens to me is that I use the cd command to specify my directory in a .cxc script. 
Each time I load a protein it confirms that directory.
But then it later defaults to my home directory. 
- Tim
Timothy A. Springer, Ph.D.
Latham Family Professor, Harvard Medical School and Boston Children's Hospital
Founder, Institute for Protein Innovation


On Thu, Jan 22, 2026 at 8:53 PM Elaine Meng <meng@cgl.ucsf.edu> wrote:
Think of "name" (without frozen) as simple text substitution, whereas "name frozen" will specify a frozen set of atoms, those that were specified at the time the name was given.

So if you do this

open 1zik
name blah1 protein
name frozen blah2 protein
open 4hhb

... "blah1" will specify all the protein(s) that are currently open since it is identical to substituting in the text "protein", whereas "blah2" will only specify the protein in 1zik, because that was the only protein open when the "name frozen" command was issued.

Elaine
-----
Elaine C. Meng, Ph.D.                       
UCSF Chimera(X) team
Resource for Biocomputing, Visualization, and Informatics
Department of Pharmaceutical Chemistry
University of California, San Francisco



> On Jan 22, 2026, at 5:36 PM, Tom Goddard via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
>
> You need to use
>
>     name frozen test sel
>
> which will set test to be the currently selected atoms.  In your example you used
>
>     name test sel
>
> which just sets the name test to be the name "sel".  So later when you use it uses "sel" and since nothing is selected.  This "name frozen" versus "name" command is confusing.
>
> Tom
>
>
>> On Jan 22, 2026, at 5:21 PM, Timothy Springer via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
>>
>> I cant get my named selections to work.
>> Here is an example.
>> select #1/V:80@CD2
>> 1 atom, 1 residue, 1 model selected
>> name test sel
>> select clear
>> select test
>> Nothing selected
>>
>> - Tim
>> Timothy A. Springer, Ph.D.
>> Latham Family Professor, Harvard Medical School and Boston Children's Hospital
>> Founder, Institute for Protein Innovation

_______________________________________________
ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu
To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu
Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/

_______________________________________________
ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu
To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu
Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/