File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -410,7 +410,7 @@ def get_leaflets_sterol(self):
410410 """
411411
412412 # Copy dict for leaflet selection without sterols, only the AtomGroups in the copied dict should be updated
413- leaflet_selection = {}
413+ leaflet_selection = self . leaflet_selection_no_sterol . copy ()
414414
415415 # Iterate over each type of sterol in the membrane
416416 for rsn , head in self .sterol_heads .items ():
@@ -432,12 +432,8 @@ def get_leaflets_sterol(self):
432432
433433 # Merge the atom selections for the phospholipids and cholesterol. "+" just adds the second selection on
434434 # top of the former one.
435- leaflet_selection ['0' ] = self .leaflet_selection_no_sterol ['0' ] + upper_sterol
436- leaflet_selection ['1' ] = self .leaflet_selection_no_sterol ['1' ] + lower_sterol
437-
438- # If not sterol compound was assigned the leaflet selection is the same as the leaflet selection without sterols
439- if not any (leaflet_selection ):
440- leaflet_selection = self .leaflet_selection_no_sterol
435+ leaflet_selection ['0' ] += upper_sterol
436+ leaflet_selection ['1' ] += lower_sterol
441437
442438 leaflet_selection ['0' ] = leaflet_selection ['0' ][np .argsort (leaflet_selection ['0' ].resids )]
443439 leaflet_selection ['1' ] = leaflet_selection ['1' ][np .argsort (leaflet_selection ['1' ].resids )]
You can’t perform that action at this time.
0 commit comments