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

Box vectors not being saved properly in utils/equilibration.py #683

Open
zhang-ivy opened this issue Apr 13, 2023 · 0 comments
Open

Box vectors not being saved properly in utils/equilibration.py #683

zhang-ivy opened this issue Apr 13, 2023 · 0 comments

Comments

@zhang-ivy
Copy link
Contributor

zhang-ivy commented Apr 13, 2023

In the equilibration module, the equilibrated PDB is saved here: https://github.com/choderalab/openmmtools/blob/main/openmmtools/utils/equilibration.py#L154-L158

The box vectors for the equilibrated PDB are not saved properly, as they are the box vectors for the original solvated input PDB, not the final equilibrated positions.

Before saving the equilibrated PDB, we should add something like this that updates the box vectors in the topology:

box_vectors_formatted = []
for vec in box_vectors:
    box_vectors_formatted.append(openmm.Vec3(*[val.value_in_unit_system(unit.md_unit_system) for val in vec]))
box_vectors_final = unit.Quantity(value=box_vectors_formatted, unit=unit.nanometer)
topology.setPeriodicBoxVectors(box_vectors_final)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant