From 06dae53ae2aa2dc47fdb3f15cecded0d963864f4 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 27 Oct 2023 12:53:32 -0500 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate (#779) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 23.9.1 → 23.10.1](https://github.com/psf/black/compare/23.9.1...23.10.1) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c5c614745..e826df8fb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,7 +16,7 @@ repos: - id: trailing-whitespace exclude: 'setup.cfg|gmso/tests/files/.*' - repo: https://github.com/psf/black - rev: 23.9.1 + rev: 23.10.1 hooks: - id: black args: [--line-length=80] From b728c999b91f6c682d73183f1165abeb58f57097 Mon Sep 17 00:00:00 2001 From: Co Quach <43968221+daico007@users.noreply.github.com> Date: Mon, 30 Oct 2023 11:13:07 -0500 Subject: [PATCH 2/2] Drop support/testing for py3.8 (#781) * drop testing for python 3.8 * convert residue number instead of residue idx when going to and from parmed --- .github/workflows/CI.yaml | 2 +- gmso/external/convert_parmed.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 016fad62c..bdd0df47d 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -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: diff --git a/gmso/external/convert_parmed.py b/gmso/external/convert_parmed.py index c28d697d9..7b89812c7 100644 --- a/gmso/external/convert_parmed.py +++ b/gmso/external/convert_parmed.py @@ -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) @@ -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)