Skip to content

Commit

Permalink
Merge pull request #292 from OpenBioSim/fix_291
Browse files Browse the repository at this point in the history
Fix issue #291
  • Loading branch information
lohedges committed May 17, 2024
2 parents 240e2f1 + 1064413 commit 598a674
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
15 changes: 11 additions & 4 deletions nodes/playground/prepareFEP.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,10 @@
")\n",
"# Create a composite system\n",
"system1.removeMolecules(lig1)\n",
"system1.addMolecules(merged)"
"system1.addMolecules(merged)\n",
"# Make sure the box vectors are in reduced form.\n",
"system1.reduceBoxVectors()\n",
"system1.rotateBoxVectors()"
]
},
{
Expand All @@ -336,7 +339,11 @@
" \"merged_at_lam0.pdb\",\n",
" merged,\n",
" \"PDB\",\n",
" {\"coordinates\": \"coordinates0\", \"bond\": \"bond0\", \"element\": \"element0\"},\n",
" property_map={\n",
" \"coordinates\": \"coordinates0\",\n",
" \"bond\": \"bond0\",\n",
" \"element\": \"element0\",\n",
" },\n",
")\n",
"if is_somd2:\n",
" BSS.Stream.save(system1, root)\n",
Expand Down Expand Up @@ -426,9 +433,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.11"
"version": "3.12.2"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
9 changes: 8 additions & 1 deletion nodes/playground/prepareFEP.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,9 @@ def loadMapping(mapping_file):
# Create a composite system
system1.removeMolecules(lig1)
system1.addMolecules(merged)
# Make sure the box vectors are in reduced form.
system1.reduceBoxVectors()
system1.rotateBoxVectors()


# In[ ]:
Expand All @@ -273,7 +276,11 @@ def loadMapping(mapping_file):
"merged_at_lam0.pdb",
merged,
"PDB",
{"coordinates": "coordinates0", "bond": "bond0", "element": "element0"},
property_map={
"coordinates": "coordinates0",
"bond": "bond0",
"element": "element0",
},
)
if is_somd2:
BSS.Stream.save(system1, root)
Expand Down

0 comments on commit 598a674

Please sign in to comment.