Changeset 1007 for branches/sandbox
- Timestamp:
- Sep 16, 2010 4:27:48 PM (10 years ago)
- Location:
- branches/sandbox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/sandbox/distrest.tcl
r1006 r1007 101 101 # switch to run disagl here someday 102 102 if {[file exists $filename]} { 103 puts "$filename from [pwd] is opened"103 #puts "$filename from [pwd] is opened" 104 104 set fh [open $filename r] 105 105 # puts $fh … … 149 149 set t2 [string map {" " ""} [set t1 $initsoftpar($x)]] 150 150 151 set z [info exists ::sr_restraintdist($t2)]152 if {$z == 0} {153 set ::sr_restraintdist($t2) ""154 set ::sr_restraintesd($t2) ""155 }151 # set z [info exists ::sr_restraintdist($t2)] 152 # if {$z == 0} { 153 # set ::sr_restraintdist($t2) "" 154 # set ::sr_restraintesd($t2) "" 155 # } 156 156 157 157 #extract bond distance … … 220 220 } else { 221 221 if {$::sr_distance_button == 1} { 222 puts "distance"222 #puts "distance" 223 223 set sr_prsort [lsort -increasing -index 8 $::sr_bond_list] 224 224 $dlabel1 config -text "Distance \u2193" … … 317 317 checkbutton $main.sr_crestraint$i -variable ::sr_crestraint([lindex $rprint 13]) 318 318 } else { 319 label $main.restraint$i -width 8 -textvariable ::sr_restraintdist([lindex $rprint 13]) -takefocus 1 320 label $main.restesd$i -width 8 -textvariable ::sr_restraintesd([lindex $rprint 13]) -takefocus 1 319 label $main.restraint$i -width 8 -textvariable ::sr_restraintdist([lindex $rprint 13]) -takefocus 1 -justify center -anchor center 320 label $main.restesd$i -width 8 -textvariable ::sr_restraintesd([lindex $rprint 13]) -takefocus 1 -justify center -anchor center 321 321 } 322 322 incr rownum … … 383 383 #************************************************************************************** 384 384 proc SR_Load_Restraints {args} { 385 386 catch {unset ::sr_restraintdist} 387 catch {unset ::sr_restraintesd} 385 388 set temp_res [SoftConst restraintlist] 386 389 set lenr [llength $temp_res] … … 445 448 lappend new_list $temp 446 449 447 } else {448 unset ::sr_restraintdist([lindex $temp 13])449 unset ::sr_restraintesd([lindex $temp 13])450 # } else { 451 # unset ::sr_restraintdist([lindex $temp 13]) 452 # unset ::sr_restraintesd([lindex $temp 13]) 450 453 } 451 454 } 452 puts $sr_write455 #puts $sr_write 453 456 # put the entire restraint list back into the .EXP file 454 457 SoftConst restraintlist set $sr_write … … 460 463 set ::sr_display_mode noedit 461 464 afterputontop 465 SR_Rest_Only 462 466 DisplayDistanceRestraints 463 467 } else { … … 668 672 #************************************************************************* 669 673 proc SR_Initialize {} { 670 catch {unset ::sr_restraintdist}671 catch {unset ::sr_restraintesd}674 #catch {unset ::sr_restraintdist} 675 #catch {unset ::sr_restraintesd} 672 676 673 677 set ::sr_atom1_button 1 … … 711 715 712 716 proc SR_TEST {} { 717 global expgui 718 pleasewait "searching interatomic distances" 719 set root [file root $expgui(expfile)] 720 catch {file delete -force $root.disagl} 713 721 set ::sr_display_mode edit 714 SR_Read_Distances test2.disagl 722 close [open disagl.inp w] 723 catch {exec [file join $expgui(gsasexe) disagl] \ 724 [file tail $root] < disagl.inp > disagl.out} 725 catch {file delete -force disagl.inp disagl.out} 726 if {! [file exists $root.disagl]} { 727 MyMessageBox -parent . -title "DISAGL Problem" \ 728 -message "Unable to run DISAGL. Do you have problems writing files in [pwd]?" \ 729 -icon error 730 donewait 731 return 732 } 733 734 SR_Read_Distances $root.disagl 715 735 SR_Load_Restraints 716 736 SR_Main_Editor 717 } 718 719 720 721 722 723 724 725 726 727 728 737 donewait 738 } 739 740 741 742 743 744 745 746 747 748 749 -
branches/sandbox/expgui
r997 r1007 3348 3348 DisplayProfile \ 3349 3349 1 expgui5.html ""} 3350 {consFrame Constraints\3350 {consFrame "Re/Constraints" \ 3351 3351 "source [file join $expgui(scriptdir) atomcons.tcl]; MakeConstraintsPane" \ 3352 3352 DisplayConstraintsPane \ -
branches/sandbox/readexp.tcl
r1000 r1007 2906 2906 for {set i 1} {$i <= $ncons} {incr i} { 2907 2907 set fi [string toupper [format %.4x $i]] 2908 lappend conslist [string trim [readexp "${key}BD$fi"]] 2908 set line [readexp "${key}BD$fi"] 2909 set const {} 2910 foreach len {3 5 5 3 3 3 3 3 6 6} { 2911 set lenm1 [expr {$len - 1}] 2912 lappend const [string trim [string range $line 0 $lenm1]] 2913 set line [string range $line $len end] 2914 } 2915 lappend conslist $const 2909 2916 } 2910 2917 return $conslist
Note: See TracChangeset
for help on using the changeset viewer.