Skip to content

Commit e4abd56

Browse files
committed
Merge branch 'devel' into feature_no_ghost_mods
2 parents 8fe807a + baad606 commit e4abd56

File tree

3 files changed

+58
-21
lines changed

3 files changed

+58
-21
lines changed

README.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@
1717
:target: https://joss.theoj.org/papers/4ba84ad443693b5dded90e35bf5f8225
1818
:alt: Paper
1919

20+
Survey
21+
------
22+
23+
We are currently conducting a
24+
`survey <https://docs.google.com/forms/d/1zY0i3lLR9MhmohKjcu0wJp_CXJvBwcWoj6iG4p9LNKk/edit?ts=6836f566>`__
25+
to help us understand how BioSimSpace is being used and how we can improve it.
26+
The survey explores your molecular simulation tools and practices, identifies workflow challenges, and
27+
gathers feedback on the BioSimSpace simulation framework to guide its future development. If you have
28+
a few minutes, please fill it out!
29+
2030
About
2131
-----
2232

python/BioSimSpace/Process/_amber.py

Lines changed: 48 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -745,31 +745,58 @@ def getFrame(self, index):
745745
# Create a copy of the existing system object.
746746
old_system = self._system.copy()
747747

748-
# Update the coordinates and velocities and return a mapping between
749-
# the molecule indices in the two systems.
750-
sire_system, mapping = _SireIO.updateCoordinatesAndVelocities(
751-
old_system._sire_object,
752-
new_system._sire_object,
753-
self._mapping,
754-
is_lambda1,
755-
self._property_map,
756-
self._property_map,
757-
)
748+
if isinstance(self._protocol, _Protocol._FreeEnergyMixin):
749+
# Udpate the coordinates and velocities and return a mapping between
750+
# the molecule indices in the two systems.
751+
mapping = {
752+
_SireMol.MolIdx(x): _SireMol.MolIdx(x)
753+
for x in range(0, self._squashed_system.nMolecules())
754+
}
755+
(
756+
self._squashed_system._sire_object,
757+
_,
758+
) = _SireIO.updateCoordinatesAndVelocities(
759+
self._squashed_system._sire_object,
760+
new_system._sire_object,
761+
mapping,
762+
is_lambda1,
763+
self._property_map,
764+
self._property_map,
765+
)
766+
767+
# Update the unsquashed system based on the updated squashed system.
768+
old_system = _unsquash(
769+
old_system,
770+
self._squashed_system,
771+
self._mapping,
772+
explicit_dummies=self._explicit_dummies,
773+
)
774+
775+
else:
776+
# Update the coordinates and velocities and return a mapping between
777+
# the molecule indices in the two systems.
778+
sire_system, mapping = _SireIO.updateCoordinatesAndVelocities(
779+
old_system._sire_object,
780+
new_system._sire_object,
781+
self._mapping,
782+
is_lambda1,
783+
self._property_map,
784+
self._property_map,
785+
)
758786

759-
# Update the underlying Sire object.
760-
old_system._sire_object = sire_system
787+
# Update the underlying Sire object.
788+
old_system._sire_object = sire_system
761789

762-
# Store the mapping between the MolIdx in both systems so we don't
763-
# need to recompute it next time.
764-
self._mapping = mapping
790+
# Store the mapping between the MolIdx in both systems so we don't
791+
# need to recompute it next time.
792+
self._mapping = mapping
765793

766794
# Update the box information in the original system.
767-
if self._has_box:
768-
if "space" in new_system._sire_object.propertyKeys():
769-
box = new_system._sire_object.property("space")
770-
old_system._sire_object.setProperty(
771-
self._property_map.get("space", "space"), box
772-
)
795+
if "space" in new_system._sire_object.propertyKeys():
796+
box = new_system._sire_object.property("space")
797+
old_system._sire_object.setProperty(
798+
self._property_map.get("space", "space"), box
799+
)
773800

774801
return old_system
775802

0 commit comments

Comments
 (0)