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 ordering of charges in CHARGE section when using to_prmtop #1033

Closed
Closed
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
4 changes: 2 additions & 2 deletions openff/interchange/interop/amber/export/_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,8 +515,8 @@ def to_prmtop(interchange: "Interchange", file_path: Path | str):

prmtop.write("%FLAG CHARGE\n" "%FORMAT(5E16.8)\n")
charges = [
charge.m_as(unit.e) * AMBER_COULOMBS_CONSTANT
for charge in interchange["Electrostatics"].charges.values()
atom.partial_charge.m_as(unit.e) * AMBER_COULOMBS_CONSTANT
for atom in interchange.topology.atoms
]
text_blob = "".join([f"{val:16.8E}" for val in charges])
_write_text_blob(prmtop, text_blob)
Expand Down
Loading