[Chimera-users] Script

Eric Pettersen pett at cgl.ucsf.edu
Wed Aug 19 11:22:04 PDT 2009

Hi Damien,
	You can use "open" with the full path to the file, or you can "cd" to  
the folder and then just use the file's name.  See below...

On Aug 19, 2009, at 6:44 AM, Damien Larivière wrote:

> Dear all,
> Sorry for this simple question : Is there an example of how to use a
> command in a script ? For example, the command "open" is described in
> the documentation but I confess (i'm not a programmer) that I do not
> understand how to use it for opening a pdb file in a specific  
> directory
> : C:\Users\damien\Fondation\LifeExplorer\3D
> models\FtsZ_ring\Bond_Set\Docking_Hex\Results_190809\dock0001.pdb
> I would like to create a script that does :
> 1/ Open a PDB file (dock0001.pdb)

	open C:\Users\damien\ ... \Results_190809\dock001.pdb

	cd C:\Users\damien\ ... \Docking_Hex\Results_190809
	open dock001.pdb

The latter might be better if you are going to save files and would  
like them to go into that folder as well without specifying a big long  

> 2/ open Tools - Structure analysis - Sequence
> 3/ select residues 203 to 227 chain A

sel :203-227.A

":203-227.A" is the "atom specifier" for residues 203 to 227 of chain  
A.  There is an extensive explanation of atom specifiers here: http://www.cgl.ucsf.edu/chimera/current/docs/UsersGuide/midas/frameatom_spec.html

> 4/ Actions Color Red

color red sel

> 5/ open Tools - Structure analysis - Sequence
> 6/ select residues 54 to 87 chain A

sel :54-87.A

> 7/ Actions Color Magenta

color magenta sel

If the only reason you are making the selection is in order to color  
it magenta (i.e. you aren't going to do any other operations on it)  
then you could just cut out the selection step and:

color magenta :54-87.A


                         Eric Pettersen
                         UCSF Computer Graphics Lab

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20090819/a940655e/attachment.html>

More information about the Chimera-users mailing list