Skip to content
Snippets Groups Projects
Commit d85e777a authored by stefan's avatar stefan
Browse files

dokk (the docking game):

 - Fixed bounding box bug
 - Changed bounding box of retinol level

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@2010 5a81b35b-ba03-0410-adc8-b2c5c5119f08
parent 509c2023
No related branches found
No related tags found
No related merge requests found
......@@ -96,8 +96,8 @@ XMIN:-50
XMAX:50
YMIN:-40
YMAX:40
ZMIN:-45
ZMAX:45
ZMIN:-100
ZMAX:0
[Start]
POSX:10.0
......
......@@ -34,9 +34,7 @@ class LevelMessages(QtCore.QObject):
size = default_size
try:
print "TEST IMG"
img = config_map["TEXTIMG%s"%i]
print img
except:
img = None
......@@ -82,7 +80,6 @@ class LevelMessages(QtCore.QObject):
self.text.font.setPointSize(self.text_list[self.cur_text][3])
self.text.Reset()
print self.text_list[self.cur_text][4]
if(self.text_list[self.cur_text][4]):
self.img.img = QtGui.QImage(self.text_list[self.cur_text][4])
hw=self.img.img.width()/2.0
......
......@@ -44,7 +44,7 @@ class Ligand:
self.go.UpdatePositions()
def Shift(self, vec):
if self.__IsInside(self.GetCenter()+vec):
if self.__IsInside(vec):
trans=geom.Mat4()
trans.PasteTranslation(vec)
edi=self.handle.RequestXCSEditor()
......@@ -60,14 +60,14 @@ class Ligand:
center=self.pivot_.GetPos()
trans.PasteTranslation(-center)
trans2=geom.Mat4()
trans2_vec = center+((tf.GetTrans())*gfx.Scene().GetTransform().GetRot())
trans2_vec = ((tf.GetTrans())*gfx.Scene().GetTransform().GetRot())
if self.__IsInside(trans2_vec):
trans2_vec = center + trans2_vec
trans2.PasteTranslation(trans2_vec)
else:
trans2.PasteTranslation(center)
full_tf = trans2*rot*trans
edi.ApplyTransform(full_tf)
self.go.UpdatePositions()
full_tf = trans2*rot*trans
edi.ApplyTransform(full_tf)
self.go.UpdatePositions()
def RMSDToSolution(self):
return alg.CalculateRMSD(self.handle.CreateFullView(),
......@@ -97,8 +97,10 @@ class Ligand:
del(self.go)
def __IsInside(self, vec):
if vec[0]< self.box_max[0] and vec[0]> self.box_min[0] and \
vec[1]< self.box_max[1] and vec[1]> self.box_min[1] and \
vec[2]< self.box_max[2] and vec[2]> self.box_min[2] :
center = self.GetCenter()
rad = 1
if center[0] + rad + vec[0] < self.box_max[0] and center[0] - rad + vec[0] > self.box_min[0] and \
center[1] + rad + vec[1] < self.box_max[1] and center[1] - rad + vec[1] > self.box_min[1] and \
center[2] + rad + vec[2] < self.box_max[2] and center[2] - rad + vec[2] > self.box_min[2] :
return True
return False
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment