############################################################################
# DESCRIPTION:
#
# VMD startup script. The commands here are executed as soon as VMD starts up
############################################################################
############################################################################
# Display Preferences
############################################################################
# menu
menu main move 525 30
menu main on
# animate
animate style once; # once/rock/loop
# display
display projection Orthographic; # Orthographic/Perspective
display nearclip set 0.01
# color
color Display Background 16; # 6/8/16 for silver/white/black
color Labels Bonds 0; # 0 for blue
color Labels Angles 1; # 1 for red
# axes
axes location lowerleft
axes location off
# stage
stage location off
# light
light 0 on
# rock
rock y by 1; # start the scene a-rockin'
# mouse
mouse rocking off
############################################################################
# Redefine Colors
############################################################################
color Name C 7; # 7 for green
color Type C 7
color Name F 12; # 12 for lime
color Type F 12
############################################################################
# New Material
############################################################################
# Glass: a very transparent Material
material add Glass
material change ambient Glass 0.00
material change specular Glass 0.50
material change diffuse Glass 0.65
material change shininess Glass 0.53
material change opacity Glass 0.15
# SemiTrans
material add SemiTrans
material change ambient SemiTrans 0.00
material change specular SemiTrans 0.50
material change diffuse SemiTrans 0.65
material change shininess SemiTrans 0.53
material change opacity SemiTrans 0.66
# Orbital
material add Orbital
material change ambient Orbital 0.00
material change specular Orbital 0.50
material change diffuse Orbital 0.65
material change shininess Orbital 0.53
material change opacity Orbital 0.38
############################################################################
# Working PATHs
############################################################################
set ARCH [vmdinfo arch]
# default $env(HOME)
# windows C:\Documents and Settings\jianzou
# linux /home/jianzou
# default $env(VMDDIR)
# windows d:/Program Files/University of Illinois/VMD
# linux /home/jianzou/program/vmd
if { ! [string compare -nocase $ARCH "WIN32"] } {
set env(HOME) "d:/Program Files/University of Illinois"
} elseif { ! [string compare -nocase $ARCH "LINUX"] } {
set env(HOME) "$env(HOME)/program"
} else {
puts "wrong ARCH"
exit
}
# molfile plugins in $env(VMDDIR)/plugins/$VMDARCH/molfile
# 'vmdinfo arch' --> $VMDARCH
# 'file join /foo bar' --> /foo/bar
# 'array get env' --> $env(index)
vmd_plugin_scandirectory [file join $env(VMDDIR)/plugins $ARCH molfile] *.so
# add scripts to the search path
# auto_path=$env(VMDDIR)/vmd/scripts/tcl:$auto_path
set auto_path [concat "$env(VMDDIR)/scripts/tcl8.4" $auto_path]
# source command extensions (e.g. vmd_draw_vector)
foreach ext [glob -nocomplain $env(VMDDIR)/scripts/extensions/*.tcl ] {
source $ext
}
unset ext
############################################################################
# Change the default VDW radii
############################################################################
proc my_set_def_vdw {args} {
lassign $args fname molid
set my_def_vdw {
{name "C.*" } { 0.5 } \
{name "OW" } { 0.3 } \
{name "HW." } { 0.3 } \
}
foreach {selstr rad} $my_def_vdw {
set my_sel [atomselect $molid "$selstr"]
$my_sel set radius $rad
$my_sel delete
}
}
trace variable vmd_initialize_structure(0) w my_set_def_vdw
trace variable vmd_initialize_structure(1) w my_set_def_vdw
trace variable vmd_initialize_structure(2) w my_set_def_vdw
############################################################################
# Misc.
############################################################################
# tkcon-menu popup
after idle {menu tkcon on}
# user-defined representation method
mol default color resid
mol default material Opaque
mol default selection "all"
mol default style {Bonds 0.3 15}
mol default style {VDW 0.3 15}
mol default style {CPK 0.9 0.4 15 15}
mol default style {HBonds 3.5 30 3}
mol default style {NewCartoon 0.3 6 4.1 0}
# User's default values for newly loaded molecules/reps, etc
mol default color {colorID 5}
mol default style {NewCartoon 0.300000 6.000000 4.100000 0}
mol default selection {name CA}
mol default material {Transparent}
2008-02-28
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment