From d9685272fedcd47a59f8cd756ac3be62c9850563 Mon Sep 17 00:00:00 2001 From: Tobias Schmidt <tobias.schmidt@unibas.ch> Date: Fri, 13 May 2011 17:19:56 +0200 Subject: [PATCH] msms binding: automatically attach entity to calculated surface --- modules/bindings/pymod/msms.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/bindings/pymod/msms.py b/modules/bindings/pymod/msms.py index 92f9494cf..fc50ff1c7 100644 --- a/modules/bindings/pymod/msms.py +++ b/modules/bindings/pymod/msms.py @@ -317,11 +317,16 @@ def CalculateSurface(entity, density=1.0, radius=1.5, all_surf=False, num_surf=int(line.split()[2]) # get surfaces + entity_sel = entity.Select(selection) msms_surfaces=[] - msms_surfaces.append(io.LoadSurface(msms_data_file, "msms")) + s = io.LoadSurface(msms_data_file, "msms") + s.Attach(entity_sel, 3+radius) + msms_surfaces.append(s) for n in range(1,num_surf+1): filename=msms_data_file+'_'+str(n) - msms_surfaces.append(io.LoadSurface(filename, "msms")) + s = io.LoadSurface(filename, "msms") + s.Attach(entity_sel, 3+radius) + msms_surfaces.append(s) # clean up if not keep_files: -- GitLab