 |
| Description |
Making a B&W outlined image with depth.
|
| See Also |
|
|
|
# first load lipid model
load lipids.pdb;
# hide the initially loaded representation
hide all;
# set background color to white
bg_color white;
# show lipid model as sticks
show sticks, lipids;
# color the lipids model by element CHNOS #2 (carbon green)
util.cbag lipids;
# select all hydrogens and remove them from the model
select hideme, hydro;
hide everything, hideme;
delete hideme;
# create phosphate spheres
create phos, elem p;
hide everything, phos;
show spheres, phos;
# load helix model
load helix.pdb;
# hide the initially loaded representation
hide everything, helix;
# make the helical struct into a cartoon form
show cartoon, helix;
# style the cartoon form
cartoon putty;
# reposition the helix among the lipids using
# the 3-Button Editing Mouse Mode
# basically
# Shift+Left Mouse to rotate the helix
# Shift+Middle Mouse to move the helix
# also, you may want to make liberal use of the
# get_view and set_view commands.
#
# When you have the scene set like you want,
# continue with...
# move the model to find the view you want,
# and use get_view to get the coordinate description
get_view;
# set ray_trace_mode to black and white outline
set ray_trace_mode, 2;
Now, you'll need to save multiple versions of your model. (use ray, then png <filename> to save each version)
- Version A: with all the elements except for the helix. This will become the background.
- Version B: with the 'front' elements, and the helix. Basically this is just a few 'layers' of lipid, with the helix among them. To do this:
- move the model around until you visually see the part to remove
- switch your Mouse Mode to 3-button viewing, then use the +Box selection (Shift+Left mouse) to select the 'background' portion to hide.
- choose Hide>Everything for the selection
- use the code from get_view to go back to the original view
Finally, you will need to compose the image in Photoshop (or Gimp, here I'll use Photoshop).
- Load the two versions.
- Select the white background in Version B, then choose Select>Color Range...
- Make sure 'Select' is set to 'Sampled Colors', and 'Fuzziness' is set to 150, then click okay.
- delete the white selection, then choose Select>All
- copy the picture, then switch to Version A and paste the selection (it should paste into its own layer as 'Layer 1')
- Click on 'Layer 0' (which is Version A) and change its opacity to 30%
- Create a new layer under 'Layer 0' which is filled with white only (or whatever background color you like)
- Click on 'Layer 1' (which is Version B), and using the Move tool (and nudge), align the molecules in 'Layer 1' to 'Layer 0'
- Some parts of 'Layer 1' are transparent and shouldn't be. Using the Paint Bucket tool fill in these areas with white (or whichever color you find appropriate).
- Admire your handiwork; put it in a publication, presentation, or poster.
|