Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #265 #266

Merged
merged 2 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions corelib/src/libs/SireMove/openmmfrenergydt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1228,9 +1228,9 @@ void OpenMMFrEnergyDT::integrate(IntegratorWorkspace &workspace, const Symbol &n

// Set Periodic Box Condition

context_openmm.setPeriodicBoxVectors(OpenMM::Vec3(Box_x_Edge_Length, 0, 0),
OpenMM::Vec3(0, Box_y_Edge_Length, 0),
OpenMM::Vec3(0, 0, Box_z_Edge_Length));
system_openmm->setDefaultPeriodicBoxVectors(OpenMM::Vec3(Box_x_Edge_Length, 0, 0),
OpenMM::Vec3(0, Box_y_Edge_Length, 0),
OpenMM::Vec3(0, 0, Box_z_Edge_Length));
}
// TriclinicBox.
else if (ptr_sys.property(space_property).isA<TriclinicBox>())
Expand All @@ -1253,9 +1253,11 @@ void OpenMMFrEnergyDT::integrate(IntegratorWorkspace &workspace, const Symbol &n
const double zy = v2.y() * OpenMM::NmPerAngstrom;
const double zz = v2.z() * OpenMM::NmPerAngstrom;

context_openmm.setPeriodicBoxVectors(OpenMM::Vec3(xx, xy, xz), OpenMM::Vec3(yx, yy, yz),
OpenMM::Vec3(zx, zy, zz));
system_openmm->setDefaultPeriodicBoxVectors(OpenMM::Vec3(xx, xy, xz), OpenMM::Vec3(yx, yy, yz),
OpenMM::Vec3(zx, zy, zz));
}

context_openmm.reinitialize();
}

if (Debug)
Expand Down
7 changes: 0 additions & 7 deletions corelib/src/libs/SireMove/openmmfrenergyst.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3450,10 +3450,6 @@ void OpenMMFrEnergyST::createContext(IntegratorWorkspace &workspace, SireUnits::
system_openmm->setDefaultPeriodicBoxVectors(OpenMM::Vec3(Box_x_Edge_Length, 0, 0),
OpenMM::Vec3(0, Box_y_Edge_Length, 0),
OpenMM::Vec3(0, 0, Box_z_Edge_Length));

openmm_context->setPeriodicBoxVectors(OpenMM::Vec3(Box_x_Edge_Length, 0, 0),
OpenMM::Vec3(0, Box_y_Edge_Length, 0),
OpenMM::Vec3(0, 0, Box_z_Edge_Length));
}
// TriclinicBox.
else if (ptr_sys.property(space_property).isA<TriclinicBox>())
Expand All @@ -3478,9 +3474,6 @@ void OpenMMFrEnergyST::createContext(IntegratorWorkspace &workspace, SireUnits::

system_openmm->setDefaultPeriodicBoxVectors(OpenMM::Vec3(xx, xy, xz), OpenMM::Vec3(yx, yy, yz),
OpenMM::Vec3(zx, zy, zz));

openmm_context->setPeriodicBoxVectors(OpenMM::Vec3(xx, xy, xz), OpenMM::Vec3(yx, yy, yz),
OpenMM::Vec3(zx, zy, zz));
}

openmm_context->reinitialize();
Expand Down
11 changes: 6 additions & 5 deletions corelib/src/libs/SireMove/openmmmdintegrator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1157,9 +1157,9 @@ void OpenMMMDIntegrator::createContext(IntegratorWorkspace &workspace, SireUnits

// Set Periodic Box Condition

openmm_context->setPeriodicBoxVectors(OpenMM::Vec3(Box_x_Edge_Length, 0, 0),
OpenMM::Vec3(0, Box_y_Edge_Length, 0),
OpenMM::Vec3(0, 0, Box_z_Edge_Length));
system_openmm->setDefaultPeriodicBoxVectors(OpenMM::Vec3(Box_x_Edge_Length, 0, 0),
OpenMM::Vec3(0, Box_y_Edge_Length, 0),
OpenMM::Vec3(0, 0, Box_z_Edge_Length));
}
// TriclinicBox.
else if (ptr_sys.property(space_property).isA<TriclinicBox>())
Expand All @@ -1182,11 +1182,12 @@ void OpenMMMDIntegrator::createContext(IntegratorWorkspace &workspace, SireUnits
const double zy = v2.y() * OpenMM::NmPerAngstrom;
const double zz = v2.z() * OpenMM::NmPerAngstrom;

openmm_context->setPeriodicBoxVectors(OpenMM::Vec3(xx, xy, xz), OpenMM::Vec3(yx, yy, yz),
OpenMM::Vec3(zx, zy, zz));
system_openmm->setDefaultPeriodicBoxVectors(OpenMM::Vec3(xx, xy, xz), OpenMM::Vec3(yx, yy, yz),
OpenMM::Vec3(zx, zy, zz));
}

is_periodic = true;
openmm_context->reinitialize();
}

double AKMAPerPs = 0.04888821;
Expand Down
7 changes: 0 additions & 7 deletions corelib/src/libs/SireMove/openmmpmefep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2954,10 +2954,6 @@ void OpenMMPMEFEP::createContext(IntegratorWorkspace &workspace, SireUnits::Dime
system_openmm->setDefaultPeriodicBoxVectors(OpenMM::Vec3(Box_x_Edge_Length, 0, 0),
OpenMM::Vec3(0, Box_y_Edge_Length, 0),
OpenMM::Vec3(0, 0, Box_z_Edge_Length));

openmm_context->setPeriodicBoxVectors(OpenMM::Vec3(Box_x_Edge_Length, 0, 0),
OpenMM::Vec3(0, Box_y_Edge_Length, 0),
OpenMM::Vec3(0, 0, Box_z_Edge_Length));
}
// TriclinicBox
else if (ptr_sys.property(space_property).isA<TriclinicBox>())
Expand All @@ -2983,9 +2979,6 @@ void OpenMMPMEFEP::createContext(IntegratorWorkspace &workspace, SireUnits::Dime

system_openmm->setDefaultPeriodicBoxVectors(OpenMM::Vec3(xx, xy, xz), OpenMM::Vec3(yx, yy, yz),
OpenMM::Vec3(zx, zy, zz));

openmm_context->setPeriodicBoxVectors(OpenMM::Vec3(xx, xy, xz), OpenMM::Vec3(yx, yy, yz),
OpenMM::Vec3(zx, zy, zz));
}

openmm_context->reinitialize();
Expand Down
15 changes: 15 additions & 0 deletions doc/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,32 @@ organisation on `GitHub <https://github.com/openbiosim/sire>`__.
---------------------------------------------------------------------------------------------

* Please add an item to this CHANGELOG for any new features or bug fixes when creating a PR.

* Fixed update of triclinic box vectors in ``SOMD`` following ``OpenMM`` bug fix.

`2024.3.1 <https://github.com/openbiosim/sire/compare/2024.3.0...2024.3.1>`__ - December 2024
--------------------------------------------------------------------------------------------

* Fixed instantiaton of ``QByteArray`` in ``Sire::Mol::Frame::toByteArray`` and count bytes with ``QByteArray::size``.

* Increase timeout before terminating ``QThread`` objects during ``PageCache`` cleanup.

* Expose missing ``timeout`` kwarg in :meth:`dynamics.minimise()` method.

* Expose missing ``include_constrained_energies`` kwarg in minimisation function.

* Make minimisation function settings consistent across API.

* Reload TorchQMForce module if OpenMM platform changes.

* Fix calculation of non-equilibrium work when starting from QM state.

* Fix stereochemistry in RDKit molecule conversion.

* Fixed :func:`sire.restraints.get_standard_state_correction` to be consistent with the definition of
the "force constanst" as ``F = 2 ** k ** x`` (rather than ``F = k ** x``). Updated docstrings and
restraints documentation to make it clear how the force constants are defined.

* Fix thread safety issue in Sire OpenMM minimiser.

`2024.3.0 <https://github.com/openbiosim/sire/compare/2024.2.0...2024.3.0>`__ - October 2024
Expand Down
Loading