From 2135623859a064541b8cf5f4418c43b6a07d6e40 Mon Sep 17 00:00:00 2001
From: tobias <tobias@5a81b35b-ba03-0410-adc8-b2c5c5119f08>
Date: Fri, 28 May 2010 15:12:29 +0000
Subject: [PATCH] fix selection problem in msms

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@2301 5a81b35b-ba03-0410-adc8-b2c5c5119f08
---
 modules/bindings/pymod/msms.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/modules/bindings/pymod/msms.py b/modules/bindings/pymod/msms.py
index a7a3dd13e..7f9e089ff 100644
--- a/modules/bindings/pymod/msms.py
+++ b/modules/bindings/pymod/msms.py
@@ -144,7 +144,10 @@ def CalculateSurfaceArea(entity, density=1.0, radius=1.5,  all_surf=False,
 
   # parse selection
   if no_hydrogens:
-    selection+=" and ele!=H"
+    if selection=="":
+      selection="ele!=H"
+    else:
+      selection+=" and ele!=H"
 
   # setup files for msms
   (msms_data_dir, msms_data_file)=_SetupFiles(entity, selection)
@@ -215,7 +218,10 @@ def CalculateSurface(entity, density=1.0, radius=1.5, all_surf=False,
 
   # parse selection
   if no_hydrogens:
-    selection+=" and ele!=H"
+    if selection=="":
+      selection="ele!=H"
+    else:
+      selection+=" and ele!=H"
 
   # setup files for msms
   
-- 
GitLab