Skip to content

Commit

Permalink
Sim.atomselections no longer triggers Universe build on call
Browse files Browse the repository at this point in the history
It can be expensive to build some Universes, so we want to be able to
store selections without having it built. This removes a relic from the
old "multiple Universes" scheme, in which the default Universe was
loaded to make it the "active" Universe for any selections work if no
Universe was already active.
  • Loading branch information
dotsdl committed Apr 6, 2016
1 parent 6c7417c commit b90fcd5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@ The rules for this file:

------------------------------------------------------------------------------

??/??/16
??/??/16 dotsdl

* 0.7.0

Changes

* Sim.atomselections no longer loads Universe on use if not already present

04/04/16 dotsdl, orbeckst, richardjgowers, sseyler

Expand Down
14 changes: 4 additions & 10 deletions src/mdsynthesis/treants.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,9 @@ def atomselections(self):
"""Stored atom selections for the universe.
Useful atom selections can be stored for the universe and
recalled later. Selections are stored separately for each defined
universe, since the same selection may require a different selection
string for different universes.
recalled later.
"""
# attach universe if not attached, and only give results if a
# universe is present thereafter
if self.universe:
if not self._atomselections:
self._atomselections = limbs.AtomSelections(self)
if not self._atomselections:
self._atomselections = limbs.AtomSelections(self)

return self._atomselections
return self._atomselections

0 comments on commit b90fcd5

Please sign in to comment.