Skip to content
Snippets Groups Projects
Commit b02aad4d authored by Gerardo Tauriello's avatar Gerardo Tauriello
Browse files

SCHWED-2349: avoid unneccessary Select statements.

parent 84f56a2b
No related branches found
No related tags found
No related merge requests found
......@@ -50,7 +50,10 @@ def _SetupFiles(entity, selection, scratch_dir, max_number_of_atoms):
tmp_dir_name = tempfile.mkdtemp()
# select as specified by user
entity_view = entity.Select(selection)
if selection != "":
entity_view = entity.Select(selection)
else:
entity_view = entity
if len(entity_view.atoms) > max_number_of_atoms:
raise RuntimeError, "Too much atoms for NACCESS (> %s)" % max_number_of_atoms
if not entity_view.IsValid():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment