Changeset 2628 for trunk


Ignore:
Timestamp:
Oct 14, 2011 11:48:46 AM (13 years ago)
Author:
gah
Message:
 
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/molvisviewer.tcl

    r2613 r2628  
    6565    private variable _cacheid ""
    6666    private variable _cacheimage ""
    67 
    68     private variable _delta1 10
    69     private variable _delta2 2
    7067
    7168    private common _settings  ;         # Array of settings for all known
     
    8279    private variable _width
    8380    private variable _height
    84     private variable _restore 1;        # Restore camera settings
     81    private variable _reset 1;  # Restore camera settings
    8582    private variable _cell 0;           # Restore camera settings
     83    private variable _flush 1
    8684
    8785    constructor { hostlist args } {
     
    183181    set _state(client) 1
    184182    set _hostlist $hostlist
    185     set _restore 1
     183    set _reset 1
    186184
    187185    array set _view {
     
    401399}
    402400
    403 itcl::body Rappture::MolvisViewer::BuildSettingsTab {} {
    404     set fg [option get $itk_component(hull) font Font]
    405 
    406     set inner [$itk_component(main) insert end \
    407         -title "Settings" \
    408         -icon [Rappture::icon wrench]]
    409     $inner configure -borderwidth 4
    410 
    411     label $inner.drawinglabel -text "Molecule Representation" \
    412         -font "Arial 9 bold"
    413 
    414     label $inner.pict -image $_settings($this-modelimg)
    415 
    416     radiobutton $inner.bstick -text "balls and sticks" \
    417         -command [itcl::code $this Representation ballnstick all] \
    418         -variable Rappture::MolvisViewer::_settings($this-model) \
    419         -value ballnstick -font "Arial 9" -pady 0
    420     Rappture::Tooltip::for $inner.bstick \
    421         "Display atoms (balls) and connections (sticks) "
    422 
    423     radiobutton $inner.spheres -text "spheres" \
    424         -command [itcl::code $this Representation spheres all] \
    425         -variable Rappture::MolvisViewer::_settings($this-model) \
    426         -value spheres -font "Arial 9" -pady 0
    427     Rappture::Tooltip::for $inner.spheres \
    428         "Display atoms as spheres. Do not display bonds."
    429 
    430     radiobutton $inner.sticks -text "sticks" \
    431         -command [itcl::code $this Representation sticks all] \
    432         -variable Rappture::MolvisViewer::_settings($this-model) \
    433         -value sticks -font "Arial 9" -pady 0
    434     Rappture::Tooltip::for $inner.sticks \
    435         "Display bonds as sticks. Do not display atoms."
    436 
    437     radiobutton $inner.lines -text "lines" \
    438         -command [itcl::code $this Representation lines all] \
    439         -variable [itcl::scope _settings($this-model)] \
    440         -value lines -font "Arial 9" -pady 0
    441     Rappture::Tooltip::for $inner.lines \
    442         "Display bonds as lines. Do not display atoms."
    443 
    444     radiobutton $inner.cartoon -text "cartoon" \
    445         -command [itcl::code $this Representation cartoon all] \
    446         -variable [itcl::scope _settings($this-model)] \
    447         -value cartoon -font "Arial 9" -pady 0
    448     Rappture::Tooltip::for $inner.cartoon \
    449         "Display cartoon representation of bonds (sticks)."
    450 
    451     scale $inner.spherescale -width 10 -font "Arial 9 bold" \
    452         -from 0.1 -to 2.0 -resolution 0.05 -label "Sphere Scale" \
    453         -showvalue true -orient horizontal \
    454         -command [itcl::code $this SphereScale] \
    455         -variable Rappture::MolvisViewer::_settings($this-spherescale)
    456     $inner.spherescale set $_settings($this-spherescale)
    457     Rappture::Tooltip::for $inner.spherescale \
    458         "Adjust scale of atoms (spheres or balls). 1.0 is the full VDW radius."
    459 
    460     scale $inner.stickradius -width 10 -font "Arial 9 bold" \
    461         -from 0.1 -to 1.0 -resolution 0.025 -label "Stick Radius" \
    462         -showvalue true -orient horizontal \
    463         -command [itcl::code $this StickRadius] \
    464         -variable Rappture::MolvisViewer::_settings($this-stickradius)
    465     Rappture::Tooltip::for $inner.stickradius \
    466         "Adjust scale of bonds (sticks)."
    467     $inner.stickradius set $_settings($this-stickradius)
    468 
    469     checkbutton $inner.labels -text "Show labels on atoms" \
    470         -command [itcl::code $this labels update] \
    471         -variable [itcl::scope _settings($this-showlabels)] \
    472         -font "Arial 9 bold"
    473     Rappture::Tooltip::for $inner.labels \
    474         "Display atom symbol and serial number."
    475 
    476     checkbutton $inner.rock -text "Rock model back and forth" \
    477         -command [itcl::code $this Rock toggle] \
    478         -variable Rappture::MolvisViewer::_settings($this-rock) \
    479         -font "Arial 9 bold"
    480     Rappture::Tooltip::for $inner.rock \
    481         "Rotate the object back and forth around the y-axis."
    482 
    483     checkbutton $inner.ortho -text "Orthoscopic projection" \
    484         -command [itcl::code $this OrthoProjection update] \
    485         -variable Rappture::MolvisViewer::_settings($this-ortho) \
    486          -font "Arial 9 bold"
    487     Rappture::Tooltip::for $inner.ortho \
    488         "Toggle between orthoscopic/perspective projection modes."
    489 
    490     checkbutton $inner.cartoontrace -text "Cartoon Trace" \
    491         -command [itcl::code $this CartoonTrace update] \
    492         -variable [itcl::scope _settings($this-cartoontrace)] \
    493         -font "Arial 9 bold"
    494     Rappture::Tooltip::for $inner.cartoontrace \
    495         "Set cartoon representation of bonds (sticks)."
    496 
    497     checkbutton $inner.cell -text "Parallelepiped" \
    498         -command [itcl::code $this Cell toggle] \
    499         -font "Arial 9 bold"
    500     $inner.cell select
    501 
    502     label $inner.spacer
    503     blt::table $inner \
    504         0,0 $inner.drawinglabel -anchor w -columnspan 4 \
    505         1,1 $inner.pict -anchor w -rowspan 5 \
    506         1,2 $inner.bstick -anchor w -columnspan 2 \
    507         2,2 $inner.spheres -anchor w -columnspan 2 \
    508         3,2 $inner.sticks -anchor w -columnspan 2 \
    509         4,2 $inner.lines -anchor w -columnspan 2 \
    510         5,2 $inner.cartoon -anchor w -columnspan 2 \
    511         6,0 $inner.labels -anchor w -columnspan 4 -pady {1 0} \
    512         7,0 $inner.rock -anchor w -columnspan 4 -pady {1 0} \
    513         8,0 $inner.ortho -anchor w -columnspan 4 -pady {1 0} \
    514         9,0 $inner.cartoontrace -anchor w -columnspan 4 -pady {1 0} \
    515         10,0 $inner.cell -anchor w -columnspan 4 -pady {1 0} \
    516         11,1 $inner.spherescale -fill x -columnspan 4 -pady {1 0} \
    517         12,1 $inner.stickradius -fill x -columnspan 4 -pady {1 0} \
    518 
    519     blt::table configure $inner c0 -resize expand -width 2
    520     blt::table configure $inner c1 c2 -resize none
    521     blt::table configure $inner c3 -resize expand
    522     blt::table configure $inner r* -resize none
    523     blt::table configure $inner r13 -resize expand
    524 }
    525 
    526401# ----------------------------------------------------------------------
    527402# DESTRUCTOR
     
    532407    image delete $_image(plot)
    533408    array unset _settings $this-*
     409}
     410
     411
     412# ----------------------------------------------------------------------
     413# USAGE: add <dataobj> ?<settings>?
     414#
     415# Clients use this to add a data object to the plot.  The optional
     416# <settings> are used to configure the plot.  Allowed settings are
     417# -color, -brightness, -width, -linestyle, and -raise. Only
     418# -brightness and -raise do anything.
     419# ----------------------------------------------------------------------
     420itcl::body Rappture::MolvisViewer::add { dataobj {options ""}} {
     421    array set params {
     422        -color          auto
     423        -brightness     0
     424        -width          1
     425        -raise          0
     426        -linestyle      solid
     427        -description    ""
     428        -param          ""
     429    }
     430
     431    foreach {opt val} $options {
     432        if {![info exists params($opt)]} {
     433            error "bad settings \"$opt\": should be [join [lsort [array names params]] {, }]"
     434        }
     435        set params($opt) $val
     436    }
     437
     438    set pos [lsearch -exact $dataobj $_dlist]
     439
     440    if {$pos < 0} {
     441        if {![Rappture::library isvalid $dataobj]} {
     442            error "bad value \"$dataobj\": should be Rappture::library object"
     443        }
     444
     445        if { !$_settings($this-showlabels-initialized) } {
     446            set showlabels [$dataobj get components.molecule.about.emblems]
     447            if { $showlabels != "" && [string is boolean $showlabels] } {
     448                set _settings($this-showlabels) $showlabels
     449            }
     450        }
     451
     452        lappend _dlist $dataobj
     453        if { $params(-brightness) >= 0.5 } {
     454            set _dobj2transparency($dataobj) "ghost"
     455        } else {
     456            set _dobj2transparency($dataobj) "normal"
     457        }
     458        set _dobj2raise($dataobj) $params(-raise)
     459        debug "setting parameters for $dataobj\n"
     460
     461        if { [isconnected] } {
     462            $_dispatcher event -idle !rebuild
     463        }
     464    }
     465}
     466
     467# ----------------------------------------------------------------------
     468# USAGE: delete ?<dataobj> <dataobj> ...?
     469#
     470# Clients use this to delete a dataobj from the plot. If no dataobjs
     471# are specified, then all dataobjs are deleted.
     472# ----------------------------------------------------------------------
     473itcl::body Rappture::MolvisViewer::delete { args } {
     474    if {[llength $args] == 0} {
     475        set args $_dlist
     476    }
     477
     478    # delete all specified dataobjs
     479    set changed 0
     480    set _flush 1
     481    foreach dataobj $args {
     482        set pos [lsearch -exact $_dlist $dataobj]
     483        if {$pos >= 0} {
     484            set _dlist [lreplace $_dlist $pos $pos]
     485            if { [info exists _obj2models($dataobj)] } {
     486                foreach model $_obj2models($dataobj) {
     487                    array unset _active $model
     488                }
     489            }
     490            array unset _obj2models $dataobj
     491            array unset _dobj2transparency $dataobj
     492            array unset _dobj2color $dataobj
     493            array unset _dobj2width $dataobj
     494            array unset _dobj2dashes $dataobj
     495            array unset _dobj2raise $dataobj
     496            set changed 1
     497        }
     498    }
     499
     500    # if anything changed, then rebuild the plot
     501    if {$changed} {
     502        if { [isconnected] } {
     503            $_dispatcher event -idle !rebuild
     504        }
     505    }
     506}
     507
     508# ----------------------------------------------------------------------
     509# USAGE: get
     510#
     511# Clients use this to query the list of objects being plotted, in
     512# order from bottom to top of this result.
     513# ----------------------------------------------------------------------
     514itcl::body Rappture::MolvisViewer::get {} {
     515    # put the dataobj list in order according to -raise options
     516    set dlist $_dlist
     517    foreach obj $dlist {
     518        if {[info exists _dobj2raise($obj)] && $_dobj2raise($obj)} {
     519            set i [lsearch -exact $dlist $obj]
     520            if {$i >= 0} {
     521                set dlist [lreplace $dlist $i $i]
     522                lappend dlist $obj
     523            }
     524        }
     525    }
     526    return $dlist
    534527}
    535528
     
    608601        return 0
    609602    }
    610     set _restore 1
     603    set _reset 1
    611604    set result [VisViewer::Connect $hosts]
    612605    if { $result } {
     
    707700
    708701
     702itcl::body Rappture::MolvisViewer::BuildSettingsTab {} {
     703    set fg [option get $itk_component(hull) font Font]
     704
     705    set inner [$itk_component(main) insert end \
     706        -title "Settings" \
     707        -icon [Rappture::icon wrench]]
     708    $inner configure -borderwidth 4
     709
     710    label $inner.drawinglabel -text "Molecule Representation" \
     711        -font "Arial 9 bold"
     712
     713    label $inner.pict -image $_settings($this-modelimg)
     714
     715    radiobutton $inner.bstick -text "balls and sticks" \
     716        -command [itcl::code $this Representation ballnstick all] \
     717        -variable Rappture::MolvisViewer::_settings($this-model) \
     718        -value ballnstick -font "Arial 9" -pady 0
     719    Rappture::Tooltip::for $inner.bstick \
     720        "Display atoms (balls) and connections (sticks) "
     721
     722    radiobutton $inner.spheres -text "spheres" \
     723        -command [itcl::code $this Representation spheres all] \
     724        -variable Rappture::MolvisViewer::_settings($this-model) \
     725        -value spheres -font "Arial 9" -pady 0
     726    Rappture::Tooltip::for $inner.spheres \
     727        "Display atoms as spheres. Do not display bonds."
     728
     729    radiobutton $inner.sticks -text "sticks" \
     730        -command [itcl::code $this Representation sticks all] \
     731        -variable Rappture::MolvisViewer::_settings($this-model) \
     732        -value sticks -font "Arial 9" -pady 0
     733    Rappture::Tooltip::for $inner.sticks \
     734        "Display bonds as sticks. Do not display atoms."
     735
     736    radiobutton $inner.lines -text "lines" \
     737        -command [itcl::code $this Representation lines all] \
     738        -variable [itcl::scope _settings($this-model)] \
     739        -value lines -font "Arial 9" -pady 0
     740    Rappture::Tooltip::for $inner.lines \
     741        "Display bonds as lines. Do not display atoms."
     742
     743    radiobutton $inner.cartoon -text "cartoon" \
     744        -command [itcl::code $this Representation cartoon all] \
     745        -variable [itcl::scope _settings($this-model)] \
     746        -value cartoon -font "Arial 9" -pady 0
     747    Rappture::Tooltip::for $inner.cartoon \
     748        "Display cartoon representation of bonds (sticks)."
     749
     750    scale $inner.spherescale -width 10 -font "Arial 9 bold" \
     751        -from 0.1 -to 2.0 -resolution 0.05 -label "Sphere Scale" \
     752        -showvalue true -orient horizontal \
     753        -command [itcl::code $this SphereScale] \
     754        -variable Rappture::MolvisViewer::_settings($this-spherescale)
     755    $inner.spherescale set $_settings($this-spherescale)
     756    Rappture::Tooltip::for $inner.spherescale \
     757        "Adjust scale of atoms (spheres or balls). 1.0 is the full VDW radius."
     758
     759    scale $inner.stickradius -width 10 -font "Arial 9 bold" \
     760        -from 0.1 -to 1.0 -resolution 0.025 -label "Stick Radius" \
     761        -showvalue true -orient horizontal \
     762        -command [itcl::code $this StickRadius] \
     763        -variable Rappture::MolvisViewer::_settings($this-stickradius)
     764    Rappture::Tooltip::for $inner.stickradius \
     765        "Adjust scale of bonds (sticks)."
     766    $inner.stickradius set $_settings($this-stickradius)
     767
     768    checkbutton $inner.labels -text "Show labels on atoms" \
     769        -command [itcl::code $this labels update] \
     770        -variable [itcl::scope _settings($this-showlabels)] \
     771        -font "Arial 9 bold"
     772    Rappture::Tooltip::for $inner.labels \
     773        "Display atom symbol and serial number."
     774
     775    checkbutton $inner.rock -text "Rock model back and forth" \
     776        -command [itcl::code $this Rock toggle] \
     777        -variable Rappture::MolvisViewer::_settings($this-rock) \
     778        -font "Arial 9 bold"
     779    Rappture::Tooltip::for $inner.rock \
     780        "Rotate the object back and forth around the y-axis."
     781
     782    checkbutton $inner.ortho -text "Orthoscopic projection" \
     783        -command [itcl::code $this OrthoProjection update] \
     784        -variable Rappture::MolvisViewer::_settings($this-ortho) \
     785         -font "Arial 9 bold"
     786    Rappture::Tooltip::for $inner.ortho \
     787        "Toggle between orthoscopic/perspective projection modes."
     788
     789    checkbutton $inner.cartoontrace -text "Cartoon Trace" \
     790        -command [itcl::code $this CartoonTrace update] \
     791        -variable [itcl::scope _settings($this-cartoontrace)] \
     792        -font "Arial 9 bold"
     793    Rappture::Tooltip::for $inner.cartoontrace \
     794        "Set cartoon representation of bonds (sticks)."
     795
     796    checkbutton $inner.cell -text "Parallelepiped" \
     797        -command [itcl::code $this Cell toggle] \
     798        -font "Arial 9 bold"
     799    $inner.cell select
     800
     801    label $inner.spacer
     802    blt::table $inner \
     803        0,0 $inner.drawinglabel -anchor w -columnspan 4 \
     804        1,1 $inner.pict -anchor w -rowspan 5 \
     805        1,2 $inner.bstick -anchor w -columnspan 2 \
     806        2,2 $inner.spheres -anchor w -columnspan 2 \
     807        3,2 $inner.sticks -anchor w -columnspan 2 \
     808        4,2 $inner.lines -anchor w -columnspan 2 \
     809        5,2 $inner.cartoon -anchor w -columnspan 2 \
     810        6,0 $inner.labels -anchor w -columnspan 4 -pady {1 0} \
     811        7,0 $inner.rock -anchor w -columnspan 4 -pady {1 0} \
     812        8,0 $inner.ortho -anchor w -columnspan 4 -pady {1 0} \
     813        9,0 $inner.cartoontrace -anchor w -columnspan 4 -pady {1 0} \
     814        10,0 $inner.cell -anchor w -columnspan 4 -pady {1 0} \
     815        11,1 $inner.spherescale -fill x -columnspan 4 -pady {1 0} \
     816        12,1 $inner.stickradius -fill x -columnspan 4 -pady {1 0} \
     817
     818    blt::table configure $inner c0 -resize expand -width 2
     819    blt::table configure $inner c1 c2 -resize none
     820    blt::table configure $inner c3 -resize expand
     821    blt::table configure $inner r* -resize none
     822    blt::table configure $inner r13 -resize expand
     823}
     824
    709825# ----------------------------------------------------------------------
    710826# USAGE: Rebuild
     
    725841    set _cell 0
    726842
    727     if { $_restore } {
     843    if { $_reset } {
    728844        set _rocker(server) 0
    729845        set _cacheid 0
     
    9331049        set flush 0
    9341050    }
    935     if { $_restore } {
     1051    if { $_reset } {
    9361052        # Set or restore viewing parameters.  We do this for the first
    9371053        # model and assume this works for everything else.
     
    9481064
    9491065        SendCmd "raw -defer {zoom complete=1}"
    950         set _restore 0
     1066        set _reset 0
    9511067    }
    9521068    if { $changed } {
     
    9671083        $inner.cell configure -state disabled
    9681084    }
    969     if { $flush } {
     1085    if { $_flush || $flush } {
    9701086        global readyForNextFrame
    9711087        set readyForNextFrame 0;        # Don't advance to the next frame
    9721088                                        # until we get an image.
    9731089        SendCmd "ppm";                  # Flush the results.
     1090        set _flush 0
    9741091    }
    9751092    set _buffering 0;                   # Turn off buffering.
     
    14611578
    14621579
    1463 # ----------------------------------------------------------------------
    1464 # USAGE: add <dataobj> ?<settings>?
    1465 #
    1466 # Clients use this to add a data object to the plot.  The optional
    1467 # <settings> are used to configure the plot.  Allowed settings are
    1468 # -color, -brightness, -width, -linestyle, and -raise. Only
    1469 # -brightness and -raise do anything.
    1470 # ----------------------------------------------------------------------
    1471 itcl::body Rappture::MolvisViewer::add { dataobj {options ""}} {
    1472     array set params {
    1473         -color          auto
    1474         -brightness     0
    1475         -width          1
    1476         -raise          0
    1477         -linestyle      solid
    1478         -description    ""
    1479         -param          ""
    1480     }
    1481 
    1482     foreach {opt val} $options {
    1483         if {![info exists params($opt)]} {
    1484             error "bad settings \"$opt\": should be [join [lsort [array names params]] {, }]"
    1485         }
    1486         set params($opt) $val
    1487     }
    1488 
    1489     set pos [lsearch -exact $dataobj $_dlist]
    1490 
    1491     if {$pos < 0} {
    1492         if {![Rappture::library isvalid $dataobj]} {
    1493             error "bad value \"$dataobj\": should be Rappture::library object"
    1494         }
    1495 
    1496         if { !$_settings($this-showlabels-initialized) } {
    1497             set showlabels [$dataobj get components.molecule.about.emblems]
    1498             if { $showlabels != "" && [string is boolean $showlabels] } {
    1499                 set _settings($this-showlabels) $showlabels
    1500             }
    1501         }
    1502 
    1503         lappend _dlist $dataobj
    1504         if { $params(-brightness) >= 0.5 } {
    1505             set _dobj2transparency($dataobj) "ghost"
    1506         } else {
    1507             set _dobj2transparency($dataobj) "normal"
    1508         }
    1509         set _dobj2raise($dataobj) $params(-raise)
    1510         debug "setting parameters for $dataobj\n"
    1511 
    1512         if { [isconnected] } {
    1513             $_dispatcher event -idle !rebuild
    1514         }
    1515     }
    1516 }
    1517 
    15181580#
    15191581# ResetView
     
    15411603    SendCmd "zoom $_view(zoom)"
    15421604}
    1543 
    1544 # ----------------------------------------------------------------------
    1545 # USAGE: get
    1546 #
    1547 # Clients use this to query the list of objects being plotted, in
    1548 # order from bottom to top of this result.
    1549 # ----------------------------------------------------------------------
    1550 itcl::body Rappture::MolvisViewer::get {} {
    1551     # put the dataobj list in order according to -raise options
    1552     set dlist $_dlist
    1553     foreach obj $dlist {
    1554         if {[info exists _dobj2raise($obj)] && $_dobj2raise($obj)} {
    1555             set i [lsearch -exact $dlist $obj]
    1556             if {$i >= 0} {
    1557                 set dlist [lreplace $dlist $i $i]
    1558                 lappend dlist $obj
    1559             }
    1560         }
    1561     }
    1562     return $dlist
    1563 }
    1564 
    1565 # ----------------------------------------------------------------------
    1566 # USAGE: delete ?<dataobj> <dataobj> ...?
    1567 #
    1568 # Clients use this to delete a dataobj from the plot. If no dataobjs
    1569 # are specified, then all dataobjs are deleted.
    1570 # ----------------------------------------------------------------------
    1571 itcl::body Rappture::MolvisViewer::delete { args } {
    1572     if {[llength $args] == 0} {
    1573         set args $_dlist
    1574     }
    1575 
    1576     # delete all specified dataobjs
    1577     set changed 0
    1578     foreach dataobj $args {
    1579         set pos [lsearch -exact $_dlist $dataobj]
    1580         if {$pos >= 0} {
    1581             set _dlist [lreplace $_dlist $pos $pos]
    1582             if { [info exists _obj2models($dataobj)] } {
    1583                 foreach model $_obj2models($dataobj) {
    1584                     array unset _active $model
    1585                 }
    1586             }
    1587             array unset _obj2models $dataobj
    1588             array unset _dobj2transparency $dataobj
    1589             array unset _dobj2color $dataobj
    1590             array unset _dobj2width $dataobj
    1591             array unset _dobj2dashes $dataobj
    1592             array unset _dobj2raise $dataobj
    1593             set changed 1
    1594         }
    1595     }
    1596 
    1597     # if anything changed, then rebuild the plot
    1598     if {$changed} {
    1599         if { [isconnected] } {
    1600             $_dispatcher event -idle !rebuild
    1601         }
    1602     }
    1603 }
    1604 
    1605 # ----------------------------------------------------------------------
    1606 # OPTION: -device
    1607 # ----------------------------------------------------------------------
    1608 itcl::configbody Rappture::MolvisViewer::device {
    1609     if {$itk_option(-device) != "" } {
    1610 
    1611         if {![Rappture::library isvalid $itk_option(-device)]} {
    1612             error "bad value \"$itk_option(-device)\": should be Rappture::library object"
    1613         }
    1614         $this delete
    1615         $this add $itk_option(-device)
    1616     } else {
    1617         $this delete
    1618     }
    1619 
    1620     if { [isconnected] } {
    1621         $_dispatcher event -idle !rebuild
    1622     }
    1623 }
    1624 
    16251605
    16261606
     
    20962076    return $vertices
    20972077}
     2078
     2079
     2080# ----------------------------------------------------------------------
     2081# OPTION: -device
     2082# ----------------------------------------------------------------------
     2083itcl::configbody Rappture::MolvisViewer::device {
     2084    if {$itk_option(-device) != "" } {
     2085
     2086        if {![Rappture::library isvalid $itk_option(-device)]} {
     2087            error "bad value \"$itk_option(-device)\": should be Rappture::library object"
     2088        }
     2089        $this delete
     2090        $this add $itk_option(-device)
     2091    } else {
     2092        $this delete
     2093    }
     2094
     2095    if { [isconnected] } {
     2096        $_dispatcher event -idle !rebuild
     2097    }
     2098}
     2099
  • trunk/packages/vizservers/pymolproxy/pymolproxy.c

    r2615 r2628  
    22032203                Debug("STDOUT>%.*s", nBytes, line);
    22042204                Debug("Done with pymol stdout\n");
     2205                INFO("EOF on pymol server");
     2206                goto error;             /* Pymol server died unexpectedly. */
    22052207            } else if (nBytes == BUFFER_CONTINUE) {
    22062208                Debug("Done with pymol stdout\n");
    2207                 goto error;             /* Pymol server died unexpectedly. */
     2209                INFO("Need to read more from Pymol server, repolling.");
     2210                continue;
    22082211            } else {
    22092212                ERROR("can't read pymol stdout (nBytes=%d): %s\n", nBytes,
Note: See TracChangeset for help on using the changeset viewer.