Skip to content

Commit

Permalink
Simplify _add_to_molecules signature
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoshanuikabundi committed Jan 21, 2025
1 parent 3bfc10c commit a28c4fe
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 1 addition & 3 deletions openff/pablo/_pdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@ def topology_from_pdb(
this_molecule = _add_to_molecule(
molecules,
this_molecule,
res_atom_idcs,
chemical_data,
data,
use_canonical_names,
Expand Down Expand Up @@ -382,7 +381,6 @@ def _set_box_vectors(topology: Topology, data: PdbData):
def _add_to_molecule(
molecules: MutableSequence[Molecule],
this_molecule: Molecule,
res_atom_idcs: tuple[int, ...],
residue_match: ResidueMatch,
data: PdbData,
use_canonical_names: bool,
Expand All @@ -406,7 +404,7 @@ def _add_to_molecule(
"pdb_idx_to_mol_atom_idx",
{},
)
for pdb_index in res_atom_idcs:
for pdb_index in sorted(residue_match.res_atom_idcs):
atom_def = residue_match.atom(pdb_index)

if data.alt_loc[pdb_index] != "":
Expand Down
1 change: 0 additions & 1 deletion openff/pablo/_tests/test_pdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ def test_add_to_molecule_when_empty(cys_data: PdbData, cys_match: ResidueMatch):
molecules=molecules,
this_molecule=this_molecule,
residue_match=cys_match,
res_atom_idcs=tuple(cys_match.res_atom_idcs),
use_canonical_names=False,
)
assert mol_out is this_molecule
Expand Down

0 comments on commit a28c4fe

Please sign in to comment.