From 10b4c8be08c54a0414f60813b2956aee10c26542 Mon Sep 17 00:00:00 2001
From: tobias <tobias@5a81b35b-ba03-0410-adc8-b2c5c5119f08>
Date: Wed, 25 Aug 2010 07:57:57 +0000
Subject: [PATCH] fix selections in msms binding

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

diff --git a/modules/bindings/pymod/msms.py b/modules/bindings/pymod/msms.py
index 4b1638f2a..e41bd5c1d 100644
--- a/modules/bindings/pymod/msms.py
+++ b/modules/bindings/pymod/msms.py
@@ -135,7 +135,7 @@ def _RunMSMS(command):
 # \return              Touplet of lists for (SES, SAS)
 def CalculateSurfaceArea(entity, density=1.0, radius=1.5,  all_surf=False,
                          no_hydrogens=False, no_hetatoms=False, no_waters=False,
-                         selection="",
+                         selection='',
                          msms_exe=None, msms_env=None, keep_files=False, 
                          attach_asa=None, attach_esa=None):
   import re 
@@ -147,17 +147,17 @@ def CalculateSurfaceArea(entity, density=1.0, radius=1.5,  all_surf=False,
   if no_hydrogens:
     if selection!='':
       selection+=" and "
-    selection="ele!=H"
+    selection+="ele!=H"
   
   if no_hetatoms:
     if selection!='':
       selection+=" and "
-    selection="ishetatm=False"
+    selection+="ishetatm=False"
   
   if no_waters:
     if selection!='':
       selection+=" and "
-    selection="rname!=HOH"
+    selection+="rname!=HOH"
 
   # setup files for msms
   (msms_data_dir, msms_data_file)=_SetupFiles(entity, selection)
@@ -219,7 +219,7 @@ def CalculateSurfaceArea(entity, density=1.0, radius=1.5,  all_surf=False,
 # \return list of OST SurfaceHandle objects
 def CalculateSurface(entity, density=1.0, radius=1.5, all_surf=False,
                      no_hydrogens=False, no_hetatoms=False, no_waters=False,
-                     selection="",
+                     selection='',
                      msms_exe=None, msms_env=None, keep_files=False):
   
   import os
@@ -232,20 +232,19 @@ def CalculateSurface(entity, density=1.0, radius=1.5, all_surf=False,
   if no_hydrogens:
     if selection!='':
       selection+=" and "
-    selection="ele!=H"
+    selection+="ele!=H"
       
   if no_hetatoms:
     if selection!='':
       selection+=" and "
-    selection="ishetatm=False"
+    selection+="ishetatm=False"
       
   if no_waters:
     if selection!='':
       selection+=" and "
-    selection="rname!=HOH"
+    selection+="rname!=HOH"
 
   # setup files for msms
-  
   (msms_data_dir, msms_data_file)=_SetupFiles(entity, selection)
 
   # set command line
-- 
GitLab