## ## Since there's not a GUI for the newest dynamic reps yet, ## I've written up a short Tcl script that you can use to ## set all of the new dynamic-capable reps to a cutoff of ## your choosing. To use the script, you run the command ## (default cutoff of 1.6): ## setrepsdynamic 1.6 ## to disable, set the cutoff to 0.0 ## setrepsdynamic 0.0 ## proc setrepsdynamic { cutoff } { foreach mol [molinfo list] { set numreps [molinfo $mol get numreps] for {set i 0} {$i < $numreps} {incr i} { set rep [lindex [molinfo $mol get "{rep $i}"] 0] # puts "mol: $mol rep: $i repstyle: $rep" set style [lindex $rep 0] # puts "style: $style" set len [llength $rep] set newrep {} if {[string compare $style "CPK"]==0} { # puts "setting CPK rep" set newrep $rep if {$len < 6} { lappend newrep $cutoff } else { lset newrep 5 $cutoff } } if {[string compare $style "Licorice"]==0} { # puts "setting licorice rep" set newrep $rep if {$len < 5} { lappend newrep $cutoff } else { lset newrep 4 $cutoff } } if {[string compare $style "Lines"]==0} { # puts "setting lines rep" set newrep $rep if {$len < 3} { lappend newrep $cutoff } else { lset newrep 2 $cutoff } } if {[llength $newrep] > 0} { # puts "newrep: $newrep" mol modstyle $i $mol $newrep } else { # puts "skipped rep" } } } }