-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dash: Add graphical control to save traj file
- Loading branch information
Showing
2 changed files
with
39 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,9 +33,13 @@ proc ::cv_dashboard::createWindow {} { | |
-row $gridrow -column 0 -pady 2 -padx 2 -sticky nsew | ||
grid [ttk::button $w.save -text "Save" -command ::cv_dashboard::save -padding "2 0 2 0"] \ | ||
-row $gridrow -column 1 -pady 2 -padx 2 -sticky nsew | ||
grid [ttk::button $w.reset -text "Reset" -command ::cv_dashboard::reset -padding "2 0 2 0"] \ | ||
grid [ttk::button $w.reset -text "⚠ Reset ⚠" -command ::cv_dashboard::reset -padding "2 0 2 0"] \ | ||
-row $gridrow -column 2 -pady 2 -padx 2 -sticky nsew | ||
|
||
incr gridrow | ||
grid [ttk::button $w.save_traj -text "Save traj file" -command ::cv_dashboard::save_traj_dialog -padding "2 0 2 0"] \ | ||
-row $gridrow -column 0 -pady 2 -padx 2 -sticky nsew | ||
|
||
# Table of colvars | ||
ttk::treeview $w.cvtable -selectmode extended -show {headings tree} -height 8 | ||
$w.cvtable configure -column val | ||
|
@@ -516,7 +520,7 @@ https://colvars.github.io | |
In [vmdinfo versionmsg] | ||
Running Tcl/Tk [info patchlevel] | ||
Jérôme Hénin (jerome.henin@ibpc.fr), Giacomo Fiorin ([email protected]) and the Colvars developers. | ||
Jérôme Hénin (jerome.henin@cnrs.fr), Giacomo Fiorin ([email protected]) and the Colvars developers. | ||
#Please cite the following references for features currently in use: | ||
|
@@ -1488,3 +1492,13 @@ proc ::cv_dashboard::createRotationMenu { row } { | |
|
||
grid remove $menu.show_rotation $menu.hide_rotation | ||
} | ||
|
||
# Open file dialog to choose file name, then save colvars trajectory | ||
|
||
proc ::cv_dashboard::save_traj_dialog {} { | ||
set file [tk_getSaveFile -title "Colvars trajectory file to be written" \ | ||
-filetypes {{"Colvars traj" .colvars.traj} {"All files" *}}] | ||
if {[llength $file] > 0 } { | ||
::cv_dashboard::save_traj_file $file | ||
} | ||
} |