Skip to content

Commit

Permalink
Backport fixes from PR #292. [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
lohedges committed May 17, 2024
1 parent 5d81e1b commit 22d8b7c
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 22d8b7c

Please sign in to comment.