Dear James.

Switch to use the python command syntax and string printing in input arguments.

cd C:\Users\tlinnet\Desktop


#fetch 1dw1

select visible

#isomesh map,, 3.0, sele, carve=1.6
cmd.isomesh("%s_map"%prot, "%s_2fofc"%prot, 3.0, "sele", carve=1.6)

#color br2, map
cmd.color("br2", "%s_map"%prot)
#cmd.color("yellow", "%s_map"%prot)

#set mesh_width, 0.5
print cmd.get_setting_text('mesh_width')
cmd.set("mesh_width", 0.5)
print cmd.get_setting_text('mesh_width')

#bg_color black

#set ray_trace_fog, 0
print cmd.get_setting_text('ray_trace_fog')
cmd.set("ray_trace_fog", 0)
print cmd.get_setting_text('ray_trace_fog')

#set depth_cue, 0
print cmd.get_setting_text('depth_cue')
cmd.set("depth_cue", 0)
print cmd.get_setting_text('depth_cue')

#set ray_shadows, off
print cmd.get_setting_text('ray_shadows')
cmd.set("ray_shadows", "off")
print cmd.get_setting_text('ray_shadows')

#ray 1280,1024

#png 1dw1.png

Troels Emtekær Linnet
Ved kløvermarken 9,
2300 København S
+45 60210234

2012/10/1 James Starlight <>
Dear PyMol users!

I wounder to know how to define variables in pml scripts.

E.g in below command sets for processing of ccp4 maps the PDB ID
(1dw1) of the processed pdb file is mentioned several times. How I
could define variable for that pdb id only once in the start of that
simple script to allow me edit pdb id only once  at that defined
variable each time when I change pdb file ?

fetch 1dw1

select visible

isomesh map,, 3.0, sele, carve=1.6

color br2, map
set mesh_width, 0.5
bg_color black
set ray_trace_fog, 0
set depth_cue, 0
set ray_shadows, off
ray 1280,1024
png 1dw1.png

Thanks for help


Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.;262219671;13503038;y?
PyMOL-users mailing list (
Info Page: