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 #232 #233

Merged
merged 4 commits into from
Oct 9, 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
1 change: 1 addition & 0 deletions doc/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ organisation on `GitHub <https://github.com/openbiosim/sire>`__.
* Add support for boresch restraints to PME.
* Port SOMD torsion fix to PME code.
* Fix issues with ``atomtype`` and ``atom`` records for dummy atoms in GROMACS topology files.
* Fix issues with positionally restrained atoms in perturbable systems.


`2024.2.0 <https://github.com/openbiosim/sire/compare/2024.1.0...2024.2.0>`__ - June 2024
Expand Down
8 changes: 6 additions & 2 deletions tests/convert/test_openmm_restraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@
"openmm" not in sr.convert.supported_formats(),
reason="openmm support is not available",
)
def test_openmm_positional_restraints(kigaki_mols, openmm_platform):
mols = kigaki_mols
@pytest.mark.parametrize("molecules", ["kigaki_mols", "merged_ethane_methanol"])
def test_openmm_positional_restraints(molecules, openmm_platform, request):
mols = request.getfixturevalue(molecules)

if mols[0].is_perturbable():
mols = sr.morph.link_to_reference(mols)

mol = mols[0]

Expand Down
3 changes: 2 additions & 1 deletion wrapper/Convert/SireOpenMM/sire_to_openmm_system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,8 @@ void _add_positional_restraints(const SireMM::PositionalRestraints &restraints,
auto ghost_nonghostff = lambda_lever.getForce<OpenMM::CustomNonbondedForce>("ghost/non-ghost", system);

std::vector<double> custom_params = {1.0, 0.0, 0.0};
std::vector<double> custom_clj_params = {0.0, 0.0, 0.0, 0.0};
// Define null parameters used to add these particles to the ghost forces (5 total)
std::vector<double> custom_clj_params = {0.0, 0.0, 0.0, 0.0, 0.0};

// we need to add all of the positions as anchor particles
for (const auto &restraint : atom_restraints)
Expand Down
Loading