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)
Either:
open C:\Users\damien\ ... \Results_190809\dock001.pdb
-or-:
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 path.
2/ open Tools - Structure analysis - Sequence
3/ select residues 203 to 227 chain A
sel :203-227.A
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
Eric Pettersen
UCSF Computer Graphics Lab