This file is indexed.

/usr/share/xcrysden/Tcl/hbonds.tcl is in xcrysden-data 1.5.53-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
#############################################################################
# Author:                                                                   #
# ------                                                                    #
#  Anton Kokalj                                  Email: Tone.Kokalj@ijs.si  #
#  Department of Physical and Organic Chemistry  Phone: x 386 1 477 3523    #
#  Jozef Stefan Institute                          Fax: x 386 1 477 3811    #
#  Jamova 39, SI-1000 Ljubljana                                             #
#  SLOVENIA                                                                 #
#                                                                           #
# Source: $XCRYSDEN_TOPDIR/Tcl/hbonds.tcl
# ------                                                                    #
# Copyright (c) 1996-2003 by Anton Kokalj                                   #
#############################################################################

proc Hbonds {togl} {
    global check 

    if { $check(Hbonds) } {
	xc_hbonds $togl on
	$togl render
	xcSwapBuffers
    } else {
	xc_hbonds $togl off
	$togl render
	xcSwapBuffers
    }
}


proc HbondsSetting {togl} {
    global check Hbonds

    set t .hbond[lindex [split $togl .] end]

    if { [winfo exists $t] } {
	return
    }

    _HbondsSetting:Init $togl


    # from here on: widget managing
    xcToplevel $t "H-bonds: Settings" "H-bonds" . -0 0 1
    set f1 [frame $t.f1]
    set f2 [frame $t.f2]
    set f3 [frame $t.f3]
    pack $f1 $f2 $f3 -side top -expand 1 -fill x -padx 3m -pady 3m

    # frame-1: simple entries

    FillEntries $f1 {
	"H-like atom list:"
	"O-like atom list:"
	"Minimum H-bond length:"
	"Maximum H-bond length:"
	"Minimum H-bond angle:"
	"H-bond line width:"
	"H-bond line pattern:"
	"H-bond pattern size:"
    } {
	Hbonds(H_like_list) 
	Hbonds(O_like_list) 
	Hbonds(length_min)  
	Hbonds(length_max)  
	Hbonds(angle_min)   
	Hbonds(line_width)   
	Hbonds(line_pattern)   
	Hbonds(line_patternsize)   
    } 23 20 top left

    # frame-2: H-bond color
    
    xcModifyColor $f2 "H-bonds color:" [rgb_f2h $Hbonds(color)] \
	groove left left 100 100 100 5 20 $Hbonds(colorID)

    # frame-3: Close/Update buttons 

    set b1 [button $f3.close  -text "Close"  -command [list DestroyWid $t]]
    set b2 [button $f3.update -text "Update" -command [list HbondsSetting:update $togl]]
    
    pack $b1 $b2 -side left -padx 3m -pady 3m -expand 1
}


proc HbondsSetting:update {togl} {
    global Hbonds
 
    # check the values of the HBonds array here ...
    # ...insert...
    #--

    if { [info exists Hbonds(colorID)] } {
	set Hbonds(color) [xcModifyColorGet $Hbonds(colorID) float RGB]
    }

    xc_hbonds $togl set \
	-H_like_list  $Hbonds(H_like_list) \
	-O_like_list  $Hbonds(O_like_list) \
	-color        $Hbonds(color) \
	-length_min   $Hbonds(length_min) \
	-length_max   $Hbonds(length_max) \
	-angle_min    $Hbonds(angle_min) \
	-line_width   $Hbonds(line_width) \
	-line_pattern $Hbonds(line_pattern) \
	-line_patternsize $Hbonds(line_patternsize)

    $togl render
    xcSwapBuffers
}


proc _HbondsSetting:Init {togl} {
    global Hbonds
    foreach option {
	H_like_list
	O_like_list
	color
	length_min
	length_max
	angle_min
	line_width
	line_pattern
	line_patternsize
    } {
	if { ![info exists Hbonds($option)] } {
	    set Hbonds($option) [xc_hbonds $togl get -$option]
	}
    }

    if { ! [info exists Hbonds(colorID)] } {
	set Hbonds(colorID) [xcModifyColorID]
    }
}