/usr/share/pyshared/ase/gui/constraints.py is in python-ase 3.6.0.2515-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 | #!/usr/bin/env python
from math import sqrt
import gtk
from gettext import gettext as _
from ase.gui.widgets import pack, Help
class Constraints(gtk.Window):
def __init__(self, gui):
gtk.Window.__init__(self)
self.set_title(_('Constraints'))
vbox = gtk.VBox()
b = pack(vbox, [gtk.Button(_('Constrain')),
gtk.Label(_(' selected atoms'))])[0]
b.connect('clicked', self.selected)
b = pack(vbox, [gtk.Button(_('Constrain')),
gtk.Label(_(' immobile atoms:'))])[0]
b.connect('clicked', self.immobile)
b = pack(vbox, [gtk.Button(_('Unconstrain')),
gtk.Label(_(' selected atoms:'))])[0]
b.connect('clicked', self.unconstrain)
b = pack(vbox, gtk.Button(_('Clear constraints')))
b.connect('clicked', self.clear)
close = pack(vbox, gtk.Button(_('Close')))
close.connect('clicked', lambda widget: self.destroy())
self.add(vbox)
vbox.show()
self.show()
self.gui = gui
def selected(self, button):
self.gui.images.dynamic[self.gui.images.selected] = False
self.gui.draw()
def unconstrain(self, button):
self.gui.images.dynamic[self.gui.images.selected] = True
self.gui.draw()
def immobile(self, button):
self.gui.images.set_dynamic()
self.gui.draw()
def clear(self, button):
self.gui.images.dynamic[:] = True
self.gui.draw()
|