Skip to content

Commit

Permalink
Drop support/testing for py3.8 (mosdef-hub#781)
Browse files Browse the repository at this point in the history
* drop testing for python 3.8

* convert residue number instead of residue idx when going to and from parmed
  • Loading branch information
daico007 committed Oct 30, 2023
1 parent 06dae53 commit b728c99
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
fail-fast: false
matrix:
os: [macOS-latest, ubuntu-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11"]
pydantic-version: ["2"]

defaults:
Expand Down
6 changes: 3 additions & 3 deletions gmso/external/convert_parmed.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ def from_parmed(structure, refer_type=True):
charge=atom.charge * u.elementary_charge,
position=[atom.xx, atom.xy, atom.xz] * u.angstrom,
atom_type=None,
residue=(residue.name, residue.idx + 1),
residue=(residue.name, residue.number),
element=element,
)
site.molecule = (residue.name, residue.idx + 1) if ind_res else None
site.molecule = (residue.name, residue.number) if ind_res else None
site.atom_type = (
copy.deepcopy(pmd_top_atomtypes[atom.atom_type])
if refer_type and isinstance(atom.atom_type, pmd.AtomType)
Expand Down Expand Up @@ -474,7 +474,7 @@ def to_parmed(top, refer_type=True):
structure.add_atom(
pmd_atom,
resname=site.residue.name,
resnum=site.residue.number - 1,
resnum=site.residue.number,
)
else:
structure.add_atom(pmd_atom, resname="RES", resnum=-1)
Expand Down

0 comments on commit b728c99

Please sign in to comment.