Skip to content

Commit

Permalink
Don't sort atom order in impropers
Browse files Browse the repository at this point in the history
  • Loading branch information
pckroon committed Nov 13, 2024
1 parent 9b1014f commit cbb71bd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions vermouth/gmx/itp.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,12 @@ def write_molecule_itp(molecule, outfile, header=(), moltype=None,
# object to distinguish them from the proper dihedrals. Yet, they
# should be written under the [ dihedrals ] section of the ITP file.
if name == 'impropers':
name = 'dihedrals'
outfile.write('[ {} ]\n'.format(name))
section_name = 'dihedrals'

Check warning on line 221 in vermouth/gmx/itp.py

View check run for this annotation

Codecov / codecov/patch

vermouth/gmx/itp.py#L221

Added line #L221 was not covered by tests
else:
section_name = name
outfile.write('[ {} ]\n'.format(section_name))
seen_sections.add(name)
for line in pre_section_lines.get(name, []):
for line in pre_section_lines.get(section_name, []):
outfile.write(line + '\n')
interactions_group_sorted = sorted(
interactions,
Expand Down

0 comments on commit cbb71bd

Please sign in to comment.