From 89b05969fd1a5ba4b642c18fd06349e9b4ade8c4 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Fri, 9 Jul 2021 19:18:51 -0400 Subject: [PATCH 1/2] enable unittests of ase and pymatgen --- .github/workflows/test.yml | 2 +- setup.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fa40e3e73..350186d9f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,7 +23,7 @@ jobs: - name: Install rdkit run: conda create -c conda-forge -n my-rdkit-env python=${{ matrix.python-version }} rdkit openbabel; - name: Install dependencies - run: source $CONDA/bin/activate my-rdkit-env && pip install .[amber] coverage codecov + run: source $CONDA/bin/activate my-rdkit-env && pip install .[amber,ase,pymatgen] coverage codecov - name: Test run: source $CONDA/bin/activate my-rdkit-env && cd tests && coverage run --source=../dpdata -m unittest && cd .. && coverage combine tests/.coverage && coverage report - name: Run codecov diff --git a/setup.py b/setup.py index 8fb19676c..59133b924 100644 --- a/setup.py +++ b/setup.py @@ -52,6 +52,7 @@ extras_require={ 'ase': ['ase'], 'amber': ['parmed'], + 'pymatgen': ['pymatgen'], } ) From cbf3ed8d0d7dc0eb46044cb5053ad733ccbb6abd Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Fri, 9 Jul 2021 19:50:21 -0400 Subject: [PATCH 2/2] support pymatgen v2022 --- dpdata/plugins/pymatgen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpdata/plugins/pymatgen.py b/dpdata/plugins/pymatgen.py index a047249e1..84d71f0e4 100644 --- a/dpdata/plugins/pymatgen.py +++ b/dpdata/plugins/pymatgen.py @@ -8,7 +8,7 @@ def to_system(self, data, **kwargs): """ structures = [] try: - from pymatgen import Structure + from pymatgen.core import Structure except ModuleNotFoundError as e: raise ImportError('No module pymatgen.Structure') from e