Skip to content

Commit

Permalink
everything is 'param' singular
Browse files Browse the repository at this point in the history
  • Loading branch information
jandom committed Nov 5, 2023
1 parent 52c4aff commit 9404601
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
24 changes: 12 additions & 12 deletions gromacs/fileformats/top.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,32 +514,32 @@ def _add_info(sys_or_mol, section, container):
blocks.AngleFunctionType.HARMONIC,
blocks.AngleFunctionType.G96_ANGLE,
}:
ang.gromacs["params"] = {
ang.gromacs["param"] = {
"tetha0": params[0],
"ktetha": params[1],
}
elif fu == blocks.AngleFunctionType.CROSS_BOND_BOND:
ang.gromacs["params"] = {
ang.gromacs["param"] = {
"r1e": params[0],
"r2e": params[1],
"krrprime": params[2],
}
elif fu == blocks.AngleFunctionType.CROSS_BOND_ANGLE:
ang.gromacs["params"] = {
ang.gromacs["param"] = {
"r1e": params[0],
"r2eprime": params[1],
"r3e": params[2],
"krtheta": params[3],
}
elif fu == blocks.AngleFunctionType.UREY_BRADLEY:
ang.gromacs["params"] = {
ang.gromacs["param"] = {
"tetha0": params[0],
"ktetha": params[1],
"s0": params[2],
"kub": params[3],
}
elif fu == blocks.AngleFunctionType.QUARTIC_ANGLE:
ang.gromacs["params"] = {
ang.gromacs["param"] = {
"tetha0": params[0],
"C1": params[1],
"C2": params[2],
Expand All @@ -548,17 +548,17 @@ def _add_info(sys_or_mol, section, container):
"C5": params[5],
}
elif fu == blocks.AngleFunctionType.TABULATED_ANGLE:
ang.gromacs["params"] = {
ang.gromacs["param"] = {
"table_number": params[0],
"k": params[1],
} # Assuming 'table number' is a parameter here
elif fu == blocks.AngleFunctionType.LINEAR_ANGLE:
ang.gromacs["params"] = {
ang.gromacs["param"] = {
"a0": params[0],
"klin": params[1],
}
elif fu == blocks.AngleFunctionType.RESTRICTED_BENDING:
ang.gromacs["params"] = {
ang.gromacs["param"] = {
"tetha0": params[0],
"ktheta": params[1],
}
Expand Down Expand Up @@ -1218,10 +1218,10 @@ def _make_angletypes(self, m):
at3 = ang.atype3
ang.convert("gromacs")

ktetha = ang.gromacs["params"]["ktetha"]
tetha0 = ang.gromacs["params"]["tetha0"]
kub = ang.gromacs["params"]["kub"]
s0 = ang.gromacs["params"]["s0"]
ktetha = ang.gromacs["param"]["ktetha"]
tetha0 = ang.gromacs["param"]["tetha0"]
kub = ang.gromacs["param"]["kub"]
s0 = ang.gromacs["param"]["s0"]

fu = ang.gromacs["func"]

Expand Down
2 changes: 1 addition & 1 deletion tests/fileformats/top/test_TOP.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ def test_angles(func_type: blocks.AngleFunctionType):
topol = gmx.fileformats.top.TOP("topol.top")
[molecule] = topol.molecules
[angle] = molecule.angles
assert len(angle.gromacs["params"].keys()) == func_type.num_params
assert len(angle.gromacs["param"].keys()) == func_type.num_params

0 comments on commit 9404601

Please sign in to comment.