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/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 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'], } )